Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-server-dom-turbopack

Package Overview
Dependencies
Maintainers
3
Versions
563
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-server-dom-turbopack - npm Package Compare versions

Comparing version 19.0.0-rc-3f1436cca1-20240516 to 19.0.0-rc-47352209-20240912

static.browser.js

495

cjs/react-server-dom-turbopack-client.browser.production.js

@@ -72,4 +72,4 @@ /**

: 0 < promises.length
? Promise.all(promises)
: null;
? Promise.all(promises)
: null;
}

@@ -99,6 +99,6 @@ var ReactDOMSharedInternals =

: Infinity === number
? "$Infinity"
: -Infinity === number
? "$-Infinity"
: "$NaN";
? "$Infinity"
: -Infinity === number
? "$-Infinity"
: "$NaN";
}

@@ -462,3 +462,19 @@ function processReply(

}
function Chunk(status, value, reason, response) {
function createBoundServerReference(metaData, callServer) {
function action() {
var args = Array.prototype.slice.call(arguments);
return bound
? "fulfilled" === bound.status
? callServer(id, bound.value.concat(args))
: Promise.resolve(bound).then(function (boundArgs) {
return callServer(id, boundArgs.concat(args));
})
: callServer(id, args);
}
var id = metaData.id,
bound = metaData.bound;
registerServerReference(action, { id: id, bound: bound });
return action;
}
function ReactPromise(status, value, reason, response) {
this.status = status;

@@ -469,4 +485,4 @@ this.value = value;

}
Chunk.prototype = Object.create(Promise.prototype);
Chunk.prototype.then = function (resolve, reject) {
ReactPromise.prototype = Object.create(Promise.prototype);
ReactPromise.prototype.then = function (resolve, reject) {
switch (this.status) {

@@ -485,3 +501,2 @@ case "resolved_model":

case "blocked":
case "cyclic":
resolve &&

@@ -509,3 +524,2 @@ (null === this.value && (this.value = []), this.value.push(resolve));

case "blocked":
case "cyclic":
throw chunk;

@@ -517,3 +531,3 @@ default:

function createPendingChunk(response) {
return new Chunk("pending", null, null, response);
return new ReactPromise("pending", null, null, response);
}

@@ -530,5 +544,15 @@ function wakeChunk(listeners, value) {

case "blocked":
case "cyclic":
chunk.value = resolveListeners;
chunk.reason = rejectListeners;
if (chunk.value)
for (var i = 0; i < resolveListeners.length; i++)
chunk.value.push(resolveListeners[i]);
else chunk.value = resolveListeners;
if (chunk.reason) {
if (rejectListeners)
for (
resolveListeners = 0;
resolveListeners < rejectListeners.length;
resolveListeners++
)
chunk.reason.push(rejectListeners[resolveListeners]);
} else chunk.reason = rejectListeners;
break;

@@ -550,3 +574,3 @@ case "rejected":

function createResolvedIteratorResultChunk(response, value, done) {
return new Chunk(
return new ReactPromise(
"resolved_model",

@@ -587,34 +611,31 @@ (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}",

}
var initializingChunk = null,
initializingChunkBlockedModel = null;
var initializingHandler = null;
function initializeModelChunk(chunk) {
var prevChunk = initializingChunk,
prevBlocked = initializingChunkBlockedModel;
initializingChunk = chunk;
initializingChunkBlockedModel = null;
var prevHandler = initializingHandler;
initializingHandler = null;
var resolvedModel = chunk.value;
chunk.status = "cyclic";
chunk.status = "blocked";
chunk.value = null;
chunk.reason = null;
try {
var value = JSON.parse(resolvedModel, chunk._response._fromJSON);
if (
null !== initializingChunkBlockedModel &&
0 < initializingChunkBlockedModel.deps
)
(initializingChunkBlockedModel.value = value),
(chunk.status = "blocked"),
(chunk.value = null),
(chunk.reason = null);
else {
var resolveListeners = chunk.value;
chunk.status = "fulfilled";
chunk.value = value;
null !== resolveListeners && wakeChunk(resolveListeners, value);
var value = JSON.parse(resolvedModel, chunk._response._fromJSON),
resolveListeners = chunk.value;
null !== resolveListeners &&
((chunk.value = null),
(chunk.reason = null),
wakeChunk(resolveListeners, value));
if (null !== initializingHandler) {
if (initializingHandler.errored) throw initializingHandler.value;
if (0 < initializingHandler.deps) {
initializingHandler.value = value;
initializingHandler.chunk = chunk;
return;
}
}
chunk.status = "fulfilled";
chunk.value = value;
} catch (error) {
(chunk.status = "rejected"), (chunk.reason = error);
} finally {
(initializingChunk = prevChunk),
(initializingChunkBlockedModel = prevBlocked);
initializingHandler = prevHandler;
}

@@ -634,6 +655,6 @@ }

: "" === metadata[2]
? moduleExports.__esModule
? moduleExports.default
: moduleExports
: moduleExports[metadata[2]];
? moduleExports.__esModule
? moduleExports.default
: moduleExports
: moduleExports[metadata[2]];
chunk.status = "fulfilled";

@@ -650,2 +671,5 @@ chunk.value = JSCompiler_inline_result;

}
function createLazyChunkWrapper(chunk) {
return { $$typeof: REACT_LAZY_TYPE, _payload: chunk, _init: readChunk };
}
function getChunk(response, id) {

@@ -657,7 +681,6 @@ var chunks = response._chunks,

}
function createModelResolver(
chunk,
function waitForReference(
referencedChunk,
parentObject,
key,
cyclic,
response,

@@ -667,43 +690,60 @@ map,

) {
if (initializingChunkBlockedModel) {
var blocked = initializingChunkBlockedModel;
cyclic || blocked.deps++;
function fulfill(value) {
for (var i = 1; i < path.length; i++) {
for (; value.$$typeof === REACT_LAZY_TYPE; )
if (((value = value._payload), value === handler.chunk))
value = handler.value;
else if ("fulfilled" === value.status) value = value.value;
else {
path.splice(0, i - 1);
value.then(fulfill, reject);
return;
}
value = value[path[i]];
}
parentObject[key] = map(response, value);
"" === key && null === handler.value && (handler.value = parentObject[key]);
parentObject[0] === REACT_ELEMENT_TYPE &&
"3" === key &&
"object" === typeof handler.value &&
null !== handler.value &&
handler.value.$$typeof === REACT_ELEMENT_TYPE &&
null === handler.value.props &&
(handler.value.props = parentObject[key]);
handler.deps--;
0 === handler.deps &&
((i = handler.chunk),
null !== i &&
"blocked" === i.status &&
((value = i.value),
(i.status = "fulfilled"),
(i.value = handler.value),
null !== value && wakeChunk(value, handler.value)));
}
function reject(error) {
if (!handler.errored) {
handler.errored = !0;
handler.value = error;
var chunk = handler.chunk;
null !== chunk &&
"blocked" === chunk.status &&
triggerErrorOnChunk(chunk, error);
}
}
if (initializingHandler) {
var handler = initializingHandler;
handler.deps++;
} else
blocked = initializingChunkBlockedModel = {
deps: cyclic ? 0 : 1,
value: null
handler = initializingHandler = {
parent: null,
chunk: null,
value: null,
deps: 1,
errored: !1
};
return function (value) {
for (var i = 1; i < path.length; i++) value = value[path[i]];
parentObject[key] = map(response, value);
"" === key && null === blocked.value && (blocked.value = parentObject[key]);
blocked.deps--;
0 === blocked.deps &&
"blocked" === chunk.status &&
((value = chunk.value),
(chunk.status = "fulfilled"),
(chunk.value = blocked.value),
null !== value && wakeChunk(value, blocked.value));
};
referencedChunk.then(fulfill, reject);
return null;
}
function createModelReject(chunk) {
return function (error) {
return triggerErrorOnChunk(chunk, error);
};
}
function createServerReferenceProxy(response, metaData) {
function proxy() {
var args = Array.prototype.slice.call(arguments),
p = metaData.bound;
return p
? "fulfilled" === p.status
? callServer(metaData.id, p.value.concat(args))
: Promise.resolve(p).then(function (bound) {
return callServer(metaData.id, bound.concat(args));
})
: callServer(metaData.id, args);
}
var callServer = response._callServer;
knownServerReferences.set(proxy, metaData);
return proxy;
return createBoundServerReference(metaData, response._callServer);
}

@@ -723,25 +763,36 @@ function getOutlinedModel(response, reference, parentObject, key, map) {

case "fulfilled":
parentObject = id.value;
for (key = 1; key < reference.length; key++)
parentObject = parentObject[reference[key]];
return map(response, parentObject);
var value = id.value;
for (id = 1; id < reference.length; id++) {
for (; value.$$typeof === REACT_LAZY_TYPE; )
if (((value = value._payload), "fulfilled" === value.status))
value = value.value;
else
return waitForReference(
value,
parentObject,
key,
response,
map,
reference.slice(id - 1)
);
value = value[reference[id]];
}
return map(response, value);
case "pending":
case "blocked":
case "cyclic":
var parentChunk = initializingChunk;
id.then(
createModelResolver(
parentChunk,
parentObject,
key,
"cyclic" === id.status,
response,
map,
reference
),
createModelReject(parentChunk)
return waitForReference(id, parentObject, key, response, map, reference);
default:
return (
initializingHandler
? ((initializingHandler.errored = !0),
(initializingHandler.value = id.reason))
: (initializingHandler = {
parent: null,
chunk: null,
value: id.reason,
deps: 0,
errored: !0
}),
null
);
return null;
default:
throw id.reason;
}

@@ -772,3 +823,15 @@ }

if ("$" === value[0]) {
if ("$" === value) return REACT_ELEMENT_TYPE;
if ("$" === value)
return (
null !== initializingHandler &&
"0" === key &&
(initializingHandler = {
parent: initializingHandler,
chunk: null,
value: null,
deps: 0,
errored: !1
}),
REACT_ELEMENT_TYPE
);
switch (value[1]) {

@@ -781,3 +844,3 @@ case "$":

(response = getChunk(response, parentObject)),
{ $$typeof: REACT_LAZY_TYPE, _payload: response, _init: readChunk }
createLazyChunkWrapper(response)
);

@@ -860,2 +923,24 @@ case "@":

}
function ResponseInstance(
bundlerConfig,
moduleLoading,
callServer,
encodeFormAction,
nonce,
temporaryReferences
) {
var chunks = new Map();
this._bundlerConfig = bundlerConfig;
this._moduleLoading = moduleLoading;
this._callServer = void 0 !== callServer ? callServer : missingCall;
this._encodeFormAction = encodeFormAction;
this._nonce = nonce;
this._chunks = chunks;
this._stringDecoder = new TextDecoder();
this._fromJSON = null;
this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
this._buffer = [];
this._tempRefs = temporaryReferences;
this._fromJSON = createFromJSONCallback(this);
}
function resolveBuffer(response, id, buffer) {

@@ -866,3 +951,3 @@ var chunks = response._chunks,

? chunk.reason.enqueueValue(buffer)
: chunks.set(id, new Chunk("fulfilled", buffer, null, response));
: chunks.set(id, new ReactPromise("fulfilled", buffer, null, response));
}

@@ -879,3 +964,3 @@ function resolveModule(response, id, model) {

} else
(blockedChunk = new Chunk("blocked", null, null, response)),
(blockedChunk = new ReactPromise("blocked", null, null, response)),
chunks.set(id, blockedChunk);

@@ -895,3 +980,3 @@ model.then(

id,
new Chunk("resolved_module", clientReference, null, response)
new ReactPromise("resolved_module", clientReference, null, response)
);

@@ -909,3 +994,6 @@ }

null !== response && wakeChunk(response, chunk.value))
: chunks.set(id, new Chunk("fulfilled", stream, controller, response));
: chunks.set(
id,
new ReactPromise("fulfilled", stream, controller, response)
);
}

@@ -931,3 +1019,3 @@ function startReadableStream(response, id, type) {

if (null === previousBlockedChunk) {
var chunk = new Chunk("resolved_model", json, null, response);
var chunk = new ReactPromise("resolved_model", json, null, response);
initializeModelChunk(chunk);

@@ -947,4 +1035,4 @@ "fulfilled" === chunk.status

chunk = previousBlockedChunk;
var chunk$50 = createPendingChunk(response);
chunk$50.then(
var chunk$52 = createPendingChunk(response);
chunk$52.then(
function (v) {

@@ -957,6 +1045,6 @@ return controller.enqueue(v);

);
previousBlockedChunk = chunk$50;
previousBlockedChunk = chunk$52;
chunk.then(function () {
previousBlockedChunk === chunk$50 && (previousBlockedChunk = null);
resolveModelChunk(chunk$50, json);
previousBlockedChunk === chunk$52 && (previousBlockedChunk = null);
resolveModelChunk(chunk$52, json);
});

@@ -1010,3 +1098,3 @@ }

if (closed)
return new Chunk(
return new ReactPromise(
"fulfilled",

@@ -1030,3 +1118,3 @@ { done: !0, value: void 0 },

if (nextWriteIndex === buffer.length)
buffer[nextWriteIndex] = new Chunk(
buffer[nextWriteIndex] = new ReactPromise(
"fulfilled",

@@ -1091,4 +1179,4 @@ { done: !1, value: value },

byteLength = new Uint8Array(byteLength);
for (var i$51 = (i = 0); i$51 < l; i$51++) {
var chunk = buffer[i$51];
for (var i$53 = (i = 0); i$53 < l; i$53++) {
var chunk = buffer[i$53];
byteLength.set(chunk, i);

@@ -1119,3 +1207,3 @@ i += chunk.byteLength;

}
function processFullRow(response, id, tag, buffer, chunk) {
function processFullBinaryRow(response, id, tag, buffer, chunk) {
switch (tag) {

@@ -1172,20 +1260,20 @@ case 65:

row += stringDecoder.decode(buffer[i], decoderOptions);
row += stringDecoder.decode(chunk);
buffer = row += stringDecoder.decode(chunk);
switch (tag) {
case 73:
resolveModule(response, id, row);
resolveModule(response, id, buffer);
break;
case 72:
id = row[0];
row = row.slice(1);
response = JSON.parse(row, response._fromJSON);
row = ReactDOMSharedInternals.d;
id = buffer[0];
buffer = buffer.slice(1);
response = JSON.parse(buffer, response._fromJSON);
buffer = ReactDOMSharedInternals.d;
switch (id) {
case "D":
row.D(response);
buffer.D(response);
break;
case "C":
"string" === typeof response
? row.C(response)
: row.C(response[0], response[1]);
? buffer.C(response)
: buffer.C(response[0], response[1]);
break;

@@ -1195,18 +1283,20 @@ case "L":

tag = response[1];
3 === response.length ? row.L(id, tag, response[2]) : row.L(id, tag);
3 === response.length
? buffer.L(id, tag, response[2])
: buffer.L(id, tag);
break;
case "m":
"string" === typeof response
? row.m(response)
: row.m(response[0], response[1]);
? buffer.m(response)
: buffer.m(response[0], response[1]);
break;
case "X":
"string" === typeof response
? row.X(response)
: row.X(response[0], response[1]);
? buffer.X(response)
: buffer.X(response[0], response[1]);
break;
case "S":
"string" === typeof response
? row.S(response)
: row.S(
? buffer.S(response)
: buffer.S(
response[0],

@@ -1219,23 +1309,23 @@ 0 === response[1] ? void 0 : response[1],

"string" === typeof response
? row.M(response)
: row.M(response[0], response[1]);
? buffer.M(response)
: buffer.M(response[0], response[1]);
}
break;
case 69:
tag = JSON.parse(row).digest;
row = Error(
tag = JSON.parse(buffer).digest;
buffer = 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."
);
row.stack = "Error: " + row.message;
row.digest = tag;
buffer.stack = "Error: " + buffer.message;
buffer.digest = tag;
tag = response._chunks;
(buffer = tag.get(id))
? triggerErrorOnChunk(buffer, row)
: tag.set(id, new Chunk("rejected", null, row, response));
(chunk = tag.get(id))
? triggerErrorOnChunk(chunk, buffer)
: tag.set(id, new ReactPromise("rejected", null, buffer, response));
break;
case 84:
tag = response._chunks;
(buffer = tag.get(id)) && "pending" !== buffer.status
? buffer.reason.enqueueValue(row)
: tag.set(id, new Chunk("fulfilled", row, null, response));
(chunk = tag.get(id)) && "pending" !== chunk.status
? chunk.reason.enqueueValue(buffer)
: tag.set(id, new ReactPromise("fulfilled", buffer, null, response));
break;

@@ -1262,9 +1352,12 @@ case 68:

"fulfilled" === response.status &&
response.reason.close("" === row ? '"$undefined"' : row);
response.reason.close("" === buffer ? '"$undefined"' : buffer);
break;
default:
(tag = response._chunks),
(buffer = tag.get(id))
? resolveModelChunk(buffer, row)
: tag.set(id, new Chunk("resolved_model", row, null, response));
(chunk = tag.get(id))
? resolveModelChunk(chunk, buffer)
: tag.set(
id,
new ReactPromise("resolved_model", buffer, null, response)
);
}

@@ -1274,44 +1367,51 @@ }

return function (key, value) {
return "string" === typeof value
? parseModelString(response, this, key, value)
: "object" === typeof value && null !== value
? ((key =
value[0] === REACT_ELEMENT_TYPE
? {
$$typeof: REACT_ELEMENT_TYPE,
type: value[1],
key: value[2],
ref: null,
props: value[3]
}
: value),
key)
: value;
if ("string" === typeof value)
return parseModelString(response, this, key, value);
if ("object" === typeof value && null !== value) {
if (value[0] === REACT_ELEMENT_TYPE) {
if (
((key = {
$$typeof: REACT_ELEMENT_TYPE,
type: value[1],
key: value[2],
ref: null,
props: value[3]
}),
null !== initializingHandler)
)
if (
((value = initializingHandler),
(initializingHandler = value.parent),
value.errored)
)
(key = new ReactPromise("rejected", null, value.value, response)),
(key = createLazyChunkWrapper(key));
else if (0 < value.deps) {
var blockedChunk = new ReactPromise(
"blocked",
null,
null,
response
);
value.value = key;
value.chunk = blockedChunk;
key = createLazyChunkWrapper(blockedChunk);
}
} else key = value;
return key;
}
return value;
};
}
function createResponseFromOptions(options) {
var callServer = options && options.callServer ? options.callServer : void 0;
options =
return new ResponseInstance(
null,
null,
options && options.callServer ? options.callServer : void 0,
void 0,
void 0,
options && options.temporaryReferences
? options.temporaryReferences
: void 0;
var chunks = new Map();
callServer = {
_bundlerConfig: null,
_moduleLoading: null,
_callServer: void 0 !== callServer ? callServer : missingCall,
_encodeFormAction: void 0,
_nonce: void 0,
_chunks: chunks,
_stringDecoder: new TextDecoder(),
_fromJSON: null,
_rowState: 0,
_rowID: 0,
_rowTag: 0,
_rowLength: 0,
_buffer: [],
_tempRefs: options
};
callServer._fromJSON = createFromJSONCallback(callServer);
return callServer;
: void 0
);
}

@@ -1361,6 +1461,7 @@ function startReadingFromStream(response, stream) {

: (64 < rowState && 91 > rowState) ||
114 === rowState ||
120 === rowState
? ((rowTag = rowState), (rowState = 3), i++)
: ((rowTag = 0), (rowState = 3));
35 === rowState ||
114 === rowState ||
120 === rowState
? ((rowTag = rowState), (rowState = 3), i++)
: ((rowTag = 0), (rowState = 3));
continue;

@@ -1384,3 +1485,3 @@ case 2:

(rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)),
processFullRow(response, _ref, rowTag, buffer, rowLength),
processFullBinaryRow(response, _ref, rowTag, buffer, rowLength),
(i = lastIdx),

@@ -1428,8 +1529,8 @@ 3 === rowState && i++,

exports.createServerReference = function (id, callServer) {
function proxy() {
function action() {
var args = Array.prototype.slice.call(arguments);
return callServer(id, args);
}
registerServerReference(proxy, { id: id, bound: null });
return proxy;
registerServerReference(action, { id: id, bound: null });
return action;
};

@@ -1436,0 +1537,0 @@ exports.createTemporaryReferenceSet = function () {

@@ -72,4 +72,4 @@ /**

: 0 < promises.length
? Promise.all(promises)
: null;
? Promise.all(promises)
: null;
}

@@ -120,6 +120,6 @@ function prepareDestinationWithChunks(moduleLoading, chunks, nonce$jscomp$0) {

: Infinity === number
? "$Infinity"
: -Infinity === number
? "$-Infinity"
: "$NaN";
? "$Infinity"
: -Infinity === number
? "$-Infinity"
: "$NaN";
}

@@ -617,11 +617,27 @@ function processReply(

}
function createBoundServerReference(metaData, callServer, encodeFormAction) {
function action() {
var args = Array.prototype.slice.call(arguments);
return bound
? "fulfilled" === bound.status
? callServer(id, bound.value.concat(args))
: Promise.resolve(bound).then(function (boundArgs) {
return callServer(id, boundArgs.concat(args));
})
: callServer(id, args);
}
var id = metaData.id,
bound = metaData.bound;
registerServerReference(action, { id: id, bound: bound }, encodeFormAction);
return action;
}
function createServerReference$1(id, callServer, encodeFormAction) {
function proxy() {
function action() {
var args = Array.prototype.slice.call(arguments);
return callServer(id, args);
}
registerServerReference(proxy, { id: id, bound: null }, encodeFormAction);
return proxy;
registerServerReference(action, { id: id, bound: null }, encodeFormAction);
return action;
}
function Chunk(status, value, reason, response) {
function ReactPromise(status, value, reason, response) {
this.status = status;

@@ -632,4 +648,4 @@ this.value = value;

}
Chunk.prototype = Object.create(Promise.prototype);
Chunk.prototype.then = function (resolve, reject) {
ReactPromise.prototype = Object.create(Promise.prototype);
ReactPromise.prototype.then = function (resolve, reject) {
switch (this.status) {

@@ -648,3 +664,2 @@ case "resolved_model":

case "blocked":
case "cyclic":
resolve &&

@@ -672,3 +687,2 @@ (null === this.value && (this.value = []), this.value.push(resolve));

case "blocked":
case "cyclic":
throw chunk;

@@ -680,3 +694,3 @@ default:

function createPendingChunk(response) {
return new Chunk("pending", null, null, response);
return new ReactPromise("pending", null, null, response);
}

@@ -693,5 +707,15 @@ function wakeChunk(listeners, value) {

case "blocked":
case "cyclic":
chunk.value = resolveListeners;
chunk.reason = rejectListeners;
if (chunk.value)
for (var i = 0; i < resolveListeners.length; i++)
chunk.value.push(resolveListeners[i]);
else chunk.value = resolveListeners;
if (chunk.reason) {
if (rejectListeners)
for (
resolveListeners = 0;
resolveListeners < rejectListeners.length;
resolveListeners++
)
chunk.reason.push(rejectListeners[resolveListeners]);
} else chunk.reason = rejectListeners;
break;

@@ -713,3 +737,3 @@ case "rejected":

function createResolvedIteratorResultChunk(response, value, done) {
return new Chunk(
return new ReactPromise(
"resolved_model",

@@ -750,34 +774,31 @@ (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}",

}
var initializingChunk = null,
initializingChunkBlockedModel = null;
var initializingHandler = null;
function initializeModelChunk(chunk) {
var prevChunk = initializingChunk,
prevBlocked = initializingChunkBlockedModel;
initializingChunk = chunk;
initializingChunkBlockedModel = null;
var prevHandler = initializingHandler;
initializingHandler = null;
var resolvedModel = chunk.value;
chunk.status = "cyclic";
chunk.status = "blocked";
chunk.value = null;
chunk.reason = null;
try {
var value = JSON.parse(resolvedModel, chunk._response._fromJSON);
if (
null !== initializingChunkBlockedModel &&
0 < initializingChunkBlockedModel.deps
)
(initializingChunkBlockedModel.value = value),
(chunk.status = "blocked"),
(chunk.value = null),
(chunk.reason = null);
else {
var resolveListeners = chunk.value;
chunk.status = "fulfilled";
chunk.value = value;
null !== resolveListeners && wakeChunk(resolveListeners, value);
var value = JSON.parse(resolvedModel, chunk._response._fromJSON),
resolveListeners = chunk.value;
null !== resolveListeners &&
((chunk.value = null),
(chunk.reason = null),
wakeChunk(resolveListeners, value));
if (null !== initializingHandler) {
if (initializingHandler.errored) throw initializingHandler.value;
if (0 < initializingHandler.deps) {
initializingHandler.value = value;
initializingHandler.chunk = chunk;
return;
}
}
chunk.status = "fulfilled";
chunk.value = value;
} catch (error) {
(chunk.status = "rejected"), (chunk.reason = error);
} finally {
(initializingChunk = prevChunk),
(initializingChunkBlockedModel = prevBlocked);
initializingHandler = prevHandler;
}

@@ -797,6 +818,6 @@ }

: "" === metadata[2]
? moduleExports.__esModule
? moduleExports.default
: moduleExports
: moduleExports[metadata[2]];
? moduleExports.__esModule
? moduleExports.default
: moduleExports
: moduleExports[metadata[2]];
chunk.status = "fulfilled";

@@ -813,2 +834,5 @@ chunk.value = JSCompiler_inline_result;

}
function createLazyChunkWrapper(chunk) {
return { $$typeof: REACT_LAZY_TYPE, _payload: chunk, _init: readChunk };
}
function getChunk(response, id) {

@@ -820,7 +844,6 @@ var chunks = response._chunks,

}
function createModelResolver(
chunk,
function waitForReference(
referencedChunk,
parentObject,
key,
cyclic,
response,

@@ -830,43 +853,64 @@ map,

) {
if (initializingChunkBlockedModel) {
var blocked = initializingChunkBlockedModel;
cyclic || blocked.deps++;
function fulfill(value) {
for (var i = 1; i < path.length; i++) {
for (; value.$$typeof === REACT_LAZY_TYPE; )
if (((value = value._payload), value === handler.chunk))
value = handler.value;
else if ("fulfilled" === value.status) value = value.value;
else {
path.splice(0, i - 1);
value.then(fulfill, reject);
return;
}
value = value[path[i]];
}
parentObject[key] = map(response, value);
"" === key && null === handler.value && (handler.value = parentObject[key]);
parentObject[0] === REACT_ELEMENT_TYPE &&
"3" === key &&
"object" === typeof handler.value &&
null !== handler.value &&
handler.value.$$typeof === REACT_ELEMENT_TYPE &&
null === handler.value.props &&
(handler.value.props = parentObject[key]);
handler.deps--;
0 === handler.deps &&
((i = handler.chunk),
null !== i &&
"blocked" === i.status &&
((value = i.value),
(i.status = "fulfilled"),
(i.value = handler.value),
null !== value && wakeChunk(value, handler.value)));
}
function reject(error) {
if (!handler.errored) {
handler.errored = !0;
handler.value = error;
var chunk = handler.chunk;
null !== chunk &&
"blocked" === chunk.status &&
triggerErrorOnChunk(chunk, error);
}
}
if (initializingHandler) {
var handler = initializingHandler;
handler.deps++;
} else
blocked = initializingChunkBlockedModel = {
deps: cyclic ? 0 : 1,
value: null
handler = initializingHandler = {
parent: null,
chunk: null,
value: null,
deps: 1,
errored: !1
};
return function (value) {
for (var i = 1; i < path.length; i++) value = value[path[i]];
parentObject[key] = map(response, value);
"" === key && null === blocked.value && (blocked.value = parentObject[key]);
blocked.deps--;
0 === blocked.deps &&
"blocked" === chunk.status &&
((value = chunk.value),
(chunk.status = "fulfilled"),
(chunk.value = blocked.value),
null !== value && wakeChunk(value, blocked.value));
};
referencedChunk.then(fulfill, reject);
return null;
}
function createModelReject(chunk) {
return function (error) {
return triggerErrorOnChunk(chunk, error);
};
}
function createServerReferenceProxy(response, metaData) {
function proxy() {
var args = Array.prototype.slice.call(arguments),
p = metaData.bound;
return p
? "fulfilled" === p.status
? callServer(metaData.id, p.value.concat(args))
: Promise.resolve(p).then(function (bound) {
return callServer(metaData.id, bound.concat(args));
})
: callServer(metaData.id, args);
}
var callServer = response._callServer;
registerServerReference(proxy, metaData, response._encodeFormAction);
return proxy;
return createBoundServerReference(
metaData,
response._callServer,
response._encodeFormAction
);
}

@@ -886,25 +930,36 @@ function getOutlinedModel(response, reference, parentObject, key, map) {

case "fulfilled":
parentObject = id.value;
for (key = 1; key < reference.length; key++)
parentObject = parentObject[reference[key]];
return map(response, parentObject);
var value = id.value;
for (id = 1; id < reference.length; id++) {
for (; value.$$typeof === REACT_LAZY_TYPE; )
if (((value = value._payload), "fulfilled" === value.status))
value = value.value;
else
return waitForReference(
value,
parentObject,
key,
response,
map,
reference.slice(id - 1)
);
value = value[reference[id]];
}
return map(response, value);
case "pending":
case "blocked":
case "cyclic":
var parentChunk = initializingChunk;
id.then(
createModelResolver(
parentChunk,
parentObject,
key,
"cyclic" === id.status,
response,
map,
reference
),
createModelReject(parentChunk)
return waitForReference(id, parentObject, key, response, map, reference);
default:
return (
initializingHandler
? ((initializingHandler.errored = !0),
(initializingHandler.value = id.reason))
: (initializingHandler = {
parent: null,
chunk: null,
value: id.reason,
deps: 0,
errored: !0
}),
null
);
return null;
default:
throw id.reason;
}

@@ -935,3 +990,15 @@ }

if ("$" === value[0]) {
if ("$" === value) return REACT_ELEMENT_TYPE;
if ("$" === value)
return (
null !== initializingHandler &&
"0" === key &&
(initializingHandler = {
parent: initializingHandler,
chunk: null,
value: null,
deps: 0,
errored: !1
}),
REACT_ELEMENT_TYPE
);
switch (value[1]) {

@@ -944,3 +1011,3 @@ case "$":

(response = getChunk(response, parentObject)),
{ $$typeof: REACT_LAZY_TYPE, _payload: response, _init: readChunk }
createLazyChunkWrapper(response)
);

@@ -1023,2 +1090,24 @@ case "@":

}
function ResponseInstance(
bundlerConfig,
moduleLoading,
callServer,
encodeFormAction,
nonce,
temporaryReferences
) {
var chunks = new Map();
this._bundlerConfig = bundlerConfig;
this._moduleLoading = moduleLoading;
this._callServer = void 0 !== callServer ? callServer : missingCall;
this._encodeFormAction = encodeFormAction;
this._nonce = nonce;
this._chunks = chunks;
this._stringDecoder = new TextDecoder();
this._fromJSON = null;
this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
this._buffer = [];
this._tempRefs = temporaryReferences;
this._fromJSON = createFromJSONCallback(this);
}
function resolveBuffer(response, id, buffer) {

@@ -1029,3 +1118,3 @@ var chunks = response._chunks,

? chunk.reason.enqueueValue(buffer)
: chunks.set(id, new Chunk("fulfilled", buffer, null, response));
: chunks.set(id, new ReactPromise("fulfilled", buffer, null, response));
}

@@ -1047,3 +1136,3 @@ function resolveModule(response, id, model) {

} else
(blockedChunk = new Chunk("blocked", null, null, response)),
(blockedChunk = new ReactPromise("blocked", null, null, response)),
chunks.set(id, blockedChunk);

@@ -1063,3 +1152,3 @@ model.then(

id,
new Chunk("resolved_module", clientReference, null, response)
new ReactPromise("resolved_module", clientReference, null, response)
);

@@ -1077,3 +1166,6 @@ }

null !== response && wakeChunk(response, chunk.value))
: chunks.set(id, new Chunk("fulfilled", stream, controller, response));
: chunks.set(
id,
new ReactPromise("fulfilled", stream, controller, response)
);
}

@@ -1099,3 +1191,3 @@ function startReadableStream(response, id, type) {

if (null === previousBlockedChunk) {
var chunk = new Chunk("resolved_model", json, null, response);
var chunk = new ReactPromise("resolved_model", json, null, response);
initializeModelChunk(chunk);

@@ -1115,4 +1207,4 @@ "fulfilled" === chunk.status

chunk = previousBlockedChunk;
var chunk$50 = createPendingChunk(response);
chunk$50.then(
var chunk$52 = createPendingChunk(response);
chunk$52.then(
function (v) {

@@ -1125,6 +1217,6 @@ return controller.enqueue(v);

);
previousBlockedChunk = chunk$50;
previousBlockedChunk = chunk$52;
chunk.then(function () {
previousBlockedChunk === chunk$50 && (previousBlockedChunk = null);
resolveModelChunk(chunk$50, json);
previousBlockedChunk === chunk$52 && (previousBlockedChunk = null);
resolveModelChunk(chunk$52, json);
});

@@ -1178,3 +1270,3 @@ }

if (closed)
return new Chunk(
return new ReactPromise(
"fulfilled",

@@ -1198,3 +1290,3 @@ { done: !0, value: void 0 },

if (nextWriteIndex === buffer.length)
buffer[nextWriteIndex] = new Chunk(
buffer[nextWriteIndex] = new ReactPromise(
"fulfilled",

@@ -1259,4 +1351,4 @@ { done: !1, value: value },

byteLength = new Uint8Array(byteLength);
for (var i$51 = (i = 0); i$51 < l; i$51++) {
var chunk = buffer[i$51];
for (var i$53 = (i = 0); i$53 < l; i$53++) {
var chunk = buffer[i$53];
byteLength.set(chunk, i);

@@ -1287,3 +1379,3 @@ i += chunk.byteLength;

}
function processFullRow(response, id, tag, buffer, chunk) {
function processFullBinaryRow(response, id, tag, buffer, chunk) {
switch (tag) {

@@ -1340,20 +1432,20 @@ case 65:

row += stringDecoder.decode(buffer[i], decoderOptions);
row += stringDecoder.decode(chunk);
buffer = row += stringDecoder.decode(chunk);
switch (tag) {
case 73:
resolveModule(response, id, row);
resolveModule(response, id, buffer);
break;
case 72:
id = row[0];
row = row.slice(1);
response = JSON.parse(row, response._fromJSON);
row = ReactDOMSharedInternals.d;
id = buffer[0];
buffer = buffer.slice(1);
response = JSON.parse(buffer, response._fromJSON);
buffer = ReactDOMSharedInternals.d;
switch (id) {
case "D":
row.D(response);
buffer.D(response);
break;
case "C":
"string" === typeof response
? row.C(response)
: row.C(response[0], response[1]);
? buffer.C(response)
: buffer.C(response[0], response[1]);
break;

@@ -1363,18 +1455,20 @@ case "L":

tag = response[1];
3 === response.length ? row.L(id, tag, response[2]) : row.L(id, tag);
3 === response.length
? buffer.L(id, tag, response[2])
: buffer.L(id, tag);
break;
case "m":
"string" === typeof response
? row.m(response)
: row.m(response[0], response[1]);
? buffer.m(response)
: buffer.m(response[0], response[1]);
break;
case "X":
"string" === typeof response
? row.X(response)
: row.X(response[0], response[1]);
? buffer.X(response)
: buffer.X(response[0], response[1]);
break;
case "S":
"string" === typeof response
? row.S(response)
: row.S(
? buffer.S(response)
: buffer.S(
response[0],

@@ -1387,23 +1481,23 @@ 0 === response[1] ? void 0 : response[1],

"string" === typeof response
? row.M(response)
: row.M(response[0], response[1]);
? buffer.M(response)
: buffer.M(response[0], response[1]);
}
break;
case 69:
tag = JSON.parse(row).digest;
row = Error(
tag = JSON.parse(buffer).digest;
buffer = 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."
);
row.stack = "Error: " + row.message;
row.digest = tag;
buffer.stack = "Error: " + buffer.message;
buffer.digest = tag;
tag = response._chunks;
(buffer = tag.get(id))
? triggerErrorOnChunk(buffer, row)
: tag.set(id, new Chunk("rejected", null, row, response));
(chunk = tag.get(id))
? triggerErrorOnChunk(chunk, buffer)
: tag.set(id, new ReactPromise("rejected", null, buffer, response));
break;
case 84:
tag = response._chunks;
(buffer = tag.get(id)) && "pending" !== buffer.status
? buffer.reason.enqueueValue(row)
: tag.set(id, new Chunk("fulfilled", row, null, response));
(chunk = tag.get(id)) && "pending" !== chunk.status
? chunk.reason.enqueueValue(buffer)
: tag.set(id, new ReactPromise("fulfilled", buffer, null, response));
break;

@@ -1430,9 +1524,12 @@ case 68:

"fulfilled" === response.status &&
response.reason.close("" === row ? '"$undefined"' : row);
response.reason.close("" === buffer ? '"$undefined"' : buffer);
break;
default:
(tag = response._chunks),
(buffer = tag.get(id))
? resolveModelChunk(buffer, row)
: tag.set(id, new Chunk("resolved_model", row, null, response));
(chunk = tag.get(id))
? resolveModelChunk(chunk, buffer)
: tag.set(
id,
new ReactPromise("resolved_model", buffer, null, response)
);
}

@@ -1442,17 +1539,38 @@ }

return function (key, value) {
return "string" === typeof value
? parseModelString(response, this, key, value)
: "object" === typeof value && null !== value
? ((key =
value[0] === REACT_ELEMENT_TYPE
? {
$$typeof: REACT_ELEMENT_TYPE,
type: value[1],
key: value[2],
ref: null,
props: value[3]
}
: value),
key)
: value;
if ("string" === typeof value)
return parseModelString(response, this, key, value);
if ("object" === typeof value && null !== value) {
if (value[0] === REACT_ELEMENT_TYPE) {
if (
((key = {
$$typeof: REACT_ELEMENT_TYPE,
type: value[1],
key: value[2],
ref: null,
props: value[3]
}),
null !== initializingHandler)
)
if (
((value = initializingHandler),
(initializingHandler = value.parent),
value.errored)
)
(key = new ReactPromise("rejected", null, value.value, response)),
(key = createLazyChunkWrapper(key));
else if (0 < value.deps) {
var blockedChunk = new ReactPromise(
"blocked",
null,
null,
response
);
value.value = key;
value.chunk = blockedChunk;
key = createLazyChunkWrapper(blockedChunk);
}
} else key = value;
return key;
}
return value;
};

@@ -1466,29 +1584,12 @@ }

function createResponseFromOptions(options) {
var bundlerConfig = options.ssrManifest.moduleMap,
moduleLoading = options.ssrManifest.moduleLoading,
encodeFormAction = options.encodeFormAction,
nonce = "string" === typeof options.nonce ? options.nonce : void 0;
options =
return new ResponseInstance(
options.ssrManifest.moduleMap,
options.ssrManifest.moduleLoading,
noServerCall,
options.encodeFormAction,
"string" === typeof options.nonce ? options.nonce : void 0,
options && options.temporaryReferences
? options.temporaryReferences
: void 0;
var chunks = new Map();
bundlerConfig = {
_bundlerConfig: bundlerConfig,
_moduleLoading: moduleLoading,
_callServer: void 0 !== noServerCall ? noServerCall : missingCall,
_encodeFormAction: encodeFormAction,
_nonce: nonce,
_chunks: chunks,
_stringDecoder: new TextDecoder(),
_fromJSON: null,
_rowState: 0,
_rowID: 0,
_rowTag: 0,
_rowLength: 0,
_buffer: [],
_tempRefs: options
};
bundlerConfig._fromJSON = createFromJSONCallback(bundlerConfig);
return bundlerConfig;
: void 0
);
}

@@ -1538,6 +1639,7 @@ function startReadingFromStream(response, stream) {

: (64 < rowState && 91 > rowState) ||
114 === rowState ||
120 === rowState
? ((rowTag = rowState), (rowState = 3), i++)
: ((rowTag = 0), (rowState = 3));
35 === rowState ||
114 === rowState ||
120 === rowState
? ((rowTag = rowState), (rowState = 3), i++)
: ((rowTag = 0), (rowState = 3));
continue;

@@ -1561,3 +1663,3 @@ case 2:

(rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)),
processFullRow(response, _ref, rowTag, buffer, rowLength),
processFullBinaryRow(response, _ref, rowTag, buffer, rowLength),
(i = lastIdx),

@@ -1564,0 +1666,0 @@ 3 === rowState && i++,

@@ -73,4 +73,4 @@ /**

: 0 < promises.length
? Promise.all(promises)
: null;
? Promise.all(promises)
: null;
}

@@ -121,6 +121,6 @@ function prepareDestinationWithChunks(moduleLoading, chunks, nonce$jscomp$0) {

: Infinity === number
? "$Infinity"
: -Infinity === number
? "$-Infinity"
: "$NaN";
? "$Infinity"
: -Infinity === number
? "$-Infinity"
: "$NaN";
}

@@ -618,11 +618,27 @@ function processReply(

}
function createBoundServerReference(metaData, callServer, encodeFormAction) {
function action() {
var args = Array.prototype.slice.call(arguments);
return bound
? "fulfilled" === bound.status
? callServer(id, bound.value.concat(args))
: Promise.resolve(bound).then(function (boundArgs) {
return callServer(id, boundArgs.concat(args));
})
: callServer(id, args);
}
var id = metaData.id,
bound = metaData.bound;
registerServerReference(action, { id: id, bound: bound }, encodeFormAction);
return action;
}
function createServerReference$1(id, callServer, encodeFormAction) {
function proxy() {
function action() {
var args = Array.prototype.slice.call(arguments);
return callServer(id, args);
}
registerServerReference(proxy, { id: id, bound: null }, encodeFormAction);
return proxy;
registerServerReference(action, { id: id, bound: null }, encodeFormAction);
return action;
}
function Chunk(status, value, reason, response) {
function ReactPromise(status, value, reason, response) {
this.status = status;

@@ -633,4 +649,4 @@ this.value = value;

}
Chunk.prototype = Object.create(Promise.prototype);
Chunk.prototype.then = function (resolve, reject) {
ReactPromise.prototype = Object.create(Promise.prototype);
ReactPromise.prototype.then = function (resolve, reject) {
switch (this.status) {

@@ -649,3 +665,2 @@ case "resolved_model":

case "blocked":
case "cyclic":
resolve &&

@@ -673,3 +688,2 @@ (null === this.value && (this.value = []), this.value.push(resolve));

case "blocked":
case "cyclic":
throw chunk;

@@ -681,3 +695,3 @@ default:

function createPendingChunk(response) {
return new Chunk("pending", null, null, response);
return new ReactPromise("pending", null, null, response);
}

@@ -694,5 +708,15 @@ function wakeChunk(listeners, value) {

case "blocked":
case "cyclic":
chunk.value = resolveListeners;
chunk.reason = rejectListeners;
if (chunk.value)
for (var i = 0; i < resolveListeners.length; i++)
chunk.value.push(resolveListeners[i]);
else chunk.value = resolveListeners;
if (chunk.reason) {
if (rejectListeners)
for (
resolveListeners = 0;
resolveListeners < rejectListeners.length;
resolveListeners++
)
chunk.reason.push(rejectListeners[resolveListeners]);
} else chunk.reason = rejectListeners;
break;

@@ -714,3 +738,3 @@ case "rejected":

function createResolvedIteratorResultChunk(response, value, done) {
return new Chunk(
return new ReactPromise(
"resolved_model",

@@ -751,34 +775,31 @@ (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}",

}
var initializingChunk = null,
initializingChunkBlockedModel = null;
var initializingHandler = null;
function initializeModelChunk(chunk) {
var prevChunk = initializingChunk,
prevBlocked = initializingChunkBlockedModel;
initializingChunk = chunk;
initializingChunkBlockedModel = null;
var prevHandler = initializingHandler;
initializingHandler = null;
var resolvedModel = chunk.value;
chunk.status = "cyclic";
chunk.status = "blocked";
chunk.value = null;
chunk.reason = null;
try {
var value = JSON.parse(resolvedModel, chunk._response._fromJSON);
if (
null !== initializingChunkBlockedModel &&
0 < initializingChunkBlockedModel.deps
)
(initializingChunkBlockedModel.value = value),
(chunk.status = "blocked"),
(chunk.value = null),
(chunk.reason = null);
else {
var resolveListeners = chunk.value;
chunk.status = "fulfilled";
chunk.value = value;
null !== resolveListeners && wakeChunk(resolveListeners, value);
var value = JSON.parse(resolvedModel, chunk._response._fromJSON),
resolveListeners = chunk.value;
null !== resolveListeners &&
((chunk.value = null),
(chunk.reason = null),
wakeChunk(resolveListeners, value));
if (null !== initializingHandler) {
if (initializingHandler.errored) throw initializingHandler.value;
if (0 < initializingHandler.deps) {
initializingHandler.value = value;
initializingHandler.chunk = chunk;
return;
}
}
chunk.status = "fulfilled";
chunk.value = value;
} catch (error) {
(chunk.status = "rejected"), (chunk.reason = error);
} finally {
(initializingChunk = prevChunk),
(initializingChunkBlockedModel = prevBlocked);
initializingHandler = prevHandler;
}

@@ -798,6 +819,6 @@ }

: "" === metadata[2]
? moduleExports.__esModule
? moduleExports.default
: moduleExports
: moduleExports[metadata[2]];
? moduleExports.__esModule
? moduleExports.default
: moduleExports
: moduleExports[metadata[2]];
chunk.status = "fulfilled";

@@ -814,2 +835,5 @@ chunk.value = JSCompiler_inline_result;

}
function createLazyChunkWrapper(chunk) {
return { $$typeof: REACT_LAZY_TYPE, _payload: chunk, _init: readChunk };
}
function getChunk(response, id) {

@@ -821,7 +845,6 @@ var chunks = response._chunks,

}
function createModelResolver(
chunk,
function waitForReference(
referencedChunk,
parentObject,
key,
cyclic,
response,

@@ -831,43 +854,64 @@ map,

) {
if (initializingChunkBlockedModel) {
var blocked = initializingChunkBlockedModel;
cyclic || blocked.deps++;
function fulfill(value) {
for (var i = 1; i < path.length; i++) {
for (; value.$$typeof === REACT_LAZY_TYPE; )
if (((value = value._payload), value === handler.chunk))
value = handler.value;
else if ("fulfilled" === value.status) value = value.value;
else {
path.splice(0, i - 1);
value.then(fulfill, reject);
return;
}
value = value[path[i]];
}
parentObject[key] = map(response, value);
"" === key && null === handler.value && (handler.value = parentObject[key]);
parentObject[0] === REACT_ELEMENT_TYPE &&
"3" === key &&
"object" === typeof handler.value &&
null !== handler.value &&
handler.value.$$typeof === REACT_ELEMENT_TYPE &&
null === handler.value.props &&
(handler.value.props = parentObject[key]);
handler.deps--;
0 === handler.deps &&
((i = handler.chunk),
null !== i &&
"blocked" === i.status &&
((value = i.value),
(i.status = "fulfilled"),
(i.value = handler.value),
null !== value && wakeChunk(value, handler.value)));
}
function reject(error) {
if (!handler.errored) {
handler.errored = !0;
handler.value = error;
var chunk = handler.chunk;
null !== chunk &&
"blocked" === chunk.status &&
triggerErrorOnChunk(chunk, error);
}
}
if (initializingHandler) {
var handler = initializingHandler;
handler.deps++;
} else
blocked = initializingChunkBlockedModel = {
deps: cyclic ? 0 : 1,
value: null
handler = initializingHandler = {
parent: null,
chunk: null,
value: null,
deps: 1,
errored: !1
};
return function (value) {
for (var i = 1; i < path.length; i++) value = value[path[i]];
parentObject[key] = map(response, value);
"" === key && null === blocked.value && (blocked.value = parentObject[key]);
blocked.deps--;
0 === blocked.deps &&
"blocked" === chunk.status &&
((value = chunk.value),
(chunk.status = "fulfilled"),
(chunk.value = blocked.value),
null !== value && wakeChunk(value, blocked.value));
};
referencedChunk.then(fulfill, reject);
return null;
}
function createModelReject(chunk) {
return function (error) {
return triggerErrorOnChunk(chunk, error);
};
}
function createServerReferenceProxy(response, metaData) {
function proxy() {
var args = Array.prototype.slice.call(arguments),
p = metaData.bound;
return p
? "fulfilled" === p.status
? callServer(metaData.id, p.value.concat(args))
: Promise.resolve(p).then(function (bound) {
return callServer(metaData.id, bound.concat(args));
})
: callServer(metaData.id, args);
}
var callServer = response._callServer;
registerServerReference(proxy, metaData, response._encodeFormAction);
return proxy;
return createBoundServerReference(
metaData,
response._callServer,
response._encodeFormAction
);
}

@@ -887,25 +931,36 @@ function getOutlinedModel(response, reference, parentObject, key, map) {

case "fulfilled":
parentObject = id.value;
for (key = 1; key < reference.length; key++)
parentObject = parentObject[reference[key]];
return map(response, parentObject);
var value = id.value;
for (id = 1; id < reference.length; id++) {
for (; value.$$typeof === REACT_LAZY_TYPE; )
if (((value = value._payload), "fulfilled" === value.status))
value = value.value;
else
return waitForReference(
value,
parentObject,
key,
response,
map,
reference.slice(id - 1)
);
value = value[reference[id]];
}
return map(response, value);
case "pending":
case "blocked":
case "cyclic":
var parentChunk = initializingChunk;
id.then(
createModelResolver(
parentChunk,
parentObject,
key,
"cyclic" === id.status,
response,
map,
reference
),
createModelReject(parentChunk)
return waitForReference(id, parentObject, key, response, map, reference);
default:
return (
initializingHandler
? ((initializingHandler.errored = !0),
(initializingHandler.value = id.reason))
: (initializingHandler = {
parent: null,
chunk: null,
value: id.reason,
deps: 0,
errored: !0
}),
null
);
return null;
default:
throw id.reason;
}

@@ -936,3 +991,15 @@ }

if ("$" === value[0]) {
if ("$" === value) return REACT_ELEMENT_TYPE;
if ("$" === value)
return (
null !== initializingHandler &&
"0" === key &&
(initializingHandler = {
parent: initializingHandler,
chunk: null,
value: null,
deps: 0,
errored: !1
}),
REACT_ELEMENT_TYPE
);
switch (value[1]) {

@@ -945,3 +1012,3 @@ case "$":

(response = getChunk(response, parentObject)),
{ $$typeof: REACT_LAZY_TYPE, _payload: response, _init: readChunk }
createLazyChunkWrapper(response)
);

@@ -1024,3 +1091,3 @@ case "@":

}
function createResponse(
function ResponseInstance(
bundlerConfig,

@@ -1034,20 +1101,14 @@ moduleLoading,

var chunks = new Map();
bundlerConfig = {
_bundlerConfig: bundlerConfig,
_moduleLoading: moduleLoading,
_callServer: void 0 !== callServer ? callServer : missingCall,
_encodeFormAction: encodeFormAction,
_nonce: nonce,
_chunks: chunks,
_stringDecoder: new util.TextDecoder(),
_fromJSON: null,
_rowState: 0,
_rowID: 0,
_rowTag: 0,
_rowLength: 0,
_buffer: [],
_tempRefs: temporaryReferences
};
bundlerConfig._fromJSON = createFromJSONCallback(bundlerConfig);
return bundlerConfig;
this._bundlerConfig = bundlerConfig;
this._moduleLoading = moduleLoading;
this._callServer = void 0 !== callServer ? callServer : missingCall;
this._encodeFormAction = encodeFormAction;
this._nonce = nonce;
this._chunks = chunks;
this._stringDecoder = new util.TextDecoder();
this._fromJSON = null;
this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
this._buffer = [];
this._tempRefs = temporaryReferences;
this._fromJSON = createFromJSONCallback(this);
}

@@ -1059,3 +1120,3 @@ function resolveBuffer(response, id, buffer) {

? chunk.reason.enqueueValue(buffer)
: chunks.set(id, new Chunk("fulfilled", buffer, null, response));
: chunks.set(id, new ReactPromise("fulfilled", buffer, null, response));
}

@@ -1077,3 +1138,3 @@ function resolveModule(response, id, model) {

} else
(blockedChunk = new Chunk("blocked", null, null, response)),
(blockedChunk = new ReactPromise("blocked", null, null, response)),
chunks.set(id, blockedChunk);

@@ -1093,3 +1154,3 @@ model.then(

id,
new Chunk("resolved_module", clientReference, null, response)
new ReactPromise("resolved_module", clientReference, null, response)
);

@@ -1107,3 +1168,6 @@ }

null !== response && wakeChunk(response, chunk.value))
: chunks.set(id, new Chunk("fulfilled", stream, controller, response));
: chunks.set(
id,
new ReactPromise("fulfilled", stream, controller, response)
);
}

@@ -1129,3 +1193,3 @@ function startReadableStream(response, id, type) {

if (null === previousBlockedChunk) {
var chunk = new Chunk("resolved_model", json, null, response);
var chunk = new ReactPromise("resolved_model", json, null, response);
initializeModelChunk(chunk);

@@ -1145,4 +1209,4 @@ "fulfilled" === chunk.status

chunk = previousBlockedChunk;
var chunk$50 = createPendingChunk(response);
chunk$50.then(
var chunk$52 = createPendingChunk(response);
chunk$52.then(
function (v) {

@@ -1155,6 +1219,6 @@ return controller.enqueue(v);

);
previousBlockedChunk = chunk$50;
previousBlockedChunk = chunk$52;
chunk.then(function () {
previousBlockedChunk === chunk$50 && (previousBlockedChunk = null);
resolveModelChunk(chunk$50, json);
previousBlockedChunk === chunk$52 && (previousBlockedChunk = null);
resolveModelChunk(chunk$52, json);
});

@@ -1208,3 +1272,3 @@ }

if (closed)
return new Chunk(
return new ReactPromise(
"fulfilled",

@@ -1228,3 +1292,3 @@ { done: !0, value: void 0 },

if (nextWriteIndex === buffer.length)
buffer[nextWriteIndex] = new Chunk(
buffer[nextWriteIndex] = new ReactPromise(
"fulfilled",

@@ -1289,4 +1353,4 @@ { done: !1, value: value },

byteLength = new Uint8Array(byteLength);
for (var i$51 = (i = 0); i$51 < l; i$51++) {
var chunk = buffer[i$51];
for (var i$53 = (i = 0); i$53 < l; i$53++) {
var chunk = buffer[i$53];
byteLength.set(chunk, i);

@@ -1317,3 +1381,3 @@ i += chunk.byteLength;

}
function processFullRow(response, id, tag, buffer, chunk) {
function processFullBinaryRow(response, id, tag, buffer, chunk) {
switch (tag) {

@@ -1370,20 +1434,20 @@ case 65:

row += stringDecoder.decode(buffer[i], decoderOptions);
row += stringDecoder.decode(chunk);
buffer = row += stringDecoder.decode(chunk);
switch (tag) {
case 73:
resolveModule(response, id, row);
resolveModule(response, id, buffer);
break;
case 72:
id = row[0];
row = row.slice(1);
response = JSON.parse(row, response._fromJSON);
row = ReactDOMSharedInternals.d;
id = buffer[0];
buffer = buffer.slice(1);
response = JSON.parse(buffer, response._fromJSON);
buffer = ReactDOMSharedInternals.d;
switch (id) {
case "D":
row.D(response);
buffer.D(response);
break;
case "C":
"string" === typeof response
? row.C(response)
: row.C(response[0], response[1]);
? buffer.C(response)
: buffer.C(response[0], response[1]);
break;

@@ -1393,18 +1457,20 @@ case "L":

tag = response[1];
3 === response.length ? row.L(id, tag, response[2]) : row.L(id, tag);
3 === response.length
? buffer.L(id, tag, response[2])
: buffer.L(id, tag);
break;
case "m":
"string" === typeof response
? row.m(response)
: row.m(response[0], response[1]);
? buffer.m(response)
: buffer.m(response[0], response[1]);
break;
case "X":
"string" === typeof response
? row.X(response)
: row.X(response[0], response[1]);
? buffer.X(response)
: buffer.X(response[0], response[1]);
break;
case "S":
"string" === typeof response
? row.S(response)
: row.S(
? buffer.S(response)
: buffer.S(
response[0],

@@ -1417,23 +1483,23 @@ 0 === response[1] ? void 0 : response[1],

"string" === typeof response
? row.M(response)
: row.M(response[0], response[1]);
? buffer.M(response)
: buffer.M(response[0], response[1]);
}
break;
case 69:
tag = JSON.parse(row).digest;
row = Error(
tag = JSON.parse(buffer).digest;
buffer = 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."
);
row.stack = "Error: " + row.message;
row.digest = tag;
buffer.stack = "Error: " + buffer.message;
buffer.digest = tag;
tag = response._chunks;
(buffer = tag.get(id))
? triggerErrorOnChunk(buffer, row)
: tag.set(id, new Chunk("rejected", null, row, response));
(chunk = tag.get(id))
? triggerErrorOnChunk(chunk, buffer)
: tag.set(id, new ReactPromise("rejected", null, buffer, response));
break;
case 84:
tag = response._chunks;
(buffer = tag.get(id)) && "pending" !== buffer.status
? buffer.reason.enqueueValue(row)
: tag.set(id, new Chunk("fulfilled", row, null, response));
(chunk = tag.get(id)) && "pending" !== chunk.status
? chunk.reason.enqueueValue(buffer)
: tag.set(id, new ReactPromise("fulfilled", buffer, null, response));
break;

@@ -1460,9 +1526,12 @@ case 68:

"fulfilled" === response.status &&
response.reason.close("" === row ? '"$undefined"' : row);
response.reason.close("" === buffer ? '"$undefined"' : buffer);
break;
default:
(tag = response._chunks),
(buffer = tag.get(id))
? resolveModelChunk(buffer, row)
: tag.set(id, new Chunk("resolved_model", row, null, response));
(chunk = tag.get(id))
? resolveModelChunk(chunk, buffer)
: tag.set(
id,
new ReactPromise("resolved_model", buffer, null, response)
);
}

@@ -1472,17 +1541,38 @@ }

return function (key, value) {
return "string" === typeof value
? parseModelString(response, this, key, value)
: "object" === typeof value && null !== value
? ((key =
value[0] === REACT_ELEMENT_TYPE
? {
$$typeof: REACT_ELEMENT_TYPE,
type: value[1],
key: value[2],
ref: null,
props: value[3]
}
: value),
key)
: value;
if ("string" === typeof value)
return parseModelString(response, this, key, value);
if ("object" === typeof value && null !== value) {
if (value[0] === REACT_ELEMENT_TYPE) {
if (
((key = {
$$typeof: REACT_ELEMENT_TYPE,
type: value[1],
key: value[2],
ref: null,
props: value[3]
}),
null !== initializingHandler)
)
if (
((value = initializingHandler),
(initializingHandler = value.parent),
value.errored)
)
(key = new ReactPromise("rejected", null, value.value, response)),
(key = createLazyChunkWrapper(key));
else if (0 < value.deps) {
var blockedChunk = new ReactPromise(
"blocked",
null,
null,
response
);
value.value = key;
value.chunk = blockedChunk;
key = createLazyChunkWrapper(blockedChunk);
}
} else key = value;
return key;
}
return value;
};

@@ -1496,3 +1586,3 @@ }

exports.createFromNodeStream = function (stream, ssrManifest, options) {
var response = createResponse(
var response = new ResponseInstance(
ssrManifest.moduleMap,

@@ -1544,6 +1634,7 @@ ssrManifest.moduleLoading,

: (64 < rowState && 91 > rowState) ||
114 === rowState ||
120 === rowState
? ((rowTag = rowState), (rowState = 3), i++)
: ((rowTag = 0), (rowState = 3));
35 === rowState ||
114 === rowState ||
120 === rowState
? ((rowTag = rowState), (rowState = 3), i++)
: ((rowTag = 0), (rowState = 3));
continue;

@@ -1567,3 +1658,3 @@ case 2:

(rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
processFullRow(response, rowID, rowTag, buffer, rowLength),
processFullBinaryRow(response, rowID, rowTag, buffer, rowLength),
(i = lastIdx),

@@ -1570,0 +1661,0 @@ 3 === rowState && i++,

{
"name": "react-server-dom-turbopack",
"description": "React Server Components bindings for DOM using Turbopack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
"version": "19.0.0-rc-3f1436cca1-20240516",
"version": "19.0.0-rc-47352209-20240912",
"keywords": [

@@ -19,3 +19,2 @@ "react"

"client.node.js",
"client.node.unbundled.js",
"server.js",

@@ -25,6 +24,7 @@ "server.browser.js",

"server.node.js",
"server.node.unbundled.js",
"node-register.js",
"cjs/",
"esm/"
"static.js",
"static.browser.js",
"static.edge.js",
"static.node.js",
"cjs/"
],

@@ -37,7 +37,3 @@ "exports": {

"worker": "./client.edge.js",
"node": {
"turbopack": "./client.node.js",
"webpack": "./client.node.js",
"default": "./client.node.unbundled.js"
},
"node": "./client.node.js",
"edge-light": "./client.edge.js",

@@ -50,3 +46,2 @@ "browser": "./client.browser.js",

"./client.node": "./client.node.js",
"./client.node.unbundled": "./client.node.unbundled.js",
"./server": {

@@ -56,7 +51,3 @@ "react-server": {

"deno": "./server.browser.js",
"node": {
"turbopack": "./server.node.js",
"webpack": "./server.node.js",
"default": "./server.node.unbundled.js"
},
"node": "./server.node.js",
"edge-light": "./server.edge.js",

@@ -70,5 +61,15 @@ "browser": "./server.browser.js"

"./server.node": "./server.node.js",
"./server.node.unbundled": "./server.node.unbundled.js",
"./node-loader": "./esm/react-server-dom-turbopack-node-loader.production.js",
"./node-register": "./node-register.js",
"./static": {
"react-server": {
"workerd": "./static.edge.js",
"deno": "./static.browser.js",
"node": "./static.node.js",
"edge-light": "./static.edge.js",
"browser": "./static.browser.js"
},
"default": "./static.js"
},
"./static.browser": "./static.browser.js",
"./static.edge": "./static.edge.js",
"./static.node": "./static.node.js",
"./package.json": "./package.json"

@@ -86,4 +87,4 @@ },

"peerDependencies": {
"react": "19.0.0-rc-3f1436cca1-20240516",
"react-dom": "19.0.0-rc-3f1436cca1-20240516"
"react": "19.0.0-rc-47352209-20240912",
"react-dom": "19.0.0-rc-47352209-20240912"
},

@@ -90,0 +91,0 @@ "dependencies": {

'use strict';
var s;
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-server.browser.production.js');
s = require('./cjs/react-server-dom-turbopack-server.browser.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-server.browser.development.js');
s = require('./cjs/react-server-dom-turbopack-server.browser.development.js');
}
exports.renderToReadableStream = s.renderToReadableStream;
exports.decodeReply = s.decodeReply;
exports.decodeAction = s.decodeAction;
exports.decodeFormState = s.decodeFormState;
exports.registerServerReference = s.registerServerReference;
exports.registerClientReference = s.registerClientReference;
exports.createClientModuleProxy = s.createClientModuleProxy;
exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;
'use strict';
var s;
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-server.edge.production.js');
s = require('./cjs/react-server-dom-turbopack-server.edge.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-server.edge.development.js');
s = require('./cjs/react-server-dom-turbopack-server.edge.development.js');
}
exports.renderToReadableStream = s.renderToReadableStream;
exports.decodeReply = s.decodeReply;
exports.decodeAction = s.decodeAction;
exports.decodeFormState = s.decodeFormState;
exports.registerServerReference = s.registerServerReference;
exports.registerClientReference = s.registerClientReference;
exports.createClientModuleProxy = s.createClientModuleProxy;
exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;
'use strict';
var s;
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-server.node.production.js');
s = require('./cjs/react-server-dom-turbopack-server.node.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-server.node.development.js');
s = require('./cjs/react-server-dom-turbopack-server.node.development.js');
}
exports.renderToPipeableStream = s.renderToPipeableStream;
exports.decodeReplyFromBusboy = s.decodeReplyFromBusboy;
exports.decodeReply = s.decodeReply;
exports.decodeAction = s.decodeAction;
exports.decodeFormState = s.decodeFormState;
exports.registerServerReference = s.registerServerReference;
exports.registerClientReference = s.registerClientReference;
exports.createClientModuleProxy = s.createClientModuleProxy;
exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc