react-server-dom-webpack 18.3.0-canary-b7972822b-20230503 → 18.3.0-canary-b00e27342-20230505

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.
Files changed (21) hide show
  1. package/cjs/react-server-dom-webpack-client.browser.development.js +1180 -1096
  2. package/cjs/react-server-dom-webpack-client.browser.production.min.js +27 -25
  3. package/cjs/react-server-dom-webpack-client.edge.development.js +722 -3
  4. package/cjs/react-server-dom-webpack-client.edge.production.min.js +24 -18
  5. package/cjs/react-server-dom-webpack-client.node.development.js +722 -3
  6. package/cjs/react-server-dom-webpack-client.node.production.min.js +25 -19
  7. package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +722 -3
  8. package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +24 -17
  9. package/cjs/react-server-dom-webpack-server.browser.development.js +82 -4
  10. package/cjs/react-server-dom-webpack-server.browser.production.min.js +43 -41
  11. package/cjs/react-server-dom-webpack-server.edge.development.js +82 -4
  12. package/cjs/react-server-dom-webpack-server.edge.production.min.js +49 -47
  13. package/cjs/react-server-dom-webpack-server.node.development.js +82 -4
  14. package/cjs/react-server-dom-webpack-server.node.production.min.js +54 -52
  15. package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +82 -4
  16. package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +53 -51
  17. package/package.json +3 -3
  18. package/umd/react-server-dom-webpack-client.browser.development.js +1180 -1096
  19. package/umd/react-server-dom-webpack-client.browser.production.min.js +21 -19
  20. package/umd/react-server-dom-webpack-server.browser.development.js +82 -4
  21. package/umd/react-server-dom-webpack-server.browser.production.min.js +41 -40
@@ -7,22 +7,28 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- 'use strict';var p=require("react-dom"),r=require("react"),t={stream:!0};function u(a,b){if(a){var c=a[b.id];if(a=c[b.name])c=a.name;else{a=c["*"];if(!a)throw Error('Could not find the module "'+b.id+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');c=b.name}return{id:a.id,chunks:a.chunks,name:c,async:!!b.async}}return b}var v=new Map,w=new Map;function x(){}
11
- function y(a){for(var b=a.chunks,c=[],d=0;d<b.length;d++){var g=b[d],e=v.get(g);if(void 0===e){e=__webpack_chunk_load__(g);c.push(e);var l=v.set.bind(v,g,null);e.then(l,x);v.set(g,e)}else null!==e&&c.push(e)}if(a.async){if(b=w.get(a.id))return"fulfilled"===b.status?null:b;var m=Promise.all(c).then(function(){return __webpack_require__(a.id)});m.then(function(h){m.status="fulfilled";m.value=h},function(h){m.status="rejected";m.reason=h});w.set(a.id,m);return m}return 0<c.length?Promise.all(c):null}
12
- var z=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,A=new WeakMap,B=Symbol.for("react.element"),C=Symbol.for("react.lazy"),D=Symbol.for("react.default_value"),E=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function F(a,b,c,d){this.status=a;this.value=b;this.reason=c;this._response=d}F.prototype=Object.create(Promise.prototype);
13
- F.prototype.then=function(a,b){switch(this.status){case "resolved_model":G(this);break;case "resolved_module":H(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":a&&(null===this.value&&(this.value=[]),this.value.push(a));b&&(null===this.reason&&(this.reason=[]),this.reason.push(b));break;default:b(this.reason)}};
14
- function I(a){switch(a.status){case "resolved_model":G(a);break;case "resolved_module":H(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":throw a;default:throw a.reason;}}function J(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function K(a,b,c){switch(a.status){case "fulfilled":J(b,a.value);break;case "pending":case "blocked":a.value=b;a.reason=c;break;case "rejected":c&&J(c,a.reason)}}
15
- function L(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&J(c,b)}}function M(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,d=a.reason;a.status="resolved_module";a.value=b;null!==c&&(H(a),K(a,c,d))}}var N=null,O=null;
16
- function G(a){var b=N,c=O;N=a;O=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==O&&0<O.deps?(O.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(g){a.status="rejected",a.reason=g}finally{N=b,O=c}}
17
- function H(a){try{var b=a.value;if(b.async){var c=w.get(b.id);if("fulfilled"===c.status)var d=c.value;else throw c.reason;}else d=__webpack_require__(b.id);var g="*"===b.name?d:""===b.name?d.__esModule?d.default:d:d[b.name];a.status="fulfilled";a.value=g}catch(e){a.status="rejected",a.reason=e}}function P(a,b){a._chunks.forEach(function(c){"pending"===c.status&&L(c,b)})}function Q(a,b){var c=a._chunks,d=c.get(b);d||(d=new F("pending",null,null,a),c.set(b,d));return d}
18
- function R(a,b,c){if(O){var d=O;d.deps++}else d=O={deps:1,value:null};return function(g){b[c]=g;d.deps--;0===d.deps&&"blocked"===a.status&&(g=a.value,a.status="fulfilled",a.value=d.value,null!==g&&J(g,d.value))}}function S(a){return function(b){return L(a,b)}}
19
- function T(a,b){function c(){var g=Array.prototype.slice.call(arguments),e=b.bound;return e?"fulfilled"===e.status?d(b.id,e.value.concat(g)):Promise.resolve(e).then(function(l){return d(b.id,l.concat(g))}):d(b.id,g)}var d=a._callServer;A.set(c,b);return c}
20
- function U(a,b,c,d){if("$"===d[0]){if("$"===d)return B;switch(d[1]){case "$":return d.slice(1);case "L":return b=parseInt(d.slice(2),16),a=Q(a,b),{$$typeof:C,_payload:a,_init:I};case "@":return b=parseInt(d.slice(2),16),Q(a,b);case "S":return Symbol.for(d.slice(2));case "P":return a=d.slice(2),E[a]||(E[a]=r.createServerContext(a,D)),E[a].Provider;case "F":b=parseInt(d.slice(2),16);b=Q(a,b);switch(b.status){case "resolved_model":G(b)}switch(b.status){case "fulfilled":return T(a,b.value);default:throw b.reason;
21
- }case "I":return Infinity;case "-":return"$-0"===d?-0:-Infinity;case "N":return NaN;case "u":return;case "D":return new Date(Date.parse(d.slice(2)));case "n":return BigInt(d.slice(2));default:d=parseInt(d.slice(1),16);a=Q(a,d);switch(a.status){case "resolved_model":G(a);break;case "resolved_module":H(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=N,a.then(R(d,b,c),S(d)),null;default:throw a.reason;}}}return d}
22
- function V(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function W(a,b,c){var d=a._chunks,g=d.get(b);c=JSON.parse(c,a._fromJSON);var e=u(a._bundlerConfig,c);if(c=y(e)){if(g){var l=g;l.status="blocked"}else l=new F("blocked",null,null,a),d.set(b,l);c.then(function(){return M(l,e)},function(m){return L(l,m)})}else g?M(g,e):d.set(b,new F("resolved_module",e,null,a))}
23
- function aa(a){return function(b,c){return"string"===typeof c?U(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===B?{$$typeof:B,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}function X(a,b){var c=new TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:V,_chunks:d,_partialRow:"",_stringDecoder:c};a._fromJSON=aa(a);return a}
10
+ 'use strict';var q=require("react-dom"),t=require("react"),u={stream:!0};function v(a,b){if(a){var c=a[b.id];if(a=c[b.name])c=a.name;else{a=c["*"];if(!a)throw Error('Could not find the module "'+b.id+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');c=b.name}return{id:a.id,chunks:a.chunks,name:c,async:!!b.async}}return b}var w=new Map,y=new Map;function z(){}
11
+ function A(a){for(var b=a.chunks,c=[],d=0;d<b.length;d++){var f=b[d],g=w.get(f);if(void 0===g){g=__webpack_chunk_load__(f);c.push(g);var n=w.set.bind(w,f,null);g.then(n,z);w.set(f,g)}else null!==g&&c.push(g)}if(a.async){if(b=y.get(a.id))return"fulfilled"===b.status?null:b;var l=Promise.all(c).then(function(){return __webpack_require__(a.id)});l.then(function(h){l.status="fulfilled";l.value=h},function(h){l.status="rejected";l.reason=h});y.set(a.id,l);return l}return 0<c.length?Promise.all(c):null}
12
+ var B=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,C=Symbol.for("react.element"),D=Symbol.for("react.lazy"),E=Symbol.for("react.default_value"),F=Symbol.iterator;function G(a){if(null===a||"object"!==typeof a)return null;a=F&&a[F]||a["@@iterator"];return"function"===typeof a?a:null}var H=Array.isArray,I=new WeakMap;function J(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
13
+ function aa(a,b,c,d){function f(h,e){if(null===e)return null;if("object"===typeof e){if("function"===typeof e.then){null===l&&(l=new FormData);n++;var k=g++;e.then(function(r){r=JSON.stringify(r,f);var x=l;x.append(b+k,r);n--;0===n&&c(x)},function(r){d(r)});return"$@"+k.toString(16)}if(e instanceof FormData){null===l&&(l=new FormData);var m=l;h=g++;var p=b+h+"_";e.forEach(function(r,x){m.append(p+x,r)});return"$K"+h.toString(16)}return!H(e)&&G(e)?Array.from(e):e}if("string"===typeof e){if("Z"===e[e.length-
14
+ 1]&&this[h]instanceof Date)return"$D"+e;e="$"===e[0]?"$"+e:e;return e}if("boolean"===typeof e)return e;if("number"===typeof e)return J(e);if("undefined"===typeof e)return"$undefined";if("function"===typeof e){e=I.get(e);if(void 0!==e)return e=JSON.stringify(e,f),null===l&&(l=new FormData),h=g++,l.set(b+h,e),"$F"+h.toString(16);throw Error("Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.");}if("symbol"===typeof e){h=e.description;
15
+ if(Symbol.for(h)!==e)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+(e.description+") cannot be found among global symbols."));return"$S"+h}if("bigint"===typeof e)return"$n"+e.toString(10);throw Error("Type "+typeof e+" is not supported as an argument to a Server Function.");}var g=1,n=0,l=null;a=JSON.stringify(a,f);null===l?c(a):(l.set(b+"0",a),0===n&&c(l))}var K=new WeakMap;
16
+ function ba(a){var b,c,d=new Promise(function(f,g){b=f;c=g});aa(a,"",function(f){if("string"===typeof f){var g=new FormData;g.append("0",f);f=g}d.status="fulfilled";d.value=f;b(f)},function(f){d.status="rejected";d.reason=f;c(f)});return d}
17
+ function ca(a){var b=I.get(this);if(!b)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");var c=null;if(null!==b.bound){c=K.get(b);c||(c=ba(b),K.set(b,c));if("rejected"===c.status)throw c.reason;if("fulfilled"!==c.status)throw c;b=c.value;var d=new FormData;b.forEach(function(f,g){d.append("$ACTION_"+a+":"+g,f)});c=d;b="$ACTION_REF_"+a}else b="$ACTION_ID_"+b.id;return{name:b,method:"POST",encType:"multipart/form-data",data:c}}
18
+ var L=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function M(a,b,c,d){this.status=a;this.value=b;this.reason=c;this._response=d}M.prototype=Object.create(Promise.prototype);
19
+ M.prototype.then=function(a,b){switch(this.status){case "resolved_model":N(this);break;case "resolved_module":O(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":a&&(null===this.value&&(this.value=[]),this.value.push(a));b&&(null===this.reason&&(this.reason=[]),this.reason.push(b));break;default:b(this.reason)}};
20
+ function da(a){switch(a.status){case "resolved_model":N(a);break;case "resolved_module":O(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":throw a;default:throw a.reason;}}function P(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function Q(a,b,c){switch(a.status){case "fulfilled":P(b,a.value);break;case "pending":case "blocked":a.value=b;a.reason=c;break;case "rejected":c&&P(c,a.reason)}}
21
+ function R(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&P(c,b)}}function S(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,d=a.reason;a.status="resolved_module";a.value=b;null!==c&&(O(a),Q(a,c,d))}}var T=null,U=null;
22
+ function N(a){var b=T,c=U;T=a;U=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==U&&0<U.deps?(U.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(f){a.status="rejected",a.reason=f}finally{T=b,U=c}}
23
+ function O(a){try{var b=a.value;if(b.async){var c=y.get(b.id);if("fulfilled"===c.status)var d=c.value;else throw c.reason;}else d=__webpack_require__(b.id);var f="*"===b.name?d:""===b.name?d.__esModule?d.default:d:d[b.name];a.status="fulfilled";a.value=f}catch(g){a.status="rejected",a.reason=g}}function V(a,b){a._chunks.forEach(function(c){"pending"===c.status&&R(c,b)})}function W(a,b){var c=a._chunks,d=c.get(b);d||(d=new M("pending",null,null,a),c.set(b,d));return d}
24
+ function ea(a,b,c){if(U){var d=U;d.deps++}else d=U={deps:1,value:null};return function(f){b[c]=f;d.deps--;0===d.deps&&"blocked"===a.status&&(f=a.value,a.status="fulfilled",a.value=d.value,null!==f&&P(f,d.value))}}function fa(a){return function(b){return R(a,b)}}
25
+ function ha(a,b){function c(){var f=Array.prototype.slice.call(arguments),g=b.bound;return g?"fulfilled"===g.status?d(b.id,g.value.concat(f)):Promise.resolve(g).then(function(n){return d(b.id,n.concat(f))}):d(b.id,f)}var d=a._callServer;c.$$FORM_ACTION=ca;I.set(c,b);return c}
26
+ function ia(a,b,c,d){if("$"===d[0]){if("$"===d)return C;switch(d[1]){case "$":return d.slice(1);case "L":return b=parseInt(d.slice(2),16),a=W(a,b),{$$typeof:D,_payload:a,_init:da};case "@":return b=parseInt(d.slice(2),16),W(a,b);case "S":return Symbol.for(d.slice(2));case "P":return a=d.slice(2),L[a]||(L[a]=t.createServerContext(a,E)),L[a].Provider;case "F":b=parseInt(d.slice(2),16);b=W(a,b);switch(b.status){case "resolved_model":N(b)}switch(b.status){case "fulfilled":return ha(a,b.value);default:throw b.reason;
27
+ }case "I":return Infinity;case "-":return"$-0"===d?-0:-Infinity;case "N":return NaN;case "u":return;case "D":return new Date(Date.parse(d.slice(2)));case "n":return BigInt(d.slice(2));default:d=parseInt(d.slice(1),16);a=W(a,d);switch(a.status){case "resolved_model":N(a);break;case "resolved_module":O(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=T,a.then(ea(d,b,c),fa(d)),null;default:throw a.reason;}}}return d}
28
+ function ja(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function ka(a,b,c){var d=a._chunks,f=d.get(b);c=JSON.parse(c,a._fromJSON);var g=v(a._bundlerConfig,c);if(c=A(g)){if(f){var n=f;n.status="blocked"}else n=new M("blocked",null,null,a),d.set(b,n);c.then(function(){return S(n,g)},function(l){return R(n,l)})}else f?S(f,g):d.set(b,new M("resolved_module",g,null,a))}
29
+ function la(a){return function(b,c){return"string"===typeof c?ia(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===C?{$$typeof:C,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}function X(a,b){var c=new TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ja,_chunks:d,_partialRow:"",_stringDecoder:c};a._fromJSON=la(a);return a}
24
30
  function Y(){throw Error("Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead.");}
25
- function Z(a,b){function c(e){var l=e.value;if(e.done)P(a,Error("Connection closed."));else{e=l;l=a._stringDecoder;for(var m=e.indexOf(10);-1<m;){var h=a._partialRow;var n=e.subarray(0,m);n=l.decode(n);var f=h+n;h=a;if(""!==f){var k=f.indexOf(":",0);n=parseInt(f.slice(0,k),16);switch(f[k+1]){case "I":W(h,n,f.slice(k+2));break;case "H":n=f[k+2];f=f.slice(k+3);h=JSON.parse(f,h._fromJSON);f=void 0;var q=z.current;if(q)switch("string"===typeof h?k=h:(k=h[0],f=h[1]),n){case "D":q.prefetchDNS(k,f);break;
26
- case "C":q.preconnect(k,f);break;case "L":q.preload(k,f);break;case "I":q.preinit(k,f)}break;case "E":k=JSON.parse(f.slice(k+2)).digest;f=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.");f.stack="Error: "+f.message;f.digest=k;k=h._chunks;(q=k.get(n))?L(q,f):k.set(n,new F("rejected",
27
- null,f,h));break;default:f=f.slice(k+1),k=h._chunks,(q=k.get(n))?(h=q,n=f,"pending"===h.status&&(f=h.value,k=h.reason,h.status="resolved_model",h.value=n,null!==f&&(G(h),K(h,f,k)))):k.set(n,new F("resolved_model",f,null,h))}}a._partialRow="";e=e.subarray(m+1);m=e.indexOf(10)}a._partialRow+=l.decode(e,t);return g.read().then(c).catch(d)}}function d(e){P(a,e)}var g=b.getReader();g.read().then(c).catch(d)}
28
- exports.createFromFetch=function(a,b){var c=X(b&&b.moduleMap?b.moduleMap:null,Y);a.then(function(d){Z(c,d.body)},function(d){P(c,d)});return Q(c,0)};exports.createFromReadableStream=function(a,b){b=X(b&&b.moduleMap?b.moduleMap:null,Y);Z(b,a);return Q(b,0)};exports.createServerReference=function(){return Y};
31
+ function Z(a,b){function c(g){var n=g.value;if(g.done)V(a,Error("Connection closed."));else{g=n;n=a._stringDecoder;for(var l=g.indexOf(10);-1<l;){var h=a._partialRow;var e=g.subarray(0,l);e=n.decode(e);var k=h+e;h=a;if(""!==k){var m=k.indexOf(":",0);e=parseInt(k.slice(0,m),16);switch(k[m+1]){case "I":ka(h,e,k.slice(m+2));break;case "H":e=k[m+2];k=k.slice(m+3);h=JSON.parse(k,h._fromJSON);k=void 0;var p=B.current;if(p)switch("string"===typeof h?m=h:(m=h[0],k=h[1]),e){case "D":p.prefetchDNS(m,k);break;
32
+ case "C":p.preconnect(m,k);break;case "L":p.preload(m,k);break;case "I":p.preinit(m,k)}break;case "E":m=JSON.parse(k.slice(m+2)).digest;k=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.");k.stack="Error: "+k.message;k.digest=m;m=h._chunks;(p=m.get(e))?R(p,k):m.set(e,new M("rejected",
33
+ null,k,h));break;default:k=k.slice(m+1),m=h._chunks,(p=m.get(e))?(h=p,e=k,"pending"===h.status&&(k=h.value,m=h.reason,h.status="resolved_model",h.value=e,null!==k&&(N(h),Q(h,k,m)))):m.set(e,new M("resolved_model",k,null,h))}}a._partialRow="";g=g.subarray(l+1);l=g.indexOf(10)}a._partialRow+=n.decode(g,u);return f.read().then(c).catch(d)}}function d(g){V(a,g)}var f=b.getReader();f.read().then(c).catch(d)}
34
+ exports.createFromFetch=function(a,b){var c=X(b&&b.moduleMap?b.moduleMap:null,Y);a.then(function(d){Z(c,d.body)},function(d){V(c,d)});return W(c,0)};exports.createFromReadableStream=function(a,b){b=X(b&&b.moduleMap?b.moduleMap:null,Y);Z(b,a);return W(b,0)};exports.createServerReference=function(){return Y};