react-server-dom-webpack 19.2.7 → 19.2.9
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 +77 -46
- package/cjs/react-server-dom-webpack-client.browser.production.js +81 -66
- package/cjs/react-server-dom-webpack-client.edge.development.js +78 -43
- package/cjs/react-server-dom-webpack-client.edge.production.js +84 -69
- package/cjs/react-server-dom-webpack-client.node.development.js +78 -43
- package/cjs/react-server-dom-webpack-client.node.production.js +84 -69
- package/cjs/react-server-dom-webpack-server.browser.development.js +214 -123
- package/cjs/react-server-dom-webpack-server.browser.production.js +208 -117
- package/cjs/react-server-dom-webpack-server.edge.development.js +247 -144
- package/cjs/react-server-dom-webpack-server.edge.production.js +239 -141
- package/cjs/react-server-dom-webpack-server.node.development.js +268 -162
- package/cjs/react-server-dom-webpack-server.node.production.js +258 -156
- package/package.json +5 -5
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
14
|
function voidHandler() {}
|
|
15
|
+
function noop() {}
|
|
15
16
|
function getIteratorFn(maybeIterable) {
|
|
16
17
|
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
17
18
|
return null;
|
|
@@ -81,33 +82,44 @@
|
|
|
81
82
|
(currentView = new Uint8Array(2048)),
|
|
82
83
|
(writtenBytes = 0));
|
|
83
84
|
}
|
|
84
|
-
} else
|
|
85
|
-
|
|
86
|
-
(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
(currentView
|
|
110
|
-
(
|
|
85
|
+
} else if (0 === chunk.byteLength)
|
|
86
|
+
if (supportsArrayBufferDetached) {
|
|
87
|
+
if (chunk.buffer.detached)
|
|
88
|
+
throw Error(
|
|
89
|
+
"Cannot transport a detached buffer. This usually happens when trying to transport multiple buffer-spanning views on the same underyling buffer. Either reuse the exact same view by identity or copy the underlying buffer manually via `view.slice()`."
|
|
90
|
+
);
|
|
91
|
+
} else
|
|
92
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
93
|
+
(console.error(
|
|
94
|
+
"React encountered an empty buffer when writing in an environment that does not support ArrayBuffer.prototype.detached. This could be a security issue if the buffer was not actually empty. Please upgrade to a Node.js version that supports ArrayBuffer.prototype.detached."
|
|
95
|
+
),
|
|
96
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
97
|
+
else
|
|
98
|
+
2048 < chunk.byteLength
|
|
99
|
+
? (0 < writtenBytes &&
|
|
100
|
+
(writeToDestination(
|
|
101
|
+
destination,
|
|
102
|
+
currentView.subarray(0, writtenBytes)
|
|
103
|
+
),
|
|
104
|
+
(currentView = new Uint8Array(2048)),
|
|
105
|
+
(writtenBytes = 0)),
|
|
106
|
+
writeToDestination(destination, chunk))
|
|
107
|
+
: ((target = currentView.length - writtenBytes),
|
|
108
|
+
target < chunk.byteLength &&
|
|
109
|
+
(0 === target
|
|
110
|
+
? writeToDestination(destination, currentView)
|
|
111
|
+
: (currentView.set(chunk.subarray(0, target), writtenBytes),
|
|
112
|
+
(writtenBytes += target),
|
|
113
|
+
writeToDestination(destination, currentView),
|
|
114
|
+
(chunk = chunk.subarray(target))),
|
|
115
|
+
(currentView = new Uint8Array(2048)),
|
|
116
|
+
(writtenBytes = 0)),
|
|
117
|
+
currentView.set(chunk, writtenBytes),
|
|
118
|
+
(writtenBytes += chunk.byteLength),
|
|
119
|
+
2048 === writtenBytes &&
|
|
120
|
+
(writeToDestination(destination, currentView),
|
|
121
|
+
(currentView = new Uint8Array(2048)),
|
|
122
|
+
(writtenBytes = 0)));
|
|
111
123
|
return destinationHasCapacity;
|
|
112
124
|
}
|
|
113
125
|
function completeWriting(destination) {
|
|
@@ -573,7 +585,6 @@
|
|
|
573
585
|
temporaryReferences.set(reference, id);
|
|
574
586
|
return reference;
|
|
575
587
|
}
|
|
576
|
-
function noop() {}
|
|
577
588
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
578
589
|
index = thenableState[index];
|
|
579
590
|
void 0 === index
|
|
@@ -1501,7 +1512,7 @@
|
|
|
1501
1512
|
erroredTask(request, streamTask, reason),
|
|
1502
1513
|
enqueueFlush(request),
|
|
1503
1514
|
"function" === typeof iterator.throw &&
|
|
1504
|
-
iterator.throw(reason).then(
|
|
1515
|
+
iterator.throw(reason).then(noop, noop));
|
|
1505
1516
|
}
|
|
1506
1517
|
function abortIterable() {
|
|
1507
1518
|
if (0 === streamTask.status) {
|
|
@@ -1515,7 +1526,7 @@
|
|
|
1515
1526
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1516
1527
|
enqueueFlush(request));
|
|
1517
1528
|
"function" === typeof iterator.throw &&
|
|
1518
|
-
iterator.throw(reason).then(
|
|
1529
|
+
iterator.throw(reason).then(noop, noop);
|
|
1519
1530
|
}
|
|
1520
1531
|
}
|
|
1521
1532
|
var isIterator = iterable === iterator,
|
|
@@ -3174,13 +3185,35 @@
|
|
|
3174
3185
|
}
|
|
3175
3186
|
function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
|
|
3176
3187
|
debug ? request.pendingDebugChunks++ : request.pendingChunks++;
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3188
|
+
a: {
|
|
3189
|
+
var view = new Uint8Array(
|
|
3190
|
+
typedArray.buffer,
|
|
3191
|
+
typedArray.byteOffset,
|
|
3192
|
+
typedArray.byteLength
|
|
3193
|
+
);
|
|
3194
|
+
if (2048 < typedArray.byteLength) {
|
|
3195
|
+
if (
|
|
3196
|
+
0 !== typedArray.byteOffset ||
|
|
3197
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
3198
|
+
typedArray.buffer.resizable
|
|
3199
|
+
) {
|
|
3200
|
+
typedArray = view.slice();
|
|
3201
|
+
break a;
|
|
3202
|
+
}
|
|
3203
|
+
if (!supportsArrayBufferDetached) {
|
|
3204
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
3205
|
+
(console.error(
|
|
3206
|
+
"React copied a partial view into a fresh buffer as a safety precaution because the environment does not implement ArrayBuffer.prototype.detached. This negatively impacts performance. Please upgrade to a modern Node.js version."
|
|
3207
|
+
),
|
|
3208
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
3209
|
+
typedArray = view.slice();
|
|
3210
|
+
break a;
|
|
3211
|
+
}
|
|
3212
|
+
}
|
|
3213
|
+
typedArray = view;
|
|
3214
|
+
}
|
|
3215
|
+
view = typedArray.byteLength;
|
|
3216
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
3184
3217
|
debug
|
|
3185
3218
|
? request.completedDebugChunks.push(id, typedArray)
|
|
3186
3219
|
: request.completedRegularChunks.push(id, typedArray);
|
|
@@ -4353,13 +4386,38 @@
|
|
|
4353
4386
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
4354
4387
|
return moduleExports[metadata[2]];
|
|
4355
4388
|
}
|
|
4356
|
-
function appendBackingEntry(backingStore,
|
|
4357
|
-
backingStore.
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4389
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
4390
|
+
var prefix = backingStore.prefix;
|
|
4391
|
+
if (key.startsWith(prefix)) {
|
|
4392
|
+
switch (key[prefix.length]) {
|
|
4393
|
+
case "_":
|
|
4394
|
+
prefix = backingStore.referencedEntries;
|
|
4395
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
4396
|
+
prefix.push([key, value]);
|
|
4397
|
+
return;
|
|
4398
|
+
case "S":
|
|
4399
|
+
"string" === typeof value &&
|
|
4400
|
+
((prefix = backingStore.streamChunks),
|
|
4401
|
+
null === prefix &&
|
|
4402
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
4403
|
+
(backingStore = prefix.get(key)),
|
|
4404
|
+
void 0 === backingStore
|
|
4405
|
+
? prefix.set(key, [value])
|
|
4406
|
+
: backingStore.push(value));
|
|
4407
|
+
return;
|
|
4408
|
+
}
|
|
4409
|
+
"string" === typeof value
|
|
4410
|
+
? ((prefix = backingStore.stringChunks),
|
|
4411
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
4412
|
+
prefix.set(key, value))
|
|
4413
|
+
: ((prefix = backingStore.blobs),
|
|
4414
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
4415
|
+
prefix.set(key, value));
|
|
4416
|
+
}
|
|
4417
|
+
}
|
|
4418
|
+
function getBackingBlob(backingStore, key) {
|
|
4419
|
+
backingStore = backingStore.blobs;
|
|
4420
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
4363
4421
|
}
|
|
4364
4422
|
function ReactPromise(status, value, reason) {
|
|
4365
4423
|
this.status = status;
|
|
@@ -4672,9 +4730,11 @@
|
|
|
4672
4730
|
function getChunk(response, id) {
|
|
4673
4731
|
var chunks = response._chunks,
|
|
4674
4732
|
chunk = chunks.get(id);
|
|
4675
|
-
chunk
|
|
4676
|
-
|
|
4677
|
-
|
|
4733
|
+
if (!chunk) {
|
|
4734
|
+
chunk = response._prefix;
|
|
4735
|
+
var stringChunks = response._formData.stringChunks;
|
|
4736
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
4737
|
+
chunk =
|
|
4678
4738
|
"string" === typeof chunk
|
|
4679
4739
|
? new ReactPromise(
|
|
4680
4740
|
"resolved_model",
|
|
@@ -4683,8 +4743,9 @@
|
|
|
4683
4743
|
)
|
|
4684
4744
|
: response._closed
|
|
4685
4745
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
4686
|
-
: new ReactPromise("pending", null, null)
|
|
4687
|
-
chunks.set(id, chunk)
|
|
4746
|
+
: new ReactPromise("pending", null, null);
|
|
4747
|
+
chunks.set(id, chunk);
|
|
4748
|
+
}
|
|
4688
4749
|
return chunk;
|
|
4689
4750
|
}
|
|
4690
4751
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -4931,7 +4992,7 @@
|
|
|
4931
4992
|
Error("Already initialized typed array.")
|
|
4932
4993
|
)
|
|
4933
4994
|
);
|
|
4934
|
-
reference = response._formData
|
|
4995
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
4935
4996
|
if (initializingHandler) {
|
|
4936
4997
|
var handler = initializingHandler;
|
|
4937
4998
|
handler.deps++;
|
|
@@ -4975,15 +5036,17 @@
|
|
|
4975
5036
|
var chunks = response._chunks;
|
|
4976
5037
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
4977
5038
|
chunks.set(id, stream);
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
5039
|
+
chunks = response._prefix;
|
|
5040
|
+
response = response._formData.streamChunks;
|
|
5041
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
5042
|
+
if (void 0 !== id)
|
|
5043
|
+
for (response = 0; response < id.length; response++)
|
|
5044
|
+
(chunks = id[response]),
|
|
5045
|
+
"C" === chunks[0]
|
|
4983
5046
|
? controller.close(
|
|
4984
5047
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
4985
5048
|
)
|
|
4986
|
-
: controller.enqueueModel(chunks)
|
|
5049
|
+
: controller.enqueueModel(chunks);
|
|
4987
5050
|
}
|
|
4988
5051
|
function parseReadableStream(response, reference, type) {
|
|
4989
5052
|
function enqueue(value) {
|
|
@@ -5147,7 +5210,14 @@
|
|
|
5147
5210
|
});
|
|
5148
5211
|
return iterator;
|
|
5149
5212
|
}
|
|
5150
|
-
function parseModelString(
|
|
5213
|
+
function parseModelString(
|
|
5214
|
+
response,
|
|
5215
|
+
obj,
|
|
5216
|
+
key$jscomp$0,
|
|
5217
|
+
value,
|
|
5218
|
+
reference,
|
|
5219
|
+
arrayRoot
|
|
5220
|
+
) {
|
|
5151
5221
|
if ("$" === value[0]) {
|
|
5152
5222
|
switch (value[1]) {
|
|
5153
5223
|
case "$":
|
|
@@ -5167,7 +5237,7 @@
|
|
|
5167
5237
|
response,
|
|
5168
5238
|
arrayRoot,
|
|
5169
5239
|
obj,
|
|
5170
|
-
key,
|
|
5240
|
+
key$jscomp$0,
|
|
5171
5241
|
null,
|
|
5172
5242
|
loadServerReference$1
|
|
5173
5243
|
)
|
|
@@ -5187,41 +5257,44 @@
|
|
|
5187
5257
|
case "Q":
|
|
5188
5258
|
return (
|
|
5189
5259
|
(arrayRoot = value.slice(2)),
|
|
5190
|
-
getOutlinedModel(
|
|
5260
|
+
getOutlinedModel(
|
|
5261
|
+
response,
|
|
5262
|
+
arrayRoot,
|
|
5263
|
+
obj,
|
|
5264
|
+
key$jscomp$0,
|
|
5265
|
+
null,
|
|
5266
|
+
createMap
|
|
5267
|
+
)
|
|
5191
5268
|
);
|
|
5192
5269
|
case "W":
|
|
5193
5270
|
return (
|
|
5194
5271
|
(arrayRoot = value.slice(2)),
|
|
5195
|
-
getOutlinedModel(
|
|
5272
|
+
getOutlinedModel(
|
|
5273
|
+
response,
|
|
5274
|
+
arrayRoot,
|
|
5275
|
+
obj,
|
|
5276
|
+
key$jscomp$0,
|
|
5277
|
+
null,
|
|
5278
|
+
createSet
|
|
5279
|
+
)
|
|
5196
5280
|
);
|
|
5197
5281
|
case "K":
|
|
5198
|
-
key = value.slice(2);
|
|
5199
|
-
obj = response.
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
(
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
for (
|
|
5213
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
5214
|
-
i < reference.length;
|
|
5215
|
-
i++
|
|
5216
|
-
)
|
|
5217
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
5218
|
-
reference = response;
|
|
5219
|
-
reference.data.delete(value);
|
|
5220
|
-
reference.keyPointer++;
|
|
5221
|
-
} else if (value.startsWith(obj)) break;
|
|
5222
|
-
else response.keyPointer++;
|
|
5282
|
+
key$jscomp$0 = value.slice(2);
|
|
5283
|
+
obj = response._formData;
|
|
5284
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
5285
|
+
key$jscomp$0 = new FormData();
|
|
5286
|
+
arrayRoot = obj.referencedEntries;
|
|
5287
|
+
if (null !== arrayRoot) {
|
|
5288
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
5289
|
+
reference = arrayRoot[value];
|
|
5290
|
+
var key = reference[0];
|
|
5291
|
+
if (!key.startsWith(response)) break;
|
|
5292
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
5293
|
+
value++;
|
|
5294
|
+
}
|
|
5295
|
+
obj.keyPointer = value;
|
|
5223
5296
|
}
|
|
5224
|
-
return
|
|
5297
|
+
return key$jscomp$0;
|
|
5225
5298
|
case "i":
|
|
5226
5299
|
return (
|
|
5227
5300
|
(arrayRoot = value.slice(2)),
|
|
@@ -5229,7 +5302,7 @@
|
|
|
5229
5302
|
response,
|
|
5230
5303
|
arrayRoot,
|
|
5231
5304
|
obj,
|
|
5232
|
-
key,
|
|
5305
|
+
key$jscomp$0,
|
|
5233
5306
|
null,
|
|
5234
5307
|
extractIterator
|
|
5235
5308
|
)
|
|
@@ -5264,7 +5337,7 @@
|
|
|
5264
5337
|
ArrayBuffer,
|
|
5265
5338
|
1,
|
|
5266
5339
|
obj,
|
|
5267
|
-
key,
|
|
5340
|
+
key$jscomp$0,
|
|
5268
5341
|
arrayRoot
|
|
5269
5342
|
);
|
|
5270
5343
|
case "O":
|
|
@@ -5274,7 +5347,7 @@
|
|
|
5274
5347
|
Int8Array,
|
|
5275
5348
|
1,
|
|
5276
5349
|
obj,
|
|
5277
|
-
key,
|
|
5350
|
+
key$jscomp$0,
|
|
5278
5351
|
arrayRoot
|
|
5279
5352
|
);
|
|
5280
5353
|
case "o":
|
|
@@ -5284,7 +5357,7 @@
|
|
|
5284
5357
|
Uint8Array,
|
|
5285
5358
|
1,
|
|
5286
5359
|
obj,
|
|
5287
|
-
key,
|
|
5360
|
+
key$jscomp$0,
|
|
5288
5361
|
arrayRoot
|
|
5289
5362
|
);
|
|
5290
5363
|
case "U":
|
|
@@ -5294,7 +5367,7 @@
|
|
|
5294
5367
|
Uint8ClampedArray,
|
|
5295
5368
|
1,
|
|
5296
5369
|
obj,
|
|
5297
|
-
key,
|
|
5370
|
+
key$jscomp$0,
|
|
5298
5371
|
arrayRoot
|
|
5299
5372
|
);
|
|
5300
5373
|
case "S":
|
|
@@ -5304,7 +5377,7 @@
|
|
|
5304
5377
|
Int16Array,
|
|
5305
5378
|
2,
|
|
5306
5379
|
obj,
|
|
5307
|
-
key,
|
|
5380
|
+
key$jscomp$0,
|
|
5308
5381
|
arrayRoot
|
|
5309
5382
|
);
|
|
5310
5383
|
case "s":
|
|
@@ -5314,7 +5387,7 @@
|
|
|
5314
5387
|
Uint16Array,
|
|
5315
5388
|
2,
|
|
5316
5389
|
obj,
|
|
5317
|
-
key,
|
|
5390
|
+
key$jscomp$0,
|
|
5318
5391
|
arrayRoot
|
|
5319
5392
|
);
|
|
5320
5393
|
case "L":
|
|
@@ -5324,7 +5397,7 @@
|
|
|
5324
5397
|
Int32Array,
|
|
5325
5398
|
4,
|
|
5326
5399
|
obj,
|
|
5327
|
-
key,
|
|
5400
|
+
key$jscomp$0,
|
|
5328
5401
|
arrayRoot
|
|
5329
5402
|
);
|
|
5330
5403
|
case "l":
|
|
@@ -5334,7 +5407,7 @@
|
|
|
5334
5407
|
Uint32Array,
|
|
5335
5408
|
4,
|
|
5336
5409
|
obj,
|
|
5337
|
-
key,
|
|
5410
|
+
key$jscomp$0,
|
|
5338
5411
|
arrayRoot
|
|
5339
5412
|
);
|
|
5340
5413
|
case "G":
|
|
@@ -5344,7 +5417,7 @@
|
|
|
5344
5417
|
Float32Array,
|
|
5345
5418
|
4,
|
|
5346
5419
|
obj,
|
|
5347
|
-
key,
|
|
5420
|
+
key$jscomp$0,
|
|
5348
5421
|
arrayRoot
|
|
5349
5422
|
);
|
|
5350
5423
|
case "g":
|
|
@@ -5354,7 +5427,7 @@
|
|
|
5354
5427
|
Float64Array,
|
|
5355
5428
|
8,
|
|
5356
5429
|
obj,
|
|
5357
|
-
key,
|
|
5430
|
+
key$jscomp$0,
|
|
5358
5431
|
arrayRoot
|
|
5359
5432
|
);
|
|
5360
5433
|
case "M":
|
|
@@ -5364,7 +5437,7 @@
|
|
|
5364
5437
|
BigInt64Array,
|
|
5365
5438
|
8,
|
|
5366
5439
|
obj,
|
|
5367
|
-
key,
|
|
5440
|
+
key$jscomp$0,
|
|
5368
5441
|
arrayRoot
|
|
5369
5442
|
);
|
|
5370
5443
|
case "m":
|
|
@@ -5374,7 +5447,7 @@
|
|
|
5374
5447
|
BigUint64Array,
|
|
5375
5448
|
8,
|
|
5376
5449
|
obj,
|
|
5377
|
-
key,
|
|
5450
|
+
key$jscomp$0,
|
|
5378
5451
|
arrayRoot
|
|
5379
5452
|
);
|
|
5380
5453
|
case "V":
|
|
@@ -5384,13 +5457,13 @@
|
|
|
5384
5457
|
DataView,
|
|
5385
5458
|
1,
|
|
5386
5459
|
obj,
|
|
5387
|
-
key,
|
|
5460
|
+
key$jscomp$0,
|
|
5388
5461
|
arrayRoot
|
|
5389
5462
|
);
|
|
5390
5463
|
case "B":
|
|
5391
5464
|
return (
|
|
5392
5465
|
(obj = parseInt(value.slice(2), 16)),
|
|
5393
|
-
response._formData
|
|
5466
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
5394
5467
|
);
|
|
5395
5468
|
case "R":
|
|
5396
5469
|
return parseReadableStream(response, value, void 0);
|
|
@@ -5406,7 +5479,7 @@
|
|
|
5406
5479
|
response,
|
|
5407
5480
|
value,
|
|
5408
5481
|
obj,
|
|
5409
|
-
key,
|
|
5482
|
+
key$jscomp$0,
|
|
5410
5483
|
arrayRoot,
|
|
5411
5484
|
createModel
|
|
5412
5485
|
);
|
|
@@ -5425,11 +5498,20 @@
|
|
|
5425
5498
|
: new FormData(),
|
|
5426
5499
|
arraySizeLimit =
|
|
5427
5500
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
5428
|
-
chunks = new Map()
|
|
5501
|
+
chunks = new Map(),
|
|
5502
|
+
backingStore = {
|
|
5503
|
+
prefix: formFieldPrefix,
|
|
5504
|
+
referencedEntries: null,
|
|
5505
|
+
keyPointer: 0,
|
|
5506
|
+
stringChunks: null,
|
|
5507
|
+
streamChunks: null,
|
|
5508
|
+
blobs: null
|
|
5509
|
+
};
|
|
5510
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
5429
5511
|
return {
|
|
5430
5512
|
_bundlerConfig: bundlerConfig,
|
|
5431
5513
|
_prefix: formFieldPrefix,
|
|
5432
|
-
_formData:
|
|
5514
|
+
_formData: backingStore,
|
|
5433
5515
|
_chunks: chunks,
|
|
5434
5516
|
_closed: !1,
|
|
5435
5517
|
_closedReason: null,
|
|
@@ -5439,14 +5521,26 @@
|
|
|
5439
5521
|
};
|
|
5440
5522
|
}
|
|
5441
5523
|
function resolveField(response, key, value) {
|
|
5442
|
-
appendBackingEntry(response._formData, key, value);
|
|
5443
5524
|
var prefix = response._prefix;
|
|
5444
5525
|
if (key.startsWith(prefix)) {
|
|
5445
5526
|
var chunks = response._chunks;
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5527
|
+
if ("S" === key[prefix.length]) {
|
|
5528
|
+
if (
|
|
5529
|
+
key.length > prefix.length + 1 &&
|
|
5530
|
+
((prefix = +key.slice(prefix.length + 1)),
|
|
5531
|
+
(chunks = chunks.get(prefix)))
|
|
5532
|
+
) {
|
|
5533
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
5534
|
+
return;
|
|
5535
|
+
}
|
|
5536
|
+
} else if (
|
|
5537
|
+
((prefix = +key.slice(prefix.length)), (chunks = chunks.get(prefix)))
|
|
5538
|
+
) {
|
|
5539
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
5540
|
+
return;
|
|
5541
|
+
}
|
|
5449
5542
|
}
|
|
5543
|
+
appendBackingEntry(response._formData, value, key);
|
|
5450
5544
|
}
|
|
5451
5545
|
function close(response) {
|
|
5452
5546
|
reportGlobalError(response, Error("Connection closed."));
|
|
@@ -5654,6 +5748,12 @@
|
|
|
5654
5748
|
Symbol.for("react.postpone");
|
|
5655
5749
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
5656
5750
|
ASYNC_ITERATOR = Symbol.asyncIterator,
|
|
5751
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5752
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
5753
|
+
ArrayBuffer.prototype,
|
|
5754
|
+
"detached"
|
|
5755
|
+
),
|
|
5756
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
5657
5757
|
scheduleMicrotask = queueMicrotask,
|
|
5658
5758
|
currentView = null,
|
|
5659
5759
|
writtenBytes = 0,
|
|
@@ -6030,7 +6130,6 @@
|
|
|
6030
6130
|
jsxPropsParents = new WeakMap(),
|
|
6031
6131
|
jsxChildrenParents = new WeakMap(),
|
|
6032
6132
|
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
|
6033
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
6034
6133
|
doNotLimit = new WeakSet();
|
|
6035
6134
|
(function () {
|
|
6036
6135
|
async_hooks
|
|
@@ -6294,44 +6393,44 @@
|
|
|
6294
6393
|
};
|
|
6295
6394
|
exports.decodeAction = function (body, serverManifest) {
|
|
6296
6395
|
var formData = new FormData(),
|
|
6297
|
-
|
|
6298
|
-
seenActions = new Set();
|
|
6396
|
+
maybeActionKey = null;
|
|
6299
6397
|
body.forEach(function (value, key) {
|
|
6300
6398
|
key.startsWith("$ACTION_")
|
|
6301
6399
|
? key.startsWith("$ACTION_REF_")
|
|
6302
|
-
?
|
|
6303
|
-
|
|
6304
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
6305
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
6306
|
-
(action = loadServerReference(serverManifest, value)))
|
|
6307
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
6308
|
-
!seenActions.has(key) &&
|
|
6309
|
-
(seenActions.add(key),
|
|
6310
|
-
(value = key.slice(11)),
|
|
6311
|
-
(action = loadServerReference(serverManifest, {
|
|
6312
|
-
id: value,
|
|
6313
|
-
bound: null
|
|
6314
|
-
})))
|
|
6400
|
+
? (maybeActionKey = key)
|
|
6401
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
6315
6402
|
: formData.append(key, value);
|
|
6316
6403
|
});
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6404
|
+
if (null === maybeActionKey) return null;
|
|
6405
|
+
var actionKey = maybeActionKey,
|
|
6406
|
+
action = null;
|
|
6407
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
6408
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
6409
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
6410
|
+
(action = loadServerReference(serverManifest, body));
|
|
6411
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
6412
|
+
(body = actionKey.slice(11)),
|
|
6413
|
+
(action = loadServerReference(serverManifest, {
|
|
6414
|
+
id: body,
|
|
6415
|
+
bound: null
|
|
6416
|
+
}));
|
|
6417
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
6418
|
+
return action.then(function (fn) {
|
|
6419
|
+
return fn.bind(null, formData);
|
|
6420
|
+
});
|
|
6322
6421
|
};
|
|
6323
6422
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
6324
6423
|
var keyPath = body.get("$ACTION_KEY");
|
|
6325
6424
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
6326
|
-
var
|
|
6425
|
+
var actionKey = null;
|
|
6327
6426
|
body.forEach(function (value, key) {
|
|
6328
|
-
key.startsWith("$ACTION_REF_") &&
|
|
6329
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
6330
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
6427
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
6331
6428
|
});
|
|
6332
|
-
if (null ===
|
|
6333
|
-
var
|
|
6334
|
-
|
|
6429
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
6430
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
6431
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
6432
|
+
var referenceId = body.id;
|
|
6433
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
6335
6434
|
return null === bound
|
|
6336
6435
|
? null
|
|
6337
6436
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -6367,14 +6466,14 @@
|
|
|
6367
6466
|
_entry$value = _entry$value[1];
|
|
6368
6467
|
"string" === typeof _entry$value
|
|
6369
6468
|
? resolveField(response, entry, _entry$value)
|
|
6370
|
-
: appendBackingEntry(response._formData,
|
|
6469
|
+
: appendBackingEntry(response._formData, _entry$value, entry);
|
|
6371
6470
|
iterator.next().then(progress, error);
|
|
6372
6471
|
}
|
|
6373
6472
|
}
|
|
6374
6473
|
function error(reason) {
|
|
6375
6474
|
reportGlobalError(response, reason);
|
|
6376
6475
|
"function" === typeof iterator.throw &&
|
|
6377
|
-
iterator.throw(reason).then(
|
|
6476
|
+
iterator.throw(reason).then(noop, noop);
|
|
6378
6477
|
}
|
|
6379
6478
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
6380
6479
|
response = createResponse(
|
|
@@ -6397,26 +6496,33 @@
|
|
|
6397
6496
|
var current = head;
|
|
6398
6497
|
if (!current.complete) return;
|
|
6399
6498
|
try {
|
|
6400
|
-
var
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6499
|
+
var key = current.name,
|
|
6500
|
+
JSCompiler_temp_const = response._formData;
|
|
6501
|
+
var handle = current.file;
|
|
6502
|
+
if ("function" === typeof File)
|
|
6503
|
+
var JSCompiler_inline_result = new File(
|
|
6504
|
+
handle.chunks,
|
|
6505
|
+
handle.filename,
|
|
6506
|
+
{ type: handle.mime }
|
|
6507
|
+
);
|
|
6508
|
+
else {
|
|
6509
|
+
var scratch = new FormData();
|
|
6510
|
+
scratch.append(
|
|
6511
|
+
"file",
|
|
6512
|
+
new Blob(handle.chunks, { type: handle.mime }),
|
|
6513
|
+
handle.filename
|
|
6514
|
+
);
|
|
6515
|
+
JSCompiler_inline_result = scratch.get("file");
|
|
6516
|
+
}
|
|
6517
|
+
appendBackingEntry(
|
|
6518
|
+
JSCompiler_temp_const,
|
|
6519
|
+
JSCompiler_inline_result,
|
|
6520
|
+
key
|
|
6521
|
+
);
|
|
6412
6522
|
var queuedFields = current.queuedFields;
|
|
6413
6523
|
if (null !== queuedFields)
|
|
6414
|
-
for (
|
|
6415
|
-
resolveField(
|
|
6416
|
-
response$jscomp$0,
|
|
6417
|
-
queuedFields[response],
|
|
6418
|
-
queuedFields[response + 1]
|
|
6419
|
-
);
|
|
6524
|
+
for (var i = 0; i < queuedFields.length; i += 2)
|
|
6525
|
+
resolveField(response, queuedFields[i], queuedFields[i + 1]);
|
|
6420
6526
|
} catch (error) {
|
|
6421
6527
|
busboyStream.destroy(error);
|
|
6422
6528
|
return;
|
|
@@ -6424,9 +6530,9 @@
|
|
|
6424
6530
|
head = current.next;
|
|
6425
6531
|
}
|
|
6426
6532
|
tail = null;
|
|
6427
|
-
bodyFinished && !closed && ((closed = !0), close(response
|
|
6533
|
+
bodyFinished && !closed && ((closed = !0), close(response));
|
|
6428
6534
|
}
|
|
6429
|
-
var response
|
|
6535
|
+
var response = createResponse(
|
|
6430
6536
|
webpackMap,
|
|
6431
6537
|
"",
|
|
6432
6538
|
options ? options.temporaryReferences : void 0,
|
|
@@ -6443,7 +6549,7 @@
|
|
|
6443
6549
|
tail.queuedFields.push(name, value);
|
|
6444
6550
|
else
|
|
6445
6551
|
try {
|
|
6446
|
-
resolveField(response
|
|
6552
|
+
resolveField(response, name, value);
|
|
6447
6553
|
} catch (error) {
|
|
6448
6554
|
busboyStream.destroy(error);
|
|
6449
6555
|
}
|
|
@@ -6489,14 +6595,14 @@
|
|
|
6489
6595
|
flush();
|
|
6490
6596
|
closed ||
|
|
6491
6597
|
reportGlobalError(
|
|
6492
|
-
response
|
|
6598
|
+
response,
|
|
6493
6599
|
Error("Reply finished with incomplete file part.")
|
|
6494
6600
|
);
|
|
6495
6601
|
});
|
|
6496
6602
|
busboyStream.on("error", function (err) {
|
|
6497
|
-
reportGlobalError(response
|
|
6603
|
+
reportGlobalError(response, err);
|
|
6498
6604
|
});
|
|
6499
|
-
return getChunk(response
|
|
6605
|
+
return getChunk(response, 0);
|
|
6500
6606
|
};
|
|
6501
6607
|
exports.prerender = function (model, webpackMap, options) {
|
|
6502
6608
|
return new Promise(function (resolve, reject) {
|