react-server-dom-webpack 18.3.0-canary-21a161fa3-20230609 → 18.3.0-canary-ce6842d8f-20230610

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.
@@ -1537,14 +1537,9 @@ function createResponse(bundlerConfig, callServer) {
1537
1537
  _callServer: callServer !== undefined ? callServer : missingCall,
1538
1538
  _chunks: chunks,
1539
1539
  _partialRow: '',
1540
- _stringDecoder: null,
1540
+ _stringDecoder: createStringDecoder(),
1541
1541
  _fromJSON: null
1542
- };
1543
-
1544
- {
1545
- response._stringDecoder = createStringDecoder();
1546
- } // Don't inline this call because it causes closure to outline the call above.
1547
-
1542
+ }; // Don't inline this call because it causes closure to outline the call above.
1548
1543
 
1549
1544
  response._fromJSON = createFromJSONCallback(response);
1550
1545
  return response;
@@ -1669,8 +1664,8 @@ function processFullRow(response, row) {
1669
1664
  }
1670
1665
  }
1671
1666
  }
1672
- function processBinaryChunk(response, chunk) {
1673
1667
 
1668
+ function processBinaryChunk(response, chunk) {
1674
1669
  var stringDecoder = response._stringDecoder;
1675
1670
  var linebreak = chunk.indexOf(10); // newline
1676
1671
 
@@ -25,7 +25,7 @@ function da(a,b,c){if(V){var d=V;d.deps++}else d=V={deps:1,value:null};return fu
25
25
  function fa(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=L;I.set(c,b);return c}
26
26
  function ha(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=X(a,b),{$$typeof:D,_payload:a,_init:ca};case "@":return b=parseInt(d.slice(2),16),X(a,b);case "S":return Symbol.for(d.slice(2));case "P":return a=d.slice(2),M[a]||(M[a]=t.createServerContext(a,E)),M[a].Provider;case "F":b=parseInt(d.slice(2),16);b=X(a,b);switch(b.status){case "resolved_model":O(b)}switch(b.status){case "fulfilled":return fa(a,b.value);default:throw b.reason;
27
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=X(a,d);switch(a.status){case "resolved_model":O(a);break;case "resolved_module":P(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=U,a.then(da(d,b,c),ea(d)),null;default:throw a.reason;}}}return d}
28
- function ia(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function Y(a,b){var c=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ia,_chunks:c,_partialRow:"",_stringDecoder:null,_fromJSON:null};a._stringDecoder=new TextDecoder;a._fromJSON=ja(a);return a}
28
+ function ia(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function Y(a,b){var c=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ia,_chunks:c,_partialRow:"",_stringDecoder:new TextDecoder,_fromJSON:null};a._fromJSON=ja(a);return a}
29
29
  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 N("blocked",null,null,a),d.set(b,n);c.then(function(){return T(n,g)},function(l){return S(n,l)})}else f?T(f,g):d.set(b,new N("resolved_module",g,null,a))}
30
30
  function ja(a){return function(b,c){return"string"===typeof c?ha(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}}
31
31
  function Z(a,b){function c(g){var n=g.value;if(g.done)W(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;
@@ -1521,14 +1521,9 @@ function createResponse(bundlerConfig, callServer) {
1521
1521
  _callServer: callServer !== undefined ? callServer : missingCall,
1522
1522
  _chunks: chunks,
1523
1523
  _partialRow: '',
1524
- _stringDecoder: null,
1524
+ _stringDecoder: createStringDecoder(),
1525
1525
  _fromJSON: null
1526
- };
1527
-
1528
- {
1529
- response._stringDecoder = createStringDecoder();
1530
- } // Don't inline this call because it causes closure to outline the call above.
1531
-
1526
+ }; // Don't inline this call because it causes closure to outline the call above.
1532
1527
 
1533
1528
  response._fromJSON = createFromJSONCallback(response);
1534
1529
  return response;
@@ -1653,8 +1648,8 @@ function processFullRow(response, row) {
1653
1648
  }
1654
1649
  }
1655
1650
  }
1656
- function processBinaryChunk(response, chunk) {
1657
1651
 
1652
+ function processBinaryChunk(response, chunk) {
1658
1653
  var stringDecoder = response._stringDecoder;
1659
1654
  var linebreak = chunk.indexOf(10); // newline
1660
1655
 
@@ -25,7 +25,7 @@ function ea(a,b,c){if(U){var d=U;d.deps++}else d=U={deps:1,value:null};return fu
25
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
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
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 X(a,b){var c=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ja,_chunks:c,_partialRow:"",_stringDecoder:null,_fromJSON:null};a._stringDecoder=new TextDecoder;a._fromJSON=ka(a);return a}
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 X(a,b){var c=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ja,_chunks:c,_partialRow:"",_stringDecoder:new TextDecoder,_fromJSON:null};a._fromJSON=ka(a);return a}
29
29
  function la(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))}
30
30
  function ka(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 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.");}
31
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":la(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;
@@ -1522,14 +1522,9 @@ function createResponse(bundlerConfig, callServer) {
1522
1522
  _callServer: callServer !== undefined ? callServer : missingCall,
1523
1523
  _chunks: chunks,
1524
1524
  _partialRow: '',
1525
- _stringDecoder: null,
1525
+ _stringDecoder: createStringDecoder(),
1526
1526
  _fromJSON: null
1527
- };
1528
-
1529
- {
1530
- response._stringDecoder = createStringDecoder();
1531
- } // Don't inline this call because it causes closure to outline the call above.
1532
-
1527
+ }; // Don't inline this call because it causes closure to outline the call above.
1533
1528
 
1534
1529
  response._fromJSON = createFromJSONCallback(response);
1535
1530
  return response;
@@ -1655,21 +1650,7 @@ function processFullRow(response, row) {
1655
1650
  }
1656
1651
  }
1657
1652
 
1658
- function processStringChunk(response, chunk, offset) {
1659
- var linebreak = chunk.indexOf('\n', offset);
1660
-
1661
- while (linebreak > -1) {
1662
- var fullrow = response._partialRow + chunk.slice(offset, linebreak);
1663
- processFullRow(response, fullrow);
1664
- response._partialRow = '';
1665
- offset = linebreak + 1;
1666
- linebreak = chunk.indexOf('\n', offset);
1667
- }
1668
-
1669
- response._partialRow += chunk.slice(offset);
1670
- }
1671
1653
  function processBinaryChunk(response, chunk) {
1672
-
1673
1654
  var stringDecoder = response._stringDecoder;
1674
1655
  var linebreak = chunk.indexOf(10); // newline
1675
1656
 
@@ -1723,11 +1704,7 @@ function createServerReference(id, callServer) {
1723
1704
  function createFromNodeStream(stream, moduleMap) {
1724
1705
  var response = createResponse(moduleMap, noServerCall);
1725
1706
  stream.on('data', function (chunk) {
1726
- if (typeof chunk === 'string') {
1727
- processStringChunk(response, chunk, 0);
1728
- } else {
1729
- processBinaryChunk(response, chunk);
1730
- }
1707
+ processBinaryChunk(response, chunk);
1731
1708
  });
1732
1709
  stream.on('error', function (error) {
1733
1710
  reportGlobalError(response, error);
@@ -7,28 +7,27 @@
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 m=require("util"),p=require("react-dom"),q=require("react"),r={stream:!0};function t(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 e=b[d],f=v.get(e);if(void 0===f){f=__webpack_chunk_load__(e);c.push(f);var k=v.set.bind(v,e,null);f.then(k,x);v.set(e,f)}else null!==f&&c.push(f)}if(a.async){if(b=w.get(a.id))return"fulfilled"===b.status?null:b;var h=Promise.all(c).then(function(){return __webpack_require__(a.id)});h.then(function(l){h.status="fulfilled";h.value=l},function(l){h.status="rejected";h.reason=l});w.set(a.id,h);return h}return 0<c.length?Promise.all(c):null}
12
- var z=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,A=Symbol.for("react.element"),B=Symbol.for("react.lazy"),C=Symbol.for("react.default_value"),D=Symbol.iterator;function E(a){if(null===a||"object"!==typeof a)return null;a=D&&a[D]||a["@@iterator"];return"function"===typeof a?a:null}var G=Array.isArray,H=new WeakMap;function I(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
13
- function J(a,b,c,d){function e(l,g){if(null===g)return null;if("object"===typeof g){if("function"===typeof g.then){null===h&&(h=new FormData);k++;var F=f++;g.then(function(n){n=JSON.stringify(n,e);var u=h;u.append(b+F,n);k--;0===k&&c(u)},function(n){d(n)});return"$@"+F.toString(16)}if(g instanceof FormData){null===h&&(h=new FormData);var Z=h;l=f++;var aa=b+l+"_";g.forEach(function(n,u){Z.append(aa+u,n)});return"$K"+l.toString(16)}return!G(g)&&E(g)?Array.from(g):g}if("string"===typeof g){if("Z"===
14
- g[g.length-1]&&this[l]instanceof Date)return"$D"+g;g="$"===g[0]?"$"+g:g;return g}if("boolean"===typeof g)return g;if("number"===typeof g)return I(g);if("undefined"===typeof g)return"$undefined";if("function"===typeof g){g=H.get(g);if(void 0!==g)return g=JSON.stringify(g,e),null===h&&(h=new FormData),l=f++,h.set(b+l,g),"$F"+l.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 g){l=
15
- g.description;if(Symbol.for(l)!==g)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+(g.description+") cannot be found among global symbols."));return"$S"+l}if("bigint"===typeof g)return"$n"+g.toString(10);throw Error("Type "+typeof g+" is not supported as an argument to a Server Function.");}var f=1,k=0,h=null;a=JSON.stringify(a,e);null===h?c(a):(h.set(b+"0",a),0===k&&c(h))}var K=new WeakMap;
16
- function ba(a){var b,c,d=new Promise(function(e,f){b=e;c=f});J(a,"",function(e){if("string"===typeof e){var f=new FormData;f.append("0",e);e=f}d.status="fulfilled";d.value=e;b(e)},function(e){d.status="rejected";d.reason=e;c(e)});return d}
17
- function ca(a){var b=H.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(e,f){d.append("$ACTION_"+a+":"+f,e)});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=q.__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(e){a.status="rejected",a.reason=e}finally{T=b,U=c}}
23
- function O(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 e="*"===b.name?d:""===b.name?d.__esModule?d.default:d:d[b.name];a.status="fulfilled";a.value=e}catch(f){a.status="rejected",a.reason=f}}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(e){b[c]=e;d.deps--;0===d.deps&&"blocked"===a.status&&(e=a.value,a.status="fulfilled",a.value=d.value,null!==e&&P(e,d.value))}}function fa(a){return function(b){return R(a,b)}}
25
- function ha(a,b){function c(){var e=Array.prototype.slice.call(arguments),f=b.bound;return f?"fulfilled"===f.status?d(b.id,f.value.concat(e)):Promise.resolve(f).then(function(k){return d(b.id,k.concat(e))}):d(b.id,e)}var d=a._callServer;c.$$FORM_ACTION=ca;H.set(c,b);return c}
26
- function ia(a,b,c,d){if("$"===d[0]){if("$"===d)return A;switch(d[1]){case "$":return d.slice(1);case "L":return b=parseInt(d.slice(2),16),a=W(a,b),{$$typeof:B,_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]=q.createServerContext(a,C)),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){var c=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ja,_chunks:c,_partialRow:"",_stringDecoder:null,_fromJSON:null};a._stringDecoder=new m.TextDecoder;a._fromJSON=la(a);return a}
29
- function ma(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=t(a._bundlerConfig,c);if(c=y(f)){if(e){var k=e;k.status="blocked"}else k=new M("blocked",null,null,a),d.set(b,k);c.then(function(){return S(k,f)},function(h){return R(k,h)})}else e?S(e,f):d.set(b,new M("resolved_module",f,null,a))}
30
- function X(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.slice(0,c),16);switch(b[c+1]){case "I":ma(a,d,b.slice(c+2));break;case "H":d=b[c+2];b=b.slice(c+3);a=JSON.parse(b,a._fromJSON);if(b=z.current){if("string"===typeof a)c=a;else{c=a[0];var e=a[1]}switch(d){case "D":b.prefetchDNS(c,e);break;case "C":b.preconnect(c,e);break;case "L":b.preload(c,e);break;case "I":b.preinit(c,e)}}break;case "E":b=JSON.parse(b.slice(c+2)).digest;e=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.");
31
- e.stack="Error: "+e.message;e.digest=b;b=a._chunks;(c=b.get(d))?R(c,e):b.set(d,new M("rejected",null,e,a));break;default:e=b.slice(c+1),c=a._chunks,(b=c.get(d))?"pending"===b.status&&(a=b.value,d=b.reason,b.status="resolved_model",b.value=e,null!==a&&(N(b),Q(b,a,d))):c.set(d,new M("resolved_model",e,null,a))}}}
32
- function la(a){return function(b,c){return"string"===typeof c?ia(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===A?{$$typeof:A,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}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.");}
33
- exports.createFromNodeStream=function(a,b){var c=ka(b,Y);a.on("data",function(d){if("string"===typeof d){for(var e=0,f=d.indexOf("\n",e);-1<f;)e=c._partialRow+d.slice(e,f),X(c,e),c._partialRow="",e=f+1,f=d.indexOf("\n",e);c._partialRow+=d.slice(e)}else{f=c._stringDecoder;for(e=d.indexOf(10);-1<e;){var k=c._partialRow;var h=d.subarray(0,e);h=f.decode(h);X(c,k+h);c._partialRow="";d=d.subarray(e+1);e=d.indexOf(10)}c._partialRow+=f.decode(d,r)}});a.on("error",function(d){V(c,d)});a.on("end",function(){V(c,
34
- Error("Connection closed."))});return W(c,0)};exports.createServerReference=function(){return Y};
10
+ 'use strict';var n=require("util"),q=require("react-dom"),r=require("react"),t={stream:!0};function u(a,c){if(a){var b=a[c.id];if(a=b[c.name])b=a.name;else{a=b["*"];if(!a)throw Error('Could not find the module "'+c.id+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');b=c.name}return{id:a.id,chunks:a.chunks,name:b,async:!!c.async}}return c}var w=new Map,x=new Map;function y(){}
11
+ function z(a){for(var c=a.chunks,b=[],d=0;d<c.length;d++){var g=c[d],k=w.get(g);if(void 0===k){k=__webpack_chunk_load__(g);b.push(k);var l=w.set.bind(w,g,null);k.then(l,y);w.set(g,k)}else null!==k&&b.push(k)}if(a.async){if(c=x.get(a.id))return"fulfilled"===c.status?null:c;var e=Promise.all(b).then(function(){return __webpack_require__(a.id)});e.then(function(h){e.status="fulfilled";e.value=h},function(h){e.status="rejected";e.reason=h});x.set(a.id,e);return e}return 0<b.length?Promise.all(b):null}
12
+ var A=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,B=Symbol.for("react.element"),C=Symbol.for("react.lazy"),D=Symbol.for("react.default_value"),E=Symbol.iterator;function F(a){if(null===a||"object"!==typeof a)return null;a=E&&a[E]||a["@@iterator"];return"function"===typeof a?a:null}var G=Array.isArray,H=new WeakMap;function I(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
13
+ function J(a,c,b,d){function g(h,f){if(null===f)return null;if("object"===typeof f){if("function"===typeof f.then){null===e&&(e=new FormData);l++;var m=k++;f.then(function(p){p=JSON.stringify(p,g);var v=e;v.append(c+m,p);l--;0===l&&b(v)},function(p){d(p)});return"$@"+m.toString(16)}if(f instanceof FormData){null===e&&(e=new FormData);var Y=e;h=k++;var Z=c+h+"_";f.forEach(function(p,v){Y.append(Z+v,p)});return"$K"+h.toString(16)}return!G(f)&&F(f)?Array.from(f):f}if("string"===typeof f){if("Z"===f[f.length-
14
+ 1]&&this[h]instanceof Date)return"$D"+f;f="$"===f[0]?"$"+f:f;return f}if("boolean"===typeof f)return f;if("number"===typeof f)return I(f);if("undefined"===typeof f)return"$undefined";if("function"===typeof f){f=H.get(f);if(void 0!==f)return f=JSON.stringify(f,g),null===e&&(e=new FormData),h=k++,e.set(c+h,f),"$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 f){h=f.description;
15
+ if(Symbol.for(h)!==f)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+(f.description+") cannot be found among global symbols."));return"$S"+h}if("bigint"===typeof f)return"$n"+f.toString(10);throw Error("Type "+typeof f+" is not supported as an argument to a Server Function.");}var k=1,l=0,e=null;a=JSON.stringify(a,g);null===e?b(a):(e.set(c+"0",a),0===l&&b(e))}var K=new WeakMap;
16
+ function aa(a){var c,b,d=new Promise(function(g,k){c=g;b=k});J(a,"",function(g){if("string"===typeof g){var k=new FormData;k.append("0",g);g=k}d.status="fulfilled";d.value=g;c(g)},function(g){d.status="rejected";d.reason=g;b(g)});return d}
17
+ function ba(a){var c=H.get(this);if(!c)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");var b=null;if(null!==c.bound){b=K.get(c);b||(b=aa(c),K.set(c,b));if("rejected"===b.status)throw b.reason;if("fulfilled"!==b.status)throw b;c=b.value;var d=new FormData;c.forEach(function(g,k){d.append("$ACTION_"+a+":"+k,g)});b=d;c="$ACTION_REF_"+a}else c="$ACTION_ID_"+c.id;return{name:c,method:"POST",encType:"multipart/form-data",data:b}}
18
+ var L=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function M(a,c,b,d){this.status=a;this.value=c;this.reason=b;this._response=d}M.prototype=Object.create(Promise.prototype);
19
+ M.prototype.then=function(a,c){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));c&&(null===this.reason&&(this.reason=[]),this.reason.push(c));break;default:c(this.reason)}};
20
+ function ca(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,c){for(var b=0;b<a.length;b++)(0,a[b])(c)}function Q(a,c,b){switch(a.status){case "fulfilled":P(c,a.value);break;case "pending":case "blocked":a.value=c;a.reason=b;break;case "rejected":b&&P(b,a.reason)}}
21
+ function R(a,c){if("pending"===a.status||"blocked"===a.status){var b=a.reason;a.status="rejected";a.reason=c;null!==b&&P(b,c)}}function S(a,c){if("pending"===a.status||"blocked"===a.status){var b=a.value,d=a.reason;a.status="resolved_module";a.value=c;null!==b&&(O(a),Q(a,b,d))}}var T=null,U=null;
22
+ function N(a){var c=T,b=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(g){a.status="rejected",a.reason=g}finally{T=c,U=b}}
23
+ function O(a){try{var c=a.value;if(c.async){var b=x.get(c.id);if("fulfilled"===b.status)var d=b.value;else throw b.reason;}else d=__webpack_require__(c.id);var g="*"===c.name?d:""===c.name?d.__esModule?d.default:d:d[c.name];a.status="fulfilled";a.value=g}catch(k){a.status="rejected",a.reason=k}}function V(a,c){a._chunks.forEach(function(b){"pending"===b.status&&R(b,c)})}function W(a,c){var b=a._chunks,d=b.get(c);d||(d=new M("pending",null,null,a),b.set(c,d));return d}
24
+ function da(a,c,b){if(U){var d=U;d.deps++}else d=U={deps:1,value:null};return function(g){c[b]=g;d.deps--;0===d.deps&&"blocked"===a.status&&(g=a.value,a.status="fulfilled",a.value=d.value,null!==g&&P(g,d.value))}}function ea(a){return function(c){return R(a,c)}}
25
+ function fa(a,c){function b(){var g=Array.prototype.slice.call(arguments),k=c.bound;return k?"fulfilled"===k.status?d(c.id,k.value.concat(g)):Promise.resolve(k).then(function(l){return d(c.id,l.concat(g))}):d(c.id,g)}var d=a._callServer;b.$$FORM_ACTION=ba;H.set(b,c);return b}
26
+ function ha(a,c,b,d){if("$"===d[0]){if("$"===d)return B;switch(d[1]){case "$":return d.slice(1);case "L":return c=parseInt(d.slice(2),16),a=W(a,c),{$$typeof:C,_payload:a,_init:ca};case "@":return c=parseInt(d.slice(2),16),W(a,c);case "S":return Symbol.for(d.slice(2));case "P":return a=d.slice(2),L[a]||(L[a]=r.createServerContext(a,D)),L[a].Provider;case "F":c=parseInt(d.slice(2),16);c=W(a,c);switch(c.status){case "resolved_model":N(c)}switch(c.status){case "fulfilled":return fa(a,c.value);default:throw c.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(da(d,c,b),ea(d)),null;default:throw a.reason;}}}return d}
28
+ function ia(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function ja(a,c){var b=new Map;a={_bundlerConfig:a,_callServer:void 0!==c?c:ia,_chunks:b,_partialRow:"",_stringDecoder:new n.TextDecoder,_fromJSON:null};a._fromJSON=ka(a);return a}
29
+ function la(a,c,b){var d=a._chunks,g=d.get(c);b=JSON.parse(b,a._fromJSON);var k=u(a._bundlerConfig,b);if(b=z(k)){if(g){var l=g;l.status="blocked"}else l=new M("blocked",null,null,a),d.set(c,l);b.then(function(){return S(l,k)},function(e){return R(l,e)})}else g?S(g,k):d.set(c,new M("resolved_module",k,null,a))}
30
+ function ka(a){return function(c,b){return"string"===typeof b?ha(a,this,c,b):"object"===typeof b&&null!==b?(c=b[0]===B?{$$typeof:B,type:b[1],key:b[2],ref:null,props:b[3],_owner:null}:b,c):b}}function X(){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.");}
31
+ exports.createFromNodeStream=function(a,c){var b=ja(c,X);a.on("data",function(d){for(var g=b._stringDecoder,k=d.indexOf(10);-1<k;){var l=b._partialRow;var e=d.subarray(0,k);e=g.decode(e);e=l+e;if(""!==e){var h=e.indexOf(":",0);l=parseInt(e.slice(0,h),16);switch(e[h+1]){case "I":la(b,l,e.slice(h+2));break;case "H":l=e[h+2];e=e.slice(h+3);e=JSON.parse(e,b._fromJSON);h=void 0;var f=A.current;if(f){if("string"===typeof e)var m=e;else m=e[0],h=e[1];switch(l){case "D":f.prefetchDNS(m,h);break;case "C":f.preconnect(m,
32
+ h);break;case "L":f.preload(m,h);break;case "I":f.preinit(m,h)}}break;case "E":h=JSON.parse(e.slice(h+2)).digest;e=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.");e.stack="Error: "+e.message;e.digest=h;h=b._chunks;(m=h.get(l))?R(m,e):h.set(l,new M("rejected",null,e,b));break;default:e=
33
+ e.slice(h+1),h=b._chunks,(m=h.get(l))?(l=m,"pending"===l.status&&(h=l.value,m=l.reason,l.status="resolved_model",l.value=e,null!==h&&(N(l),Q(l,h,m)))):h.set(l,new M("resolved_model",e,null,b))}}b._partialRow="";d=d.subarray(k+1);k=d.indexOf(10)}b._partialRow+=g.decode(d,t)});a.on("error",function(d){V(b,d)});a.on("end",function(){V(b,Error("Connection closed."))});return W(b,0)};exports.createServerReference=function(){return X};
@@ -1471,14 +1471,9 @@ function createResponse(bundlerConfig, callServer) {
1471
1471
  _callServer: callServer !== undefined ? callServer : missingCall,
1472
1472
  _chunks: chunks,
1473
1473
  _partialRow: '',
1474
- _stringDecoder: null,
1474
+ _stringDecoder: createStringDecoder(),
1475
1475
  _fromJSON: null
1476
- };
1477
-
1478
- {
1479
- response._stringDecoder = createStringDecoder();
1480
- } // Don't inline this call because it causes closure to outline the call above.
1481
-
1476
+ }; // Don't inline this call because it causes closure to outline the call above.
1482
1477
 
1483
1478
  response._fromJSON = createFromJSONCallback(response);
1484
1479
  return response;
@@ -1604,21 +1599,7 @@ function processFullRow(response, row) {
1604
1599
  }
1605
1600
  }
1606
1601
 
1607
- function processStringChunk(response, chunk, offset) {
1608
- var linebreak = chunk.indexOf('\n', offset);
1609
-
1610
- while (linebreak > -1) {
1611
- var fullrow = response._partialRow + chunk.slice(offset, linebreak);
1612
- processFullRow(response, fullrow);
1613
- response._partialRow = '';
1614
- offset = linebreak + 1;
1615
- linebreak = chunk.indexOf('\n', offset);
1616
- }
1617
-
1618
- response._partialRow += chunk.slice(offset);
1619
- }
1620
1602
  function processBinaryChunk(response, chunk) {
1621
-
1622
1603
  var stringDecoder = response._stringDecoder;
1623
1604
  var linebreak = chunk.indexOf(10); // newline
1624
1605
 
@@ -1672,11 +1653,7 @@ function createServerReference(id, callServer) {
1672
1653
  function createFromNodeStream(stream, moduleMap) {
1673
1654
  var response = createResponse(moduleMap, noServerCall);
1674
1655
  stream.on('data', function (chunk) {
1675
- if (typeof chunk === 'string') {
1676
- processStringChunk(response, chunk, 0);
1677
- } else {
1678
- processBinaryChunk(response, chunk);
1679
- }
1656
+ processBinaryChunk(response, chunk);
1680
1657
  });
1681
1658
  stream.on('error', function (error) {
1682
1659
  reportGlobalError(response, error);
@@ -7,27 +7,26 @@
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 m=require("util"),p=require("react-dom"),q=require("react"),r={stream:!0};function u(a,b){var c=a[b.id];if(a=c[b.name])b=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.');b=b.name}return{specifier:a.specifier,name:b}}var v=new Map;
11
- function w(a){var b=v.get(a.specifier);if(b)return"fulfilled"===b.status?null:b;var c=import(a.specifier);c.then(function(d){c.status="fulfilled";c.value=d},function(d){c.status="rejected";c.reason=d});v.set(a.specifier,c);return c}var x=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,y=Symbol.for("react.element"),z=Symbol.for("react.lazy"),A=Symbol.for("react.default_value"),B=Symbol.iterator;
12
- function C(a){if(null===a||"object"!==typeof a)return null;a=B&&a[B]||a["@@iterator"];return"function"===typeof a?a:null}var D=Array.isArray,F=new WeakMap;function G(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
13
- function H(a,b,c,d){function e(l,f){if(null===f)return null;if("object"===typeof f){if("function"===typeof f.then){null===h&&(h=new FormData);k++;var E=g++;f.then(function(n){n=JSON.stringify(n,e);var t=h;t.append(b+E,n);k--;0===k&&c(t)},function(n){d(n)});return"$@"+E.toString(16)}if(f instanceof FormData){null===h&&(h=new FormData);var X=h;l=g++;var Y=b+l+"_";f.forEach(function(n,t){X.append(Y+t,n)});return"$K"+l.toString(16)}return!D(f)&&C(f)?Array.from(f):f}if("string"===typeof f){if("Z"===f[f.length-
14
- 1]&&this[l]instanceof Date)return"$D"+f;f="$"===f[0]?"$"+f:f;return f}if("boolean"===typeof f)return f;if("number"===typeof f)return G(f);if("undefined"===typeof f)return"$undefined";if("function"===typeof f){f=F.get(f);if(void 0!==f)return f=JSON.stringify(f,e),null===h&&(h=new FormData),l=g++,h.set(b+l,f),"$F"+l.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 f){l=f.description;
15
- if(Symbol.for(l)!==f)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+(f.description+") cannot be found among global symbols."));return"$S"+l}if("bigint"===typeof f)return"$n"+f.toString(10);throw Error("Type "+typeof f+" is not supported as an argument to a Server Function.");}var g=1,k=0,h=null;a=JSON.stringify(a,e);null===h?c(a):(h.set(b+"0",a),0===k&&c(h))}var I=new WeakMap;
16
- function J(a){var b,c,d=new Promise(function(e,g){b=e;c=g});H(a,"",function(e){if("string"===typeof e){var g=new FormData;g.append("0",e);e=g}d.status="fulfilled";d.value=e;b(e)},function(e){d.status="rejected";d.reason=e;c(e)});return d}
17
- function aa(a){var b=F.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=I.get(b);c||(c=J(b),I.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(e,g){d.append("$ACTION_"+a+":"+g,e)});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 K=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function L(a,b,c,d){this.status=a;this.value=b;this.reason=c;this._response=d}L.prototype=Object.create(Promise.prototype);
19
- L.prototype.then=function(a,b){switch(this.status){case "resolved_model":M(this);break;case "resolved_module":N(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 ba(a){switch(a.status){case "resolved_model":M(a);break;case "resolved_module":N(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":throw a;default:throw a.reason;}}function O(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function P(a,b,c){switch(a.status){case "fulfilled":O(b,a.value);break;case "pending":case "blocked":a.value=b;a.reason=c;break;case "rejected":c&&O(c,a.reason)}}
21
- function Q(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&O(c,b)}}function R(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&&(N(a),P(a,c,d))}}var S=null,T=null;
22
- function M(a){var b=S,c=T;S=a;T=null;try{var d=JSON.parse(a.value,a._response._fromJSON);null!==T&&0<T.deps?(T.value=d,a.status="blocked",a.value=null,a.reason=null):(a.status="fulfilled",a.value=d)}catch(e){a.status="rejected",a.reason=e}finally{S=b,T=c}}function N(a){try{var b=a.value,c=v.get(b.specifier);if("fulfilled"===c.status)var d=c.value;else throw c.reason;var e="*"===b.name?d:""===b.name?d.default:d[b.name];a.status="fulfilled";a.value=e}catch(g){a.status="rejected",a.reason=g}}
23
- function U(a,b){a._chunks.forEach(function(c){"pending"===c.status&&Q(c,b)})}function V(a,b){var c=a._chunks,d=c.get(b);d||(d=new L("pending",null,null,a),c.set(b,d));return d}function ca(a,b,c){if(T){var d=T;d.deps++}else d=T={deps:1,value:null};return function(e){b[c]=e;d.deps--;0===d.deps&&"blocked"===a.status&&(e=a.value,a.status="fulfilled",a.value=d.value,null!==e&&O(e,d.value))}}function da(a){return function(b){return Q(a,b)}}
24
- function ea(a,b){function c(){var e=Array.prototype.slice.call(arguments),g=b.bound;return g?"fulfilled"===g.status?d(b.id,g.value.concat(e)):Promise.resolve(g).then(function(k){return d(b.id,k.concat(e))}):d(b.id,e)}var d=a._callServer;c.$$FORM_ACTION=aa;F.set(c,b);return c}
25
- function fa(a,b,c,d){if("$"===d[0]){if("$"===d)return y;switch(d[1]){case "$":return d.slice(1);case "L":return b=parseInt(d.slice(2),16),a=V(a,b),{$$typeof:z,_payload:a,_init:ba};case "@":return b=parseInt(d.slice(2),16),V(a,b);case "S":return Symbol.for(d.slice(2));case "P":return a=d.slice(2),K[a]||(K[a]=q.createServerContext(a,A)),K[a].Provider;case "F":b=parseInt(d.slice(2),16);b=V(a,b);switch(b.status){case "resolved_model":M(b)}switch(b.status){case "fulfilled":return ea(a,b.value);default:throw b.reason;
26
- }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=V(a,d);switch(a.status){case "resolved_model":M(a);break;case "resolved_module":N(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=S,a.then(ca(d,b,c),da(d)),null;default:throw a.reason;}}}return d}
27
- function ha(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function ia(a,b){var c=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ha,_chunks:c,_partialRow:"",_stringDecoder:null,_fromJSON:null};a._stringDecoder=new m.TextDecoder;a._fromJSON=ja(a);return a}
28
- function ka(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var g=u(a._bundlerConfig,c);if(c=w(g)){if(e){var k=e;k.status="blocked"}else k=new L("blocked",null,null,a),d.set(b,k);c.then(function(){return R(k,g)},function(h){return Q(k,h)})}else e?R(e,g):d.set(b,new L("resolved_module",g,null,a))}
29
- function W(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.slice(0,c),16);switch(b[c+1]){case "I":ka(a,d,b.slice(c+2));break;case "H":d=b[c+2];b=b.slice(c+3);a=JSON.parse(b,a._fromJSON);if(b=x.current){if("string"===typeof a)c=a;else{c=a[0];var e=a[1]}switch(d){case "D":b.prefetchDNS(c,e);break;case "C":b.preconnect(c,e);break;case "L":b.preload(c,e);break;case "I":b.preinit(c,e)}}break;case "E":b=JSON.parse(b.slice(c+2)).digest;e=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.");
30
- e.stack="Error: "+e.message;e.digest=b;b=a._chunks;(c=b.get(d))?Q(c,e):b.set(d,new L("rejected",null,e,a));break;default:e=b.slice(c+1),c=a._chunks,(b=c.get(d))?"pending"===b.status&&(a=b.value,d=b.reason,b.status="resolved_model",b.value=e,null!==a&&(M(b),P(b,a,d))):c.set(d,new L("resolved_model",e,null,a))}}}
31
- function ja(a){return function(b,c){return"string"===typeof c?fa(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===y?{$$typeof:y,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}function Z(){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.");}
32
- exports.createFromNodeStream=function(a,b){var c=ia(b,Z);a.on("data",function(d){if("string"===typeof d){for(var e=0,g=d.indexOf("\n",e);-1<g;)e=c._partialRow+d.slice(e,g),W(c,e),c._partialRow="",e=g+1,g=d.indexOf("\n",e);c._partialRow+=d.slice(e)}else{g=c._stringDecoder;for(e=d.indexOf(10);-1<e;){var k=c._partialRow;var h=d.subarray(0,e);h=g.decode(h);W(c,k+h);c._partialRow="";d=d.subarray(e+1);e=d.indexOf(10)}c._partialRow+=g.decode(d,r)}});a.on("error",function(d){U(c,d)});a.on("end",function(){U(c,
33
- Error("Connection closed."))});return V(c,0)};exports.createServerReference=function(){return Z};
10
+ 'use strict';var n=require("util"),q=require("react-dom"),r=require("react"),t={stream:!0};function v(a,c){var b=a[c.id];if(a=b[c.name])c=a.name;else{a=b["*"];if(!a)throw Error('Could not find the module "'+c.id+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');c=c.name}return{specifier:a.specifier,name:c}}var w=new Map;
11
+ function x(a){var c=w.get(a.specifier);if(c)return"fulfilled"===c.status?null:c;var b=import(a.specifier);b.then(function(d){b.status="fulfilled";b.value=d},function(d){b.status="rejected";b.reason=d});w.set(a.specifier,b);return b}var y=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,z=Symbol.for("react.element"),A=Symbol.for("react.lazy"),B=Symbol.for("react.default_value"),C=Symbol.iterator;
12
+ function D(a){if(null===a||"object"!==typeof a)return null;a=C&&a[C]||a["@@iterator"];return"function"===typeof a?a:null}var E=Array.isArray,F=new WeakMap;function G(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
13
+ function H(a,c,b,d){function g(h,e){if(null===e)return null;if("object"===typeof e){if("function"===typeof e.then){null===f&&(f=new FormData);k++;var m=l++;e.then(function(p){p=JSON.stringify(p,g);var u=f;u.append(c+m,p);k--;0===k&&b(u)},function(p){d(p)});return"$@"+m.toString(16)}if(e instanceof FormData){null===f&&(f=new FormData);var W=f;h=l++;var X=c+h+"_";e.forEach(function(p,u){W.append(X+u,p)});return"$K"+h.toString(16)}return!E(e)&&D(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 G(e);if("undefined"===typeof e)return"$undefined";if("function"===typeof e){e=F.get(e);if(void 0!==e)return e=JSON.stringify(e,g),null===f&&(f=new FormData),h=l++,f.set(c+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 l=1,k=0,f=null;a=JSON.stringify(a,g);null===f?b(a):(f.set(c+"0",a),0===k&&b(f))}var I=new WeakMap;
16
+ function J(a){var c,b,d=new Promise(function(g,l){c=g;b=l});H(a,"",function(g){if("string"===typeof g){var l=new FormData;l.append("0",g);g=l}d.status="fulfilled";d.value=g;c(g)},function(g){d.status="rejected";d.reason=g;b(g)});return d}
17
+ function K(a){var c=F.get(this);if(!c)throw Error("Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.");var b=null;if(null!==c.bound){b=I.get(c);b||(b=J(c),I.set(c,b));if("rejected"===b.status)throw b.reason;if("fulfilled"!==b.status)throw b;c=b.value;var d=new FormData;c.forEach(function(g,l){d.append("$ACTION_"+a+":"+l,g)});b=d;c="$ACTION_REF_"+a}else c="$ACTION_ID_"+c.id;return{name:c,method:"POST",encType:"multipart/form-data",data:b}}
18
+ var L=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function M(a,c,b,d){this.status=a;this.value=c;this.reason=b;this._response=d}M.prototype=Object.create(Promise.prototype);
19
+ M.prototype.then=function(a,c){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));c&&(null===this.reason&&(this.reason=[]),this.reason.push(c));break;default:c(this.reason)}};
20
+ function aa(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,c){for(var b=0;b<a.length;b++)(0,a[b])(c)}function Q(a,c,b){switch(a.status){case "fulfilled":P(c,a.value);break;case "pending":case "blocked":a.value=c;a.reason=b;break;case "rejected":b&&P(b,a.reason)}}
21
+ function R(a,c){if("pending"===a.status||"blocked"===a.status){var b=a.reason;a.status="rejected";a.reason=c;null!==b&&P(b,c)}}function S(a,c){if("pending"===a.status||"blocked"===a.status){var b=a.value,d=a.reason;a.status="resolved_module";a.value=c;null!==b&&(O(a),Q(a,b,d))}}var T=null,U=null;
22
+ function N(a){var c=T,b=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(g){a.status="rejected",a.reason=g}finally{T=c,U=b}}function O(a){try{var c=a.value,b=w.get(c.specifier);if("fulfilled"===b.status)var d=b.value;else throw b.reason;var g="*"===c.name?d:""===c.name?d.default:d[c.name];a.status="fulfilled";a.value=g}catch(l){a.status="rejected",a.reason=l}}
23
+ function V(a,c){a._chunks.forEach(function(b){"pending"===b.status&&R(b,c)})}function Y(a,c){var b=a._chunks,d=b.get(c);d||(d=new M("pending",null,null,a),b.set(c,d));return d}function ba(a,c,b){if(U){var d=U;d.deps++}else d=U={deps:1,value:null};return function(g){c[b]=g;d.deps--;0===d.deps&&"blocked"===a.status&&(g=a.value,a.status="fulfilled",a.value=d.value,null!==g&&P(g,d.value))}}function ca(a){return function(c){return R(a,c)}}
24
+ function da(a,c){function b(){var g=Array.prototype.slice.call(arguments),l=c.bound;return l?"fulfilled"===l.status?d(c.id,l.value.concat(g)):Promise.resolve(l).then(function(k){return d(c.id,k.concat(g))}):d(c.id,g)}var d=a._callServer;b.$$FORM_ACTION=K;F.set(b,c);return b}
25
+ function ea(a,c,b,d){if("$"===d[0]){if("$"===d)return z;switch(d[1]){case "$":return d.slice(1);case "L":return c=parseInt(d.slice(2),16),a=Y(a,c),{$$typeof:A,_payload:a,_init:aa};case "@":return c=parseInt(d.slice(2),16),Y(a,c);case "S":return Symbol.for(d.slice(2));case "P":return a=d.slice(2),L[a]||(L[a]=r.createServerContext(a,B)),L[a].Provider;case "F":c=parseInt(d.slice(2),16);c=Y(a,c);switch(c.status){case "resolved_model":N(c)}switch(c.status){case "fulfilled":return da(a,c.value);default:throw c.reason;
26
+ }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=Y(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(ba(d,c,b),ca(d)),null;default:throw a.reason;}}}return d}
27
+ function fa(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function ha(a,c){var b=new Map;a={_bundlerConfig:a,_callServer:void 0!==c?c:fa,_chunks:b,_partialRow:"",_stringDecoder:new n.TextDecoder,_fromJSON:null};a._fromJSON=ia(a);return a}
28
+ function ja(a,c,b){var d=a._chunks,g=d.get(c);b=JSON.parse(b,a._fromJSON);var l=v(a._bundlerConfig,b);if(b=x(l)){if(g){var k=g;k.status="blocked"}else k=new M("blocked",null,null,a),d.set(c,k);b.then(function(){return S(k,l)},function(f){return R(k,f)})}else g?S(g,l):d.set(c,new M("resolved_module",l,null,a))}
29
+ function ia(a){return function(c,b){return"string"===typeof b?ea(a,this,c,b):"object"===typeof b&&null!==b?(c=b[0]===z?{$$typeof:z,type:b[1],key:b[2],ref:null,props:b[3],_owner:null}:b,c):b}}function Z(){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.");}
30
+ exports.createFromNodeStream=function(a,c){var b=ha(c,Z);a.on("data",function(d){for(var g=b._stringDecoder,l=d.indexOf(10);-1<l;){var k=b._partialRow;var f=d.subarray(0,l);f=g.decode(f);f=k+f;if(""!==f){var h=f.indexOf(":",0);k=parseInt(f.slice(0,h),16);switch(f[h+1]){case "I":ja(b,k,f.slice(h+2));break;case "H":k=f[h+2];f=f.slice(h+3);f=JSON.parse(f,b._fromJSON);h=void 0;var e=y.current;if(e){if("string"===typeof f)var m=f;else m=f[0],h=f[1];switch(k){case "D":e.prefetchDNS(m,h);break;case "C":e.preconnect(m,
31
+ h);break;case "L":e.preload(m,h);break;case "I":e.preinit(m,h)}}break;case "E":h=JSON.parse(f.slice(h+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=h;h=b._chunks;(m=h.get(k))?R(m,f):h.set(k,new M("rejected",null,f,b));break;default:f=
32
+ f.slice(h+1),h=b._chunks,(m=h.get(k))?(k=m,"pending"===k.status&&(h=k.value,m=k.reason,k.status="resolved_model",k.value=f,null!==h&&(N(k),Q(k,h,m)))):h.set(k,new M("resolved_model",f,null,b))}}b._partialRow="";d=d.subarray(l+1);l=d.indexOf(10)}b._partialRow+=g.decode(d,t)});a.on("error",function(d){V(b,d)});a.on("end",function(){V(b,Error("Connection closed."))});return Y(b,0)};exports.createServerReference=function(){return Z};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-server-dom-webpack",
3
3
  "description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
4
- "version": "18.3.0-canary-21a161fa3-20230609",
4
+ "version": "18.3.0-canary-ce6842d8f-20230610",
5
5
  "keywords": [
6
6
  "react"
7
7
  ],
@@ -78,8 +78,8 @@
78
78
  "node": ">=0.10.0"
79
79
  },
80
80
  "peerDependencies": {
81
- "react": "18.3.0-canary-21a161fa3-20230609",
82
- "react-dom": "18.3.0-canary-21a161fa3-20230609",
81
+ "react": "18.3.0-canary-ce6842d8f-20230610",
82
+ "react-dom": "18.3.0-canary-ce6842d8f-20230610",
83
83
  "webpack": "^5.59.0"
84
84
  },
85
85
  "dependencies": {
@@ -1533,14 +1533,9 @@
1533
1533
  _callServer: callServer !== undefined ? callServer : missingCall,
1534
1534
  _chunks: chunks,
1535
1535
  _partialRow: '',
1536
- _stringDecoder: null,
1536
+ _stringDecoder: createStringDecoder(),
1537
1537
  _fromJSON: null
1538
- };
1539
-
1540
- {
1541
- response._stringDecoder = createStringDecoder();
1542
- } // Don't inline this call because it causes closure to outline the call above.
1543
-
1538
+ }; // Don't inline this call because it causes closure to outline the call above.
1544
1539
 
1545
1540
  response._fromJSON = createFromJSONCallback(response);
1546
1541
  return response;
@@ -1665,8 +1660,8 @@
1665
1660
  }
1666
1661
  }
1667
1662
  }
1668
- function processBinaryChunk(response, chunk) {
1669
1663
 
1664
+ function processBinaryChunk(response, chunk) {
1670
1665
  var stringDecoder = response._stringDecoder;
1671
1666
  var linebreak = chunk.indexOf(10); // newline
1672
1667
 
@@ -20,9 +20,9 @@ a.value;if(b.async){var c=F.get(b.id);if("fulfilled"===c.status)var d=c.value;el
20
20
  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&&C(f,d.value))}}function ba(a){return function(b){return D(a,b)}}function ca(a,b){var c=a._callServer;a=function(){var d=Array.prototype.slice.call(arguments),f=b.bound;return f?"fulfilled"===f.status?c(b.id,f.value.concat(d)):Promise.resolve(f).then(function(g){return c(b.id,g.concat(d))}):c(b.id,d)};a.$$FORM_ACTION=M;A.set(a,b);return a}function da(a,b,c,d){if("$"===
21
21
  d[0]){if("$"===d)return H;switch(d[1]){case "$":return d.slice(1);case "L":return b=parseInt(d.slice(2),16),a=v(a,b),{$$typeof:ea,_payload:a,_init:Z};case "@":return b=parseInt(d.slice(2),16),v(a,b);case "S":return Symbol.for(d.slice(2));case "P":return a=d.slice(2),I[a]||(I[a]=J.createServerContext(a,fa)),I[a].Provider;case "F":b=parseInt(d.slice(2),16);b=v(a,b);switch(b.status){case "resolved_model":x(b)}switch(b.status){case "fulfilled":return ca(a,b.value);default:throw b.reason;}case "I":return Infinity;
22
22
  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=v(a,d);switch(a.status){case "resolved_model":x(a);break;case "resolved_module":B(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=E,a.then(aa(d,b,c),ba(d)),null;default:throw a.reason;}}}return d}function ha(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');
23
- }function Q(a,b){var c=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ha,_chunks:c,_partialRow:"",_stringDecoder:null,_fromJSON:null};a._stringDecoder=new TextDecoder;a._fromJSON=ia(a);return a}function ja(a,b,c){var d=a._chunks,f=d.get(b);c=JSON.parse(c,a._fromJSON);var g=S(a._bundlerConfig,c);if(c=U(g)){if(f){var n=f;n.status="blocked"}else n=new u("blocked",null,null,a),d.set(b,n);c.then(function(){return P(n,g)},function(l){return D(n,l)})}else f?P(f,g):d.set(b,new u("resolved_module",g,
24
- null,a))}function ia(a){return function(b,c){return"string"===typeof c?da(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===H?{$$typeof:H,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}function R(a,b){function c(g){var n=g.value;if(g.done)G(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":ja(h,
25
- 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=ka.current;if(p)switch("string"===typeof h?m=h:(m=h[0],k=h[1]),e){case "D":p.prefetchDNS(m,k);break;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.");
23
+ }function Q(a,b){var c=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:ha,_chunks:c,_partialRow:"",_stringDecoder:new TextDecoder,_fromJSON:null};a._fromJSON=ia(a);return a}function ja(a,b,c){var d=a._chunks,f=d.get(b);c=JSON.parse(c,a._fromJSON);var g=S(a._bundlerConfig,c);if(c=U(g)){if(f){var n=f;n.status="blocked"}else n=new u("blocked",null,null,a),d.set(b,n);c.then(function(){return P(n,g)},function(l){return D(n,l)})}else f?P(f,g):d.set(b,new u("resolved_module",g,null,a))}function ia(a){return function(b,
24
+ c){return"string"===typeof c?da(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===H?{$$typeof:H,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}function R(a,b){function c(g){var n=g.value;if(g.done)G(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":ja(h,e,k.slice(m+2));break;case "H":e=k[m+
25
+ 2];k=k.slice(m+3);h=JSON.parse(k,h._fromJSON);k=void 0;var p=ka.current;if(p)switch("string"===typeof h?m=h:(m=h[0],k=h[1]),e){case "D":p.prefetchDNS(m,k);break;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.");
26
26
  k.stack="Error: "+k.message;k.digest=m;m=h._chunks;(p=m.get(e))?D(p,k):m.set(e,new u("rejected",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&&(x(h),O(h,k,m)))):m.set(e,new u("resolved_model",k,null,h))}}a._partialRow="";g=g.subarray(l+1);l=g.indexOf(10)}a._partialRow+=n.decode(g,la);return f.read().then(c).catch(d)}}function d(g){G(a,g)}var f=b.getReader();f.read().then(c).catch(d)}
27
27
  var la={stream:!0},y=new Map,F=new Map,ka=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,H=Symbol.for("react.element"),ea=Symbol.for("react.lazy"),fa=Symbol.for("react.default_value"),K=Symbol.iterator,X=Array.isArray,A=new WeakMap,N=new WeakMap,I=J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;u.prototype=Object.create(Promise.prototype);u.prototype.then=function(a,b){switch(this.status){case "resolved_model":x(this);break;case "resolved_module":B(this)}switch(this.status){case "fulfilled":a(this.value);
28
28
  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)}};var E=null,r=null;q.createFromFetch=function(a,b){var c=Q(null,b&&b.callServer?b.callServer:void 0);a.then(function(d){R(c,d.body)},function(d){G(c,d)});return v(c,0)};q.createFromReadableStream=function(a,b){b=Q(null,b&&b.callServer?b.callServer:void 0);R(b,a);return v(b,0)};q.createServerReference=function(a,b){var c=