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
@@ -151,7 +151,7 @@ chunks, nonce) {
|
|
151
151
|
}
|
152
152
|
}
|
153
153
|
|
154
|
-
const ReactDOMSharedInternals = ReactDOM.
|
154
|
+
const ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
155
155
|
|
156
156
|
function getCrossOriginString(input) {
|
157
157
|
if (typeof input === 'string') {
|
@@ -162,16 +162,18 @@ function getCrossOriginString(input) {
|
|
162
162
|
}
|
163
163
|
|
164
164
|
// This client file is in the shared folder because it applies to both SSR and browser contexts.
|
165
|
-
const ReactDOMCurrentDispatcher = ReactDOMSharedInternals.ReactDOMCurrentDispatcher;
|
166
165
|
function dispatchHint(code, model) {
|
167
|
-
const dispatcher =
|
166
|
+
const dispatcher = ReactDOMSharedInternals.d;
|
167
|
+
/* ReactDOMCurrentDispatcher */
|
168
168
|
|
169
169
|
switch (code) {
|
170
170
|
case 'D':
|
171
171
|
{
|
172
172
|
const refined = refineModel(code, model);
|
173
173
|
const href = refined;
|
174
|
-
dispatcher.
|
174
|
+
dispatcher.D(
|
175
|
+
/* prefetchDNS */
|
176
|
+
href);
|
175
177
|
return;
|
176
178
|
}
|
177
179
|
|
@@ -181,11 +183,15 @@ function dispatchHint(code, model) {
|
|
181
183
|
|
182
184
|
if (typeof refined === 'string') {
|
183
185
|
const href = refined;
|
184
|
-
dispatcher.
|
186
|
+
dispatcher.C(
|
187
|
+
/* preconnect */
|
188
|
+
href);
|
185
189
|
} else {
|
186
190
|
const href = refined[0];
|
187
191
|
const crossOrigin = refined[1];
|
188
|
-
dispatcher.
|
192
|
+
dispatcher.C(
|
193
|
+
/* preconnect */
|
194
|
+
href, crossOrigin);
|
189
195
|
}
|
190
196
|
|
191
197
|
return;
|
@@ -199,9 +205,13 @@ function dispatchHint(code, model) {
|
|
199
205
|
|
200
206
|
if (refined.length === 3) {
|
201
207
|
const options = refined[2];
|
202
|
-
dispatcher.
|
208
|
+
dispatcher.L(
|
209
|
+
/* preload */
|
210
|
+
href, as, options);
|
203
211
|
} else {
|
204
|
-
dispatcher.
|
212
|
+
dispatcher.L(
|
213
|
+
/* preload */
|
214
|
+
href, as);
|
205
215
|
}
|
206
216
|
|
207
217
|
return;
|
@@ -213,44 +223,56 @@ function dispatchHint(code, model) {
|
|
213
223
|
|
214
224
|
if (typeof refined === 'string') {
|
215
225
|
const href = refined;
|
216
|
-
dispatcher.
|
226
|
+
dispatcher.m(
|
227
|
+
/* preloadModule */
|
228
|
+
href);
|
217
229
|
} else {
|
218
230
|
const href = refined[0];
|
219
231
|
const options = refined[1];
|
220
|
-
dispatcher.
|
232
|
+
dispatcher.m(
|
233
|
+
/* preloadModule */
|
234
|
+
href, options);
|
221
235
|
}
|
222
236
|
|
223
237
|
return;
|
224
238
|
}
|
225
239
|
|
226
|
-
case '
|
240
|
+
case 'X':
|
227
241
|
{
|
228
242
|
const refined = refineModel(code, model);
|
229
243
|
|
230
244
|
if (typeof refined === 'string') {
|
231
245
|
const href = refined;
|
232
|
-
dispatcher.
|
246
|
+
dispatcher.X(
|
247
|
+
/* preinitScript */
|
248
|
+
href);
|
233
249
|
} else {
|
234
250
|
const href = refined[0];
|
235
|
-
const
|
236
|
-
|
237
|
-
|
251
|
+
const options = refined[1];
|
252
|
+
dispatcher.X(
|
253
|
+
/* preinitScript */
|
254
|
+
href, options);
|
238
255
|
}
|
239
256
|
|
240
257
|
return;
|
241
258
|
}
|
242
259
|
|
243
|
-
case '
|
260
|
+
case 'S':
|
244
261
|
{
|
245
262
|
const refined = refineModel(code, model);
|
246
263
|
|
247
264
|
if (typeof refined === 'string') {
|
248
265
|
const href = refined;
|
249
|
-
dispatcher.
|
266
|
+
dispatcher.S(
|
267
|
+
/* preinitStyle */
|
268
|
+
href);
|
250
269
|
} else {
|
251
270
|
const href = refined[0];
|
252
|
-
const
|
253
|
-
|
271
|
+
const precedence = refined[1] === 0 ? undefined : refined[1];
|
272
|
+
const options = refined.length === 3 ? refined[2] : undefined;
|
273
|
+
dispatcher.S(
|
274
|
+
/* preinitStyle */
|
275
|
+
href, precedence, options);
|
254
276
|
}
|
255
277
|
|
256
278
|
return;
|
@@ -262,11 +284,15 @@ function dispatchHint(code, model) {
|
|
262
284
|
|
263
285
|
if (typeof refined === 'string') {
|
264
286
|
const href = refined;
|
265
|
-
dispatcher.
|
287
|
+
dispatcher.M(
|
288
|
+
/* preinitModuleScript */
|
289
|
+
href);
|
266
290
|
} else {
|
267
291
|
const href = refined[0];
|
268
292
|
const options = refined[1];
|
269
|
-
dispatcher.
|
293
|
+
dispatcher.M(
|
294
|
+
/* preinitModuleScript */
|
295
|
+
href, options);
|
270
296
|
}
|
271
297
|
|
272
298
|
return;
|
@@ -279,14 +305,14 @@ function refineModel(code, model) {
|
|
279
305
|
return model;
|
280
306
|
}
|
281
307
|
function preinitScriptForSSR(href, nonce, crossOrigin) {
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
}
|
308
|
+
ReactDOMSharedInternals.d
|
309
|
+
/* ReactDOMCurrentDispatcher */
|
310
|
+
.X(
|
311
|
+
/* preinitScript */
|
312
|
+
href, {
|
313
|
+
crossOrigin: getCrossOriginString(crossOrigin),
|
314
|
+
nonce
|
315
|
+
});
|
290
316
|
}
|
291
317
|
|
292
318
|
// ATTENTION
|
@@ -1222,7 +1248,8 @@ function reportGlobalError(response, error) {
|
|
1222
1248
|
});
|
1223
1249
|
}
|
1224
1250
|
|
1225
|
-
function createElement(type, key, props)
|
1251
|
+
function createElement(type, key, props, owner) // DEV-only
|
1252
|
+
{
|
1226
1253
|
let element;
|
1227
1254
|
|
1228
1255
|
{
|
@@ -1261,7 +1288,7 @@ function getChunk(response, id) {
|
|
1261
1288
|
return chunk;
|
1262
1289
|
}
|
1263
1290
|
|
1264
|
-
function createModelResolver(chunk, parentObject, key, cyclic) {
|
1291
|
+
function createModelResolver(chunk, parentObject, key, cyclic, response, map) {
|
1265
1292
|
let blocked;
|
1266
1293
|
|
1267
1294
|
if (initializingChunkBlockedModel) {
|
@@ -1278,11 +1305,11 @@ function createModelResolver(chunk, parentObject, key, cyclic) {
|
|
1278
1305
|
}
|
1279
1306
|
|
1280
1307
|
return value => {
|
1281
|
-
parentObject[key] = value; // If this is the root object for a model reference, where `blocked.value`
|
1308
|
+
parentObject[key] = map(response, value); // If this is the root object for a model reference, where `blocked.value`
|
1282
1309
|
// is a stale `null`, the resolved value can be used directly.
|
1283
1310
|
|
1284
1311
|
if (key === '' && blocked.value === null) {
|
1285
|
-
blocked.value =
|
1312
|
+
blocked.value = parentObject[key];
|
1286
1313
|
}
|
1287
1314
|
|
1288
1315
|
blocked.deps--;
|
@@ -1336,28 +1363,60 @@ function createServerReferenceProxy(response, metaData) {
|
|
1336
1363
|
return proxy;
|
1337
1364
|
}
|
1338
1365
|
|
1339
|
-
function getOutlinedModel(response, id) {
|
1366
|
+
function getOutlinedModel(response, id, parentObject, key, map) {
|
1340
1367
|
const chunk = getChunk(response, id);
|
1341
1368
|
|
1342
1369
|
switch (chunk.status) {
|
1343
1370
|
case RESOLVED_MODEL:
|
1344
1371
|
initializeModelChunk(chunk);
|
1345
1372
|
break;
|
1373
|
+
|
1374
|
+
case RESOLVED_MODULE:
|
1375
|
+
initializeModuleChunk(chunk);
|
1376
|
+
break;
|
1346
1377
|
} // The status might have changed after initialization.
|
1347
1378
|
|
1348
1379
|
|
1349
1380
|
switch (chunk.status) {
|
1350
1381
|
case INITIALIZED:
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1382
|
+
const chunkValue = map(response, chunk.value);
|
1383
|
+
|
1384
|
+
return chunkValue;
|
1385
|
+
|
1386
|
+
case PENDING:
|
1387
|
+
case BLOCKED:
|
1388
|
+
case CYCLIC:
|
1389
|
+
const parentChunk = initializingChunk;
|
1390
|
+
chunk.then(createModelResolver(parentChunk, parentObject, key, chunk.status === CYCLIC, response, map), createModelReject(parentChunk));
|
1391
|
+
return null;
|
1355
1392
|
|
1356
1393
|
default:
|
1357
1394
|
throw chunk.reason;
|
1358
1395
|
}
|
1359
1396
|
}
|
1360
1397
|
|
1398
|
+
function createMap(response, model) {
|
1399
|
+
return new Map(model);
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
function createSet(response, model) {
|
1403
|
+
return new Set(model);
|
1404
|
+
}
|
1405
|
+
|
1406
|
+
function createFormData(response, model) {
|
1407
|
+
const formData = new FormData();
|
1408
|
+
|
1409
|
+
for (let i = 0; i < model.length; i++) {
|
1410
|
+
formData.append(model[i][0], model[i][1]);
|
1411
|
+
}
|
1412
|
+
|
1413
|
+
return formData;
|
1414
|
+
}
|
1415
|
+
|
1416
|
+
function createModel(response, model) {
|
1417
|
+
return model;
|
1418
|
+
}
|
1419
|
+
|
1361
1420
|
function parseModelString(response, parentObject, key, value) {
|
1362
1421
|
if (value[0] === '$') {
|
1363
1422
|
if (value === '$') {
|
@@ -1405,8 +1464,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
1405
1464
|
{
|
1406
1465
|
// Server Reference
|
1407
1466
|
const id = parseInt(value.slice(2), 16);
|
1408
|
-
|
1409
|
-
return createServerReferenceProxy(response, metadata);
|
1467
|
+
return getOutlinedModel(response, id, parentObject, key, createServerReferenceProxy);
|
1410
1468
|
}
|
1411
1469
|
|
1412
1470
|
case 'T':
|
@@ -1426,16 +1484,27 @@ function parseModelString(response, parentObject, key, value) {
|
|
1426
1484
|
{
|
1427
1485
|
// Map
|
1428
1486
|
const id = parseInt(value.slice(2), 16);
|
1429
|
-
|
1430
|
-
return new Map(data);
|
1487
|
+
return getOutlinedModel(response, id, parentObject, key, createMap);
|
1431
1488
|
}
|
1432
1489
|
|
1433
1490
|
case 'W':
|
1434
1491
|
{
|
1435
1492
|
// Set
|
1436
1493
|
const id = parseInt(value.slice(2), 16);
|
1437
|
-
|
1438
|
-
|
1494
|
+
return getOutlinedModel(response, id, parentObject, key, createSet);
|
1495
|
+
}
|
1496
|
+
|
1497
|
+
case 'B':
|
1498
|
+
{
|
1499
|
+
|
1500
|
+
return undefined;
|
1501
|
+
}
|
1502
|
+
|
1503
|
+
case 'K':
|
1504
|
+
{
|
1505
|
+
// FormData
|
1506
|
+
const id = parseInt(value.slice(2), 16);
|
1507
|
+
return getOutlinedModel(response, id, parentObject, key, createFormData);
|
1439
1508
|
}
|
1440
1509
|
|
1441
1510
|
case 'I':
|
@@ -1485,35 +1554,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
1485
1554
|
{
|
1486
1555
|
// We assume that anything else is a reference ID.
|
1487
1556
|
const id = parseInt(value.slice(1), 16);
|
1488
|
-
|
1489
|
-
|
1490
|
-
switch (chunk.status) {
|
1491
|
-
case RESOLVED_MODEL:
|
1492
|
-
initializeModelChunk(chunk);
|
1493
|
-
break;
|
1494
|
-
|
1495
|
-
case RESOLVED_MODULE:
|
1496
|
-
initializeModuleChunk(chunk);
|
1497
|
-
break;
|
1498
|
-
} // The status might have changed after initialization.
|
1499
|
-
|
1500
|
-
|
1501
|
-
switch (chunk.status) {
|
1502
|
-
case INITIALIZED:
|
1503
|
-
const chunkValue = chunk.value;
|
1504
|
-
|
1505
|
-
return chunkValue;
|
1506
|
-
|
1507
|
-
case PENDING:
|
1508
|
-
case BLOCKED:
|
1509
|
-
case CYCLIC:
|
1510
|
-
const parentChunk = initializingChunk;
|
1511
|
-
chunk.then(createModelResolver(parentChunk, parentObject, key, chunk.status === CYCLIC), createModelReject(parentChunk));
|
1512
|
-
return null;
|
1513
|
-
|
1514
|
-
default:
|
1515
|
-
throw chunk.reason;
|
1516
|
-
}
|
1557
|
+
return getOutlinedModel(response, id, parentObject, key, createModel);
|
1517
1558
|
}
|
1518
1559
|
}
|
1519
1560
|
}
|
@@ -7,37 +7,38 @@
|
|
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 r=require("util"),t=require("react-dom"),u={stream:!0};function aa(a,b){var
|
11
|
-
function ba(a){var b=x.get(a.specifier);if(b)return"fulfilled"===b.status?null:b;var
|
12
|
-
function ca(a,b,
|
13
|
-
function
|
14
|
-
function ia(a,b,d,
|
15
|
-
null!==q&&"function"===typeof q.then){
|
16
|
-
var ka=e;k
|
17
|
-
return"$T"+E(
|
18
|
-
return"$T"+E(
|
19
|
-
function ma(a){var b,d
|
20
|
-
function na(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
|
21
|
-
function
|
22
|
-
function J(a,b,
|
23
|
-
function K(){var a=oa.apply(this,arguments),b=F.get(this);if(b){var
|
24
|
-
function L(a,b,d
|
25
|
-
function ra(a){switch(a.status){case "resolved_model":M(a);break;case "resolved_module":P(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
|
26
|
-
function S(a,b){if("pending"===a.status||"blocked"===a.status){var
|
27
|
-
function M(a){var b=U,
|
28
|
-
function P(a){try{var b=a.value,
|
29
|
-
function sa(a,b,d,
|
30
|
-
function ua(a,b){function
|
31
|
-
function
|
32
|
-
if(0
|
33
|
-
|
34
|
-
|
35
|
-
function
|
36
|
-
function
|
37
|
-
|
38
|
-
|
39
|
-
case
|
40
|
-
e
|
41
|
-
|
10
|
+
'use strict';var r=require("util"),t=require("react-dom"),u={stream:!0};function aa(a,b){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{specifier:a.specifier,name:c,async:4===b.length}}var x=new Map;
|
11
|
+
function ba(a){var b=x.get(a.specifier);if(b)return"fulfilled"===b.status?null:b;var c=import(a.specifier);a.async&&(c=c.then(function(d){return d.default}));c.then(function(d){var f=c;f.status="fulfilled";f.value=d},function(d){var f=c;f.status="rejected";f.reason=d});x.set(a.specifier,c);return c}
|
12
|
+
function ca(a,b,c){if(null!==a)for(var d=1;d<b.length;d+=2){var f=c,g=y.d,k=g.X,l=a.prefix+b[d];var e=a.crossOrigin;e="string"===typeof e?"use-credentials"===e?e:"":void 0;k.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"),C=Symbol.iterator;function da(a){if(null===a||"object"!==typeof a)return null;a=C&&a[C]||a["@@iterator"];return"function"===typeof a?a:null}var ea=Array.isArray,D=Object.getPrototypeOf;
|
13
|
+
function E(a,b){var c=a.length;a.push(b);return c}var fa=Object.prototype,F=new WeakMap;function ha(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
|
14
|
+
function ia(a,b,c,d,f){function g(n,h){if(null===h)return null;if("object"===typeof h){switch(h.$$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,h).toString(16);case A:n=h._payload;var I=h._init;null===e&&(e=new FormData);l++;try{var m=I(n),p=k++,v=JSON.stringify(m,g);e.append(b+p,v);return"$"+p.toString(16)}catch(q){if("object"===typeof q&&
|
15
|
+
null!==q&&"function"===typeof q.then){l++;var N=k++;m=function(){try{var w=JSON.stringify(h,g),B=e;B.append(b+N,w);l--;0===l&&d(B)}catch(ja){f(ja)}};q.then(m,m);return"$"+N.toString(16)}f(q);return null}finally{l--}}if("function"===typeof h.then){null===e&&(e=new FormData);l++;var O=k++;h.then(function(q){try{var w=JSON.stringify(q,g);q=e;q.append(b+O,w);l--;0===l&&d(q)}catch(B){f(B)}},function(q){f(q)});return"$@"+O.toString(16)}if(ea(h))return h;if(h instanceof FormData){null===e&&(e=new FormData);
|
16
|
+
var ka=e;m=k++;var la=b+m+"_";h.forEach(function(q,w){ka.append(la+w,q)});return"$K"+m.toString(16)}if(h instanceof Map)return m=JSON.stringify(Array.from(h),g),null===e&&(e=new FormData),p=k++,e.append(b+p,m),"$Q"+p.toString(16);if(h instanceof Set)return m=JSON.stringify(Array.from(h),g),null===e&&(e=new FormData),p=k++,e.append(b+p,m),"$W"+p.toString(16);if(da(h))return Array.from(h);m=D(h);if(m!==fa&&(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.");
|
17
|
+
return"$T"+E(c,h).toString(16)}return h}if("string"===typeof h){if("Z"===h[h.length-1]&&this[n]instanceof Date)return"$D"+h;m="$"===h[0]?"$"+h:h;return m}if("boolean"===typeof h)return h;if("number"===typeof h)return ha(h);if("undefined"===typeof h)return"$undefined";if("function"===typeof h){m=F.get(h);if(void 0!==m)return m=JSON.stringify(m,g),null===e&&(e=new FormData),p=k++,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.");
|
18
|
+
return"$T"+E(c,h).toString(16)}if("symbol"===typeof h){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,h).toString(16)}if("bigint"===typeof h)return"$n"+h.toString(10);throw Error("Type "+typeof h+" is not supported as an argument to a Server Function.");}var k=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;
|
19
|
+
function ma(a){var b,c,d=new Promise(function(f,g){b=f;c=g});ia(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}
|
20
|
+
function na(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=ma(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}}
|
21
|
+
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;}}
|
22
|
+
function J(a,b,c){Object.defineProperties(a,{$$FORM_ACTION:{value:void 0===c?na: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 oa=Function.prototype.bind,pa=Array.prototype.slice;
|
23
|
+
function K(){var a=oa.apply(this,arguments),b=F.get(this);if(b){var c=pa.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 qa(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}
|
24
|
+
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":P(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)}};
|
25
|
+
function ra(a){switch(a.status){case "resolved_model":M(a);break;case "resolved_module":P(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)}}
|
26
|
+
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&&(P(a),R(a,c,d))}}var U=null,V=null;
|
27
|
+
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(k){a.status="rejected",a.reason=k}finally{U=b,V=c}}
|
28
|
+
function P(a){try{var b=a.value,c=x.get(b.specifier);if("fulfilled"===c.status)var d=c.value;else throw c.reason;var f="*"===b.name?d:""===b.name?d.default:d[b.name];a.status="fulfilled";a.value=f}catch(g){a.status="rejected",a.reason=g}}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}
|
29
|
+
function sa(a,b,c,d,f,g){if(V){var k=V;d||k.deps++}else k=V={deps:d?0:1,value:null};return function(l){b[c]=g(f,l);""===c&&null===k.value&&(k.value=b[c]);k.deps--;0===k.deps&&"blocked"===a.status&&(l=a.value,a.status="fulfilled",a.value=k.value,null!==l&&Q(l,k.value))}}function ta(a){return function(b){return S(a,b)}}
|
30
|
+
function ua(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(k){return d(b.id,k.concat(f))}):d(b.id,f)}var d=a._callServer;J(c,b,a._encodeFormAction);return c}
|
31
|
+
function Y(a,b,c,d,f){b=X(a,b);switch(b.status){case "resolved_model":M(b);break;case "resolved_module":P(b)}switch(b.status){case "fulfilled":return f(a,b.value);case "pending":case "blocked":case "cyclic":var g=U;b.then(sa(g,c,d,"cyclic"===b.status,a,f),ta(g));return null;default:throw b.reason;}}function va(a,b){return new Map(b)}function wa(a,b){return new Set(b)}function xa(a,b){a=new FormData;for(var c=0;c<b.length;c++)a.append(b[c][0],b[c][1]);return a}function ya(a,b){return b}
|
32
|
+
function za(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:ra};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,ua);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.");
|
33
|
+
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,va);case "W":return d=parseInt(d.slice(2),16),Y(a,d,b,c,wa);case "B":return;case "K":return d=parseInt(d.slice(2),16),Y(a,d,b,c,xa);case "I":return Infinity;case "-":return"$-0"===d?-0:-Infinity;case "N":return NaN;case "u":return;
|
34
|
+
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,ya)}}return d}function Aa(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}
|
35
|
+
function Ba(a,b,c,d,f,g){var k=new Map;a={_bundlerConfig:a,_moduleLoading:b,_callServer:void 0!==c?c:Aa,_encodeFormAction:d,_nonce:f,_chunks:k,_stringDecoder:new r.TextDecoder,_fromJSON:null,_rowState:0,_rowID:0,_rowTag:0,_rowLength:0,_buffer:[],_tempRefs:g};a._fromJSON=Ca(a);return a}
|
36
|
+
function Da(a,b,c){var d=a._chunks,f=d.get(b);c=JSON.parse(c,a._fromJSON);var g=aa(a._bundlerConfig,c);ca(a._moduleLoading,c[1],a._nonce);if(c=ba(g)){if(f){var k=f;k.status="blocked"}else k=new L("blocked",null,null,a),d.set(b,k);c.then(function(){return T(k,g)},function(l){return S(k,l)})}else f?T(f,g):d.set(b,new L("resolved_module",g,null,a))}
|
37
|
+
function Ca(a){return function(b,c){return"string"===typeof c?za(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.");}
|
38
|
+
exports.createFromNodeStream=function(a,b,c){var d=Ba(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,k=d._rowState,l=d._rowID,e=d._rowTag,n=d._rowLength,h=d._buffer,I=f.length;g<I;){var m=-1;switch(k){case 0:m=f[g++];58===m?k=1:l=l<<4|(96<m?m-87:m-48);continue;case 1:k=f[g];84===k?(e=k,k=2,g++):64<k&&91>k?(e=k,k=3,g++):(e=0,k=3);continue;case 2:m=f[g++];44===m?k=4:n=n<<4|(96<m?m-87:m-48);continue;case 3:m=
|
39
|
+
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<h.length;v++)e+=p.decode(h[v],u);e+=p.decode(n);switch(g){case 73:Da(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],
|
40
|
+
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.");
|
41
|
+
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",
|
42
|
+
l.value=e,null!==n&&(M(l),R(l,n,g)))):n.set(l,new L("resolved_model",e,null,d))}g=m;3===k&&g++;n=l=e=k=0;h.length=0}else{f=new Uint8Array(f.buffer,p,f.byteLength-g);h.push(f);n-=f.byteLength;break}}d._rowState=k;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 qa(a,Z)};
|
42
43
|
|
43
44
|
//# sourceMappingURL=react-server-dom-webpack-client.node.unbundled.production.min.js.map
|