Unverified Commit 9c0e5208 authored by Shu Ding's avatar Shu Ding Committed by GitHub

Re-land "Vendor `react@experimental` under an `experimentalReact` flag" (#48041)

Reverts vercel/next.js#48038

fix NEXT-926

---

The root cause was that when copying the package.json, I removed all
fields except for a few (such as `exports`) but missed the `browser`
field. That caused the client bundle to resolve to the Node.js version
of React DOM, and then we had the `async_hooks` error. Added it back in
99c9b9e51f8b0d4e4503ece9d07bce09161f3341.

I reproduced the error with next-site earlier and confirmed that this
fix is good.
parent 2bcdfbb6
...@@ -197,11 +197,13 @@ ...@@ -197,11 +197,13 @@
"random-seed": "0.3.0", "random-seed": "0.3.0",
"react": "18.2.0", "react": "18.2.0",
"react-17": "npm:react@17.0.2", "react-17": "npm:react@17.0.2",
"react-builtin": "npm:react@18.3.0-next-85de6fde5-20230328", "react-builtin": "npm:react@18.3.0-next-b14f8da15-20230403",
"react-experimental-builtin": "npm:react@0.0.0-experimental-b14f8da15-20230403",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2", "react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@18.3.0-next-85de6fde5-20230328", "react-dom-builtin": "npm:react-dom@18.3.0-next-b14f8da15-20230403",
"react-server-dom-webpack": "18.3.0-next-85de6fde5-20230328", "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-b14f8da15-20230403",
"react-server-dom-webpack": "18.3.0-next-b14f8da15-20230403",
"react-ssr-prepass": "1.0.8", "react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3", "react-virtualized": "9.22.3",
"relay-compiler": "13.0.2", "relay-compiler": "13.0.2",
...@@ -212,6 +214,8 @@ ...@@ -212,6 +214,8 @@
"rimraf": "3.0.2", "rimraf": "3.0.2",
"sass": "1.54.0", "sass": "1.54.0",
"satori": "0.4.4", "satori": "0.4.4",
"scheduler-builtin": "npm:scheduler@0.24.0-next-b14f8da15-20230403",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-b14f8da15-20230403",
"seedrandom": "3.0.5", "seedrandom": "3.0.5",
"selenium-webdriver": "4.0.0-beta.4", "selenium-webdriver": "4.0.0-beta.4",
"semver": "7.3.7", "semver": "7.3.7",
......
...@@ -280,6 +280,7 @@ export default async function build( ...@@ -280,6 +280,7 @@ export default async function build(
const publicDir = path.join(dir, 'public') const publicDir = path.join(dir, 'public')
const isAppDirEnabled = !!config.experimental.appDir const isAppDirEnabled = !!config.experimental.appDir
const useExperimentalReact = !!config.experimental.experimentalReact
const initialRequireHookFilePath = require.resolve( const initialRequireHookFilePath = require.resolve(
'next/dist/server/initialize-require-hook' 'next/dist/server/initialize-require-hook'
) )
...@@ -289,7 +290,9 @@ export default async function build( ...@@ -289,7 +290,9 @@ export default async function build(
) )
if (isAppDirEnabled) { if (isAppDirEnabled) {
process.env.NEXT_PREBUNDLED_REACT = '1' process.env.NEXT_PREBUNDLED_REACT = useExperimentalReact
? 'experimental'
: 'next'
} }
await promises await promises
.writeFile( .writeFile(
......
...@@ -683,8 +683,10 @@ export default async function getBaseWebpackConfig( ...@@ -683,8 +683,10 @@ export default async function getBaseWebpackConfig(
const hasAppDir = !!config.experimental.appDir && !!appDir const hasAppDir = !!config.experimental.appDir && !!appDir
const hasServerComponents = hasAppDir const hasServerComponents = hasAppDir
const useExperimentalReact = !!config.experimental.experimentalReact
const disableOptimizedLoading = true const disableOptimizedLoading = true
const enableTypedRoutes = !!config.experimental.typedRoutes && hasAppDir const enableTypedRoutes = !!config.experimental.typedRoutes && hasAppDir
const builtInReactChannel = useExperimentalReact ? '-experimental' : ''
if (isClient) { if (isClient) {
if (isEdgeRuntime(config.experimental.runtime)) { if (isEdgeRuntime(config.experimental.runtime)) {
...@@ -692,6 +694,11 @@ export default async function getBaseWebpackConfig( ...@@ -692,6 +694,11 @@ export default async function getBaseWebpackConfig(
'You are using `experimental.runtime` which was removed. Check https://nextjs.org/docs/api-routes/edge-api-routes on how to use edge runtime.' 'You are using `experimental.runtime` which was removed. Check https://nextjs.org/docs/api-routes/edge-api-routes on how to use edge runtime.'
) )
} }
if (useExperimentalReact && !hasAppDir) {
Log.warn(
'You are using `experimental.experimentalReact` which requires `experimental.appDir` to be enabled.'
)
}
} }
const babelConfigFile = await getBabelConfigFile(dir) const babelConfigFile = await getBabelConfigFile(dir)
...@@ -1025,13 +1032,11 @@ export default async function getBaseWebpackConfig( ...@@ -1025,13 +1032,11 @@ export default async function getBaseWebpackConfig(
? { ? {
// For react and react-dom, alias them dynamically for server layer // For react and react-dom, alias them dynamically for server layer
// and others in the loaders configuration // and others in the loaders configuration
'react-dom/client$': 'next/dist/compiled/react-dom/client', 'react-dom/client$': `next/dist/compiled/react-dom${builtInReactChannel}/client`,
'react-dom/server$': 'next/dist/compiled/react-dom/server', 'react-dom/server$': `next/dist/compiled/react-dom${builtInReactChannel}/server`,
'react-dom/server.browser$': 'react-dom/server.browser$': `next/dist/compiled/react-dom${builtInReactChannel}/server.browser`,
'next/dist/compiled/react-dom/server.browser', 'react/jsx-dev-runtime$': `next/dist/compiled/react${builtInReactChannel}/jsx-dev-runtime`,
'react/jsx-dev-runtime$': 'react/jsx-runtime$': `next/dist/compiled/react${builtInReactChannel}/jsx-runtime`,
'next/dist/compiled/react/jsx-dev-runtime',
'react/jsx-runtime$': 'next/dist/compiled/react/jsx-runtime',
} }
: { : {
react: reactDir, react: reactDir,
...@@ -1233,11 +1238,17 @@ export default async function getBaseWebpackConfig( ...@@ -1233,11 +1238,17 @@ export default async function getBaseWebpackConfig(
if (/^(react(?:$|\/)|react-dom(?:$|\/))/.test(request)) { if (/^(react(?:$|\/)|react-dom(?:$|\/))/.test(request)) {
// override react-dom to server-rendering-stub for server // override react-dom to server-rendering-stub for server
const channel = useExperimentalReact ? '-experimental' : ''
if ( if (
request === 'react-dom' && request === 'react-dom' &&
(layer === WEBPACK_LAYERS.client || layer === WEBPACK_LAYERS.server) (layer === WEBPACK_LAYERS.client || layer === WEBPACK_LAYERS.server)
) { ) {
request = 'react-dom/server-rendering-stub' request = `react-dom${channel}/server-rendering-stub`
} else {
// `react` -> `react-experimental`
// `react-dom` -> `react-dom-experimental`
// `react/jsx-runtime` -> `react-experimental/jsx-runtime`
request = request.replace(/^(react|react-dom)/, (m) => m + channel)
} }
return `commonjs ${hasAppDir ? 'next/dist/compiled/' : ''}${request}` return `commonjs ${hasAppDir ? 'next/dist/compiled/' : ''}${request}`
} }
...@@ -1766,9 +1777,8 @@ export default async function getBaseWebpackConfig( ...@@ -1766,9 +1777,8 @@ export default async function getBaseWebpackConfig(
// If missing the alias override here, the default alias will be used which aliases // If missing the alias override here, the default alias will be used which aliases
// react to the direct file path, not the package name. In that case the condition // react to the direct file path, not the package name. In that case the condition
// will be ignored completely. // will be ignored completely.
react: 'next/dist/compiled/react/react.shared-subset', react: `next/dist/compiled/react${builtInReactChannel}/react.shared-subset`,
'react-dom$': 'react-dom$': `next/dist/compiled/react-dom${builtInReactChannel}/server-rendering-stub`,
'next/dist/compiled/react-dom/server-rendering-stub',
}, },
}, },
use: { use: {
...@@ -1854,11 +1864,10 @@ export default async function getBaseWebpackConfig( ...@@ -1854,11 +1864,10 @@ export default async function getBaseWebpackConfig(
// It needs `conditionNames` here to require the proper asset, // It needs `conditionNames` here to require the proper asset,
// when react is acting as dependency of compiled/react-dom. // when react is acting as dependency of compiled/react-dom.
alias: { alias: {
react: 'next/dist/compiled/react/react.shared-subset', react: `next/dist/compiled/react${builtInReactChannel}/react.shared-subset`,
// Use server rendering stub for RSC // Use server rendering stub for RSC
// x-ref: https://github.com/facebook/react/pull/25436 // x-ref: https://github.com/facebook/react/pull/25436
'react-dom$': 'react-dom$': `next/dist/compiled/react-dom${builtInReactChannel}/server-rendering-stub`,
'next/dist/compiled/react-dom/server-rendering-stub',
}, },
}, },
}, },
...@@ -1867,9 +1876,8 @@ export default async function getBaseWebpackConfig( ...@@ -1867,9 +1876,8 @@ export default async function getBaseWebpackConfig(
test: codeCondition.test, test: codeCondition.test,
resolve: { resolve: {
alias: { alias: {
react: 'next/dist/compiled/react', react: `next/dist/compiled/react${builtInReactChannel}`,
'react-dom$': 'react-dom$': `next/dist/compiled/react-dom${builtInReactChannel}/server-rendering-stub`,
'next/dist/compiled/react-dom/server-rendering-stub',
}, },
}, },
}, },
...@@ -1877,12 +1885,11 @@ export default async function getBaseWebpackConfig( ...@@ -1877,12 +1885,11 @@ export default async function getBaseWebpackConfig(
test: codeCondition.test, test: codeCondition.test,
resolve: { resolve: {
alias: { alias: {
react: 'next/dist/compiled/react', react: `next/dist/compiled/react${builtInReactChannel}`,
'react-dom$': reactProductionProfiling 'react-dom$': reactProductionProfiling
? 'next/dist/compiled/react-dom/cjs/react-dom.profiling.min' ? `next/dist/compiled/react-dom${builtInReactChannel}/cjs/react-dom.profiling.min`
: 'next/dist/compiled/react-dom', : `next/dist/compiled/react-dom${builtInReactChannel}`,
'react-dom/client$': 'react-dom/client$': `next/dist/compiled/react-dom${builtInReactChannel}/client`,
'next/dist/compiled/react-dom/client',
}, },
}, },
}, },
......
...@@ -48,31 +48,35 @@ export function loadRequireHook(aliases: [string, string][] = []) { ...@@ -48,31 +48,35 @@ export function loadRequireHook(aliases: [string, string][] = []) {
} }
export function overrideBuiltInReactPackages() { export function overrideBuiltInReactPackages() {
const channel =
process.env.NEXT_PREBUNDLED_REACT === 'experimental' ? '-experimental' : ''
setRequireOverrides([ setRequireOverrides([
['react', require.resolve('next/dist/compiled/react')], ['react', require.resolve(`next/dist/compiled/react${channel}`)],
[ [
'react/jsx-runtime', 'react/jsx-runtime',
require.resolve('next/dist/compiled/react/jsx-runtime'), require.resolve(`next/dist/compiled/react${channel}/jsx-runtime`),
], ],
[ [
'react/jsx-dev-runtime', 'react/jsx-dev-runtime',
require.resolve('next/dist/compiled/react/jsx-dev-runtime'), require.resolve(`next/dist/compiled/react${channel}/jsx-dev-runtime`),
], ],
[ [
'react-dom', 'react-dom',
require.resolve('next/dist/compiled/react-dom/server-rendering-stub'), require.resolve(
`next/dist/compiled/react-dom${channel}/server-rendering-stub`
),
], ],
[ [
'react-dom/client', 'react-dom/client',
require.resolve('next/dist/compiled/react-dom/client'), require.resolve(`next/dist/compiled/react-dom${channel}/client`),
], ],
[ [
'react-dom/server', 'react-dom/server',
require.resolve('next/dist/compiled/react-dom/server'), require.resolve(`next/dist/compiled/react-dom${channel}/server`),
], ],
[ [
'react-dom/server.browser', 'react-dom/server.browser',
require.resolve('next/dist/compiled/react-dom/server.browser'), require.resolve(`next/dist/compiled/react-dom${channel}/server.browser`),
], ],
]) ])
} }
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
/**
* @license React
* react-dom-server-rendering-stub.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
if (process.env.NODE_ENV !== "production") {
(function() {
'use strict';
var ReactVersion = '18.3.0-experimental-b14f8da15-20230403';
var Internals = {
usingClientEntryPoint: false,
Events: null,
Dispatcher: {
current: null
}
};
function prefetchDNS() {
var dispatcher = Internals.Dispatcher.current;
if (dispatcher) {
dispatcher.prefetchDNS.apply(this, arguments);
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring.
}
function preconnect() {
var dispatcher = Internals.Dispatcher.current;
if (dispatcher) {
dispatcher.preconnect.apply(this, arguments);
} // We don't error because preconnect needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring.
}
function preload() {
var dispatcher = Internals.Dispatcher.current;
if (dispatcher) {
dispatcher.preload.apply(this, arguments);
} // We don't error because preload needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring.
}
function preinit() {
var dispatcher = Internals.Dispatcher.current;
if (dispatcher) {
dispatcher.preinit.apply(this, arguments);
} // We don't error because preinit needs to be resilient to being called in a variety of scopes
// and the runtime may not be capable of responding. The function is optimistic and not critical
// so we favor silent bailout over warning or erroring.
}
function createPortal() {
throw new Error('createPortal was called on the server. Portals are not currently' + ' supported on the server. Update your program to conditionally call' + ' createPortal on the client only.');
}
function flushSync() {
throw new Error('flushSync was called on the server. This is likely caused by a' + ' function being called during render or in module scope that was' + ' intended to be called from an effect or event handler. Update your' + ' to not call flushSync no the server.');
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal;
exports.flushSync = flushSync;
exports.preconnect = preconnect;
exports.prefetchDNS = prefetchDNS;
exports.preinit = preinit;
exports.preload = preload;
exports.version = ReactVersion;
})();
}
/**
* @license React
* react-dom-server-rendering-stub.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b;
exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preconnect=function(){var a=b.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=b.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-experimental-b14f8da15-20230403";
/**
* @license React
* react-jsx-dev-runtime.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
/**
* @license React
* react-jsx-dev-runtime.profiling.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
/**
* @license React
* react-jsx-runtime.profiling.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
/**
* @license React
* react.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.server_context"),w=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),aa=Symbol.for("react.debug_trace_mode"),ba=Symbol.for("react.offscreen"),ca=
Symbol.for("react.cache"),B=Symbol.for("react.default_value"),C=Symbol.iterator;function da(a){if(null===a||"object"!==typeof a)return null;a=C&&a[C]||a["@@iterator"];return"function"===typeof a?a:null}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,F={};function G(a,b,c){this.props=a;this.context=b;this.refs=F;this.updater=c||D}G.prototype.isReactComponent={};
G.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};G.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function H(){}H.prototype=G.prototype;function I(a,b,c){this.props=a;this.context=b;this.refs=F;this.updater=c||D}var J=I.prototype=new H;
J.constructor=I;E(J,G.prototype);J.isPureReactComponent=!0;var K=Array.isArray,L=Object.prototype.hasOwnProperty,M={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};
function O(a,b,c){var d,e={},f=null,g=null;if(null!=b)for(d in void 0!==b.ref&&(g=b.ref),void 0!==b.key&&(f=""+b.key),b)L.call(b,d)&&!N.hasOwnProperty(d)&&(e[d]=b[d]);var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){for(var k=Array(h),m=0;m<h;m++)k[m]=arguments[m+2];e.children=k}if(a&&a.defaultProps)for(d in h=a.defaultProps,h)void 0===e[d]&&(e[d]=h[d]);return{$$typeof:l,type:a,key:f,ref:g,props:e,_owner:M.current}}
function ea(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function P(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}var Q=/\/+/g;function R(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
function S(a,b,c,d,e){var f=typeof a;if("undefined"===f||"boolean"===f)a=null;var g=!1;if(null===a)g=!0;else switch(f){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case l:case n:g=!0}}if(g)return g=a,e=e(g),a=""===d?"."+R(g,0):d,K(e)?(c="",null!=a&&(c=a.replace(Q,"$&/")+"/"),S(e,b,c,"",function(m){return m})):null!=e&&(P(e)&&(e=ea(e,c+(!e.key||g&&g.key===e.key?"":(""+e.key).replace(Q,"$&/")+"/")+a)),b.push(e)),1;g=0;d=""===d?".":d+":";if(K(a))for(var h=0;h<a.length;h++){f=
a[h];var k=d+R(f,h);g+=S(f,b,c,k,e)}else if(k=da(a),"function"===typeof k)for(a=k.call(a),h=0;!(f=a.next()).done;)f=f.value,k=d+R(f,h++),g+=S(f,b,c,k,e);else if("object"===f)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return g}
function T(a,b,c){if(null==a)return a;var d=[],e=0;S(a,d,"","",function(f){return b.call(c,f,e++)});return d}function fa(a){if(-1===a._status){var b=a._result;b=b();b.then(function(c){if(0===a._status||-1===a._status)a._status=1,a._result=c},function(c){if(0===a._status||-1===a._status)a._status=2,a._result=c});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}var U={current:null};function ha(){return new WeakMap}
function V(){return{s:0,v:void 0,o:null,p:null}}var W={current:null},X={transition:null},Y={ReactCurrentDispatcher:W,ReactCurrentCache:U,ReactCurrentBatchConfig:X,ReactCurrentOwner:M,ContextRegistry:{}},Z=Y.ContextRegistry;
exports.Children={map:T,forEach:function(a,b,c){T(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;T(a,function(){b++});return b},toArray:function(a){return T(a,function(b){return b})||[]},only:function(a){if(!P(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=G;exports.Fragment=p;exports.Profiler=r;exports.PureComponent=I;exports.StrictMode=q;exports.Suspense=x;exports.SuspenseList=y;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y;
exports.cache=function(a){return function(){var b=U.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(ha);b=c.get(a);void 0===b&&(b=V(),c.set(a,b));c=0;for(var d=arguments.length;c<d;c++){var e=arguments[c];if("function"===typeof e||"object"===typeof e&&null!==e){var f=b.o;null===f&&(b.o=f=new WeakMap);b=f.get(e);void 0===b&&(b=V(),f.set(e,b))}else f=b.p,null===f&&(b.p=f=new Map),b=f.get(e),void 0===b&&(b=V(),f.set(e,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var g=a.apply(null,
arguments);c=b;c.s=1;return c.v=g}catch(h){throw g=b,g.s=2,g.v=h,h;}}};
exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=E({},a.props),e=a.key,f=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(f=b.ref,g=M.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var h=a.type.defaultProps;for(k in b)L.call(b,k)&&!N.hasOwnProperty(k)&&(d[k]=void 0===b[k]&&void 0!==h?h[k]:b[k])}var k=arguments.length-2;if(1===k)d.children=c;else if(1<k){h=Array(k);
for(var m=0;m<k;m++)h[m]=arguments[m+2];d.children=h}return{$$typeof:l,type:a.type,key:e,ref:f,props:d,_owner:g}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=O;exports.createFactory=function(a){var b=O.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};
exports.createServerContext=function(a,b){var c=!0;if(!Z[a]){c=!1;var d={$$typeof:v,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};d.Provider={$$typeof:t,_context:d};Z[a]=d}d=Z[a];if(d._defaultValue===B)d._defaultValue=b,d._currentValue===B&&(d._currentValue=b),d._currentValue2===B&&(d._currentValue2=b);else if(c)throw Error("ServerContext: "+a+" already defined");return d};exports.experimental_useEffectEvent=function(a){return W.current.useEffectEvent(a)};
exports.forwardRef=function(a){return{$$typeof:w,render:a}};exports.isValidElement=P;exports.lazy=function(a){return{$$typeof:A,_payload:{_status:-1,_result:a},_init:fa}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.unstable_Cache=ca;exports.unstable_DebugTracingMode=aa;exports.unstable_Offscreen=ba;
exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};exports.unstable_getCacheForType=function(a){var b=U.current;return b?b.getCacheForType(a):a()};exports.unstable_getCacheSignal=function(){var a=U.current;return a?a.getCacheSignal():(a=new AbortController,a.abort(Error("This CacheSignal was requested outside React which means that it is immediately aborted.")),a.signal)};exports.unstable_useCacheRefresh=function(){return W.current.useCacheRefresh()};
exports.unstable_useMemoCache=function(a){return W.current.useMemoCache(a)};exports.use=function(a){return W.current.use(a)};exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return W.current.useDeferredValue(a)};exports.useEffect=function(a,b){return W.current.useEffect(a,b)};exports.useId=function(){return W.current.useId()};
exports.useImperativeHandle=function(a,b,c){return W.current.useImperativeHandle(a,b,c)};exports.useInsertionEffect=function(a,b){return W.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return W.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.useReducer=function(a,b,c){return W.current.useReducer(a,b,c)};exports.useRef=function(a){return W.current.useRef(a)};exports.useState=function(a){return W.current.useState(a)};
exports.useSyncExternalStore=function(a,b,c){return W.current.useSyncExternalStore(a,b,c)};exports.useTransition=function(){return W.current.useTransition()};exports.version="18.3.0-experimental-1308e49a6-20230330";
/**
* @license React
* react.shared-subset.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var m=Object.assign,n={current:null};function p(){return new Map}
if("function"===typeof fetch){var q=fetch,r=function(a,b){var d=n.current;if(!d||b&&b.signal&&b.signal!==d.getCacheSignal())return q(a,b);if("string"!==typeof a||b){var c=new Request(a,b);if("GET"!==c.method&&"HEAD"!==c.method||c.keepalive)return q(a,b);var e=JSON.stringify([c.method,Array.from(c.headers.entries()),c.mode,c.redirect,c.credentials,c.referrer,c.referrerPolicy,c.integrity]);c=c.url}else e='["GET",[],null,"follow",null,null,null,null]',c=a;var f=d.getCacheForType(p);d=f.get(c);if(void 0===
d)a=q(a,b),f.set(c,[e,a]);else{c=0;for(f=d.length;c<f;c+=2){var h=d[c+1];if(d[c]===e)return a=h,a.then(function(g){return g.clone()})}a=q(a,b);d.push(e,a)}return a.then(function(g){return g.clone()})};m(r,q);try{fetch=r}catch(a){try{globalThis.fetch=r}catch(b){console.warn("React was unable to patch the fetch() function in this environment. Suspensey APIs might not work correctly as a result.")}}}
var t=Symbol.for("react.element"),u=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),z=Symbol.for("react.server_context"),A=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),aa=Symbol.for("react.memo"),ba=Symbol.for("react.lazy"),ca=Symbol.for("react.debug_trace_mode"),D=Symbol.for("react.default_value"),E=Symbol.iterator;
function da(a){if(null===a||"object"!==typeof a)return null;a=E&&a[E]||a["@@iterator"];return"function"===typeof a?a:null}function F(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)b+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
var G={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H={};function I(a,b,d){this.props=a;this.context=b;this.refs=H;this.updater=d||G}I.prototype.isReactComponent={};I.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(F(85));this.updater.enqueueSetState(this,a,b,"setState")};I.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
function J(){}J.prototype=I.prototype;function K(a,b,d){this.props=a;this.context=b;this.refs=H;this.updater=d||G}var L=K.prototype=new J;L.constructor=K;m(L,I.prototype);L.isPureReactComponent=!0;var M=Array.isArray,N=Object.prototype.hasOwnProperty,O={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function ea(a,b){return{$$typeof:t,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function Q(a){return"object"===typeof a&&null!==a&&a.$$typeof===t}
function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(d){return b[d]})}var R=/\/+/g;function S(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
function T(a,b,d,c,e){var f=typeof a;if("undefined"===f||"boolean"===f)a=null;var h=!1;if(null===a)h=!0;else switch(f){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case t:case u:h=!0}}if(h)return h=a,e=e(h),a=""===c?"."+S(h,0):c,M(e)?(d="",null!=a&&(d=a.replace(R,"$&/")+"/"),T(e,b,d,"",function(l){return l})):null!=e&&(Q(e)&&(e=ea(e,d+(!e.key||h&&h.key===e.key?"":(""+e.key).replace(R,"$&/")+"/")+a)),b.push(e)),1;h=0;c=""===c?".":c+":";if(M(a))for(var g=0;g<a.length;g++){f=
a[g];var k=c+S(f,g);h+=T(f,b,d,k,e)}else if(k=da(a),"function"===typeof k)for(a=k.call(a),g=0;!(f=a.next()).done;)f=f.value,k=c+S(f,g++),h+=T(f,b,d,k,e);else if("object"===f)throw b=String(a),Error(F(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function U(a,b,d){if(null==a)return a;var c=[],e=0;T(a,c,"","",function(f){return b.call(d,f,e++)});return c}
function fa(a){if(-1===a._status){var b=a._result;b=b();b.then(function(d){if(0===a._status||-1===a._status)a._status=1,a._result=d},function(d){if(0===a._status||-1===a._status)a._status=2,a._result=d});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function ha(){return new WeakMap}function V(){return{s:0,v:void 0,o:null,p:null}}
var W={current:null},X={transition:null},Y={ReactCurrentDispatcher:W,ReactCurrentCache:n,ReactCurrentBatchConfig:X,ReactCurrentOwner:O,ContextRegistry:{}},Z=Y.ContextRegistry;exports.Children={map:U,forEach:function(a,b,d){U(a,function(){b.apply(this,arguments)},d)},count:function(a){var b=0;U(a,function(){b++});return b},toArray:function(a){return U(a,function(b){return b})||[]},only:function(a){if(!Q(a))throw Error(F(143));return a}};exports.Fragment=v;exports.Profiler=x;exports.StrictMode=w;
exports.Suspense=B;exports.SuspenseList=C;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y;
exports.cache=function(a){return function(){var b=n.current;if(!b)return a.apply(null,arguments);var d=b.getCacheForType(ha);b=d.get(a);void 0===b&&(b=V(),d.set(a,b));d=0;for(var c=arguments.length;d<c;d++){var e=arguments[d];if("function"===typeof e||"object"===typeof e&&null!==e){var f=b.o;null===f&&(b.o=f=new WeakMap);b=f.get(e);void 0===b&&(b=V(),f.set(e,b))}else f=b.p,null===f&&(b.p=f=new Map),b=f.get(e),void 0===b&&(b=V(),f.set(e,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var h=a.apply(null,
arguments);d=b;d.s=1;return d.v=h}catch(g){throw h=b,h.s=2,h.v=g,g;}}};
exports.cloneElement=function(a,b,d){if(null===a||void 0===a)throw Error(F(267,a));var c=m({},a.props),e=a.key,f=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(f=b.ref,h=O.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(k in b)N.call(b,k)&&!P.hasOwnProperty(k)&&(c[k]=void 0===b[k]&&void 0!==g?g[k]:b[k])}var k=arguments.length-2;if(1===k)c.children=d;else if(1<k){g=Array(k);for(var l=0;l<k;l++)g[l]=arguments[l+2];c.children=g}return{$$typeof:t,type:a.type,
key:e,ref:f,props:c,_owner:h}};exports.createElement=function(a,b,d){var c,e={},f=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(f=""+b.key),b)N.call(b,c)&&!P.hasOwnProperty(c)&&(e[c]=b[c]);var g=arguments.length-2;if(1===g)e.children=d;else if(1<g){for(var k=Array(g),l=0;l<g;l++)k[l]=arguments[l+2];e.children=k}if(a&&a.defaultProps)for(c in g=a.defaultProps,g)void 0===e[c]&&(e[c]=g[c]);return{$$typeof:t,type:a,key:f,ref:h,props:e,_owner:O.current}};exports.createRef=function(){return{current:null}};
exports.createServerContext=function(a,b){var d=!0;if(!Z[a]){d=!1;var c={$$typeof:z,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};c.Provider={$$typeof:y,_context:c};Z[a]=c}c=Z[a];if(c._defaultValue===D)c._defaultValue=b,c._currentValue===D&&(c._currentValue=b),c._currentValue2===D&&(c._currentValue2=b);else if(d)throw Error(F(429,a));return c};exports.forwardRef=function(a){return{$$typeof:A,render:a}};exports.isValidElement=Q;
exports.lazy=function(a){return{$$typeof:ba,_payload:{_status:-1,_result:a},_init:fa}};exports.memo=function(a,b){return{$$typeof:aa,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.unstable_DebugTracingMode=ca;exports.unstable_getCacheForType=function(a){var b=n.current;return b?b.getCacheForType(a):a()};
exports.unstable_getCacheSignal=function(){var a=n.current;if(!a){a=new AbortController;var b=Error(F(455));a.abort(b);return a.signal}return a.getCacheSignal()};exports.use=function(a){return W.current.use(a)};exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){};exports.useId=function(){return W.current.useId()};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};
exports.version="18.3.0-experimental-1308e49a6-20230330";
'use strict';
var m = require('react-dom');
if (process.env.NODE_ENV === 'production') {
exports.createRoot = m.createRoot;
exports.hydrateRoot = m.hydrateRoot;
} else {
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
exports.createRoot = function (c, o) {
i.usingClientEntryPoint = true;
try {
return m.createRoot(c, o);
} finally {
i.usingClientEntryPoint = false;
}
};
exports.hydrateRoot = function (c, h, o) {
i.usingClientEntryPoint = true;
try {
return m.hydrateRoot(c, h, o);
} finally {
i.usingClientEntryPoint = false;
}
};
}
'use strict';
function checkDCE() {
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
) {
return;
}
if (process.env.NODE_ENV !== 'production') {
// This branch is unreachable because this function is only called
// in production, but the condition is true only in development.
// Therefore if the branch is still here, dead code elimination wasn't
// properly applied.
// Don't change the message. React DevTools relies on it. Also make sure
// this message doesn't occur elsewhere in this function, or it will cause
// a false positive.
throw new Error('^_^');
}
try {
// Verify that the code above has been dead code eliminated (DCE'd).
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
} catch (err) {
// DevTools shouldn't crash React, no matter what.
// We should still report in case we break this code.
console.error(err);
}
}
if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom.production.min.js');
} else {
module.exports = require('./cjs/react-dom.development.js');
}
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');
} else {
module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
}
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-jsx-runtime.production.min.js');
} else {
module.exports = require('./cjs/react-jsx-runtime.development.js');
}
{
"name": "react-dom-experimental-builtin",
"main": "index.js",
"exports": {
".": "./index.js",
"./client": "./client.js",
"./server": {
"workerd": "./server.edge.js",
"edge-light": "./server.edge.js",
"bun": "./server.bun.js",
"deno": "./server.browser.js",
"worker": "./server.browser.js",
"browser": "./server.browser.js",
"default": "./server.node.js"
},
"./server.browser": "./server.browser.js",
"./server.bun": "./server.bun.js",
"./server.edge": "./server.edge.js",
"./server.node": "./server.node.js",
"./static": {
"workerd": "./static.edge.js",
"edge-light": "./static.edge.js",
"deno": "./static.browser.js",
"worker": "./static.browser.js",
"browser": "./static.browser.js",
"default": "./static.node.js"
},
"./static.browser": "./static.browser.js",
"./static.edge": "./static.edge.js",
"./static.node": "./static.node.js",
"./server-rendering-stub": "./server-rendering-stub.js",
"./profiling": "./profiling.js",
"./test-utils": "./test-utils.js",
"./unstable_testing": "./unstable_testing.js",
"./unstable_server-external-runtime": "./unstable_server-external-runtime.js",
"./package.json": "./package.json"
},
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "0.0.0-experimental-b14f8da15-20230403"
},
"peerDependencies": {
"react": "0.0.0-experimental-b14f8da15-20230403"
},
"browser": {
"./server.js": "./server.browser.js",
"./static.js": "./static.browser.js"
}
}
\ No newline at end of file
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react.shared-subset.production.min.js');
} else {
module.exports = require('./cjs/react.shared-subset.development.js');
}
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom-server-rendering-stub.production.min.js');
} else {
module.exports = require('./cjs/react-dom-server-rendering-stub.development.js');
}
'use strict';
var l, s;
if (process.env.NODE_ENV === 'production') {
l = require('./cjs/react-dom-server-legacy.browser.production.min.js');
s = require('./cjs/react-dom-server.browser.production.min.js');
} else {
l = require('./cjs/react-dom-server-legacy.browser.development.js');
s = require('./cjs/react-dom-server.browser.development.js');
}
exports.version = l.version;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
exports.renderToNodeStream = l.renderToNodeStream;
exports.renderToStaticNodeStream = l.renderToStaticNodeStream;
exports.renderToReadableStream = s.renderToReadableStream;
'use strict';
var b;
var l;
if (process.env.NODE_ENV === 'production') {
b = require('./cjs/react-dom-server.edge.production.min.js');
l = require('./cjs/react-dom-server-legacy.browser.production.min.js');
} else {
b = require('./cjs/react-dom-server.edge.development.js');
l = require('./cjs/react-dom-server-legacy.browser.development.js');
}
exports.version = b.version;
exports.renderToReadableStream = b.renderToReadableStream;
exports.renderToNodeStream = b.renderToNodeStream;
exports.renderToStaticNodeStream = b.renderToStaticNodeStream;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
'use strict';
module.exports = require('./server.node');
'use strict';
var l, s;
if (process.env.NODE_ENV === 'production') {
l = require('./cjs/react-dom-server-legacy.node.production.min.js');
s = require('./cjs/react-dom-server.node.production.min.js');
} else {
l = require('./cjs/react-dom-server-legacy.node.development.js');
s = require('./cjs/react-dom-server.node.development.js');
}
exports.version = l.version;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
exports.renderToNodeStream = l.renderToNodeStream;
exports.renderToStaticNodeStream = l.renderToStaticNodeStream;
exports.renderToPipeableStream = s.renderToPipeableStream;
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom-static.edge.production.min.js');
} else {
module.exports = require('./cjs/react-dom-static.edge.development.js');
}
...@@ -14,7 +14,7 @@ if (process.env.NODE_ENV !== "production") { ...@@ -14,7 +14,7 @@ if (process.env.NODE_ENV !== "production") {
(function() { (function() {
'use strict'; 'use strict';
var ReactVersion = '18.3.0-next-85de6fde5-20230328'; var ReactVersion = '18.3.0-next-b14f8da15-20230403';
var Internals = { var Internals = {
usingClientEntryPoint: false, usingClientEntryPoint: false,
......
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b; 'use strict';var b={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function d(a){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)e+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b;
exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preconnect=function(){var a=b.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=b.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-next-85de6fde5-20230328"; exports.createPortal=function(){throw Error(d(448));};exports.flushSync=function(){throw Error(d(449));};exports.preconnect=function(){var a=b.Dispatcher.current;a&&a.preconnect.apply(this,arguments)};exports.prefetchDNS=function(){var a=b.Dispatcher.current;a&&a.prefetchDNS.apply(this,arguments)};exports.preinit=function(){var a=b.Dispatcher.current;a&&a.preinit.apply(this,arguments)};exports.preload=function(){var a=b.Dispatcher.current;a&&a.preload.apply(this,arguments)};exports.version="18.3.0-next-b14f8da15-20230403";
{ {
"name": "react-dom", "name": "react-dom-builtin",
"version": "18.3.0-next-85de6fde5-20230328",
"description": "React package for working with the DOM.",
"main": "index.js", "main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-dom"
},
"keywords": [
"react"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
"homepage": "https://reactjs.org/",
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "0.24.0-next-85de6fde5-20230328"
},
"peerDependencies": {
"react": "18.3.0-next-85de6fde5-20230328"
},
"files": [
"LICENSE",
"README.md",
"index.js",
"client.js",
"profiling.js",
"server.js",
"server.browser.js",
"server.edge.js",
"server.node.js",
"server.bun.js",
"server-rendering-stub.js",
"test-utils.js",
"unstable_server-external-runtime.js",
"cjs/",
"umd/"
],
"exports": { "exports": {
".": "./index.js", ".": "./index.js",
"./client": "./client.js", "./client": "./client.js",
...@@ -62,12 +23,14 @@ ...@@ -62,12 +23,14 @@
"./unstable_server-external-runtime": "./unstable_server-external-runtime.js", "./unstable_server-external-runtime": "./unstable_server-external-runtime.js",
"./package.json": "./package.json" "./package.json": "./package.json"
}, },
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "0.24.0-next-b14f8da15-20230403"
},
"peerDependencies": {
"react": "18.3.0-next-b14f8da15-20230403"
},
"browser": { "browser": {
"./server.js": "./server.browser.js" "./server.js": "./server.browser.js"
},
"browserify": {
"transform": [
"loose-envify"
]
} }
} }
\ No newline at end of file
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
/**
* @license React
* react-jsx-dev-runtime.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
/**
* @license React
* react-jsx-dev-runtime.profiling.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
/**
* @license React
* react-jsx-runtime.profiling.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
/**
* @license React
* react.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.server_context"),w=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),aa=Symbol.for("react.debug_trace_mode"),ba=Symbol.for("react.offscreen"),ca=
Symbol.for("react.cache"),B=Symbol.for("react.default_value"),C=Symbol.iterator;function da(a){if(null===a||"object"!==typeof a)return null;a=C&&a[C]||a["@@iterator"];return"function"===typeof a?a:null}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,F={};function G(a,b,c){this.props=a;this.context=b;this.refs=F;this.updater=c||D}G.prototype.isReactComponent={};
G.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};G.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function H(){}H.prototype=G.prototype;function I(a,b,c){this.props=a;this.context=b;this.refs=F;this.updater=c||D}var J=I.prototype=new H;
J.constructor=I;E(J,G.prototype);J.isPureReactComponent=!0;var K=Array.isArray,L=Object.prototype.hasOwnProperty,M={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};
function O(a,b,c){var d,e={},f=null,g=null;if(null!=b)for(d in void 0!==b.ref&&(g=b.ref),void 0!==b.key&&(f=""+b.key),b)L.call(b,d)&&!N.hasOwnProperty(d)&&(e[d]=b[d]);var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){for(var k=Array(h),m=0;m<h;m++)k[m]=arguments[m+2];e.children=k}if(a&&a.defaultProps)for(d in h=a.defaultProps,h)void 0===e[d]&&(e[d]=h[d]);return{$$typeof:l,type:a,key:f,ref:g,props:e,_owner:M.current}}
function ea(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function P(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}var Q=/\/+/g;function R(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
function S(a,b,c,d,e){var f=typeof a;if("undefined"===f||"boolean"===f)a=null;var g=!1;if(null===a)g=!0;else switch(f){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case l:case n:g=!0}}if(g)return g=a,e=e(g),a=""===d?"."+R(g,0):d,K(e)?(c="",null!=a&&(c=a.replace(Q,"$&/")+"/"),S(e,b,c,"",function(m){return m})):null!=e&&(P(e)&&(e=ea(e,c+(!e.key||g&&g.key===e.key?"":(""+e.key).replace(Q,"$&/")+"/")+a)),b.push(e)),1;g=0;d=""===d?".":d+":";if(K(a))for(var h=0;h<a.length;h++){f=
a[h];var k=d+R(f,h);g+=S(f,b,c,k,e)}else if(k=da(a),"function"===typeof k)for(a=k.call(a),h=0;!(f=a.next()).done;)f=f.value,k=d+R(f,h++),g+=S(f,b,c,k,e);else if("object"===f)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return g}
function T(a,b,c){if(null==a)return a;var d=[],e=0;S(a,d,"","",function(f){return b.call(c,f,e++)});return d}function fa(a){if(-1===a._status){var b=a._result;b=b();b.then(function(c){if(0===a._status||-1===a._status)a._status=1,a._result=c},function(c){if(0===a._status||-1===a._status)a._status=2,a._result=c});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}var U={current:null};function ha(){return new WeakMap}
function V(){return{s:0,v:void 0,o:null,p:null}}var W={current:null},X={transition:null},Y={ReactCurrentDispatcher:W,ReactCurrentCache:U,ReactCurrentBatchConfig:X,ReactCurrentOwner:M,ContextRegistry:{}},Z=Y.ContextRegistry;
exports.Children={map:T,forEach:function(a,b,c){T(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;T(a,function(){b++});return b},toArray:function(a){return T(a,function(b){return b})||[]},only:function(a){if(!P(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=G;exports.Fragment=p;exports.Profiler=r;exports.PureComponent=I;exports.StrictMode=q;exports.Suspense=x;exports.SuspenseList=y;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y;
exports.cache=function(a){return function(){var b=U.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(ha);b=c.get(a);void 0===b&&(b=V(),c.set(a,b));c=0;for(var d=arguments.length;c<d;c++){var e=arguments[c];if("function"===typeof e||"object"===typeof e&&null!==e){var f=b.o;null===f&&(b.o=f=new WeakMap);b=f.get(e);void 0===b&&(b=V(),f.set(e,b))}else f=b.p,null===f&&(b.p=f=new Map),b=f.get(e),void 0===b&&(b=V(),f.set(e,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var g=a.apply(null,
arguments);c=b;c.s=1;return c.v=g}catch(h){throw g=b,g.s=2,g.v=h,h;}}};
exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=E({},a.props),e=a.key,f=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(f=b.ref,g=M.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var h=a.type.defaultProps;for(k in b)L.call(b,k)&&!N.hasOwnProperty(k)&&(d[k]=void 0===b[k]&&void 0!==h?h[k]:b[k])}var k=arguments.length-2;if(1===k)d.children=c;else if(1<k){h=Array(k);
for(var m=0;m<k;m++)h[m]=arguments[m+2];d.children=h}return{$$typeof:l,type:a.type,key:e,ref:f,props:d,_owner:g}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=O;exports.createFactory=function(a){var b=O.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};
exports.createServerContext=function(a,b){var c=!0;if(!Z[a]){c=!1;var d={$$typeof:v,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};d.Provider={$$typeof:t,_context:d};Z[a]=d}d=Z[a];if(d._defaultValue===B)d._defaultValue=b,d._currentValue===B&&(d._currentValue=b),d._currentValue2===B&&(d._currentValue2=b);else if(c)throw Error("ServerContext: "+a+" already defined");return d};exports.experimental_useEffectEvent=function(a){return W.current.useEffectEvent(a)};
exports.forwardRef=function(a){return{$$typeof:w,render:a}};exports.isValidElement=P;exports.lazy=function(a){return{$$typeof:A,_payload:{_status:-1,_result:a},_init:fa}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=X.transition;X.transition={};try{a()}finally{X.transition=b}};exports.unstable_Cache=ca;exports.unstable_DebugTracingMode=aa;exports.unstable_Offscreen=ba;
exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};exports.unstable_getCacheForType=function(a){var b=U.current;return b?b.getCacheForType(a):a()};exports.unstable_getCacheSignal=function(){var a=U.current;return a?a.getCacheSignal():(a=new AbortController,a.abort(Error("This CacheSignal was requested outside React which means that it is immediately aborted.")),a.signal)};exports.unstable_useCacheRefresh=function(){return W.current.useCacheRefresh()};
exports.unstable_useMemoCache=function(a){return W.current.useMemoCache(a)};exports.use=function(a){return W.current.use(a)};exports.useCallback=function(a,b){return W.current.useCallback(a,b)};exports.useContext=function(a){return W.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return W.current.useDeferredValue(a)};exports.useEffect=function(a,b){return W.current.useEffect(a,b)};exports.useId=function(){return W.current.useId()};
exports.useImperativeHandle=function(a,b,c){return W.current.useImperativeHandle(a,b,c)};exports.useInsertionEffect=function(a,b){return W.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return W.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return W.current.useMemo(a,b)};exports.useReducer=function(a,b,c){return W.current.useReducer(a,b,c)};exports.useRef=function(a){return W.current.useRef(a)};exports.useState=function(a){return W.current.useState(a)};
exports.useSyncExternalStore=function(a,b,c){return W.current.useSyncExternalStore(a,b,c)};exports.useTransition=function(){return W.current.useTransition()};exports.version="18.3.0-experimental-b14f8da15-20230403";
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react.production.min.js');
} else {
module.exports = require('./cjs/react.development.js');
}
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');
} else {
module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
}
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-jsx-runtime.production.min.js');
} else {
module.exports = require('./cjs/react-jsx-runtime.development.js');
}
{
"name": "react-experimental-builtin",
"main": "index.js",
"exports": {
".": {
"react-server": "./react.shared-subset.js",
"default": "./index.js"
},
"./package.json": "./package.json",
"./jsx-runtime": "./jsx-runtime.js",
"./jsx-dev-runtime": "./jsx-dev-runtime.js"
},
"dependencies": {
"loose-envify": "^1.1.0"
}
}
\ No newline at end of file
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react.shared-subset.production.min.js');
} else {
module.exports = require('./cjs/react.shared-subset.development.js');
}
...@@ -669,6 +669,12 @@ function parseModelString(response, parentObject, key, value) { ...@@ -669,6 +669,12 @@ function parseModelString(response, parentObject, key, value) {
return undefined; return undefined;
} }
case 'n':
{
// BigInt
return BigInt(value.substring(2));
}
default: default:
{ {
// We assume that anything else is a reference ID. // We assume that anything else is a reference ID.
...@@ -1285,6 +1291,10 @@ function serializeUndefined() { ...@@ -1285,6 +1291,10 @@ function serializeUndefined() {
return '$undefined'; return '$undefined';
} }
function serializeBigInt(n) {
return '$n' + n.toString(10);
}
function escapeStringValue(value) { function escapeStringValue(value) {
if (value[0] === '$') { if (value[0] === '$') {
// We need to escape $ prefixed strings since we use those to encode // We need to escape $ prefixed strings since we use those to encode
...@@ -1433,7 +1443,7 @@ function processReply(root, resolve, reject) { ...@@ -1433,7 +1443,7 @@ function processReply(root, resolve, reject) {
} }
if (typeof value === 'bigint') { if (typeof value === 'bigint') {
throw new Error("BigInt (" + value + ") is not yet supported as an argument to a Server Function."); return serializeBigInt(value);
} }
throw new Error("Type " + typeof value + " is not supported as an argument to a Server Function."); throw new Error("Type " + typeof value + " is not supported as an argument to a Server Function.");
......
...@@ -649,6 +649,12 @@ function parseModelString(response, parentObject, key, value) { ...@@ -649,6 +649,12 @@ function parseModelString(response, parentObject, key, value) {
return undefined; return undefined;
} }
case 'n':
{
// BigInt
return BigInt(value.substring(2));
}
default: default:
{ {
// We assume that anything else is a reference ID. // We assume that anything else is a reference ID.
......
...@@ -650,6 +650,12 @@ function parseModelString(response, parentObject, key, value) { ...@@ -650,6 +650,12 @@ function parseModelString(response, parentObject, key, value) {
return undefined; return undefined;
} }
case 'n':
{
// BigInt
return BigInt(value.substring(2));
}
default: default:
{ {
// We assume that anything else is a reference ID. // We assume that anything else is a reference ID.
......
...@@ -18,8 +18,8 @@ function C(a){try{var b=a.value;if(b.async){var c=q.get(b.id);if("fulfilled"===c ...@@ -18,8 +18,8 @@ function C(a){try{var b=a.value;if(b.async){var c=q.get(b.id);if("fulfilled"===c
function M(a,b,c){if(J){var d=J;d.deps++}else d=J={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&&E(e,d.value))}}function N(a){return function(b){return G(a,b)}} function M(a,b,c){if(J){var d=J;d.deps++}else d=J={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&&E(e,d.value))}}function N(a){return function(b){return G(a,b)}}
function O(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(h){return d(b.id,h.concat(e))}):d(b.id,e)}var d=a._callServer;u.set(c,b);return c} function O(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(h){return d(b.id,h.concat(e))}):d(b.id,e)}var d=a._callServer;u.set(c,b);return c}
function P(a,b,c,d){if("$"===d[0]){if("$"===d)return v;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=L(a,b),{$$typeof:x,_payload:a,_init:D};case "@":return b=parseInt(d.substring(2),16),L(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),z[a]||(z[a]=l.createServerContext(a,y)),z[a].Provider;case "F":b=parseInt(d.substring(2),16);b=L(a,b);switch(b.status){case "resolved_model":B(b)}switch(b.status){case "fulfilled":return O(a, function P(a,b,c,d){if("$"===d[0]){if("$"===d)return v;switch(d[1]){case "$":return d.substring(1);case "L":return b=parseInt(d.substring(2),16),a=L(a,b),{$$typeof:x,_payload:a,_init:D};case "@":return b=parseInt(d.substring(2),16),L(a,b);case "S":return Symbol.for(d.substring(2));case "P":return a=d.substring(2),z[a]||(z[a]=l.createServerContext(a,y)),z[a].Provider;case "F":b=parseInt(d.substring(2),16);b=L(a,b);switch(b.status){case "resolved_model":B(b)}switch(b.status){case "fulfilled":return O(a,
b.value);default:throw b.reason;}case "u":return;default:d=parseInt(d.substring(1),16);a=L(a,d);switch(a.status){case "resolved_model":B(a);break;case "resolved_module":C(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=I,a.then(M(d,b,c),N(d)),null;default:throw a.reason;}}}return d}function Q(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');} b.value);default:throw b.reason;}case "u":return;case "n":return BigInt(d.substring(2));default:d=parseInt(d.substring(1),16);a=L(a,d);switch(a.status){case "resolved_model":B(a);break;case "resolved_module":C(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":return d=I,a.then(M(d,b,c),N(d)),null;default:throw a.reason;}}}return d}
function R(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=n(a._bundlerConfig,c);if(c=t(f)){if(e){var h=e;h.status="blocked"}else h=new A("blocked",null,null,a),d.set(b,h);c.then(function(){return H(h,f)},function(g){return G(h,g)})}else e?H(e,f):d.set(b,new A("resolved_module",f,null,a))} function Q(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function R(a,b,c){var d=a._chunks,e=d.get(b);c=JSON.parse(c,a._fromJSON);var f=n(a._bundlerConfig,c);if(c=t(f)){if(e){var h=e;h.status="blocked"}else h=new A("blocked",null,null,a),d.set(b,h);c.then(function(){return H(h,f)},function(g){return G(h,g)})}else e?H(e,f):d.set(b,new A("resolved_module",f,null,a))}
function S(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.substring(0,c),16);switch(b[c+1]){case "I":R(a,d,b.substring(c+2));break;case "E":c=JSON.parse(b.substring(c+2)).digest;b=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.");b.stack="Error: "+b.message;b.digest=c;c=a._chunks; function S(a,b){if(""!==b){var c=b.indexOf(":",0),d=parseInt(b.substring(0,c),16);switch(b[c+1]){case "I":R(a,d,b.substring(c+2));break;case "E":c=JSON.parse(b.substring(c+2)).digest;b=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.");b.stack="Error: "+b.message;b.digest=c;c=a._chunks;
var e=c.get(d);e?G(e,b):c.set(d,new A("rejected",null,b,a));break;default:b=b.substring(c+1),e=a._chunks,(c=e.get(d))?"pending"===c.status&&(a=c.value,d=c.reason,c.status="resolved_model",c.value=b,null!==a&&(B(c),F(c,a,d))):e.set(d,new A("resolved_model",b,null,a))}}}function T(a){return function(b,c){return"string"===typeof c?P(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===v?{$$typeof:v,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}} var e=c.get(d);e?G(e,b):c.set(d,new A("rejected",null,b,a));break;default:b=b.substring(c+1),e=a._chunks,(c=e.get(d))?"pending"===c.status&&(a=c.value,d=c.reason,c.status="resolved_model",c.value=b,null!==a&&(B(c),F(c,a,d))):e.set(d,new A("resolved_model",b,null,a))}}}function T(a){return function(b,c){return"string"===typeof c?P(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===v?{$$typeof:v,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}
function U(a,b){var c=new k.TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:Q,_chunks:d,_partialRow:"",_stringDecoder:c};a._fromJSON=T(a);return a}function V(){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.");} function U(a,b){var c=new k.TextDecoder,d=new Map;a={_bundlerConfig:a,_callServer:void 0!==b?b:Q,_chunks:d,_partialRow:"",_stringDecoder:c};a._fromJSON=T(a);return a}function V(){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.");}
......
...@@ -591,6 +591,12 @@ function parseModelString(response, parentObject, key, value) { ...@@ -591,6 +591,12 @@ function parseModelString(response, parentObject, key, value) {
return undefined; return undefined;
} }
case 'n':
{
// BigInt
return BigInt(value.substring(2));
}
default: default:
{ {
// We assume that anything else is a reference ID. // We assume that anything else is a reference ID.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment