react-server-dom-webpack 0.0.1 → 18.3.0-next-d925a8d0b-20221024
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/LICENSE +21 -0
- package/README.md +5 -0
- package/cjs/react-server-dom-webpack-client.development.js +893 -0
- package/cjs/react-server-dom-webpack-client.production.min.js +26 -0
- package/cjs/react-server-dom-webpack-node-register.js +143 -0
- package/cjs/react-server-dom-webpack-plugin.js +255 -0
- package/cjs/react-server-dom-webpack-server.browser.development.js +2305 -0
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +56 -0
- package/cjs/react-server-dom-webpack-server.node.development.js +2360 -0
- package/cjs/react-server-dom-webpack-server.node.production.min.js +58 -0
- package/client.js +7 -0
- package/esm/package.json +3 -0
- package/esm/react-server-dom-webpack-node-loader.js +277 -0
- package/index.js +12 -1
- package/node-register.js +3 -0
- package/package.json +55 -12
- package/plugin.js +3 -0
- package/server.browser.js +7 -0
- package/server.js +6 -0
- package/server.node.js +7 -0
- package/umd/react-server-dom-webpack-client.development.js +890 -0
- package/umd/react-server-dom-webpack-client.production.min.js +23 -0
- package/umd/react-server-dom-webpack-server.browser.development.js +2301 -0
- package/umd/react-server-dom-webpack-server.browser.production.min.js +49 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
/**
|
2
|
+
* @license React
|
3
|
+
* react-server-dom-webpack-server.browser.production.min.js
|
4
|
+
*
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
6
|
+
*
|
7
|
+
* This source code is licensed under the MIT license found in the
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
9
|
+
*/
|
10
|
+
'use strict';var ba=require("react");var e="function"===typeof AsyncLocalStorage,ca=e?new AsyncLocalStorage:null,m=null,n=0;function p(a,b){if(0!==b.length)if(512<b.length)0<n&&(a.enqueue(new Uint8Array(m.buffer,0,n)),m=new Uint8Array(512),n=0),a.enqueue(b);else{var d=m.length-n;d<b.length&&(0===d?a.enqueue(m):(m.set(b.subarray(0,d),n),a.enqueue(m),b=b.subarray(d)),m=new Uint8Array(512),n=0);m.set(b,n);n+=b.length}return!0}var q=new TextEncoder;
|
11
|
+
function r(a){return q.encode(a)}function da(a,b){"function"===typeof a.error?a.error(b):a.close()}var t=JSON.stringify,v=Symbol.for("react.module.reference"),w=Symbol.for("react.element"),ea=Symbol.for("react.fragment"),fa=Symbol.for("react.provider"),ha=Symbol.for("react.server_context"),ia=Symbol.for("react.forward_ref"),ja=Symbol.for("react.suspense"),ka=Symbol.for("react.suspense_list"),la=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),ma=Symbol.for("react.default_value"),na=Symbol.for("react.memo_cache_sentinel");
|
12
|
+
function y(a,b,d,c,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=f;this.mustUseProperty=d;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new y(a,0,!1,a,null,!1,!1)});
|
13
|
+
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new y(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new y(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new y(a,2,!1,a,null,!1,!1)});
|
14
|
+
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new y(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new y(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new y(a,4,!1,a,null,!1,!1)});
|
15
|
+
["cols","rows","size","span"].forEach(function(a){new y(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new y(a,5,!1,a.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function B(a){return a[1].toUpperCase()}
|
16
|
+
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(A,
|
17
|
+
B);new y(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(A,B);new y(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(A,B);new y(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new y(a,1,!1,a.toLowerCase(),null,!1,!1)});
|
18
|
+
new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new y(a,1,!1,a.toLowerCase(),null,!0,!0)});
|
19
|
+
var C={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,
|
20
|
+
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oa=["Webkit","ms","Moz","O"];Object.keys(C).forEach(function(a){oa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);C[b]=C[a]})});var pa=Array.isArray;r("<script>");r("\x3c/script>");r('<script src="');r('<script type="module" src="');r('" integrity="');r('" async="">\x3c/script>');r("\x3c!-- --\x3e");r(' style="');r(":");r(";");r(" ");r('="');r('"');
|
21
|
+
r('=""');r(">");r("/>");r(' selected=""');r("\n");r("<!DOCTYPE html>");r("</");r(">");r('<template id="');r('"></template>');r("\x3c!--$--\x3e");r('\x3c!--$?--\x3e<template id="');r('"></template>');r("\x3c!--$!--\x3e");r("\x3c!--/$--\x3e");r("<template");r('"');r(' data-dgst="');r(' data-msg="');r(' data-stck="');r("></template>");r('<div hidden id="');r('">');r("</div>");r('<svg aria-hidden="true" style="display:none" id="');r('">');r("</svg>");r('<math aria-hidden="true" style="display:none" id="');
|
22
|
+
r('">');r("</math>");r('<table hidden id="');r('">');r("</table>");r('<table hidden><tbody id="');r('">');r("</tbody></table>");r('<table hidden><tr id="');r('">');r("</tr></table>");r('<table hidden><colgroup id="');r('">');r("</colgroup></table>");r('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("');r('$RS("');r('","');r('")\x3c/script>');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("');
|
23
|
+
r('$RC("');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("');
|
24
|
+
r('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("');
|
25
|
+
r('$RR("');r('","');r('",');r('"');r(")\x3c/script>");r('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');r('$RX("');r('"');r(")\x3c/script>");r(",");r('<style data-precedence="');r('"></style>');r("[");r(",[");r(",");r("]");var D=null;
|
26
|
+
function E(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var d=b.parent;if(null===a){if(null!==d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");E(a,d);b.context._currentValue=b.value}}}function qa(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&qa(a)}
|
27
|
+
function ra(a){var b=a.parent;null!==b&&ra(b);a.context._currentValue=a.value}function sa(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?E(a,b):sa(a,b)}
|
28
|
+
function ta(a,b){var d=b.parent;if(null===d)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===d.depth?E(a,d):ta(a,d);b.context._currentValue=b.value}function F(a){var b=D;b!==a&&(null===b?ra(a):null===a?qa(b):b.depth===a.depth?E(b,a):b.depth>a.depth?sa(b,a):ta(b,a),D=a)}function ua(a,b){var d=a._currentValue;a._currentValue=b;var c=D;return D=a={parent:c,depth:null===c?0:c.depth+1,context:a,parentValue:d,value:b}}function va(){}
|
29
|
+
function wa(a,b,d){d=a[d];void 0===d?a.push(b):d!==b&&(b.then(va,va),b=d);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:throw"string"!==typeof b.status&&(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}})),b;}}var G=null,H=0,I=null;function xa(){var a=I;I=null;return a}function ya(a){return a._currentValue}
|
30
|
+
var Da={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:J,useTransition:J,readContext:ya,useContext:ya,useReducer:J,useRef:J,useState:J,useInsertionEffect:J,useLayoutEffect:J,useImperativeHandle:J,useEffect:J,useId:za,useMutableSource:J,useSyncExternalStore:J,useCacheRefresh:function(){return Ba},useMemoCache:function(a){for(var b=Array(a),d=0;d<a;d++)b[d]=na;return b},use:Ca};
|
31
|
+
function J(){throw Error("This Hook is not supported in Server Components.");}function Ba(){throw Error("Refreshing the cache is not supported in Server Components.");}function za(){if(null===G)throw Error("useId can only be used while React is rendering");var a=G.identifierCount++;return":"+G.identifierPrefix+"S"+a.toString(32)+":"}
|
32
|
+
function Ca(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=H;H+=1;null===I&&(I=[]);return wa(I,a,b)}if(a.$$typeof===ha)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function K(){return(new AbortController).signal}function Ea(){if(L)return L;if(e){var a=ca.getStore();if(a)return a}return new Map}
|
33
|
+
var Fa={getCacheSignal:function(){var a=Ea(),b=a.get(K);void 0===b&&(b=K(),a.set(K,b));return b},getCacheForType:function(a){var b=Ea(),d=b.get(a);void 0===d&&(d=a(),b.set(a,d));return d}},L=null,M=ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=M.ContextRegistry,O=M.ReactCurrentDispatcher,P=M.ReactCurrentCache;function Ga(a){console.error(a)}
|
34
|
+
function Ha(a,b,d,c,f){if(null!==P.current&&P.current!==Fa)throw Error("Currently React only supports one RSC renderer at a time.");P.current=Fa;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,identifierPrefix:f||"",identifierCount:1,onError:void 0===
|
35
|
+
d?Ga:d,toJSON:function(a,b){return Ia(k,this,a,b)}};k.pendingChunks++;b=Ja(c);a=Ka(k,a,b,g);h.push(a);return k}var La={};function Ma(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}
|
36
|
+
function Na(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:x,_payload:a,_init:Ma}}
|
37
|
+
function Q(a,b,d,c,f){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof a){if(a.$$typeof===v)return[w,a,b,c];H=0;I=f;c=a(c);return"object"===typeof c&&null!==c&&"function"===typeof c.then?Na(c):c}if("string"===typeof a)return[w,a,b,c];if("symbol"===typeof a)return a===ea?c.children:[w,a,b,c];if(null!=a&&"object"===typeof a){if(a.$$typeof===v)return[w,a,b,c];switch(a.$$typeof){case x:var g=a._init;a=g(a._payload);
|
38
|
+
return Q(a,b,d,c,f);case ia:return b=a.render,H=0,I=f,b(c,void 0);case la:return Q(a.type,b,d,c,f);case fa:return ua(a._context,c.value),[w,a,b,{value:c.value,children:c.children,__pop:La}]}}throw Error("Unsupported Server Component type: "+R(a));}function Ka(a,b,d,c){var f={id:a.nextChunkId++,status:0,model:b,context:d,ping:function(){var b=a.pingedTasks;b.push(f);1===b.length&&S(a)},thenableState:null};c.add(f);return f}
|
39
|
+
function Oa(a,b,d,c){var f=c.filepath+"#"+c.name+(c.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return b[0]===w&&"1"===d?"@"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[c.filepath][c.name];var l=c.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var z=a.nextChunkId++,X=t(l),Y="M"+z.toString(16)+":"+X+"\n";var Z=q.encode(Y);a.completedModuleChunks.push(Z);g.set(f,z);return b[0]===w&&"1"===d?"@"+z.toString(16):"$"+z.toString(16)}catch(aa){return a.pendingChunks++,
|
40
|
+
b=a.nextChunkId++,d=T(a,aa),U(a,b,d),"$"+b.toString(16)}}function Pa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,d){return d})}function R(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(pa(a))return"[...]";a=Pa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}}
|
41
|
+
function V(a){if("string"===typeof a)return a;switch(a){case ja:return"Suspense";case ka:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case ia:return V(a.render);case la:return V(a.type);case x:var b=a._payload;a=a._init;try{return V(a(b))}catch(d){}}return""}
|
42
|
+
function W(a,b){var d=Pa(a);if("Object"!==d&&"Array"!==d)return d;d=-1;var c=0;if(pa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?W(h):R(h);""+g===b?(d=f.length,c=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===w)f="<"+V(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?W(l):
|
43
|
+
R(l);k===b?(d=f.length,c=l.length,f+=l):f=10>l.length&&40>f.length+l.length?f+l:f+"..."}f+="}"}return void 0===b?f:-1<d&&0<c?(a=" ".repeat(d)+"^".repeat(c),"\n "+f+"\n "+a):"\n "+f}
|
44
|
+
function Ia(a,b,d,c){switch(c){case w:return"$"}for(;"object"===typeof c&&null!==c&&(c.$$typeof===w||c.$$typeof===x);)try{switch(c.$$typeof){case w:var f=c;c=Q(f.type,f.key,f.ref,f.props,null);break;case x:var g=c._init;c=g(c._payload)}}catch(h){if("object"===typeof h&&null!==h&&"function"===typeof h.then)return a.pendingChunks++,a=Ka(a,c,D,a.abortableTasks),c=a.ping,h.then(c,c),a.thenableState=xa(),"@"+a.id.toString(16);a.pendingChunks++;c=a.nextChunkId++;d=T(a,h);U(a,c,d);return"@"+c.toString(16)}if(null===
|
45
|
+
c)return null;if("object"===typeof c){if(c.$$typeof===v)return Oa(a,b,d,c);if(c.$$typeof===fa)return f=c._context._globalName,b=a.writtenProviders,c=b.get(d),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(f,c),d="P"+c.toString(16)+":"+f+"\n",d=q.encode(d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(c===La){a=D;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");c=a.parentValue;a.context._currentValue=c===ma?a.context._defaultValue:c;D=
|
46
|
+
a.parent;return}return c}if("string"===typeof c)return a="$"===c[0]||"@"===c[0]?"$"+c:c,a;if("boolean"===typeof c||"number"===typeof c||"undefined"===typeof c)return c;if("function"===typeof c){if(c.$$typeof===v)return Oa(a,b,d,c);if(/^on[A-Z]/.test(d))throw Error("Event handlers cannot be passed to Client Component props."+W(b,d)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error("Functions cannot be passed directly to Client Components because they're not serializable."+
|
47
|
+
W(b,d));}if("symbol"===typeof c){f=a.writtenSymbols;g=f.get(c);if(void 0!==g)return"$"+g.toString(16);g=c.description;if(Symbol.for(g)!==c)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(c.description+") cannot be found among global symbols.")+W(b,d));a.pendingChunks++;d=a.nextChunkId++;b=t(g);b="S"+d.toString(16)+":"+b+"\n";b=q.encode(b);a.completedModuleChunks.push(b);f.set(c,d);return"$"+d.toString(16)}if("bigint"===typeof c)throw Error("BigInt ("+
|
48
|
+
c+") is not yet supported in Client Component props."+W(b,d));throw Error("Type "+typeof c+" is not supported in Client Component props."+W(b,d));}function T(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}
|
49
|
+
function Qa(a,b){null!==a.destination?(a.status=2,da(a.destination,b)):(a.status=1,a.fatalError=b)}function U(a,b,d){d={digest:d};b="E"+b.toString(16)+":"+t(d)+"\n";b=q.encode(b);a.completedErrorChunks.push(b)}
|
50
|
+
function S(a){var b=O.current,d=L;O.current=Da;L=a.cache;G=a;try{var c=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<c.length;f++){var g=c[f];var h=a;if(0===g.status){F(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===w){var l=k,z=g.thenableState;g.model=k;k=Q(l.type,l.key,l.ref,l.props,z);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===w;)l=k,g.model=k,k=Q(l.type,l.key,l.ref,l.props,null)}var X=g.id,Y=t(k,h.toJSON),Z="J"+X.toString(16)+":"+Y+"\n";var aa=
|
51
|
+
q.encode(Z);h.completedJSONChunks.push(aa);h.abortableTasks.delete(g);g.status=1}catch(u){if("object"===typeof u&&null!==u&&"function"===typeof u.then){var Aa=g.ping;u.then(Aa,Aa);g.thenableState=xa()}else{h.abortableTasks.delete(g);g.status=4;var Ta=T(h,u);U(h,g.id,Ta)}}}}null!==a.destination&&Ra(a,a.destination)}catch(u){T(a,u),Qa(a,u)}finally{O.current=b,L=d,G=null}}
|
52
|
+
function Ra(a,b){m=new Uint8Array(512);n=0;try{for(var d=a.completedModuleChunks,c=0;c<d.length;c++)if(a.pendingChunks--,!p(b,d[c])){a.destination=null;c++;break}d.splice(0,c);var f=a.completedJSONChunks;for(c=0;c<f.length;c++)if(a.pendingChunks--,!p(b,f[c])){a.destination=null;c++;break}f.splice(0,c);var g=a.completedErrorChunks;for(c=0;c<g.length;c++)if(a.pendingChunks--,!p(b,g[c])){a.destination=null;c++;break}g.splice(0,c)}finally{m&&0<n&&(b.enqueue(new Uint8Array(m.buffer,0,n)),m=null,n=0)}0===
|
53
|
+
a.pendingChunks&&b.close()}function Sa(a,b){try{var d=a.abortableTasks;if(0<d.size){var c=T(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var f=a.nextChunkId++;U(a,f,c);d.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=b.id;c=t(c);c="J"+b.toString(16)+":"+c+"\n";c=q.encode(c);a.completedErrorChunks.push(c)});d.clear()}null!==a.destination&&Ra(a,a.destination)}catch(g){T(a,g),Qa(a,g)}}
|
54
|
+
function Ja(a){if(a){var b=D;F(null);for(var d=0;d<a.length;d++){var c=a[d],f=c[0];c=c[1];N[f]||(N[f]=ba.createServerContext(f,ma));ua(N[f],c)}a=D;F(b);return a}return null}
|
55
|
+
exports.renderToReadableStream=function(a,b,d){var c=Ha(a,b,d?d.onError:void 0,d?d.context:void 0,d?d.identifierPrefix:void 0);if(d&&d.signal){var f=d.signal;if(f.aborted)Sa(c,f.reason);else{var g=function(){Sa(c,f.reason);f.removeEventListener("abort",g)};f.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){e?ca.run(c.cache,S,c):S(c)},pull:function(a){if(1===c.status)c.status=2,da(a,c.fatalError);else if(2!==c.status&&null===c.destination){c.destination=a;try{Ra(c,
|
56
|
+
a)}catch(k){T(c,k),Qa(c,k)}}},cancel:function(){}},{highWaterMark:0})};
|