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;
|
|
@@ -47,31 +48,39 @@
|
|
|
47
48
|
});
|
|
48
49
|
}
|
|
49
50
|
function writeChunkAndReturn(destination, chunk) {
|
|
50
|
-
if (0
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
(
|
|
54
|
-
|
|
51
|
+
if (0 === chunk.byteLength)
|
|
52
|
+
if (supportsArrayBufferDetached) {
|
|
53
|
+
if (chunk.buffer.detached)
|
|
54
|
+
throw Error(
|
|
55
|
+
"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()`."
|
|
56
|
+
);
|
|
57
|
+
} else
|
|
58
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
59
|
+
(console.error(
|
|
60
|
+
"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 use a modern Edge runtime that supports ArrayBuffer.prototype.detached."
|
|
55
61
|
),
|
|
56
|
-
(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(currentView
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
63
|
+
else if (2048 < chunk.byteLength)
|
|
64
|
+
0 < writtenBytes &&
|
|
65
|
+
(destination.enqueue(
|
|
66
|
+
new Uint8Array(currentView.buffer, 0, writtenBytes)
|
|
67
|
+
),
|
|
68
|
+
(currentView = new Uint8Array(2048)),
|
|
69
|
+
(writtenBytes = 0)),
|
|
70
|
+
destination.enqueue(chunk);
|
|
71
|
+
else {
|
|
72
|
+
var allowableBytes = currentView.length - writtenBytes;
|
|
73
|
+
allowableBytes < chunk.byteLength &&
|
|
74
|
+
(0 === allowableBytes
|
|
75
|
+
? destination.enqueue(currentView)
|
|
76
|
+
: (currentView.set(chunk.subarray(0, allowableBytes), writtenBytes),
|
|
77
|
+
destination.enqueue(currentView),
|
|
78
|
+
(chunk = chunk.subarray(allowableBytes))),
|
|
79
|
+
(currentView = new Uint8Array(2048)),
|
|
80
|
+
(writtenBytes = 0));
|
|
81
|
+
currentView.set(chunk, writtenBytes);
|
|
82
|
+
writtenBytes += chunk.byteLength;
|
|
83
|
+
}
|
|
75
84
|
return !0;
|
|
76
85
|
}
|
|
77
86
|
function completeWriting(destination) {
|
|
@@ -514,7 +523,6 @@
|
|
|
514
523
|
temporaryReferences.set(reference, id);
|
|
515
524
|
return reference;
|
|
516
525
|
}
|
|
517
|
-
function noop() {}
|
|
518
526
|
function trackUsedThenable(thenableState, thenable, index) {
|
|
519
527
|
index = thenableState[index];
|
|
520
528
|
void 0 === index
|
|
@@ -1407,7 +1415,7 @@
|
|
|
1407
1415
|
erroredTask(request, streamTask, reason),
|
|
1408
1416
|
enqueueFlush(request),
|
|
1409
1417
|
"function" === typeof iterator.throw &&
|
|
1410
|
-
iterator.throw(reason).then(
|
|
1418
|
+
iterator.throw(reason).then(noop, noop));
|
|
1411
1419
|
}
|
|
1412
1420
|
function abortIterable() {
|
|
1413
1421
|
if (0 === streamTask.status) {
|
|
@@ -1421,7 +1429,7 @@
|
|
|
1421
1429
|
: (erroredTask(request, streamTask, signal.reason),
|
|
1422
1430
|
enqueueFlush(request));
|
|
1423
1431
|
"function" === typeof iterator.throw &&
|
|
1424
|
-
iterator.throw(reason).then(
|
|
1432
|
+
iterator.throw(reason).then(noop, noop);
|
|
1425
1433
|
}
|
|
1426
1434
|
}
|
|
1427
1435
|
var isIterator = iterable === iterator,
|
|
@@ -2875,14 +2883,35 @@
|
|
|
2875
2883
|
}
|
|
2876
2884
|
function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
|
|
2877
2885
|
debug ? request.pendingDebugChunks++ : request.pendingChunks++;
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
+
a: {
|
|
2887
|
+
var view = new Uint8Array(
|
|
2888
|
+
typedArray.buffer,
|
|
2889
|
+
typedArray.byteOffset,
|
|
2890
|
+
typedArray.byteLength
|
|
2891
|
+
);
|
|
2892
|
+
if (2048 < typedArray.byteLength) {
|
|
2893
|
+
if (
|
|
2894
|
+
0 !== typedArray.byteOffset ||
|
|
2895
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
2896
|
+
typedArray.buffer.resizable
|
|
2897
|
+
) {
|
|
2898
|
+
typedArray = view.slice();
|
|
2899
|
+
break a;
|
|
2900
|
+
}
|
|
2901
|
+
if (!supportsArrayBufferDetached) {
|
|
2902
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
2903
|
+
(console.error(
|
|
2904
|
+
"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 Edge runtime."
|
|
2905
|
+
),
|
|
2906
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
2907
|
+
typedArray = view.slice();
|
|
2908
|
+
break a;
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
typedArray = view;
|
|
2912
|
+
}
|
|
2913
|
+
view = typedArray.byteLength;
|
|
2914
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
2886
2915
|
id = stringToChunk(id);
|
|
2887
2916
|
debug
|
|
2888
2917
|
? request.completedDebugChunks.push(id, typedArray)
|
|
@@ -3950,13 +3979,38 @@
|
|
|
3950
3979
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
3951
3980
|
return moduleExports[metadata[2]];
|
|
3952
3981
|
}
|
|
3953
|
-
function appendBackingEntry(backingStore,
|
|
3954
|
-
backingStore.
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3982
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
3983
|
+
var prefix = backingStore.prefix;
|
|
3984
|
+
if (key.startsWith(prefix)) {
|
|
3985
|
+
switch (key[prefix.length]) {
|
|
3986
|
+
case "_":
|
|
3987
|
+
prefix = backingStore.referencedEntries;
|
|
3988
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
3989
|
+
prefix.push([key, value]);
|
|
3990
|
+
return;
|
|
3991
|
+
case "S":
|
|
3992
|
+
"string" === typeof value &&
|
|
3993
|
+
((prefix = backingStore.streamChunks),
|
|
3994
|
+
null === prefix &&
|
|
3995
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
3996
|
+
(backingStore = prefix.get(key)),
|
|
3997
|
+
void 0 === backingStore
|
|
3998
|
+
? prefix.set(key, [value])
|
|
3999
|
+
: backingStore.push(value));
|
|
4000
|
+
return;
|
|
4001
|
+
}
|
|
4002
|
+
"string" === typeof value
|
|
4003
|
+
? ((prefix = backingStore.stringChunks),
|
|
4004
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
4005
|
+
prefix.set(key, value))
|
|
4006
|
+
: ((prefix = backingStore.blobs),
|
|
4007
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
4008
|
+
prefix.set(key, value));
|
|
4009
|
+
}
|
|
4010
|
+
}
|
|
4011
|
+
function getBackingBlob(backingStore, key) {
|
|
4012
|
+
backingStore = backingStore.blobs;
|
|
4013
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
3960
4014
|
}
|
|
3961
4015
|
function ReactPromise(status, value, reason) {
|
|
3962
4016
|
this.status = status;
|
|
@@ -4269,9 +4323,11 @@
|
|
|
4269
4323
|
function getChunk(response, id) {
|
|
4270
4324
|
var chunks = response._chunks,
|
|
4271
4325
|
chunk = chunks.get(id);
|
|
4272
|
-
chunk
|
|
4273
|
-
|
|
4274
|
-
|
|
4326
|
+
if (!chunk) {
|
|
4327
|
+
chunk = response._prefix;
|
|
4328
|
+
var stringChunks = response._formData.stringChunks;
|
|
4329
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
4330
|
+
chunk =
|
|
4275
4331
|
"string" === typeof chunk
|
|
4276
4332
|
? new ReactPromise(
|
|
4277
4333
|
"resolved_model",
|
|
@@ -4280,8 +4336,9 @@
|
|
|
4280
4336
|
)
|
|
4281
4337
|
: response._closed
|
|
4282
4338
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
4283
|
-
: new ReactPromise("pending", null, null)
|
|
4284
|
-
chunks.set(id, chunk)
|
|
4339
|
+
: new ReactPromise("pending", null, null);
|
|
4340
|
+
chunks.set(id, chunk);
|
|
4341
|
+
}
|
|
4285
4342
|
return chunk;
|
|
4286
4343
|
}
|
|
4287
4344
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -4528,7 +4585,7 @@
|
|
|
4528
4585
|
Error("Already initialized typed array.")
|
|
4529
4586
|
)
|
|
4530
4587
|
);
|
|
4531
|
-
reference = response._formData
|
|
4588
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
4532
4589
|
if (initializingHandler) {
|
|
4533
4590
|
var handler = initializingHandler;
|
|
4534
4591
|
handler.deps++;
|
|
@@ -4572,15 +4629,17 @@
|
|
|
4572
4629
|
var chunks = response._chunks;
|
|
4573
4630
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
4574
4631
|
chunks.set(id, stream);
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4632
|
+
chunks = response._prefix;
|
|
4633
|
+
response = response._formData.streamChunks;
|
|
4634
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
4635
|
+
if (void 0 !== id)
|
|
4636
|
+
for (response = 0; response < id.length; response++)
|
|
4637
|
+
(chunks = id[response]),
|
|
4638
|
+
"C" === chunks[0]
|
|
4580
4639
|
? controller.close(
|
|
4581
4640
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
4582
4641
|
)
|
|
4583
|
-
: controller.enqueueModel(chunks)
|
|
4642
|
+
: controller.enqueueModel(chunks);
|
|
4584
4643
|
}
|
|
4585
4644
|
function parseReadableStream(response, reference, type) {
|
|
4586
4645
|
function enqueue(value) {
|
|
@@ -4744,7 +4803,14 @@
|
|
|
4744
4803
|
});
|
|
4745
4804
|
return iterator;
|
|
4746
4805
|
}
|
|
4747
|
-
function parseModelString(
|
|
4806
|
+
function parseModelString(
|
|
4807
|
+
response,
|
|
4808
|
+
obj,
|
|
4809
|
+
key$jscomp$0,
|
|
4810
|
+
value,
|
|
4811
|
+
reference,
|
|
4812
|
+
arrayRoot
|
|
4813
|
+
) {
|
|
4748
4814
|
if ("$" === value[0]) {
|
|
4749
4815
|
switch (value[1]) {
|
|
4750
4816
|
case "$":
|
|
@@ -4764,7 +4830,7 @@
|
|
|
4764
4830
|
response,
|
|
4765
4831
|
arrayRoot,
|
|
4766
4832
|
obj,
|
|
4767
|
-
key,
|
|
4833
|
+
key$jscomp$0,
|
|
4768
4834
|
null,
|
|
4769
4835
|
loadServerReference$1
|
|
4770
4836
|
)
|
|
@@ -4784,41 +4850,44 @@
|
|
|
4784
4850
|
case "Q":
|
|
4785
4851
|
return (
|
|
4786
4852
|
(arrayRoot = value.slice(2)),
|
|
4787
|
-
getOutlinedModel(
|
|
4853
|
+
getOutlinedModel(
|
|
4854
|
+
response,
|
|
4855
|
+
arrayRoot,
|
|
4856
|
+
obj,
|
|
4857
|
+
key$jscomp$0,
|
|
4858
|
+
null,
|
|
4859
|
+
createMap
|
|
4860
|
+
)
|
|
4788
4861
|
);
|
|
4789
4862
|
case "W":
|
|
4790
4863
|
return (
|
|
4791
4864
|
(arrayRoot = value.slice(2)),
|
|
4792
|
-
getOutlinedModel(
|
|
4865
|
+
getOutlinedModel(
|
|
4866
|
+
response,
|
|
4867
|
+
arrayRoot,
|
|
4868
|
+
obj,
|
|
4869
|
+
key$jscomp$0,
|
|
4870
|
+
null,
|
|
4871
|
+
createSet
|
|
4872
|
+
)
|
|
4793
4873
|
);
|
|
4794
4874
|
case "K":
|
|
4795
|
-
key = value.slice(2);
|
|
4796
|
-
obj = response.
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
(
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
for (
|
|
4810
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
4811
|
-
i < reference.length;
|
|
4812
|
-
i++
|
|
4813
|
-
)
|
|
4814
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
4815
|
-
reference = response;
|
|
4816
|
-
reference.data.delete(value);
|
|
4817
|
-
reference.keyPointer++;
|
|
4818
|
-
} else if (value.startsWith(obj)) break;
|
|
4819
|
-
else response.keyPointer++;
|
|
4875
|
+
key$jscomp$0 = value.slice(2);
|
|
4876
|
+
obj = response._formData;
|
|
4877
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
4878
|
+
key$jscomp$0 = new FormData();
|
|
4879
|
+
arrayRoot = obj.referencedEntries;
|
|
4880
|
+
if (null !== arrayRoot) {
|
|
4881
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
4882
|
+
reference = arrayRoot[value];
|
|
4883
|
+
var key = reference[0];
|
|
4884
|
+
if (!key.startsWith(response)) break;
|
|
4885
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
4886
|
+
value++;
|
|
4887
|
+
}
|
|
4888
|
+
obj.keyPointer = value;
|
|
4820
4889
|
}
|
|
4821
|
-
return
|
|
4890
|
+
return key$jscomp$0;
|
|
4822
4891
|
case "i":
|
|
4823
4892
|
return (
|
|
4824
4893
|
(arrayRoot = value.slice(2)),
|
|
@@ -4826,7 +4895,7 @@
|
|
|
4826
4895
|
response,
|
|
4827
4896
|
arrayRoot,
|
|
4828
4897
|
obj,
|
|
4829
|
-
key,
|
|
4898
|
+
key$jscomp$0,
|
|
4830
4899
|
null,
|
|
4831
4900
|
extractIterator
|
|
4832
4901
|
)
|
|
@@ -4861,7 +4930,7 @@
|
|
|
4861
4930
|
ArrayBuffer,
|
|
4862
4931
|
1,
|
|
4863
4932
|
obj,
|
|
4864
|
-
key,
|
|
4933
|
+
key$jscomp$0,
|
|
4865
4934
|
arrayRoot
|
|
4866
4935
|
);
|
|
4867
4936
|
case "O":
|
|
@@ -4871,7 +4940,7 @@
|
|
|
4871
4940
|
Int8Array,
|
|
4872
4941
|
1,
|
|
4873
4942
|
obj,
|
|
4874
|
-
key,
|
|
4943
|
+
key$jscomp$0,
|
|
4875
4944
|
arrayRoot
|
|
4876
4945
|
);
|
|
4877
4946
|
case "o":
|
|
@@ -4881,7 +4950,7 @@
|
|
|
4881
4950
|
Uint8Array,
|
|
4882
4951
|
1,
|
|
4883
4952
|
obj,
|
|
4884
|
-
key,
|
|
4953
|
+
key$jscomp$0,
|
|
4885
4954
|
arrayRoot
|
|
4886
4955
|
);
|
|
4887
4956
|
case "U":
|
|
@@ -4891,7 +4960,7 @@
|
|
|
4891
4960
|
Uint8ClampedArray,
|
|
4892
4961
|
1,
|
|
4893
4962
|
obj,
|
|
4894
|
-
key,
|
|
4963
|
+
key$jscomp$0,
|
|
4895
4964
|
arrayRoot
|
|
4896
4965
|
);
|
|
4897
4966
|
case "S":
|
|
@@ -4901,7 +4970,7 @@
|
|
|
4901
4970
|
Int16Array,
|
|
4902
4971
|
2,
|
|
4903
4972
|
obj,
|
|
4904
|
-
key,
|
|
4973
|
+
key$jscomp$0,
|
|
4905
4974
|
arrayRoot
|
|
4906
4975
|
);
|
|
4907
4976
|
case "s":
|
|
@@ -4911,7 +4980,7 @@
|
|
|
4911
4980
|
Uint16Array,
|
|
4912
4981
|
2,
|
|
4913
4982
|
obj,
|
|
4914
|
-
key,
|
|
4983
|
+
key$jscomp$0,
|
|
4915
4984
|
arrayRoot
|
|
4916
4985
|
);
|
|
4917
4986
|
case "L":
|
|
@@ -4921,7 +4990,7 @@
|
|
|
4921
4990
|
Int32Array,
|
|
4922
4991
|
4,
|
|
4923
4992
|
obj,
|
|
4924
|
-
key,
|
|
4993
|
+
key$jscomp$0,
|
|
4925
4994
|
arrayRoot
|
|
4926
4995
|
);
|
|
4927
4996
|
case "l":
|
|
@@ -4931,7 +5000,7 @@
|
|
|
4931
5000
|
Uint32Array,
|
|
4932
5001
|
4,
|
|
4933
5002
|
obj,
|
|
4934
|
-
key,
|
|
5003
|
+
key$jscomp$0,
|
|
4935
5004
|
arrayRoot
|
|
4936
5005
|
);
|
|
4937
5006
|
case "G":
|
|
@@ -4941,7 +5010,7 @@
|
|
|
4941
5010
|
Float32Array,
|
|
4942
5011
|
4,
|
|
4943
5012
|
obj,
|
|
4944
|
-
key,
|
|
5013
|
+
key$jscomp$0,
|
|
4945
5014
|
arrayRoot
|
|
4946
5015
|
);
|
|
4947
5016
|
case "g":
|
|
@@ -4951,7 +5020,7 @@
|
|
|
4951
5020
|
Float64Array,
|
|
4952
5021
|
8,
|
|
4953
5022
|
obj,
|
|
4954
|
-
key,
|
|
5023
|
+
key$jscomp$0,
|
|
4955
5024
|
arrayRoot
|
|
4956
5025
|
);
|
|
4957
5026
|
case "M":
|
|
@@ -4961,7 +5030,7 @@
|
|
|
4961
5030
|
BigInt64Array,
|
|
4962
5031
|
8,
|
|
4963
5032
|
obj,
|
|
4964
|
-
key,
|
|
5033
|
+
key$jscomp$0,
|
|
4965
5034
|
arrayRoot
|
|
4966
5035
|
);
|
|
4967
5036
|
case "m":
|
|
@@ -4971,7 +5040,7 @@
|
|
|
4971
5040
|
BigUint64Array,
|
|
4972
5041
|
8,
|
|
4973
5042
|
obj,
|
|
4974
|
-
key,
|
|
5043
|
+
key$jscomp$0,
|
|
4975
5044
|
arrayRoot
|
|
4976
5045
|
);
|
|
4977
5046
|
case "V":
|
|
@@ -4981,13 +5050,13 @@
|
|
|
4981
5050
|
DataView,
|
|
4982
5051
|
1,
|
|
4983
5052
|
obj,
|
|
4984
|
-
key,
|
|
5053
|
+
key$jscomp$0,
|
|
4985
5054
|
arrayRoot
|
|
4986
5055
|
);
|
|
4987
5056
|
case "B":
|
|
4988
5057
|
return (
|
|
4989
5058
|
(obj = parseInt(value.slice(2), 16)),
|
|
4990
|
-
response._formData
|
|
5059
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
4991
5060
|
);
|
|
4992
5061
|
case "R":
|
|
4993
5062
|
return parseReadableStream(response, value, void 0);
|
|
@@ -5003,7 +5072,7 @@
|
|
|
5003
5072
|
response,
|
|
5004
5073
|
value,
|
|
5005
5074
|
obj,
|
|
5006
|
-
key,
|
|
5075
|
+
key$jscomp$0,
|
|
5007
5076
|
arrayRoot,
|
|
5008
5077
|
createModel
|
|
5009
5078
|
);
|
|
@@ -5022,11 +5091,20 @@
|
|
|
5022
5091
|
: new FormData(),
|
|
5023
5092
|
arraySizeLimit =
|
|
5024
5093
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
5025
|
-
chunks = new Map()
|
|
5094
|
+
chunks = new Map(),
|
|
5095
|
+
backingStore = {
|
|
5096
|
+
prefix: formFieldPrefix,
|
|
5097
|
+
referencedEntries: null,
|
|
5098
|
+
keyPointer: 0,
|
|
5099
|
+
stringChunks: null,
|
|
5100
|
+
streamChunks: null,
|
|
5101
|
+
blobs: null
|
|
5102
|
+
};
|
|
5103
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
5026
5104
|
return {
|
|
5027
5105
|
_bundlerConfig: bundlerConfig,
|
|
5028
5106
|
_prefix: formFieldPrefix,
|
|
5029
|
-
_formData:
|
|
5107
|
+
_formData: backingStore,
|
|
5030
5108
|
_chunks: chunks,
|
|
5031
5109
|
_closed: !1,
|
|
5032
5110
|
_closedReason: null,
|
|
@@ -5186,6 +5264,12 @@
|
|
|
5186
5264
|
Symbol.for("react.postpone");
|
|
5187
5265
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
5188
5266
|
ASYNC_ITERATOR = Symbol.asyncIterator,
|
|
5267
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5268
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
5269
|
+
ArrayBuffer.prototype,
|
|
5270
|
+
"detached"
|
|
5271
|
+
),
|
|
5272
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
5189
5273
|
LocalPromise = Promise,
|
|
5190
5274
|
scheduleMicrotask =
|
|
5191
5275
|
"function" === typeof queueMicrotask
|
|
@@ -5569,7 +5653,6 @@
|
|
|
5569
5653
|
jsxPropsParents = new WeakMap(),
|
|
5570
5654
|
jsxChildrenParents = new WeakMap(),
|
|
5571
5655
|
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
|
5572
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
5573
5656
|
doNotLimit = new WeakSet();
|
|
5574
5657
|
"object" === typeof console &&
|
|
5575
5658
|
null !== console &&
|
|
@@ -5668,44 +5751,44 @@
|
|
|
5668
5751
|
};
|
|
5669
5752
|
exports.decodeAction = function (body, serverManifest) {
|
|
5670
5753
|
var formData = new FormData(),
|
|
5671
|
-
|
|
5672
|
-
seenActions = new Set();
|
|
5754
|
+
maybeActionKey = null;
|
|
5673
5755
|
body.forEach(function (value, key) {
|
|
5674
5756
|
key.startsWith("$ACTION_")
|
|
5675
5757
|
? key.startsWith("$ACTION_REF_")
|
|
5676
|
-
?
|
|
5677
|
-
|
|
5678
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
5679
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
5680
|
-
(action = loadServerReference(serverManifest, value)))
|
|
5681
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
5682
|
-
!seenActions.has(key) &&
|
|
5683
|
-
(seenActions.add(key),
|
|
5684
|
-
(value = key.slice(11)),
|
|
5685
|
-
(action = loadServerReference(serverManifest, {
|
|
5686
|
-
id: value,
|
|
5687
|
-
bound: null
|
|
5688
|
-
})))
|
|
5758
|
+
? (maybeActionKey = key)
|
|
5759
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
5689
5760
|
: formData.append(key, value);
|
|
5690
5761
|
});
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5762
|
+
if (null === maybeActionKey) return null;
|
|
5763
|
+
var actionKey = maybeActionKey,
|
|
5764
|
+
action = null;
|
|
5765
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
5766
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
5767
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
5768
|
+
(action = loadServerReference(serverManifest, body));
|
|
5769
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
5770
|
+
(body = actionKey.slice(11)),
|
|
5771
|
+
(action = loadServerReference(serverManifest, {
|
|
5772
|
+
id: body,
|
|
5773
|
+
bound: null
|
|
5774
|
+
}));
|
|
5775
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
5776
|
+
return action.then(function (fn) {
|
|
5777
|
+
return fn.bind(null, formData);
|
|
5778
|
+
});
|
|
5696
5779
|
};
|
|
5697
5780
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
5698
5781
|
var keyPath = body.get("$ACTION_KEY");
|
|
5699
5782
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
5700
|
-
var
|
|
5783
|
+
var actionKey = null;
|
|
5701
5784
|
body.forEach(function (value, key) {
|
|
5702
|
-
key.startsWith("$ACTION_REF_") &&
|
|
5703
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
5704
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
5785
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
5705
5786
|
});
|
|
5706
|
-
if (null ===
|
|
5707
|
-
var
|
|
5708
|
-
|
|
5787
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
5788
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
5789
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
5790
|
+
var referenceId = body.id;
|
|
5791
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
5709
5792
|
return null === bound
|
|
5710
5793
|
? null
|
|
5711
5794
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -5736,27 +5819,47 @@
|
|
|
5736
5819
|
function progress(entry) {
|
|
5737
5820
|
if (entry.done) close(response$jscomp$0);
|
|
5738
5821
|
else {
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
if ("string" === typeof
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5822
|
+
var _entry$value = entry.value;
|
|
5823
|
+
entry = _entry$value[0];
|
|
5824
|
+
_entry$value = _entry$value[1];
|
|
5825
|
+
if ("string" === typeof _entry$value)
|
|
5826
|
+
a: {
|
|
5827
|
+
var response = response$jscomp$0,
|
|
5828
|
+
prefix = response._prefix;
|
|
5829
|
+
if (entry.startsWith(prefix)) {
|
|
5830
|
+
var chunks = response._chunks;
|
|
5831
|
+
if ("S" === entry[prefix.length]) {
|
|
5832
|
+
if (
|
|
5833
|
+
entry.length > prefix.length + 1 &&
|
|
5834
|
+
((prefix = +entry.slice(prefix.length + 1)),
|
|
5835
|
+
(chunks = chunks.get(prefix)))
|
|
5836
|
+
) {
|
|
5837
|
+
resolveModelChunk(response, chunks, _entry$value, prefix);
|
|
5838
|
+
break a;
|
|
5839
|
+
}
|
|
5840
|
+
} else if (
|
|
5841
|
+
((prefix = +entry.slice(prefix.length)),
|
|
5842
|
+
(chunks = chunks.get(prefix)))
|
|
5843
|
+
) {
|
|
5844
|
+
resolveModelChunk(response, chunks, _entry$value, prefix);
|
|
5845
|
+
break a;
|
|
5846
|
+
}
|
|
5847
|
+
}
|
|
5848
|
+
appendBackingEntry(response._formData, _entry$value, entry);
|
|
5751
5849
|
}
|
|
5752
|
-
|
|
5850
|
+
else
|
|
5851
|
+
appendBackingEntry(
|
|
5852
|
+
response$jscomp$0._formData,
|
|
5853
|
+
_entry$value,
|
|
5854
|
+
entry
|
|
5855
|
+
);
|
|
5753
5856
|
iterator.next().then(progress, error);
|
|
5754
5857
|
}
|
|
5755
5858
|
}
|
|
5756
5859
|
function error(reason) {
|
|
5757
5860
|
reportGlobalError(response$jscomp$0, reason);
|
|
5758
5861
|
"function" === typeof iterator.throw &&
|
|
5759
|
-
iterator.throw(reason).then(
|
|
5862
|
+
iterator.throw(reason).then(noop, noop);
|
|
5760
5863
|
}
|
|
5761
5864
|
var iterator = iterable[ASYNC_ITERATOR](),
|
|
5762
5865
|
response$jscomp$0 = createResponse(
|