Comparing version 0.0.0-experimental-057915477-20220407 to 0.0.0-experimental-05797cceb-20240328
@@ -5,3 +5,3 @@ /** | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
@@ -29,5 +29,6 @@ * This source code is licensed under the MIT license found in the | ||
var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); | ||
var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); | ||
var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext | ||
var REACT_CONSUMER_TYPE = Symbol.for('react.consumer'); | ||
var REACT_CONTEXT_TYPE = Symbol.for('react.context'); | ||
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context'); | ||
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | ||
@@ -101,31 +102,20 @@ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); | ||
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber | ||
// stuff. Intended to enable React core members to more easily debug scheduling | ||
// issues in DEV builds. | ||
// Ready for next major. | ||
// | ||
// Alias __NEXT_MAJOR__ to true for easier skimming. | ||
// ----------------------------------------------------------------------------- | ||
var enableDebugTracing = false; // Track which Fiber(s) schedule render work. | ||
var __NEXT_MAJOR__ = true; // Removes legacy style context | ||
// as a normal prop instead of stripping it from the props object. | ||
// Passes `ref` as a normal prop instead of stripping it from the props object | ||
// during element creation. | ||
var REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); | ||
function isValidElementType(type) { | ||
if (typeof type === 'string' || typeof type === 'function') { | ||
return true; | ||
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | ||
var enableRefAsProp = __NEXT_MAJOR__; | ||
var enableRenderableContext = __NEXT_MAJOR__; // ----------------------------------------------------------------------------- | ||
// stuff. Intended to enable React core members to more easily debug scheduling | ||
// issues in DEV builds. | ||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || type === REACT_CACHE_TYPE || enableTransitionTracing ) { | ||
return true; | ||
} | ||
var enableDebugTracing = false; | ||
if (typeof type === 'object' && type !== null) { | ||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
function getWrappedName(outerType, innerType, wrapperName) { | ||
@@ -145,4 +135,5 @@ var displayName = outerType.displayName; | ||
return type.displayName || 'Context'; | ||
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. | ||
} | ||
var REACT_CLIENT_REFERENCE$2 = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. | ||
@@ -155,9 +146,8 @@ function getComponentNameFromType(type) { | ||
{ | ||
if (typeof type.tag === 'number') { | ||
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); | ||
if (typeof type === 'function') { | ||
if (type.$$typeof === REACT_CLIENT_REFERENCE$2) { | ||
// TODO: Create a convention for naming client references with debug info. | ||
return null; | ||
} | ||
} | ||
if (typeof type === 'function') { | ||
return type.displayName || type.name || null; | ||
@@ -197,11 +187,27 @@ } | ||
if (typeof type === 'object') { | ||
{ | ||
if (typeof type.tag === 'number') { | ||
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); | ||
} | ||
} | ||
switch (type.$$typeof) { | ||
case REACT_PROVIDER_TYPE: | ||
{ | ||
return null; | ||
} | ||
case REACT_CONTEXT_TYPE: | ||
var context = type; | ||
return getContextName(context) + '.Consumer'; | ||
case REACT_PROVIDER_TYPE: | ||
var provider = type; | ||
return getContextName(provider._context) + '.Provider'; | ||
{ | ||
return getContextName(context) + '.Provider'; | ||
} | ||
case REACT_CONSUMER_TYPE: | ||
{ | ||
var consumer = type; | ||
return getContextName(consumer._context) + '.Consumer'; | ||
} | ||
case REACT_FORWARD_REF_TYPE: | ||
@@ -231,10 +237,2 @@ return getWrappedName(type, type.render, 'ForwardRef'); | ||
} | ||
case REACT_SERVER_CONTEXT_TYPE: | ||
{ | ||
var context2 = type; | ||
return (context2.displayName || context2._globalName) + '.Provider'; | ||
} | ||
// eslint-disable-next-line no-fallthrough | ||
} | ||
@@ -246,4 +244,105 @@ } | ||
// $FlowFixMe[method-unbinding] | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
var assign = Object.assign; | ||
/* | ||
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol | ||
* and Temporal.* types. See https://github.com/facebook/react/pull/22064. | ||
* | ||
* The functions in this module will throw an easier-to-understand, | ||
* easier-to-debug exception with a clear errors message message explaining the | ||
* problem. (Instead of a confusing exception thrown inside the implementation | ||
* of the `value` object). | ||
*/ | ||
// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. | ||
function typeName(value) { | ||
{ | ||
// toStringTag is needed for namespaced types like Temporal.Instant | ||
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; | ||
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return] | ||
return type; | ||
} | ||
} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. | ||
function willCoercionThrow(value) { | ||
{ | ||
try { | ||
testStringCoercion(value); | ||
return false; | ||
} catch (e) { | ||
return true; | ||
} | ||
} | ||
} | ||
function testStringCoercion(value) { | ||
// If you ended up here by following an exception call stack, here's what's | ||
// happened: you supplied an object or symbol value to React (as a prop, key, | ||
// DOM attribute, CSS property, string ref, etc.) and when React tried to | ||
// coerce it to a string using `'' + value`, an exception was thrown. | ||
// | ||
// The most common types that will cause this exception are `Symbol` instances | ||
// and Temporal objects like `Temporal.Instant`. But any object that has a | ||
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this | ||
// exception. (Library authors do this to prevent users from using built-in | ||
// numeric operators like `+` or comparison operators like `>=` because custom | ||
// methods are needed to perform accurate arithmetic or comparison.) | ||
// | ||
// To fix the problem, coerce this object or symbol value to a string before | ||
// passing it to React. The most reliable way is usually `String(value)`. | ||
// | ||
// To find which value is throwing, check the browser or debugger console. | ||
// Before this exception was thrown, there should be `console.error` output | ||
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the | ||
// problem and how that type was used: key, atrribute, input value prop, etc. | ||
// In most cases, this console output also shows the component and its | ||
// ancestor components where the exception happened. | ||
// | ||
// eslint-disable-next-line react-internal/safe-string-coercion | ||
return '' + value; | ||
} | ||
function checkKeyStringCoercion(value) { | ||
{ | ||
if (willCoercionThrow(value)) { | ||
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value)); | ||
return testStringCoercion(value); // throw (to help callers find troubleshooting comments) | ||
} | ||
} | ||
} | ||
var REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference'); | ||
function isValidElementType(type) { | ||
if (typeof type === 'string' || typeof type === 'function') { | ||
return true; | ||
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | ||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || type === REACT_CACHE_TYPE || enableTransitionTracing ) { | ||
return true; | ||
} | ||
if (typeof type === 'object' && type !== null) { | ||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || !enableRenderableContext || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
type.$$typeof === REACT_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare | ||
function isArray(a) { | ||
return isArrayImpl(a); | ||
} | ||
// Helpers to patch console.logs to avoid logging during side-effect free | ||
@@ -282,3 +381,3 @@ // replaying on render function. This currently only patches the object | ||
writable: true | ||
}; // $FlowFixMe Flow thinks console is immutable. | ||
}; // $FlowFixMe[cannot-write] Flow thinks console is immutable. | ||
@@ -310,3 +409,3 @@ Object.defineProperties(console, { | ||
writable: true | ||
}; // $FlowFixMe Flow thinks console is immutable. | ||
}; // $FlowFixMe[cannot-write] Flow thinks console is immutable. | ||
@@ -347,3 +446,3 @@ Object.defineProperties(console, { | ||
var prefix; | ||
function describeBuiltInComponentFrame(name, source, ownerFn) { | ||
function describeBuiltInComponentFrame(name, ownerFn) { | ||
{ | ||
@@ -371,6 +470,18 @@ if (prefix === undefined) { | ||
} | ||
/** | ||
* Leverages native browser/VM stack frames to get proper details (e.g. | ||
* filename, line + col number) for a single component in a component stack. We | ||
* do this by: | ||
* (1) throwing and catching an error in the function - this will be our | ||
* control error. | ||
* (2) calling the component which will eventually throw an error that we'll | ||
* catch - this will be our sample error. | ||
* (3) diffing the control and sample error stacks to find the stack frame | ||
* which represents our component. | ||
*/ | ||
function describeNativeComponentFrame(fn, construct) { | ||
// If something asked for a stack inside a fake render, it should get ignored. | ||
if ( !fn || reentry) { | ||
if (!fn || reentry) { | ||
return ''; | ||
@@ -387,5 +498,4 @@ } | ||
var control; | ||
reentry = true; | ||
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. | ||
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. | ||
@@ -402,68 +512,138 @@ Error.prepareStackTrace = undefined; | ||
} | ||
/** | ||
* Finding a common stack frame between sample and control errors can be | ||
* tricky given the different types and levels of stack trace truncation from | ||
* different JS VMs. So instead we'll attempt to control what that common | ||
* frame should be through this object method: | ||
* Having both the sample and control errors be in the function under the | ||
* `DescribeNativeComponentFrameRoot` property, + setting the `name` and | ||
* `displayName` properties of the function ensures that a stack | ||
* frame exists that has the method name `DescribeNativeComponentFrameRoot` in | ||
* it for both control and sample stacks. | ||
*/ | ||
try { | ||
// This should throw. | ||
if (construct) { | ||
// Something should be setting the props in the constructor. | ||
var Fake = function () { | ||
throw Error(); | ||
}; // $FlowFixMe | ||
var RunInRootFrame = { | ||
DetermineComponentFrameRoot: function () { | ||
var control; | ||
Object.defineProperty(Fake.prototype, 'props', { | ||
set: function () { | ||
// We use a throwing setter instead of frozen or non-writable props | ||
// because that won't throw in a non-strict mode function. | ||
throw Error(); | ||
} | ||
}); | ||
try { | ||
// This should throw. | ||
if (construct) { | ||
// Something should be setting the props in the constructor. | ||
var Fake = function () { | ||
throw Error(); | ||
}; // $FlowFixMe[prop-missing] | ||
if (typeof Reflect === 'object' && Reflect.construct) { | ||
// We construct a different control for this case to include any extra | ||
// frames added by the construct call. | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x) { | ||
control = x; | ||
Object.defineProperty(Fake.prototype, 'props', { | ||
set: function () { | ||
// We use a throwing setter instead of frozen or non-writable props | ||
// because that won't throw in a non-strict mode function. | ||
throw Error(); | ||
} | ||
}); | ||
if (typeof Reflect === 'object' && Reflect.construct) { | ||
// We construct a different control for this case to include any extra | ||
// frames added by the construct call. | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x) { | ||
control = x; | ||
} // $FlowFixMe[prop-missing] found when upgrading Flow | ||
fn.call(Fake.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
control = x; | ||
} // TODO(luna): This will currently only throw if the function component | ||
// tries to access React/ReactDOM/props. We should probably make this throw | ||
// in simple components too | ||
var maybePromise = fn(); // If the function component returns a promise, it's likely an async | ||
// component, which we don't yet support. Attach a noop catch handler to | ||
// silence the error. | ||
// TODO: Implement component stacks for async client components? | ||
if (maybePromise && typeof maybePromise.catch === 'function') { | ||
maybePromise.catch(function () {}); | ||
} | ||
} | ||
fn.call(Fake.prototype); | ||
} catch (sample) { | ||
// This is inlined manually because closure doesn't do it for us. | ||
if (sample && control && typeof sample.stack === 'string') { | ||
return [sample.stack, control.stack]; | ||
} | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
control = x; | ||
} | ||
fn(); | ||
return [null, null]; | ||
} | ||
} catch (sample) { | ||
// This is inlined manually because closure doesn't do it for us. | ||
if (sample && control && typeof sample.stack === 'string') { | ||
}; // $FlowFixMe[prop-missing] | ||
RunInRootFrame.DetermineComponentFrameRoot.displayName = 'DetermineComponentFrameRoot'; | ||
var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, 'name'); // Before ES6, the `name` property was not configurable. | ||
if (namePropDescriptor && namePropDescriptor.configurable) { | ||
// V8 utilizes a function's `name` property when generating a stack trace. | ||
Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, // Configurable properties can be updated even if its writable descriptor | ||
// is set to `false`. | ||
// $FlowFixMe[cannot-write] | ||
'name', { | ||
value: 'DetermineComponentFrameRoot' | ||
}); | ||
} | ||
try { | ||
var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), | ||
sampleStack = _RunInRootFrame$Deter[0], | ||
controlStack = _RunInRootFrame$Deter[1]; | ||
if (sampleStack && controlStack) { | ||
// This extracts the first frame from the sample that isn't also in the control. | ||
// Skipping one frame that we assume is the frame that calls the two. | ||
var sampleLines = sample.stack.split('\n'); | ||
var controlLines = control.stack.split('\n'); | ||
var s = sampleLines.length - 1; | ||
var c = controlLines.length - 1; | ||
var sampleLines = sampleStack.split('\n'); | ||
var controlLines = controlStack.split('\n'); | ||
var s = 0; | ||
var c = 0; | ||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { | ||
// We expect at least one stack frame to be shared. | ||
// Typically this will be the root most one. However, stack frames may be | ||
// cut off due to maximum stack limits. In this case, one maybe cut off | ||
// earlier than the other. We assume that the sample is longer or the same | ||
// and there for cut off earlier. So we should find the root most frame in | ||
// the sample somewhere in the control. | ||
c--; | ||
while (s < sampleLines.length && !sampleLines[s].includes('DetermineComponentFrameRoot')) { | ||
s++; | ||
} | ||
while (c < controlLines.length && !controlLines[c].includes('DetermineComponentFrameRoot')) { | ||
c++; | ||
} // We couldn't find our intentionally injected common root frame, attempt | ||
// to find another common root frame by search from the bottom of the | ||
// control stack... | ||
if (s === sampleLines.length || c === controlLines.length) { | ||
s = sampleLines.length - 1; | ||
c = controlLines.length - 1; | ||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { | ||
// We expect at least one stack frame to be shared. | ||
// Typically this will be the root most one. However, stack frames may be | ||
// cut off due to maximum stack limits. In this case, one maybe cut off | ||
// earlier than the other. We assume that the sample is longer or the same | ||
// and there for cut off earlier. So we should find the root most frame in | ||
// the sample somewhere in the control. | ||
c--; | ||
} | ||
} | ||
for (; s >= 1 && c >= 0; s--, c--) { | ||
@@ -495,3 +675,3 @@ // Next we find the first one that isn't the same which should be the | ||
{ | ||
if (true) { | ||
if (typeof fn === 'function') { | ||
@@ -535,3 +715,3 @@ componentFrameCache.set(fn, _frame); | ||
} | ||
function describeFunctionComponentFrame(fn, source, ownerFn) { | ||
function describeFunctionComponentFrame(fn, ownerFn) { | ||
{ | ||
@@ -547,3 +727,3 @@ return describeNativeComponentFrame(fn, false); | ||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { | ||
function describeUnknownElementTypeFrameInDEV(type, ownerFn) { | ||
@@ -579,3 +759,3 @@ if (type == null) { | ||
// Memo may contain any component type so we recursively resolve it. | ||
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); | ||
return describeUnknownElementTypeFrameInDEV(type.type, ownerFn); | ||
@@ -590,3 +770,3 @@ case REACT_LAZY_TYPE: | ||
// Lazy may contain any component type so we recursively resolve it. | ||
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); | ||
return describeUnknownElementTypeFrameInDEV(init(payload), ownerFn); | ||
} catch (x) {} | ||
@@ -600,154 +780,10 @@ } | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
var loggedTypeFailures = {}; | ||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | ||
function setCurrentlyValidatingElement(element) { | ||
{ | ||
if (element) { | ||
var owner = element._owner; | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); | ||
ReactDebugCurrentFrame.setExtraStackFrame(stack); | ||
} else { | ||
ReactDebugCurrentFrame.setExtraStackFrame(null); | ||
} | ||
} | ||
} | ||
function checkPropTypes(typeSpecs, values, location, componentName, element) { | ||
{ | ||
// $FlowFixMe This is okay but Flow doesn't know it. | ||
var has = Function.call.bind(hasOwnProperty); | ||
for (var typeSpecName in typeSpecs) { | ||
if (has(typeSpecs, typeSpecName)) { | ||
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to | ||
// fail the render phase where it didn't fail before. So we log it. | ||
// After these have been cleaned up, we'll let them throw. | ||
try { | ||
// This is intentionally an invariant that gets caught. It's the same | ||
// behavior as without this statement except with a better message. | ||
if (typeof typeSpecs[typeSpecName] !== 'function') { | ||
// eslint-disable-next-line react-internal/prod-error-codes | ||
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); | ||
err.name = 'Invariant Violation'; | ||
throw err; | ||
} | ||
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); | ||
} catch (ex) { | ||
error$1 = ex; | ||
} | ||
if (error$1 && !(error$1 instanceof Error)) { | ||
setCurrentlyValidatingElement(element); | ||
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); | ||
setCurrentlyValidatingElement(null); | ||
} | ||
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { | ||
// Only monitor this failure once because there tends to be a lot of the | ||
// same error. | ||
loggedTypeFailures[error$1.message] = true; | ||
setCurrentlyValidatingElement(element); | ||
error('Failed %s type: %s', location, error$1.message); | ||
setCurrentlyValidatingElement(null); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare | ||
function isArray(a) { | ||
return isArrayImpl(a); | ||
} | ||
/* | ||
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol | ||
* and Temporal.* types. See https://github.com/facebook/react/pull/22064. | ||
* | ||
* The functions in this module will throw an easier-to-understand, | ||
* easier-to-debug exception with a clear errors message message explaining the | ||
* problem. (Instead of a confusing exception thrown inside the implementation | ||
* of the `value` object). | ||
*/ | ||
// $FlowFixMe only called in DEV, so void return is not possible. | ||
function typeName(value) { | ||
{ | ||
// toStringTag is needed for namespaced types like Temporal.Instant | ||
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; | ||
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; | ||
return type; | ||
} | ||
} // $FlowFixMe only called in DEV, so void return is not possible. | ||
function willCoercionThrow(value) { | ||
{ | ||
try { | ||
testStringCoercion(value); | ||
return false; | ||
} catch (e) { | ||
return true; | ||
} | ||
} | ||
} | ||
function testStringCoercion(value) { | ||
// If you ended up here by following an exception call stack, here's what's | ||
// happened: you supplied an object or symbol value to React (as a prop, key, | ||
// DOM attribute, CSS property, string ref, etc.) and when React tried to | ||
// coerce it to a string using `'' + value`, an exception was thrown. | ||
// | ||
// The most common types that will cause this exception are `Symbol` instances | ||
// and Temporal objects like `Temporal.Instant`. But any object that has a | ||
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this | ||
// exception. (Library authors do this to prevent users from using built-in | ||
// numeric operators like `+` or comparison operators like `>=` because custom | ||
// methods are needed to perform accurate arithmetic or comparison.) | ||
// | ||
// To fix the problem, coerce this object or symbol value to a string before | ||
// passing it to React. The most reliable way is usually `String(value)`. | ||
// | ||
// To find which value is throwing, check the browser or debugger console. | ||
// Before this exception was thrown, there should be `console.error` output | ||
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the | ||
// problem and how that type was used: key, atrribute, input value prop, etc. | ||
// In most cases, this console output also shows the component and its | ||
// ancestor components where the exception happened. | ||
// | ||
// eslint-disable-next-line react-internal/safe-string-coercion | ||
return '' + value; | ||
} | ||
function checkKeyStringCoercion(value) { | ||
{ | ||
if (willCoercionThrow(value)) { | ||
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); | ||
return testStringCoercion(value); // throw (to help callers find troubleshooting comments) | ||
} | ||
} | ||
} | ||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
var RESERVED_PROPS = { | ||
key: true, | ||
ref: true, | ||
__self: true, | ||
__source: true | ||
}; | ||
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); | ||
var specialPropKeyWarningShown; | ||
var specialPropRefWarningShown; | ||
var didWarnAboutStringRefs; | ||
var didWarnAboutElementRef; | ||
{ | ||
didWarnAboutStringRefs = {}; | ||
didWarnAboutElementRef = {}; | ||
} | ||
@@ -783,16 +819,2 @@ | ||
function warnIfStringRefCannotBeAutoConverted(config, self) { | ||
{ | ||
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) { | ||
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); | ||
if (!didWarnAboutStringRefs[componentName]) { | ||
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); | ||
didWarnAboutStringRefs[componentName] = true; | ||
} | ||
} | ||
} | ||
} | ||
function defineKeyPropWarningGetter(props, displayName) { | ||
@@ -804,3 +826,3 @@ { | ||
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); | ||
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://react.dev/link/special-props)', displayName); | ||
} | ||
@@ -817,17 +839,16 @@ }; | ||
function defineRefPropWarningGetter(props, displayName) { | ||
function elementRefGetterWithDeprecationWarning() { | ||
{ | ||
var warnAboutAccessingRef = function () { | ||
if (!specialPropRefWarningShown) { | ||
specialPropRefWarningShown = true; | ||
var componentName = getComponentNameFromType(this.type); | ||
error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); | ||
} | ||
}; | ||
if (!didWarnAboutElementRef[componentName]) { | ||
didWarnAboutElementRef[componentName] = true; | ||
warnAboutAccessingRef.isReactWarning = true; | ||
Object.defineProperty(props, 'ref', { | ||
get: warnAboutAccessingRef, | ||
configurable: true | ||
}); | ||
error('Accessing element.ref was removed in React 19. ref is now a ' + 'regular prop. It will be removed from the JSX Element ' + 'type in a future release.'); | ||
} // An undefined `element.ref` is coerced to `null` for | ||
// backwards compatibility. | ||
var refProp = this.props.ref; | ||
return refProp !== undefined ? refProp : null; | ||
} | ||
@@ -857,16 +878,63 @@ } | ||
var ReactElement = function (type, key, ref, self, source, owner, props) { | ||
var element = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
// Built-in properties that belong on the element | ||
type: type, | ||
key: key, | ||
ref: ref, | ||
props: props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
function ReactElement(type, key, _ref, self, source, owner, props) { | ||
var ref; | ||
{ | ||
// When enableRefAsProp is on, ignore whatever was passed as the ref | ||
// argument and treat `props.ref` as the source of truth. The only thing we | ||
// use this for is `element.ref`, which will log a deprecation warning on | ||
// access. In the next release, we can remove `element.ref` as well as the | ||
// `ref` argument. | ||
var refProp = props.ref; // An undefined `element.ref` is coerced to `null` for | ||
// backwards compatibility. | ||
ref = refProp !== undefined ? refProp : null; | ||
} | ||
var element; | ||
{ | ||
// In dev, make `ref` a non-enumerable property with a warning. It's non- | ||
// enumerable so that test matchers and serializers don't access it and | ||
// trigger the warning. | ||
// | ||
// `ref` will be removed from the element completely in a future release. | ||
element = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
// Built-in properties that belong on the element | ||
type: type, | ||
key: key, | ||
props: props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
if (ref !== null) { | ||
Object.defineProperty(element, 'ref', { | ||
enumerable: false, | ||
get: elementRefGetterWithDeprecationWarning | ||
}); | ||
} else { | ||
// Don't warn on access if a ref is not given. This reduces false | ||
// positives in cases where a test serializer uses | ||
// getOwnPropertyDescriptors to compare objects, like Jest does, which is | ||
// a problem because it bypasses non-enumerability. | ||
// | ||
// So unfortunately this will trigger a false positive warning in Jest | ||
// when the diff is printed: | ||
// | ||
// expect(<div ref={ref} />).toEqual(<span ref={ref} />); | ||
// | ||
// A bit sketchy, but this is what we've done for the `props.key` and | ||
// `props.ref` accessors for years, which implies it will be good enough | ||
// for `element.ref`, too. Let's see if anyone complains. | ||
Object.defineProperty(element, 'ref', { | ||
enumerable: false, | ||
value: null | ||
}); | ||
} | ||
} | ||
{ | ||
// The validation flag is currently mutative. We put it on | ||
@@ -886,17 +954,9 @@ // an external backing store so that we can freeze the whole object. | ||
value: false | ||
}); // self and source are DEV only properties. | ||
}); // debugInfo contains Server Component debug information. | ||
Object.defineProperty(element, '_self', { | ||
Object.defineProperty(element, '_debugInfo', { | ||
configurable: false, | ||
enumerable: false, | ||
writable: false, | ||
value: self | ||
}); // Two elements created in two different places should be considered | ||
// equal for testing purposes and therefore we hide it from enumeration. | ||
Object.defineProperty(element, '_source', { | ||
configurable: false, | ||
enumerable: false, | ||
writable: false, | ||
value: source | ||
writable: true, | ||
value: null | ||
}); | ||
@@ -911,3 +971,4 @@ | ||
return element; | ||
}; | ||
} | ||
var didWarnAboutKeySpread = {}; | ||
/** | ||
@@ -920,4 +981,74 @@ * https://github.com/reactjs/rfcs/pull/107 | ||
function jsxDEV(type, config, maybeKey, source, self) { | ||
function jsxDEV$1(type, config, maybeKey, isStaticChildren, source, self) { | ||
{ | ||
if (!isValidElementType(type)) { | ||
// This is an invalid element type. | ||
// | ||
// We warn in this case but don't throw. We expect the element creation to | ||
// succeed and there will likely be errors in render. | ||
var info = ''; | ||
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { | ||
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; | ||
} | ||
var typeString; | ||
if (type === null) { | ||
typeString = 'null'; | ||
} else if (isArray(type)) { | ||
typeString = 'array'; | ||
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { | ||
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; | ||
info = ' Did you accidentally export a JSX literal instead of a component?'; | ||
} else { | ||
typeString = typeof type; | ||
} | ||
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); | ||
} else { | ||
// This is a valid element type. | ||
// Skip key warning if the type isn't valid since our key validation logic | ||
// doesn't expect a non-string/function type and can throw confusing | ||
// errors. We don't want exception behavior to differ between dev and | ||
// prod. (Rendering will throw with a helpful message and as soon as the | ||
// type is fixed, the key warnings will appear.) | ||
var children = config.children; | ||
if (children !== undefined) { | ||
if (isStaticChildren) { | ||
if (isArray(children)) { | ||
for (var i = 0; i < children.length; i++) { | ||
validateChildKeys(children[i], type); | ||
} | ||
if (Object.freeze) { | ||
Object.freeze(children); | ||
} | ||
} else { | ||
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.'); | ||
} | ||
} else { | ||
validateChildKeys(children, type); | ||
} | ||
} | ||
} // Warn about key spread regardless of whether the type is valid. | ||
if (hasOwnProperty.call(config, 'key')) { | ||
var componentName = getComponentNameFromType(type); | ||
var keys = Object.keys(config).filter(function (k) { | ||
return k !== 'key'; | ||
}); | ||
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}'; | ||
if (!didWarnAboutKeySpread[componentName + beforeExample]) { | ||
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}'; | ||
error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); | ||
didWarnAboutKeySpread[componentName + beforeExample] = true; | ||
} | ||
} | ||
var propName; // Reserved names are extracted | ||
@@ -950,10 +1081,8 @@ | ||
if (hasValidRef(config)) { | ||
ref = config.ref; | ||
warnIfStringRefCannotBeAutoConverted(config, self); | ||
} // Remaining properties are added to a new props object | ||
if (hasValidRef(config)) ; // Remaining properties are added to a new props object | ||
for (propName in config) { | ||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { | ||
if (hasOwnProperty.call(config, propName) && // Skip over reserved prop names | ||
propName !== 'key' && (enableRefAsProp )) { | ||
props[propName] = config[propName]; | ||
@@ -974,3 +1103,3 @@ } | ||
if (key || ref) { | ||
if (key || !enableRefAsProp ) { | ||
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; | ||
@@ -981,44 +1110,11 @@ | ||
} | ||
if (ref) { | ||
defineRefPropWarningGetter(props, displayName); | ||
} | ||
} | ||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | ||
} | ||
} | ||
var element = ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | ||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; | ||
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; | ||
function setCurrentlyValidatingElement$1(element) { | ||
{ | ||
if (element) { | ||
var owner = element._owner; | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); | ||
ReactDebugCurrentFrame$1.setExtraStackFrame(stack); | ||
} else { | ||
ReactDebugCurrentFrame$1.setExtraStackFrame(null); | ||
if (type === REACT_FRAGMENT_TYPE) { | ||
validateFragmentProps(element); | ||
} | ||
} | ||
} | ||
var propTypesMisspellWarningShown; | ||
{ | ||
propTypesMisspellWarningShown = false; | ||
} | ||
/** | ||
* Verifies the object is a ReactElement. | ||
* See https://reactjs.org/docs/react-api.html#isvalidelement | ||
* @param {?object} object | ||
* @return {boolean} True if `object` is a ReactElement. | ||
* @final | ||
*/ | ||
function isValidElement(object) { | ||
{ | ||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
return element; | ||
} | ||
@@ -1029,4 +1125,4 @@ } | ||
{ | ||
if (ReactCurrentOwner$1.current) { | ||
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); | ||
if (ReactCurrentOwner.current) { | ||
var name = getComponentNameFromType(ReactCurrentOwner.current.type); | ||
@@ -1041,83 +1137,3 @@ if (name) { | ||
} | ||
function getSourceInfoErrorAddendum(source) { | ||
{ | ||
if (source !== undefined) { | ||
var fileName = source.fileName.replace(/^.*[\\\/]/, ''); | ||
var lineNumber = source.lineNumber; | ||
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; | ||
} | ||
return ''; | ||
} | ||
} | ||
/** | ||
* Warn if there's no key explicitly set on dynamic arrays of children or | ||
* object keys are not valid. This allows us to keep track of children between | ||
* updates. | ||
*/ | ||
var ownerHasKeyUseWarning = {}; | ||
function getCurrentComponentErrorInfo(parentType) { | ||
{ | ||
var info = getDeclarationErrorAddendum(); | ||
if (!info) { | ||
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; | ||
if (parentName) { | ||
info = "\n\nCheck the top-level render call using <" + parentName + ">."; | ||
} | ||
} | ||
return info; | ||
} | ||
} | ||
/** | ||
* Warn if the element doesn't have an explicit key assigned to it. | ||
* This element is in an array. The array could grow and shrink or be | ||
* reordered. All children that haven't already been validated are required to | ||
* have a "key" property assigned to it. Error statuses are cached so a warning | ||
* will only be shown once. | ||
* | ||
* @internal | ||
* @param {ReactElement} element Element that requires a key. | ||
* @param {*} parentType element's parent's type. | ||
*/ | ||
function validateExplicitKey(element, parentType) { | ||
{ | ||
if (!element._store || element._store.validated || element.key != null) { | ||
return; | ||
} | ||
element._store.validated = true; | ||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); | ||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { | ||
return; | ||
} | ||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a | ||
// property, it may be the creator of the child that's responsible for | ||
// assigning it a key. | ||
var childOwner = ''; | ||
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { | ||
// Give the component that originally created this child. | ||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; | ||
} | ||
setCurrentlyValidatingElement$1(element); | ||
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); | ||
setCurrentlyValidatingElement$1(null); | ||
} | ||
} | ||
/** | ||
* Ensure that every element either is passed in a static location, in an | ||
@@ -1135,7 +1151,7 @@ * array with an explicit keys property defined, or in an object literal | ||
{ | ||
if (typeof node !== 'object') { | ||
if (typeof node !== 'object' || !node) { | ||
return; | ||
} | ||
if (isArray(node)) { | ||
if (node.$$typeof === REACT_CLIENT_REFERENCE) ; else if (isArray(node)) { | ||
for (var i = 0; i < node.length; i++) { | ||
@@ -1153,3 +1169,3 @@ var child = node[i]; | ||
} | ||
} else if (node) { | ||
} else { | ||
var iteratorFn = getIteratorFn(node); | ||
@@ -1175,46 +1191,85 @@ | ||
/** | ||
* Given an element, validate that its props follow the propTypes definition, | ||
* provided by the type. | ||
* Verifies the object is a ReactElement. | ||
* See https://reactjs.org/docs/react-api.html#isvalidelement | ||
* @param {?object} object | ||
* @return {boolean} True if `object` is a ReactElement. | ||
* @final | ||
*/ | ||
function isValidElement(object) { | ||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
} | ||
var ownerHasKeyUseWarning = {}; | ||
/** | ||
* Warn if the element doesn't have an explicit key assigned to it. | ||
* This element is in an array. The array could grow and shrink or be | ||
* reordered. All children that haven't already been validated are required to | ||
* have a "key" property assigned to it. Error statuses are cached so a warning | ||
* will only be shown once. | ||
* | ||
* @param {ReactElement} element | ||
* @internal | ||
* @param {ReactElement} element Element that requires a key. | ||
* @param {*} parentType element's parent's type. | ||
*/ | ||
function validatePropTypes(element) { | ||
function validateExplicitKey(element, parentType) { | ||
{ | ||
var type = element.type; | ||
if (type === null || type === undefined || typeof type === 'string') { | ||
if (!element._store || element._store.validated || element.key != null) { | ||
return; | ||
} | ||
var propTypes; | ||
element._store.validated = true; | ||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); | ||
if (typeof type === 'function') { | ||
propTypes = type.propTypes; | ||
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
type.$$typeof === REACT_MEMO_TYPE)) { | ||
propTypes = type.propTypes; | ||
} else { | ||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { | ||
return; | ||
} | ||
if (propTypes) { | ||
// Intentionally inside to avoid triggering lazy initializers: | ||
var name = getComponentNameFromType(type); | ||
checkPropTypes(propTypes, element.props, 'prop', name, element); | ||
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { | ||
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: | ||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a | ||
// property, it may be the creator of the child that's responsible for | ||
// assigning it a key. | ||
var _name = getComponentNameFromType(type); | ||
var childOwner = ''; | ||
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); | ||
if (element && element._owner && element._owner !== ReactCurrentOwner.current) { | ||
// Give the component that originally created this child. | ||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; | ||
} | ||
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { | ||
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); | ||
setCurrentlyValidatingElement(element); | ||
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); | ||
setCurrentlyValidatingElement(null); | ||
} | ||
} | ||
function setCurrentlyValidatingElement(element) { | ||
{ | ||
if (element) { | ||
var owner = element._owner; | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type, owner ? owner.type : null); | ||
ReactDebugCurrentFrame.setExtraStackFrame(stack); | ||
} else { | ||
ReactDebugCurrentFrame.setExtraStackFrame(null); | ||
} | ||
} | ||
} | ||
function getCurrentComponentErrorInfo(parentType) { | ||
{ | ||
var info = getDeclarationErrorAddendum(); | ||
if (!info) { | ||
var parentName = getComponentNameFromType(parentType); | ||
if (parentName) { | ||
info = "\n\nCheck the top-level render call using <" + parentName + ">."; | ||
} | ||
} | ||
return info; | ||
} | ||
} | ||
/** | ||
@@ -1227,2 +1282,3 @@ * Given a fragment, validate that it can only be provided with fragment props | ||
function validateFragmentProps(fragment) { | ||
// TODO: Move this to render phase instead of at element creation. | ||
{ | ||
@@ -1235,106 +1291,18 @@ var keys = Object.keys(fragment.props); | ||
if (key !== 'children' && key !== 'key') { | ||
setCurrentlyValidatingElement$1(fragment); | ||
setCurrentlyValidatingElement(fragment); | ||
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); | ||
setCurrentlyValidatingElement$1(null); | ||
setCurrentlyValidatingElement(null); | ||
break; | ||
} | ||
} | ||
if (fragment.ref !== null) { | ||
setCurrentlyValidatingElement$1(fragment); | ||
error('Invalid attribute `ref` supplied to `React.Fragment`.'); | ||
setCurrentlyValidatingElement$1(null); | ||
} | ||
} | ||
} | ||
function jsxWithValidation(type, props, key, isStaticChildren, source, self) { | ||
{ | ||
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to | ||
// succeed and there will likely be errors in render. | ||
var jsxDEV = jsxDEV$1 ; | ||
if (!validType) { | ||
var info = ''; | ||
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { | ||
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; | ||
} | ||
var sourceInfo = getSourceInfoErrorAddendum(source); | ||
if (sourceInfo) { | ||
info += sourceInfo; | ||
} else { | ||
info += getDeclarationErrorAddendum(); | ||
} | ||
var typeString; | ||
if (type === null) { | ||
typeString = 'null'; | ||
} else if (isArray(type)) { | ||
typeString = 'array'; | ||
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { | ||
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; | ||
info = ' Did you accidentally export a JSX literal instead of a component?'; | ||
} else { | ||
typeString = typeof type; | ||
} | ||
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); | ||
} | ||
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. | ||
// TODO: Drop this when these are no longer allowed as the type argument. | ||
if (element == null) { | ||
return element; | ||
} // Skip key warning if the type isn't valid since our key validation logic | ||
// doesn't expect a non-string/function type and can throw confusing errors. | ||
// We don't want exception behavior to differ between dev and prod. | ||
// (Rendering will throw with a helpful message and as soon as the type is | ||
// fixed, the key warnings will appear.) | ||
if (validType) { | ||
var children = props.children; | ||
if (children !== undefined) { | ||
if (isStaticChildren) { | ||
if (isArray(children)) { | ||
for (var i = 0; i < children.length; i++) { | ||
validateChildKeys(children[i], type); | ||
} | ||
if (Object.freeze) { | ||
Object.freeze(children); | ||
} | ||
} else { | ||
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.'); | ||
} | ||
} else { | ||
validateChildKeys(children, type); | ||
} | ||
} | ||
} | ||
if (type === REACT_FRAGMENT_TYPE) { | ||
validateFragmentProps(element); | ||
} else { | ||
validatePropTypes(element); | ||
} | ||
return element; | ||
} | ||
} // These two functions exist to still get child warnings in dev | ||
var jsxDEV$1 = jsxWithValidation ; | ||
exports.Fragment = REACT_FRAGMENT_TYPE; | ||
exports.jsxDEV = jsxDEV$1; | ||
exports.jsxDEV = jsxDEV; | ||
})(); | ||
} |
@@ -1,10 +0,12 @@ | ||
/** | ||
* @license React | ||
* react-jsx-dev-runtime.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
/* | ||
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; | ||
//# sourceMappingURL=react-jsx-dev-runtime.production.min.js.map |
@@ -1,10 +0,12 @@ | ||
/** | ||
* @license React | ||
* react-jsx-dev-runtime.profiling.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
/* | ||
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; | ||
//# sourceMappingURL=react-jsx-dev-runtime.profiling.min.js.map |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
@@ -29,5 +29,6 @@ * This source code is licensed under the MIT license found in the | ||
var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); | ||
var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); | ||
var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext | ||
var REACT_CONSUMER_TYPE = Symbol.for('react.consumer'); | ||
var REACT_CONTEXT_TYPE = Symbol.for('react.context'); | ||
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context'); | ||
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | ||
@@ -101,31 +102,20 @@ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); | ||
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber | ||
// stuff. Intended to enable React core members to more easily debug scheduling | ||
// issues in DEV builds. | ||
// Ready for next major. | ||
// | ||
// Alias __NEXT_MAJOR__ to true for easier skimming. | ||
// ----------------------------------------------------------------------------- | ||
var enableDebugTracing = false; // Track which Fiber(s) schedule render work. | ||
var __NEXT_MAJOR__ = true; // Removes legacy style context | ||
// as a normal prop instead of stripping it from the props object. | ||
// Passes `ref` as a normal prop instead of stripping it from the props object | ||
// during element creation. | ||
var REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); | ||
function isValidElementType(type) { | ||
if (typeof type === 'string' || typeof type === 'function') { | ||
return true; | ||
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | ||
var enableRefAsProp = __NEXT_MAJOR__; | ||
var enableRenderableContext = __NEXT_MAJOR__; // ----------------------------------------------------------------------------- | ||
// stuff. Intended to enable React core members to more easily debug scheduling | ||
// issues in DEV builds. | ||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || type === REACT_CACHE_TYPE || enableTransitionTracing ) { | ||
return true; | ||
} | ||
var enableDebugTracing = false; | ||
if (typeof type === 'object' && type !== null) { | ||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
function getWrappedName(outerType, innerType, wrapperName) { | ||
@@ -145,4 +135,5 @@ var displayName = outerType.displayName; | ||
return type.displayName || 'Context'; | ||
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. | ||
} | ||
var REACT_CLIENT_REFERENCE$2 = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. | ||
@@ -155,9 +146,8 @@ function getComponentNameFromType(type) { | ||
{ | ||
if (typeof type.tag === 'number') { | ||
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); | ||
if (typeof type === 'function') { | ||
if (type.$$typeof === REACT_CLIENT_REFERENCE$2) { | ||
// TODO: Create a convention for naming client references with debug info. | ||
return null; | ||
} | ||
} | ||
if (typeof type === 'function') { | ||
return type.displayName || type.name || null; | ||
@@ -197,11 +187,27 @@ } | ||
if (typeof type === 'object') { | ||
{ | ||
if (typeof type.tag === 'number') { | ||
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); | ||
} | ||
} | ||
switch (type.$$typeof) { | ||
case REACT_PROVIDER_TYPE: | ||
{ | ||
return null; | ||
} | ||
case REACT_CONTEXT_TYPE: | ||
var context = type; | ||
return getContextName(context) + '.Consumer'; | ||
case REACT_PROVIDER_TYPE: | ||
var provider = type; | ||
return getContextName(provider._context) + '.Provider'; | ||
{ | ||
return getContextName(context) + '.Provider'; | ||
} | ||
case REACT_CONSUMER_TYPE: | ||
{ | ||
var consumer = type; | ||
return getContextName(consumer._context) + '.Consumer'; | ||
} | ||
case REACT_FORWARD_REF_TYPE: | ||
@@ -231,10 +237,2 @@ return getWrappedName(type, type.render, 'ForwardRef'); | ||
} | ||
case REACT_SERVER_CONTEXT_TYPE: | ||
{ | ||
var context2 = type; | ||
return (context2.displayName || context2._globalName) + '.Provider'; | ||
} | ||
// eslint-disable-next-line no-fallthrough | ||
} | ||
@@ -246,4 +244,105 @@ } | ||
// $FlowFixMe[method-unbinding] | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
var assign = Object.assign; | ||
/* | ||
* The `'' + value` pattern (used in perf-sensitive code) throws for Symbol | ||
* and Temporal.* types. See https://github.com/facebook/react/pull/22064. | ||
* | ||
* The functions in this module will throw an easier-to-understand, | ||
* easier-to-debug exception with a clear errors message message explaining the | ||
* problem. (Instead of a confusing exception thrown inside the implementation | ||
* of the `value` object). | ||
*/ | ||
// $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. | ||
function typeName(value) { | ||
{ | ||
// toStringTag is needed for namespaced types like Temporal.Instant | ||
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; | ||
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return] | ||
return type; | ||
} | ||
} // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. | ||
function willCoercionThrow(value) { | ||
{ | ||
try { | ||
testStringCoercion(value); | ||
return false; | ||
} catch (e) { | ||
return true; | ||
} | ||
} | ||
} | ||
function testStringCoercion(value) { | ||
// If you ended up here by following an exception call stack, here's what's | ||
// happened: you supplied an object or symbol value to React (as a prop, key, | ||
// DOM attribute, CSS property, string ref, etc.) and when React tried to | ||
// coerce it to a string using `'' + value`, an exception was thrown. | ||
// | ||
// The most common types that will cause this exception are `Symbol` instances | ||
// and Temporal objects like `Temporal.Instant`. But any object that has a | ||
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this | ||
// exception. (Library authors do this to prevent users from using built-in | ||
// numeric operators like `+` or comparison operators like `>=` because custom | ||
// methods are needed to perform accurate arithmetic or comparison.) | ||
// | ||
// To fix the problem, coerce this object or symbol value to a string before | ||
// passing it to React. The most reliable way is usually `String(value)`. | ||
// | ||
// To find which value is throwing, check the browser or debugger console. | ||
// Before this exception was thrown, there should be `console.error` output | ||
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the | ||
// problem and how that type was used: key, atrribute, input value prop, etc. | ||
// In most cases, this console output also shows the component and its | ||
// ancestor components where the exception happened. | ||
// | ||
// eslint-disable-next-line react-internal/safe-string-coercion | ||
return '' + value; | ||
} | ||
function checkKeyStringCoercion(value) { | ||
{ | ||
if (willCoercionThrow(value)) { | ||
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value)); | ||
return testStringCoercion(value); // throw (to help callers find troubleshooting comments) | ||
} | ||
} | ||
} | ||
var REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference'); | ||
function isValidElementType(type) { | ||
if (typeof type === 'string' || typeof type === 'function') { | ||
return true; | ||
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | ||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || type === REACT_CACHE_TYPE || enableTransitionTracing ) { | ||
return true; | ||
} | ||
if (typeof type === 'object' && type !== null) { | ||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || !enableRenderableContext || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
type.$$typeof === REACT_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare | ||
function isArray(a) { | ||
return isArrayImpl(a); | ||
} | ||
// Helpers to patch console.logs to avoid logging during side-effect free | ||
@@ -282,3 +381,3 @@ // replaying on render function. This currently only patches the object | ||
writable: true | ||
}; // $FlowFixMe Flow thinks console is immutable. | ||
}; // $FlowFixMe[cannot-write] Flow thinks console is immutable. | ||
@@ -310,3 +409,3 @@ Object.defineProperties(console, { | ||
writable: true | ||
}; // $FlowFixMe Flow thinks console is immutable. | ||
}; // $FlowFixMe[cannot-write] Flow thinks console is immutable. | ||
@@ -347,3 +446,3 @@ Object.defineProperties(console, { | ||
var prefix; | ||
function describeBuiltInComponentFrame(name, source, ownerFn) { | ||
function describeBuiltInComponentFrame(name, ownerFn) { | ||
{ | ||
@@ -371,6 +470,18 @@ if (prefix === undefined) { | ||
} | ||
/** | ||
* Leverages native browser/VM stack frames to get proper details (e.g. | ||
* filename, line + col number) for a single component in a component stack. We | ||
* do this by: | ||
* (1) throwing and catching an error in the function - this will be our | ||
* control error. | ||
* (2) calling the component which will eventually throw an error that we'll | ||
* catch - this will be our sample error. | ||
* (3) diffing the control and sample error stacks to find the stack frame | ||
* which represents our component. | ||
*/ | ||
function describeNativeComponentFrame(fn, construct) { | ||
// If something asked for a stack inside a fake render, it should get ignored. | ||
if ( !fn || reentry) { | ||
if (!fn || reentry) { | ||
return ''; | ||
@@ -387,5 +498,4 @@ } | ||
var control; | ||
reentry = true; | ||
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. | ||
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. | ||
@@ -402,68 +512,138 @@ Error.prepareStackTrace = undefined; | ||
} | ||
/** | ||
* Finding a common stack frame between sample and control errors can be | ||
* tricky given the different types and levels of stack trace truncation from | ||
* different JS VMs. So instead we'll attempt to control what that common | ||
* frame should be through this object method: | ||
* Having both the sample and control errors be in the function under the | ||
* `DescribeNativeComponentFrameRoot` property, + setting the `name` and | ||
* `displayName` properties of the function ensures that a stack | ||
* frame exists that has the method name `DescribeNativeComponentFrameRoot` in | ||
* it for both control and sample stacks. | ||
*/ | ||
try { | ||
// This should throw. | ||
if (construct) { | ||
// Something should be setting the props in the constructor. | ||
var Fake = function () { | ||
throw Error(); | ||
}; // $FlowFixMe | ||
var RunInRootFrame = { | ||
DetermineComponentFrameRoot: function () { | ||
var control; | ||
Object.defineProperty(Fake.prototype, 'props', { | ||
set: function () { | ||
// We use a throwing setter instead of frozen or non-writable props | ||
// because that won't throw in a non-strict mode function. | ||
throw Error(); | ||
} | ||
}); | ||
try { | ||
// This should throw. | ||
if (construct) { | ||
// Something should be setting the props in the constructor. | ||
var Fake = function () { | ||
throw Error(); | ||
}; // $FlowFixMe[prop-missing] | ||
if (typeof Reflect === 'object' && Reflect.construct) { | ||
// We construct a different control for this case to include any extra | ||
// frames added by the construct call. | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x) { | ||
control = x; | ||
Object.defineProperty(Fake.prototype, 'props', { | ||
set: function () { | ||
// We use a throwing setter instead of frozen or non-writable props | ||
// because that won't throw in a non-strict mode function. | ||
throw Error(); | ||
} | ||
}); | ||
if (typeof Reflect === 'object' && Reflect.construct) { | ||
// We construct a different control for this case to include any extra | ||
// frames added by the construct call. | ||
try { | ||
Reflect.construct(Fake, []); | ||
} catch (x) { | ||
control = x; | ||
} | ||
Reflect.construct(fn, [], Fake); | ||
} else { | ||
try { | ||
Fake.call(); | ||
} catch (x) { | ||
control = x; | ||
} // $FlowFixMe[prop-missing] found when upgrading Flow | ||
fn.call(Fake.prototype); | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
control = x; | ||
} // TODO(luna): This will currently only throw if the function component | ||
// tries to access React/ReactDOM/props. We should probably make this throw | ||
// in simple components too | ||
var maybePromise = fn(); // If the function component returns a promise, it's likely an async | ||
// component, which we don't yet support. Attach a noop catch handler to | ||
// silence the error. | ||
// TODO: Implement component stacks for async client components? | ||
if (maybePromise && typeof maybePromise.catch === 'function') { | ||
maybePromise.catch(function () {}); | ||
} | ||
} | ||
fn.call(Fake.prototype); | ||
} catch (sample) { | ||
// This is inlined manually because closure doesn't do it for us. | ||
if (sample && control && typeof sample.stack === 'string') { | ||
return [sample.stack, control.stack]; | ||
} | ||
} | ||
} else { | ||
try { | ||
throw Error(); | ||
} catch (x) { | ||
control = x; | ||
} | ||
fn(); | ||
return [null, null]; | ||
} | ||
} catch (sample) { | ||
// This is inlined manually because closure doesn't do it for us. | ||
if (sample && control && typeof sample.stack === 'string') { | ||
}; // $FlowFixMe[prop-missing] | ||
RunInRootFrame.DetermineComponentFrameRoot.displayName = 'DetermineComponentFrameRoot'; | ||
var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, 'name'); // Before ES6, the `name` property was not configurable. | ||
if (namePropDescriptor && namePropDescriptor.configurable) { | ||
// V8 utilizes a function's `name` property when generating a stack trace. | ||
Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, // Configurable properties can be updated even if its writable descriptor | ||
// is set to `false`. | ||
// $FlowFixMe[cannot-write] | ||
'name', { | ||
value: 'DetermineComponentFrameRoot' | ||
}); | ||
} | ||
try { | ||
var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), | ||
sampleStack = _RunInRootFrame$Deter[0], | ||
controlStack = _RunInRootFrame$Deter[1]; | ||
if (sampleStack && controlStack) { | ||
// This extracts the first frame from the sample that isn't also in the control. | ||
// Skipping one frame that we assume is the frame that calls the two. | ||
var sampleLines = sample.stack.split('\n'); | ||
var controlLines = control.stack.split('\n'); | ||
var s = sampleLines.length - 1; | ||
var c = controlLines.length - 1; | ||
var sampleLines = sampleStack.split('\n'); | ||
var controlLines = controlStack.split('\n'); | ||
var s = 0; | ||
var c = 0; | ||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { | ||
// We expect at least one stack frame to be shared. | ||
// Typically this will be the root most one. However, stack frames may be | ||
// cut off due to maximum stack limits. In this case, one maybe cut off | ||
// earlier than the other. We assume that the sample is longer or the same | ||
// and there for cut off earlier. So we should find the root most frame in | ||
// the sample somewhere in the control. | ||
c--; | ||
while (s < sampleLines.length && !sampleLines[s].includes('DetermineComponentFrameRoot')) { | ||
s++; | ||
} | ||
while (c < controlLines.length && !controlLines[c].includes('DetermineComponentFrameRoot')) { | ||
c++; | ||
} // We couldn't find our intentionally injected common root frame, attempt | ||
// to find another common root frame by search from the bottom of the | ||
// control stack... | ||
if (s === sampleLines.length || c === controlLines.length) { | ||
s = sampleLines.length - 1; | ||
c = controlLines.length - 1; | ||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { | ||
// We expect at least one stack frame to be shared. | ||
// Typically this will be the root most one. However, stack frames may be | ||
// cut off due to maximum stack limits. In this case, one maybe cut off | ||
// earlier than the other. We assume that the sample is longer or the same | ||
// and there for cut off earlier. So we should find the root most frame in | ||
// the sample somewhere in the control. | ||
c--; | ||
} | ||
} | ||
for (; s >= 1 && c >= 0; s--, c--) { | ||
@@ -495,3 +675,3 @@ // Next we find the first one that isn't the same which should be the | ||
{ | ||
if (true) { | ||
if (typeof fn === 'function') { | ||
@@ -535,3 +715,3 @@ componentFrameCache.set(fn, _frame); | ||
} | ||
function describeFunctionComponentFrame(fn, source, ownerFn) { | ||
function describeFunctionComponentFrame(fn, ownerFn) { | ||
{ | ||
@@ -547,3 +727,3 @@ return describeNativeComponentFrame(fn, false); | ||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { | ||
function describeUnknownElementTypeFrameInDEV(type, ownerFn) { | ||
@@ -579,3 +759,3 @@ if (type == null) { | ||
// Memo may contain any component type so we recursively resolve it. | ||
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); | ||
return describeUnknownElementTypeFrameInDEV(type.type, ownerFn); | ||
@@ -590,3 +770,3 @@ case REACT_LAZY_TYPE: | ||
// Lazy may contain any component type so we recursively resolve it. | ||
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); | ||
return describeUnknownElementTypeFrameInDEV(init(payload), ownerFn); | ||
} catch (x) {} | ||
@@ -600,154 +780,10 @@ } | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
var loggedTypeFailures = {}; | ||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | ||
function setCurrentlyValidatingElement(element) { | ||
{ | ||
if (element) { | ||
var owner = element._owner; | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); | ||
ReactDebugCurrentFrame.setExtraStackFrame(stack); | ||
} else { | ||
ReactDebugCurrentFrame.setExtraStackFrame(null); | ||
} | ||
} | ||
} | ||
function checkPropTypes(typeSpecs, values, location, componentName, element) { | ||
{ | ||
// $FlowFixMe This is okay but Flow doesn't know it. | ||
var has = Function.call.bind(hasOwnProperty); | ||
for (var typeSpecName in typeSpecs) { | ||
if (has(typeSpecs, typeSpecName)) { | ||
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to | ||
// fail the render phase where it didn't fail before. So we log it. | ||
// After these have been cleaned up, we'll let them throw. | ||
try { | ||
// This is intentionally an invariant that gets caught. It's the same | ||
// behavior as without this statement except with a better message. | ||
if (typeof typeSpecs[typeSpecName] !== 'function') { | ||
// eslint-disable-next-line react-internal/prod-error-codes | ||
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); | ||
err.name = 'Invariant Violation'; | ||
throw err; | ||
} | ||
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); | ||
} catch (ex) { | ||
error$1 = ex; | ||
} | ||
if (error$1 && !(error$1 instanceof Error)) { | ||
setCurrentlyValidatingElement(element); | ||
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); | ||
setCurrentlyValidatingElement(null); | ||
} | ||
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { | ||
// Only monitor this failure once because there tends to be a lot of the | ||
// same error. | ||
loggedTypeFailures[error$1.message] = true; | ||
setCurrentlyValidatingElement(element); | ||
error('Failed %s type: %s', location, error$1.message); | ||
setCurrentlyValidatingElement(null); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare | ||
function isArray(a) { | ||
return isArrayImpl(a); | ||
} | ||
/* | ||
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol | ||
* and Temporal.* types. See https://github.com/facebook/react/pull/22064. | ||
* | ||
* The functions in this module will throw an easier-to-understand, | ||
* easier-to-debug exception with a clear errors message message explaining the | ||
* problem. (Instead of a confusing exception thrown inside the implementation | ||
* of the `value` object). | ||
*/ | ||
// $FlowFixMe only called in DEV, so void return is not possible. | ||
function typeName(value) { | ||
{ | ||
// toStringTag is needed for namespaced types like Temporal.Instant | ||
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; | ||
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; | ||
return type; | ||
} | ||
} // $FlowFixMe only called in DEV, so void return is not possible. | ||
function willCoercionThrow(value) { | ||
{ | ||
try { | ||
testStringCoercion(value); | ||
return false; | ||
} catch (e) { | ||
return true; | ||
} | ||
} | ||
} | ||
function testStringCoercion(value) { | ||
// If you ended up here by following an exception call stack, here's what's | ||
// happened: you supplied an object or symbol value to React (as a prop, key, | ||
// DOM attribute, CSS property, string ref, etc.) and when React tried to | ||
// coerce it to a string using `'' + value`, an exception was thrown. | ||
// | ||
// The most common types that will cause this exception are `Symbol` instances | ||
// and Temporal objects like `Temporal.Instant`. But any object that has a | ||
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this | ||
// exception. (Library authors do this to prevent users from using built-in | ||
// numeric operators like `+` or comparison operators like `>=` because custom | ||
// methods are needed to perform accurate arithmetic or comparison.) | ||
// | ||
// To fix the problem, coerce this object or symbol value to a string before | ||
// passing it to React. The most reliable way is usually `String(value)`. | ||
// | ||
// To find which value is throwing, check the browser or debugger console. | ||
// Before this exception was thrown, there should be `console.error` output | ||
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the | ||
// problem and how that type was used: key, atrribute, input value prop, etc. | ||
// In most cases, this console output also shows the component and its | ||
// ancestor components where the exception happened. | ||
// | ||
// eslint-disable-next-line react-internal/safe-string-coercion | ||
return '' + value; | ||
} | ||
function checkKeyStringCoercion(value) { | ||
{ | ||
if (willCoercionThrow(value)) { | ||
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); | ||
return testStringCoercion(value); // throw (to help callers find troubleshooting comments) | ||
} | ||
} | ||
} | ||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
var RESERVED_PROPS = { | ||
key: true, | ||
ref: true, | ||
__self: true, | ||
__source: true | ||
}; | ||
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); | ||
var specialPropKeyWarningShown; | ||
var specialPropRefWarningShown; | ||
var didWarnAboutStringRefs; | ||
var didWarnAboutElementRef; | ||
{ | ||
didWarnAboutStringRefs = {}; | ||
didWarnAboutElementRef = {}; | ||
} | ||
@@ -783,16 +819,2 @@ | ||
function warnIfStringRefCannotBeAutoConverted(config, self) { | ||
{ | ||
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) { | ||
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); | ||
if (!didWarnAboutStringRefs[componentName]) { | ||
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); | ||
didWarnAboutStringRefs[componentName] = true; | ||
} | ||
} | ||
} | ||
} | ||
function defineKeyPropWarningGetter(props, displayName) { | ||
@@ -804,3 +826,3 @@ { | ||
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); | ||
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://react.dev/link/special-props)', displayName); | ||
} | ||
@@ -817,17 +839,16 @@ }; | ||
function defineRefPropWarningGetter(props, displayName) { | ||
function elementRefGetterWithDeprecationWarning() { | ||
{ | ||
var warnAboutAccessingRef = function () { | ||
if (!specialPropRefWarningShown) { | ||
specialPropRefWarningShown = true; | ||
var componentName = getComponentNameFromType(this.type); | ||
error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); | ||
} | ||
}; | ||
if (!didWarnAboutElementRef[componentName]) { | ||
didWarnAboutElementRef[componentName] = true; | ||
warnAboutAccessingRef.isReactWarning = true; | ||
Object.defineProperty(props, 'ref', { | ||
get: warnAboutAccessingRef, | ||
configurable: true | ||
}); | ||
error('Accessing element.ref was removed in React 19. ref is now a ' + 'regular prop. It will be removed from the JSX Element ' + 'type in a future release.'); | ||
} // An undefined `element.ref` is coerced to `null` for | ||
// backwards compatibility. | ||
var refProp = this.props.ref; | ||
return refProp !== undefined ? refProp : null; | ||
} | ||
@@ -857,16 +878,63 @@ } | ||
var ReactElement = function (type, key, ref, self, source, owner, props) { | ||
var element = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
// Built-in properties that belong on the element | ||
type: type, | ||
key: key, | ||
ref: ref, | ||
props: props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
function ReactElement(type, key, _ref, self, source, owner, props) { | ||
var ref; | ||
{ | ||
// When enableRefAsProp is on, ignore whatever was passed as the ref | ||
// argument and treat `props.ref` as the source of truth. The only thing we | ||
// use this for is `element.ref`, which will log a deprecation warning on | ||
// access. In the next release, we can remove `element.ref` as well as the | ||
// `ref` argument. | ||
var refProp = props.ref; // An undefined `element.ref` is coerced to `null` for | ||
// backwards compatibility. | ||
ref = refProp !== undefined ? refProp : null; | ||
} | ||
var element; | ||
{ | ||
// In dev, make `ref` a non-enumerable property with a warning. It's non- | ||
// enumerable so that test matchers and serializers don't access it and | ||
// trigger the warning. | ||
// | ||
// `ref` will be removed from the element completely in a future release. | ||
element = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
// Built-in properties that belong on the element | ||
type: type, | ||
key: key, | ||
props: props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
if (ref !== null) { | ||
Object.defineProperty(element, 'ref', { | ||
enumerable: false, | ||
get: elementRefGetterWithDeprecationWarning | ||
}); | ||
} else { | ||
// Don't warn on access if a ref is not given. This reduces false | ||
// positives in cases where a test serializer uses | ||
// getOwnPropertyDescriptors to compare objects, like Jest does, which is | ||
// a problem because it bypasses non-enumerability. | ||
// | ||
// So unfortunately this will trigger a false positive warning in Jest | ||
// when the diff is printed: | ||
// | ||
// expect(<div ref={ref} />).toEqual(<span ref={ref} />); | ||
// | ||
// A bit sketchy, but this is what we've done for the `props.key` and | ||
// `props.ref` accessors for years, which implies it will be good enough | ||
// for `element.ref`, too. Let's see if anyone complains. | ||
Object.defineProperty(element, 'ref', { | ||
enumerable: false, | ||
value: null | ||
}); | ||
} | ||
} | ||
{ | ||
// The validation flag is currently mutative. We put it on | ||
@@ -886,17 +954,9 @@ // an external backing store so that we can freeze the whole object. | ||
value: false | ||
}); // self and source are DEV only properties. | ||
}); // debugInfo contains Server Component debug information. | ||
Object.defineProperty(element, '_self', { | ||
Object.defineProperty(element, '_debugInfo', { | ||
configurable: false, | ||
enumerable: false, | ||
writable: false, | ||
value: self | ||
}); // Two elements created in two different places should be considered | ||
// equal for testing purposes and therefore we hide it from enumeration. | ||
Object.defineProperty(element, '_source', { | ||
configurable: false, | ||
enumerable: false, | ||
writable: false, | ||
value: source | ||
writable: true, | ||
value: null | ||
}); | ||
@@ -911,3 +971,28 @@ | ||
return element; | ||
}; | ||
} | ||
// support `jsx` and `jsxs` when running in development. This supports the case | ||
// where a third-party dependency ships code that was compiled for production; | ||
// we want to still provide warnings in development. | ||
// | ||
// So these functions are the _dev_ implementations of the _production_ | ||
// API signatures. | ||
// | ||
// Since these functions are dev-only, it's ok to add an indirection here. They | ||
// only exist to provide different versions of `isStaticChildren`. (We shouldn't | ||
// use this pattern for the prod versions, though, because it will add an call | ||
// frame.) | ||
function jsxProdSignatureRunningInDevWithDynamicChildren(type, config, maybeKey, source, self) { | ||
{ | ||
var isStaticChildren = false; | ||
return jsxDEV(type, config, maybeKey, isStaticChildren, source, self); | ||
} | ||
} | ||
function jsxProdSignatureRunningInDevWithStaticChildren(type, config, maybeKey, source, self) { | ||
{ | ||
var isStaticChildren = true; | ||
return jsxDEV(type, config, maybeKey, isStaticChildren, source, self); | ||
} | ||
} | ||
var didWarnAboutKeySpread = {}; | ||
/** | ||
@@ -920,4 +1005,74 @@ * https://github.com/reactjs/rfcs/pull/107 | ||
function jsxDEV(type, config, maybeKey, source, self) { | ||
function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) { | ||
{ | ||
if (!isValidElementType(type)) { | ||
// This is an invalid element type. | ||
// | ||
// We warn in this case but don't throw. We expect the element creation to | ||
// succeed and there will likely be errors in render. | ||
var info = ''; | ||
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { | ||
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; | ||
} | ||
var typeString; | ||
if (type === null) { | ||
typeString = 'null'; | ||
} else if (isArray(type)) { | ||
typeString = 'array'; | ||
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { | ||
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; | ||
info = ' Did you accidentally export a JSX literal instead of a component?'; | ||
} else { | ||
typeString = typeof type; | ||
} | ||
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); | ||
} else { | ||
// This is a valid element type. | ||
// Skip key warning if the type isn't valid since our key validation logic | ||
// doesn't expect a non-string/function type and can throw confusing | ||
// errors. We don't want exception behavior to differ between dev and | ||
// prod. (Rendering will throw with a helpful message and as soon as the | ||
// type is fixed, the key warnings will appear.) | ||
var children = config.children; | ||
if (children !== undefined) { | ||
if (isStaticChildren) { | ||
if (isArray(children)) { | ||
for (var i = 0; i < children.length; i++) { | ||
validateChildKeys(children[i], type); | ||
} | ||
if (Object.freeze) { | ||
Object.freeze(children); | ||
} | ||
} else { | ||
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.'); | ||
} | ||
} else { | ||
validateChildKeys(children, type); | ||
} | ||
} | ||
} // Warn about key spread regardless of whether the type is valid. | ||
if (hasOwnProperty.call(config, 'key')) { | ||
var componentName = getComponentNameFromType(type); | ||
var keys = Object.keys(config).filter(function (k) { | ||
return k !== 'key'; | ||
}); | ||
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}'; | ||
if (!didWarnAboutKeySpread[componentName + beforeExample]) { | ||
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}'; | ||
error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); | ||
didWarnAboutKeySpread[componentName + beforeExample] = true; | ||
} | ||
} | ||
var propName; // Reserved names are extracted | ||
@@ -950,10 +1105,8 @@ | ||
if (hasValidRef(config)) { | ||
ref = config.ref; | ||
warnIfStringRefCannotBeAutoConverted(config, self); | ||
} // Remaining properties are added to a new props object | ||
if (hasValidRef(config)) ; // Remaining properties are added to a new props object | ||
for (propName in config) { | ||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { | ||
if (hasOwnProperty.call(config, propName) && // Skip over reserved prop names | ||
propName !== 'key' && (enableRefAsProp )) { | ||
props[propName] = config[propName]; | ||
@@ -974,3 +1127,3 @@ } | ||
if (key || ref) { | ||
if (key || !enableRefAsProp ) { | ||
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; | ||
@@ -981,44 +1134,11 @@ | ||
} | ||
if (ref) { | ||
defineRefPropWarningGetter(props, displayName); | ||
} | ||
} | ||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | ||
} | ||
} | ||
var element = ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | ||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; | ||
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; | ||
function setCurrentlyValidatingElement$1(element) { | ||
{ | ||
if (element) { | ||
var owner = element._owner; | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); | ||
ReactDebugCurrentFrame$1.setExtraStackFrame(stack); | ||
} else { | ||
ReactDebugCurrentFrame$1.setExtraStackFrame(null); | ||
if (type === REACT_FRAGMENT_TYPE) { | ||
validateFragmentProps(element); | ||
} | ||
} | ||
} | ||
var propTypesMisspellWarningShown; | ||
{ | ||
propTypesMisspellWarningShown = false; | ||
} | ||
/** | ||
* Verifies the object is a ReactElement. | ||
* See https://reactjs.org/docs/react-api.html#isvalidelement | ||
* @param {?object} object | ||
* @return {boolean} True if `object` is a ReactElement. | ||
* @final | ||
*/ | ||
function isValidElement(object) { | ||
{ | ||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
return element; | ||
} | ||
@@ -1029,4 +1149,4 @@ } | ||
{ | ||
if (ReactCurrentOwner$1.current) { | ||
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); | ||
if (ReactCurrentOwner.current) { | ||
var name = getComponentNameFromType(ReactCurrentOwner.current.type); | ||
@@ -1041,83 +1161,3 @@ if (name) { | ||
} | ||
function getSourceInfoErrorAddendum(source) { | ||
{ | ||
if (source !== undefined) { | ||
var fileName = source.fileName.replace(/^.*[\\\/]/, ''); | ||
var lineNumber = source.lineNumber; | ||
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; | ||
} | ||
return ''; | ||
} | ||
} | ||
/** | ||
* Warn if there's no key explicitly set on dynamic arrays of children or | ||
* object keys are not valid. This allows us to keep track of children between | ||
* updates. | ||
*/ | ||
var ownerHasKeyUseWarning = {}; | ||
function getCurrentComponentErrorInfo(parentType) { | ||
{ | ||
var info = getDeclarationErrorAddendum(); | ||
if (!info) { | ||
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; | ||
if (parentName) { | ||
info = "\n\nCheck the top-level render call using <" + parentName + ">."; | ||
} | ||
} | ||
return info; | ||
} | ||
} | ||
/** | ||
* Warn if the element doesn't have an explicit key assigned to it. | ||
* This element is in an array. The array could grow and shrink or be | ||
* reordered. All children that haven't already been validated are required to | ||
* have a "key" property assigned to it. Error statuses are cached so a warning | ||
* will only be shown once. | ||
* | ||
* @internal | ||
* @param {ReactElement} element Element that requires a key. | ||
* @param {*} parentType element's parent's type. | ||
*/ | ||
function validateExplicitKey(element, parentType) { | ||
{ | ||
if (!element._store || element._store.validated || element.key != null) { | ||
return; | ||
} | ||
element._store.validated = true; | ||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); | ||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { | ||
return; | ||
} | ||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a | ||
// property, it may be the creator of the child that's responsible for | ||
// assigning it a key. | ||
var childOwner = ''; | ||
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { | ||
// Give the component that originally created this child. | ||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; | ||
} | ||
setCurrentlyValidatingElement$1(element); | ||
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); | ||
setCurrentlyValidatingElement$1(null); | ||
} | ||
} | ||
/** | ||
* Ensure that every element either is passed in a static location, in an | ||
@@ -1135,7 +1175,7 @@ * array with an explicit keys property defined, or in an object literal | ||
{ | ||
if (typeof node !== 'object') { | ||
if (typeof node !== 'object' || !node) { | ||
return; | ||
} | ||
if (isArray(node)) { | ||
if (node.$$typeof === REACT_CLIENT_REFERENCE) ; else if (isArray(node)) { | ||
for (var i = 0; i < node.length; i++) { | ||
@@ -1153,3 +1193,3 @@ var child = node[i]; | ||
} | ||
} else if (node) { | ||
} else { | ||
var iteratorFn = getIteratorFn(node); | ||
@@ -1175,46 +1215,85 @@ | ||
/** | ||
* Given an element, validate that its props follow the propTypes definition, | ||
* provided by the type. | ||
* Verifies the object is a ReactElement. | ||
* See https://reactjs.org/docs/react-api.html#isvalidelement | ||
* @param {?object} object | ||
* @return {boolean} True if `object` is a ReactElement. | ||
* @final | ||
*/ | ||
function isValidElement(object) { | ||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
} | ||
var ownerHasKeyUseWarning = {}; | ||
/** | ||
* Warn if the element doesn't have an explicit key assigned to it. | ||
* This element is in an array. The array could grow and shrink or be | ||
* reordered. All children that haven't already been validated are required to | ||
* have a "key" property assigned to it. Error statuses are cached so a warning | ||
* will only be shown once. | ||
* | ||
* @param {ReactElement} element | ||
* @internal | ||
* @param {ReactElement} element Element that requires a key. | ||
* @param {*} parentType element's parent's type. | ||
*/ | ||
function validatePropTypes(element) { | ||
function validateExplicitKey(element, parentType) { | ||
{ | ||
var type = element.type; | ||
if (type === null || type === undefined || typeof type === 'string') { | ||
if (!element._store || element._store.validated || element.key != null) { | ||
return; | ||
} | ||
var propTypes; | ||
element._store.validated = true; | ||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); | ||
if (typeof type === 'function') { | ||
propTypes = type.propTypes; | ||
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
type.$$typeof === REACT_MEMO_TYPE)) { | ||
propTypes = type.propTypes; | ||
} else { | ||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { | ||
return; | ||
} | ||
if (propTypes) { | ||
// Intentionally inside to avoid triggering lazy initializers: | ||
var name = getComponentNameFromType(type); | ||
checkPropTypes(propTypes, element.props, 'prop', name, element); | ||
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { | ||
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: | ||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a | ||
// property, it may be the creator of the child that's responsible for | ||
// assigning it a key. | ||
var _name = getComponentNameFromType(type); | ||
var childOwner = ''; | ||
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); | ||
if (element && element._owner && element._owner !== ReactCurrentOwner.current) { | ||
// Give the component that originally created this child. | ||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; | ||
} | ||
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { | ||
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); | ||
setCurrentlyValidatingElement(element); | ||
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); | ||
setCurrentlyValidatingElement(null); | ||
} | ||
} | ||
function setCurrentlyValidatingElement(element) { | ||
{ | ||
if (element) { | ||
var owner = element._owner; | ||
var stack = describeUnknownElementTypeFrameInDEV(element.type, owner ? owner.type : null); | ||
ReactDebugCurrentFrame.setExtraStackFrame(stack); | ||
} else { | ||
ReactDebugCurrentFrame.setExtraStackFrame(null); | ||
} | ||
} | ||
} | ||
function getCurrentComponentErrorInfo(parentType) { | ||
{ | ||
var info = getDeclarationErrorAddendum(); | ||
if (!info) { | ||
var parentName = getComponentNameFromType(parentType); | ||
if (parentName) { | ||
info = "\n\nCheck the top-level render call using <" + parentName + ">."; | ||
} | ||
} | ||
return info; | ||
} | ||
} | ||
/** | ||
@@ -1227,2 +1306,3 @@ * Given a fragment, validate that it can only be provided with fragment props | ||
function validateFragmentProps(fragment) { | ||
// TODO: Move this to render phase instead of at element creation. | ||
{ | ||
@@ -1235,119 +1315,17 @@ var keys = Object.keys(fragment.props); | ||
if (key !== 'children' && key !== 'key') { | ||
setCurrentlyValidatingElement$1(fragment); | ||
setCurrentlyValidatingElement(fragment); | ||
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); | ||
setCurrentlyValidatingElement$1(null); | ||
setCurrentlyValidatingElement(null); | ||
break; | ||
} | ||
} | ||
if (fragment.ref !== null) { | ||
setCurrentlyValidatingElement$1(fragment); | ||
error('Invalid attribute `ref` supplied to `React.Fragment`.'); | ||
setCurrentlyValidatingElement$1(null); | ||
} | ||
} | ||
} | ||
function jsxWithValidation(type, props, key, isStaticChildren, source, self) { | ||
{ | ||
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to | ||
// succeed and there will likely be errors in render. | ||
if (!validType) { | ||
var info = ''; | ||
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { | ||
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; | ||
} | ||
var sourceInfo = getSourceInfoErrorAddendum(source); | ||
if (sourceInfo) { | ||
info += sourceInfo; | ||
} else { | ||
info += getDeclarationErrorAddendum(); | ||
} | ||
var typeString; | ||
if (type === null) { | ||
typeString = 'null'; | ||
} else if (isArray(type)) { | ||
typeString = 'array'; | ||
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { | ||
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; | ||
info = ' Did you accidentally export a JSX literal instead of a component?'; | ||
} else { | ||
typeString = typeof type; | ||
} | ||
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); | ||
} | ||
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. | ||
// TODO: Drop this when these are no longer allowed as the type argument. | ||
if (element == null) { | ||
return element; | ||
} // Skip key warning if the type isn't valid since our key validation logic | ||
// doesn't expect a non-string/function type and can throw confusing errors. | ||
// We don't want exception behavior to differ between dev and prod. | ||
// (Rendering will throw with a helpful message and as soon as the type is | ||
// fixed, the key warnings will appear.) | ||
if (validType) { | ||
var children = props.children; | ||
if (children !== undefined) { | ||
if (isStaticChildren) { | ||
if (isArray(children)) { | ||
for (var i = 0; i < children.length; i++) { | ||
validateChildKeys(children[i], type); | ||
} | ||
if (Object.freeze) { | ||
Object.freeze(children); | ||
} | ||
} else { | ||
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.'); | ||
} | ||
} else { | ||
validateChildKeys(children, type); | ||
} | ||
} | ||
} | ||
if (type === REACT_FRAGMENT_TYPE) { | ||
validateFragmentProps(element); | ||
} else { | ||
validatePropTypes(element); | ||
} | ||
return element; | ||
} | ||
} // These two functions exist to still get child warnings in dev | ||
// even with the prod transform. This means that jsxDEV is purely | ||
// opt-in behavior for better messages but that we won't stop | ||
// giving you warnings if you use production apis. | ||
function jsxWithValidationStatic(type, props, key) { | ||
{ | ||
return jsxWithValidation(type, props, key, true); | ||
} | ||
} | ||
function jsxWithValidationDynamic(type, props, key) { | ||
{ | ||
return jsxWithValidation(type, props, key, false); | ||
} | ||
} | ||
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children. | ||
var jsx = jsxProdSignatureRunningInDevWithDynamicChildren ; // we may want to special case jsxs internally to take advantage of static children. | ||
// for now we can ship identical prod functions | ||
var jsxs = jsxWithValidationStatic ; | ||
var jsxs = jsxProdSignatureRunningInDevWithStaticChildren ; | ||
@@ -1354,0 +1332,0 @@ exports.Fragment = REACT_FRAGMENT_TYPE; |
@@ -1,11 +0,13 @@ | ||
/** | ||
* @license React | ||
* react-jsx-runtime.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its 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; | ||
/* | ||
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"),h=Symbol.for("react.element"),k=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner; | ||
function n(d,b,g){var c={},e=null;void 0!==g&&(e=""+g);void 0!==b.key&&(e=""+b.key);for(a in b)l.call(b,a)&&"key"!==a&&(c[a]=b[a]);if(d&&d.defaultProps)for(a in b=d.defaultProps,b)void 0===c[a]&&(c[a]=b[a]);var a=c.ref;return{$$typeof:h,type:d,key:e,ref:void 0!==a?a:null,props:c,_owner:m.current}}exports.Fragment=k;exports.jsx=n;exports.jsxs=n; | ||
//# sourceMappingURL=react-jsx-runtime.production.min.js.map |
@@ -1,11 +0,13 @@ | ||
/** | ||
* @license React | ||
* react-jsx-runtime.profiling.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its 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; | ||
/* | ||
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"),h=Symbol.for("react.element"),k=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner; | ||
function n(d,b,g){var c={},e=null;void 0!==g&&(e=""+g);void 0!==b.key&&(e=""+b.key);for(a in b)l.call(b,a)&&"key"!==a&&(c[a]=b[a]);if(d&&d.defaultProps)for(a in b=d.defaultProps,b)void 0===c[a]&&(c[a]=b[a]);var a=c.ref;return{$$typeof:h,type:d,key:e,ref:void 0!==a?a:null,props:c,_owner:m.current}}exports.Fragment=k;exports.jsx=n;exports.jsxs=n; | ||
//# sourceMappingURL=react-jsx-runtime.profiling.min.js.map |
@@ -1,27 +0,35 @@ | ||
/** | ||
* @license React | ||
* react.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its 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"),B=Symbol.for("react.debug_trace_mode"),C=Symbol.for("react.offscreen"),aa=Symbol.for("react.cache"), | ||
D=Symbol.for("react.default_value"),E=Symbol.iterator;function ba(a){if(null===a||"object"!==typeof a)return null;a=E&&a[E]||a["@@iterator"];return"function"===typeof a?a:null}var F={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,H={};function I(a,b,d){this.props=a;this.context=b;this.refs=H;this.updater=d||F}I.prototype.isReactComponent={}; | ||
I.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")};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||F}var L=K.prototype=new J; | ||
L.constructor=K;G(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 Q(a,b,d){var c,e={},k=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+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 f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];e.children=f}if(a&&a.defaultProps)for(c in g=a.defaultProps,g)void 0===e[c]&&(e[c]=g[c]);return{$$typeof:l,type:a,key:k,ref:h,props:e,_owner:O.current}} | ||
function ca(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function R(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var S=/\/+/g;function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)} | ||
function U(a,b,d,c,e){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,e=e(h),a=""===c?"."+T(h,0):c,M(e)?(d="",null!=a&&(d=a.replace(S,"$&/")+"/"),U(e,b,d,"",function(a){return a})):null!=e&&(R(e)&&(e=ca(e,d+(!e.key||h&&h.key===e.key?"":(""+e.key).replace(S,"$&/")+"/")+a)),b.push(e)),1;h=0;c=""===c?".":c+":";if(M(a))for(var g=0;g<a.length;g++){k= | ||
a[g];var f=c+T(k,g);h+=U(k,b,d,f,e)}else if(f=ba(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=c+T(k,g++),h+=U(k,b,d,f,e);else if("object"===k)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 h} | ||
function V(a,b,d){if(null==a)return a;var c=[],e=0;U(a,c,"","",function(a){return b.call(d,a,e++)});return c}function da(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;} | ||
var W={current:null},X={transition:null},Y={ReactCurrentDispatcher:W,ReactCurrentBatchConfig:X,ReactCurrentOwner:O,ContextRegistry:{}},Z=Y.ContextRegistry;exports.Children={map:V,forEach:function(a,b,d){V(a,function(){b.apply(this,arguments)},d)},count:function(a){var b=0;V(a,function(){b++});return b},toArray:function(a){return V(a,function(a){return a})||[]},only:function(a){if(!R(a))throw Error("React.Children.only expected to receive a single React element child.");return a}}; | ||
exports.Component=I;exports.Fragment=p;exports.Profiler=r;exports.PureComponent=K;exports.StrictMode=q;exports.Suspense=x;exports.SuspenseList=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y; | ||
exports.cloneElement=function(a,b,d){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var c=G({},a.props),e=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=O.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)N.call(b,f)&&!P.hasOwnProperty(f)&&(c[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)c.children=d;else if(1<f){g=Array(f); | ||
for(var m=0;m<f;m++)g[m]=arguments[m+2];c.children=g}return{$$typeof:l,type:a.type,key:e,ref:k,props:c,_owner:h}};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=Q;exports.createFactory=function(a){var b=Q.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}}; | ||
exports.createServerContext=function(a,b){var d=!0;if(!Z[a]){d=!1;var c={$$typeof:v,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};c.Provider={$$typeof:t,_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("ServerContext: "+a+" already defined");return c};exports.forwardRef=function(a){return{$$typeof:w,render:a}}; | ||
exports.isValidElement=R;exports.lazy=function(a){return{$$typeof:A,_payload:{_status:-1,_result:a},_init:da}};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=aa;exports.unstable_DebugTracingMode=B;exports.unstable_Offscreen=C;exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");}; | ||
exports.unstable_getCacheForType=function(a){return W.current.getCacheForType(a)};exports.unstable_getCacheSignal=function(){return W.current.getCacheSignal()};exports.unstable_useCacheRefresh=function(){return W.current.useCacheRefresh()};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,d){return W.current.useImperativeHandle(a,b,d)};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,d){return W.current.useReducer(a,b,d)}; | ||
exports.useRef=function(a){return W.current.useRef(a)};exports.useState=function(a){return W.current.useState(a)};exports.useSyncExternalStore=function(a,b,d){return W.current.useSyncExternalStore(a,b,d)};exports.useTransition=function(){return W.current.useTransition()};exports.version="18.1.0-experimental-057915477-20220407"; | ||
/* | ||
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 k=Symbol.for("react.element"),m=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),t=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.for("react.debug_trace_mode"),aa=Symbol.for("react.offscreen"),ba=Symbol.for("react.cache"),ca=Symbol.for("react.postpone"), | ||
A=Symbol.iterator;function da(a){if(null===a||"object"!==typeof a)return null;a=A&&a[A]||a["@@iterator"];return"function"===typeof a?a:null}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,c){this.props=a;this.context=b;this.refs=D;this.updater=c||B}E.prototype.isReactComponent={}; | ||
E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("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")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,c){this.props=a;this.context=b;this.refs=D;this.updater=c||B}var H=G.prototype=new F; | ||
H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J={current:null},K={current:null},L={transition:null},M={ReactCurrentDispatcher:J,ReactCurrentCache:K,ReactCurrentBatchConfig:L,ReactCurrentOwner:{current:null}},N=Object.prototype.hasOwnProperty,O=M.ReactCurrentOwner;function P(a,b,c,e,d,g,f){c=f.ref;return{$$typeof:k,type:a,key:b,ref:void 0!==c?c:null,props:f,_owner:g}} | ||
function Q(a,b,c){var e,d={},g=null;if(null!=b)for(e in void 0!==b.key&&(g=""+b.key),b)N.call(b,e)&&"key"!==e&&"__self"!==e&&"__source"!==e&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),l=0;l<f;l++)h[l]=arguments[l+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return P(a,g,null,void 0,void 0,O.current,d)}function ea(a,b){return P(a.type,b,null,void 0,void 0,a._owner,a.props)} | ||
function R(a){return"object"===typeof a&&null!==a&&a.$$typeof===k}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}var S=/\/+/g;function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}function U(){} | ||
function fa(a){switch(a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;default:switch("string"===typeof a.status?a.then(U,U):(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)})),a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;}}throw a;} | ||
function V(a,b,c,e,d){var g=typeof a;if("undefined"===g||"boolean"===g)a=null;var f=!1;if(null===a)f=!0;else switch(g){case "bigint":case "string":case "number":f=!0;break;case "object":switch(a.$$typeof){case k:case m:f=!0;break;case y:return f=a._init,V(f(a._payload),b,c,e,d)}}if(f)return d=d(a),f=""===e?"."+T(a,0):e,I(d)?(c="",null!=f&&(c=f.replace(S,"$&/")+"/"),V(d,b,c,"",function(ha){return ha})):null!=d&&(R(d)&&(d=ea(d,c+(!d.key||a&&a.key===d.key?"":(""+d.key).replace(S,"$&/")+"/")+f)),b.push(d)), | ||
1;f=0;var h=""===e?".":e+":";if(I(a))for(var l=0;l<a.length;l++)e=a[l],g=h+T(e,l),f+=V(e,b,c,g,d);else if(l=da(a),"function"===typeof l)for(a=l.call(a),l=0;!(e=a.next()).done;)e=e.value,g=h+T(e,l++),f+=V(e,b,c,g,d);else if("object"===g){if("function"===typeof a.then)return V(fa(a),b,c,e,d);b=String(a);throw 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 f}function W(a,b,c){if(null==a)return a;var e=[],d=0;V(a,e,"","",function(g){return b.call(c,g,d++)});return e}function ia(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;}function ja(){return new WeakMap} | ||
function X(){return{s:0,v:void 0,o:null,p:null}}function Y(a,b){return J.current.useOptimistic(a,b)} | ||
var Z="function"===typeof reportError?reportError:function(a){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var b=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof a&&null!==a&&"string"===typeof a.message?String(a.message):String(a),error:a});if(!window.dispatchEvent(b))return}else if("object"===typeof process&&"function"===typeof process.emit){process.emit("uncaughtException",a);return}console.error(a)};function ka(){} | ||
exports.Children={map:W,forEach:function(a,b,c){W(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;W(a,function(){b++});return b},toArray:function(a){return W(a,function(b){return b})||[]},only:function(a){if(!R(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=E;exports.Fragment=n;exports.Profiler=q;exports.PureComponent=G;exports.StrictMode=p;exports.Suspense=v; | ||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M;exports.act=function(){throw Error("act(...) is not supported in production builds of React.");}; | ||
exports.cache=function(a){return function(){var b=K.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(ja);b=c.get(a);void 0===b&&(b=X(),c.set(a,b));c=0;for(var e=arguments.length;c<e;c++){var d=arguments[c];if("function"===typeof d||"object"===typeof d&&null!==d){var g=b.o;null===g&&(b.o=g=new WeakMap);b=g.get(d);void 0===b&&(b=X(),g.set(d,b))}else g=b.p,null===g&&(b.p=g=new Map),b=g.get(d),void 0===b&&(b=X(),g.set(d,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var f=a.apply(null, | ||
arguments);c=b;c.s=1;return c.v=f}catch(h){throw f=b,f.s=2,f.v=h,h;}}}; | ||
exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("The argument must be a React element, but you passed "+a+".");var e=C({},a.props),d=a.key,g=a._owner;if(null!=b){void 0!==b.ref&&(g=O.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)!N.call(b,h)||"key"===h||"__self"===h||"__source"===h||"ref"===h&&void 0===b.ref||(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f= | ||
Array(h);for(var l=0;l<h;l++)f[l]=arguments[l+2];e.children=f}return P(a.type,d,null,void 0,void 0,g,e)};exports.createContext=function(a){a={$$typeof:t,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider=a;a.Consumer={$$typeof:r,_context:a};return a};exports.createElement=Q;exports.createFactory=function(a){var b=Q.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.experimental_useEffectEvent=function(a){return J.current.useEffectEvent(a)}; | ||
exports.experimental_useOptimistic=function(a,b){return Y(a,b)};exports.forwardRef=function(a){return{$$typeof:u,render:a}};exports.isValidElement=R;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:ia}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}}; | ||
exports.startTransition=function(a){var b=L.transition,c=new Set;L.transition={_callbacks:c};var e=L.transition;try{var d=a();"object"===typeof d&&null!==d&&"function"===typeof d.then&&(c.forEach(function(g){return g(e,d)}),d.then(ka,Z))}catch(g){Z(g)}finally{L.transition=b}};exports.unstable_Activity=aa;exports.unstable_Cache=ba;exports.unstable_DebugTracingMode=z;exports.unstable_SuspenseList=w;exports.unstable_getCacheForType=function(a){var b=K.current;return b?b.getCacheForType(a):a()}; | ||
exports.unstable_getCacheSignal=function(){var a=K.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_postpone=function(a){a=Error(a);a.$$typeof=ca;throw a;};exports.unstable_useCacheRefresh=function(){return J.current.useCacheRefresh()};exports.unstable_useMemoCache=function(a){return J.current.useMemoCache(a)};exports.use=function(a){return J.current.use(a)}; | ||
exports.useActionState=function(a,b,c){return J.current.useActionState(a,b,c)};exports.useCallback=function(a,b){return J.current.useCallback(a,b)};exports.useContext=function(a){return J.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a,b){return J.current.useDeferredValue(a,b)};exports.useEffect=function(a,b){return J.current.useEffect(a,b)};exports.useId=function(){return J.current.useId()}; | ||
exports.useImperativeHandle=function(a,b,c){return J.current.useImperativeHandle(a,b,c)};exports.useInsertionEffect=function(a,b){return J.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return J.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return J.current.useMemo(a,b)};exports.useOptimistic=Y;exports.useReducer=function(a,b,c){return J.current.useReducer(a,b,c)};exports.useRef=function(a){return J.current.useRef(a)};exports.useState=function(a){return J.current.useState(a)}; | ||
exports.useSyncExternalStore=function(a,b,c){return J.current.useSyncExternalStore(a,b,c)};exports.useTransition=function(){return J.current.useTransition()};exports.version="19.0.0-experimental-05797cceb-20240328"; | ||
//# sourceMappingURL=react.production.min.js.map |
@@ -7,4 +7,4 @@ { | ||
], | ||
"version": "0.0.0-experimental-057915477-20220407", | ||
"homepage": "https://reactjs.org/", | ||
"version": "0.0.0-experimental-05797cceb-20240328", | ||
"homepage": "https://react.dev/", | ||
"bugs": "https://github.com/facebook/react/issues", | ||
@@ -19,4 +19,5 @@ "license": "MIT", | ||
"jsx-runtime.js", | ||
"jsx-runtime.react-server.js", | ||
"jsx-dev-runtime.js", | ||
"react.shared-subset.js" | ||
"react.react-server.js" | ||
], | ||
@@ -26,7 +27,10 @@ "main": "index.js", | ||
".": { | ||
"react-server": "./react.shared-subset.js", | ||
"react-server": "./react.react-server.js", | ||
"default": "./index.js" | ||
}, | ||
"./package.json": "./package.json", | ||
"./jsx-runtime": "./jsx-runtime.js", | ||
"./jsx-runtime": { | ||
"react-server": "./jsx-runtime.react-server.js", | ||
"default": "./jsx-runtime.js" | ||
}, | ||
"./jsx-dev-runtime": "./jsx-dev-runtime.js" | ||
@@ -41,11 +45,3 @@ }, | ||
"node": ">=0.10.0" | ||
}, | ||
"dependencies": { | ||
"loose-envify": "^1.1.0" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"loose-envify" | ||
] | ||
} | ||
} |
@@ -28,3 +28,3 @@ # `react` | ||
const root = createRoot(document.getElementById('root')); | ||
root.render(<App />); | ||
root.render(<Counter />); | ||
``` | ||
@@ -34,6 +34,6 @@ | ||
See https://reactjs.org/ | ||
See https://react.dev/ | ||
## API | ||
See https://reactjs.org/docs/react-api.html | ||
See https://react.dev/reference/react |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
@@ -11,25 +11,28 @@ * This source code is licensed under the MIT license found in the | ||
*/ | ||
(function(){'use strict';(function(c,x){"object"===typeof exports&&"undefined"!==typeof module?x(exports):"function"===typeof define&&define.amd?define(["exports"],x):(c=c||self,x(c.React={}))})(this,function(c){function x(a){if(null===a||"object"!==typeof a)return null;a=X&&a[X]||a["@@iterator"];return"function"===typeof a?a:null}function w(a,b,m){this.props=a;this.context=b;this.refs=Y;this.updater=m||Z}function aa(){}function L(a,b,m){this.props=a;this.context=b;this.refs=Y;this.updater=m||Z}function ba(a, | ||
b,m){var d,c={},l=null,g=null;if(null!=b)for(d in void 0!==b.ref&&(g=b.ref),void 0!==b.key&&(l=""+b.key),b)ca.call(b,d)&&!da.hasOwnProperty(d)&&(c[d]=b[d]);var k=arguments.length-2;if(1===k)c.children=m;else if(1<k){for(var f=Array(k),e=0;e<k;e++)f[e]=arguments[e+2];c.children=f}if(a&&a.defaultProps)for(d in k=a.defaultProps,k)void 0===c[d]&&(c[d]=k[d]);return{$$typeof:y,type:a,key:l,ref:g,props:c,_owner:M.current}}function qa(a,b){return{$$typeof:y,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}} | ||
function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===y}function ra(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?ra(""+a.key):b.toString(36)}function B(a,b,m,d,c){var l=typeof a;if("undefined"===l||"boolean"===l)a=null;var g=!1;if(null===a)g=!0;else switch(l){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case y:case sa:g=!0}}if(g)return g=a,c=c(g),a=""===d?"."+ | ||
O(g,0):d,ea(c)?(m="",null!=a&&(m=a.replace(fa,"$&/")+"/"),B(c,b,m,"",function(a){return a})):null!=c&&(N(c)&&(c=qa(c,m+(!c.key||g&&g.key===c.key?"":(""+c.key).replace(fa,"$&/")+"/")+a)),b.push(c)),1;g=0;d=""===d?".":d+":";if(ea(a))for(var k=0;k<a.length;k++){l=a[k];var f=d+O(l,k);g+=B(l,b,m,f,c)}else if(f=x(a),"function"===typeof f)for(a=f.call(a),k=0;!(l=a.next()).done;)l=l.value,f=d+O(l,k++),g+=B(l,b,m,f,c);else if("object"===l)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 C(a,b,m){if(null==a)return a;var c=[],e=0;B(a,c,"","",function(a){return b.call(m,a,e++)});return c}function ta(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status= | ||
0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function P(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<D(e,b))a[d]=b,a[c]=e,c=d;else break a}}function p(a){return 0===a.length?null:a[0]}function E(a){if(0===a.length)return null;var b=a[0],c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length,l=e>>>1;d<l;){var g=2*(d+1)-1,k=a[g],f=g+1,h=a[f];if(0>D(k,c))f<e&&0>D(h,k)?(a[d]=h,a[f]=c,d=f):(a[d]=k,a[g]=c,d=g);else if(f<e&&0>D(h,c))a[d]=h,a[f]=c,d=f;else break a}}return b} | ||
function D(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function Q(a){for(var b=p(r);null!==b;){if(null===b.callback)E(r);else if(b.startTime<=a)E(r),b.sortIndex=b.expirationTime,P(q,b);else break;b=p(r)}}function R(a){z=!1;Q(a);if(!u)if(null!==p(q))u=!0,S(T);else{var b=p(r);null!==b&&U(R,b.startTime-a)}}function T(a,b){u=!1;z&&(z=!1,ha(A),A=-1);F=!0;var c=h;try{Q(b);for(n=p(q);null!==n&&(!(n.expirationTime>b)||a&&!ia());){var d=n.callback;if("function"===typeof d){n.callback=null; | ||
h=n.priorityLevel;var e=d(n.expirationTime<=b);b=v();"function"===typeof e?n.callback=e:n===p(q)&&E(q);Q(b)}else E(q);n=p(q)}if(null!==n)var l=!0;else{var g=p(r);null!==g&&U(R,g.startTime-b);l=!1}return l}finally{n=null,h=c,F=!1}}function ia(){return v()-ja<ka?!1:!0}function S(a){G=a;H||(H=!0,I())}function U(a,b){A=la(function(){a(v())},b)}var y=Symbol.for("react.element"),sa=Symbol.for("react.portal"),ua=Symbol.for("react.fragment"),va=Symbol.for("react.strict_mode"),wa=Symbol.for("react.profiler"), | ||
ma=Symbol.for("react.provider"),xa=Symbol.for("react.context"),ya=Symbol.for("react.server_context"),za=Symbol.for("react.forward_ref"),Aa=Symbol.for("react.suspense"),Ba=Symbol.for("react.suspense_list"),Ca=Symbol.for("react.memo"),Da=Symbol.for("react.lazy"),Ea=Symbol.for("react.debug_trace_mode"),Fa=Symbol.for("react.offscreen"),Ga=Symbol.for("react.cache"),V=Symbol.for("react.default_value"),X=Symbol.iterator,Z={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a, | ||
b,c,d){},enqueueSetState:function(a,b,c,d){}},na=Object.assign,Y={};w.prototype.isReactComponent={};w.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")};w.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};aa.prototype=w.prototype;var t=L.prototype= | ||
new aa;t.constructor=L;na(t,w.prototype);t.isPureReactComponent=!0;var ea=Array.isArray,ca=Object.prototype.hasOwnProperty,M={current:null},da={key:!0,ref:!0,__self:!0,__source:!0},fa=/\/+/g,e={current:null},J={transition:null},K={};if("object"===typeof performance&&"function"===typeof performance.now){var Ha=performance;var v=function(){return Ha.now()}}else{var oa=Date,Ia=oa.now();v=function(){return oa.now()-Ia}}var q=[],r=[],Ja=1,n=null,h=3,F=!1,u=!1,z=!1,la="function"===typeof setTimeout?setTimeout: | ||
null,ha="function"===typeof clearTimeout?clearTimeout:null,pa="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var H=!1,G=null,A=-1,ka=5,ja=-1,W=function(){if(null!==G){var a=v();ja=a;var b=!0;try{b=G(!0,a)}finally{b?I():(H=!1,G=null)}}else H=!1};if("function"===typeof pa)var I=function(){pa(W)};else if("undefined"!==typeof MessageChannel){t= | ||
new MessageChannel;var Ka=t.port2;t.port1.onmessage=W;I=function(){Ka.postMessage(null)}}else I=function(){la(W,0)};t={ReactCurrentDispatcher:e,ReactCurrentOwner:M,ReactCurrentBatchConfig:J,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=h;h=a;try{return b()}finally{h=c}},unstable_next:function(a){switch(h){case 1:case 2:case 3:var b= | ||
3;break;default:b=h}var c=h;h=b;try{return a()}finally{h=c}},unstable_scheduleCallback:function(a,b,c){var d=v();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:Ja++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,P(r,a),null===p(q)&&a===p(r)&&(z?(ha(A),A=-1):z=!0,U(R,c-d))):(a.sortIndex=e,P(q,a),u||F||(u= | ||
!0,S(T)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=h;return function(){var c=h;h=b;try{return a.apply(this,arguments)}finally{h=c}}},unstable_getCurrentPriorityLevel:function(){return h},unstable_shouldYield:ia,unstable_requestPaint:function(){},unstable_continueExecution:function(){u||F||(u=!0,S(T))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)},get unstable_now(){return v},unstable_forceFrameRate:function(a){0> | ||
a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ka=0<a?Math.floor(1E3/a):5},unstable_Profiling:null},ContextRegistry:K};c.Children={map:C,forEach:function(a,b,c){C(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;C(a,function(){b++});return b},toArray:function(a){return C(a,function(a){return a})||[]},only:function(a){if(!N(a))throw Error("React.Children.only expected to receive a single React element child."); | ||
return a}};c.Component=w;c.Fragment=ua;c.Profiler=wa;c.PureComponent=L;c.StrictMode=va;c.Suspense=Aa;c.SuspenseList=Ba;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t;c.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=na({},a.props),e=a.key,m=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(m=b.ref,g=M.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var k=a.type.defaultProps; | ||
for(f in b)ca.call(b,f)&&!da.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==k?k[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){k=Array(f);for(var h=0;h<f;h++)k[h]=arguments[h+2];d.children=k}return{$$typeof:y,type:a.type,key:e,ref:m,props:d,_owner:g}};c.createContext=function(a){a={$$typeof:xa,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:ma,_context:a};return a.Consumer=a};c.createElement= | ||
ba;c.createFactory=function(a){var b=ba.bind(null,a);b.type=a;return b};c.createRef=function(){return{current:null}};c.createServerContext=function(a,b){var c=!0;if(!K[a]){c=!1;var d={$$typeof:ya,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};d.Provider={$$typeof:ma,_context:d};K[a]=d}d=K[a];if(d._defaultValue===V)d._defaultValue=b,d._currentValue===V&&(d._currentValue=b),d._currentValue2===V&&(d._currentValue2=b);else if(c)throw Error("ServerContext: "+ | ||
a+" already defined");return d};c.forwardRef=function(a){return{$$typeof:za,render:a}};c.isValidElement=N;c.lazy=function(a){return{$$typeof:Da,_payload:{_status:-1,_result:a},_init:ta}};c.memo=function(a,b){return{$$typeof:Ca,type:a,compare:void 0===b?null:b}};c.startTransition=function(a,b){b=J.transition;J.transition={};try{a()}finally{J.transition=b}};c.unstable_Cache=Ga;c.unstable_DebugTracingMode=Ea;c.unstable_Offscreen=Fa;c.unstable_act=function(a){throw Error("act(...) is not supported in production builds of React."); | ||
};c.unstable_getCacheForType=function(a){return e.current.getCacheForType(a)};c.unstable_getCacheSignal=function(){return e.current.getCacheSignal()};c.unstable_useCacheRefresh=function(){return e.current.useCacheRefresh()};c.useCallback=function(a,b){return e.current.useCallback(a,b)};c.useContext=function(a){return e.current.useContext(a)};c.useDebugValue=function(a,b){};c.useDeferredValue=function(a){return e.current.useDeferredValue(a)};c.useEffect=function(a,b){return e.current.useEffect(a,b)}; | ||
c.useId=function(){return e.current.useId()};c.useImperativeHandle=function(a,b,c){return e.current.useImperativeHandle(a,b,c)};c.useInsertionEffect=function(a,b){return e.current.useInsertionEffect(a,b)};c.useLayoutEffect=function(a,b){return e.current.useLayoutEffect(a,b)};c.useMemo=function(a,b){return e.current.useMemo(a,b)};c.useReducer=function(a,b,c){return e.current.useReducer(a,b,c)};c.useRef=function(a){return e.current.useRef(a)};c.useState=function(a){return e.current.useState(a)};c.useSyncExternalStore= | ||
function(a,b,c){return e.current.useSyncExternalStore(a,b,c)};c.useTransition=function(){return e.current.useTransition()};c.version="18.1.0-experimental-057915477-20220407"}); | ||
})(); | ||
'use strict';(function(){(function(f,A){"object"===typeof exports&&"undefined"!==typeof module?A(exports):"function"===typeof define&&define.amd?define(["exports"],A):(f="undefined"!==typeof globalThis?globalThis:f||self,A(f.React={}))})(this,function(f){function A(a){if(null===a||"object"!==typeof a)return null;a=X&&a[X]||a["@@iterator"];return"function"===typeof a?a:null}function x(a,b,c){this.props=a;this.context=b;this.refs=Y;this.updater=c||Z}function aa(){}function M(a,b,c){this.props=a;this.context= | ||
b;this.refs=Y;this.updater=c||Z}function N(a,b,c,d,e,h,g){c=g.ref;return{$$typeof:O,type:a,key:b,ref:void 0!==c?c:null,props:g,_owner:h}}function ba(a,b,c){var d,e={},h=null;if(null!=b)for(d in void 0!==b.key&&(h=""+b.key),b)ca.call(b,d)&&"key"!==d&&"__self"!==d&&"__source"!==d&&(e[d]=b[d]);var g=arguments.length-2;if(1===g)e.children=c;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(d in g=a.defaultProps,g)void 0===e[d]&&(e[d]=g[d]);return N(a, | ||
h,null,void 0,void 0,da.current,e)}function ua(a,b){return N(a.type,b,null,void 0,void 0,a._owner,a.props)}function P(a){return"object"===typeof a&&null!==a&&a.$$typeof===O}function va(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?va(""+a.key):b.toString(36)}function ea(){}function wa(a){switch(a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;default:switch("string"===typeof a.status? | ||
a.then(ea,ea):(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)})),a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;}}throw a;}function y(a,b,c,d,e){var h=typeof a;if("undefined"===h||"boolean"===h)a=null;var g=!1;if(null===a)g=!0;else switch(h){case "bigint":case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case O:case xa:g=!0;break;case fa:return g= | ||
a._init,y(g(a._payload),b,c,d,e)}}if(g)return e=e(a),g=""===d?"."+Q(a,0):d,ha(e)?(c="",null!=g&&(c=g.replace(ia,"$&/")+"/"),y(e,b,c,"",function(z){return z})):null!=e&&(P(e)&&(e=ua(e,c+(!e.key||a&&a.key===e.key?"":(""+e.key).replace(ia,"$&/")+"/")+g)),b.push(e)),1;g=0;var k=""===d?".":d+":";if(ha(a))for(var l=0;l<a.length;l++)d=a[l],h=k+Q(d,l),g+=y(d,b,c,h,e);else if(l=A(a),"function"===typeof l)for(a=l.call(a),l=0;!(d=a.next()).done;)d=d.value,h=k+Q(d,l++),g+=y(d,b,c,h,e);else if("object"===h){if("function"=== | ||
typeof a.then)return y(wa(a),b,c,d,e);b=String(a);throw 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 E(a,b,c){if(null==a)return a;var d=[],e=0;y(a,d,"","",function(h){return b.call(c,h,e++)});return d}function ya(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;}function za(){return new WeakMap}function R(){return{s:0,v:void 0,o:null,p:null}}function ja(a,b){return m.current.useOptimistic(a,b)}function S(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<F(e,b))a[d]=b,a[c]=e,c=d;else break a}}function q(a){return 0===a.length?null:a[0]}function G(a){if(0=== | ||
a.length)return null;var b=a[0],c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length,h=e>>>1;d<h;){var g=2*(d+1)-1,k=a[g],l=g+1,z=a[l];if(0>F(k,c))l<e&&0>F(z,k)?(a[d]=z,a[l]=c,d=l):(a[d]=k,a[g]=c,d=g);else if(l<e&&0>F(z,c))a[d]=z,a[l]=c,d=l;else break a}}return b}function F(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function H(a){for(var b=q(t);null!==b;){if(null===b.callback)G(t);else if(b.startTime<=a)G(t),b.sortIndex=b.expirationTime,S(r,b);else break;b=q(t)}}function T(a){B=!1; | ||
H(a);if(!v)if(null!==q(r))v=!0,U();else{var b=q(t);null!==b&&V(T,b.startTime-a)}}function ka(){return w()-la<ma?!1:!0}function U(){I||(I=!0,J())}function V(a,b){C=na(function(){a(w())},b)}function Aa(){}var O=Symbol.for("react.element"),xa=Symbol.for("react.portal"),Ba=Symbol.for("react.fragment"),Ca=Symbol.for("react.strict_mode"),Da=Symbol.for("react.profiler"),Ea=Symbol.for("react.consumer"),Fa=Symbol.for("react.context"),Ga=Symbol.for("react.forward_ref"),Ha=Symbol.for("react.suspense"),Ia=Symbol.for("react.suspense_list"), | ||
Ja=Symbol.for("react.memo"),fa=Symbol.for("react.lazy"),Ka=Symbol.for("react.debug_trace_mode"),La=Symbol.for("react.offscreen"),Ma=Symbol.for("react.cache"),Na=Symbol.for("react.postpone"),X=Symbol.iterator,Z={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}},oa=Object.assign,Y={};x.prototype.isReactComponent={};x.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("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")};x.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};aa.prototype=x.prototype;var u=M.prototype=new aa;u.constructor=M;oa(u,x.prototype);u.isPureReactComponent=!0;var ha=Array.isArray,m={current:null},K={current:null},D={transition:null};u={current:null};var ca=Object.prototype.hasOwnProperty,da=u,ia=/\/+/g;if("object"===typeof performance&&"function"===typeof performance.now){var Oa=performance;var w=function(){return Oa.now()}}else{var pa= | ||
Date,Pa=pa.now();w=function(){return pa.now()-Pa}}var r=[],t=[],Qa=1,p=null,n=3,L=!1,v=!1,B=!1,na="function"===typeof setTimeout?setTimeout:null,qa="function"===typeof clearTimeout?clearTimeout:null,ra="undefined"!==typeof setImmediate?setImmediate:null,I=!1,C=-1,ma=5,la=-1,W=function(){if(I){var a=w();la=a;var b=!0;try{a:{v=!1;B&&(B=!1,qa(C),C=-1);L=!0;var c=n;try{b:{H(a);for(p=q(r);null!==p&&!(p.expirationTime>a&&ka());){var d=p.callback;if("function"===typeof d){p.callback=null;n=p.priorityLevel; | ||
var e=d(p.expirationTime<=a);a=w();if("function"===typeof e){p.callback=e;H(a);b=!0;break b}p===q(r)&&G(r);H(a)}else G(r);p=q(r)}if(null!==p)b=!0;else{var h=q(t);null!==h&&V(T,h.startTime-a);b=!1}}break a}finally{p=null,n=c,L=!1}b=void 0}}finally{b?J():I=!1}}};if("function"===typeof ra)var J=function(){ra(W)};else if("undefined"!==typeof MessageChannel){var sa=new MessageChannel,Ra=sa.port2;sa.port1.onmessage=W;J=function(){Ra.postMessage(null)}}else J=function(){na(W,0)};u={ReactCurrentDispatcher:m, | ||
ReactCurrentCache:K,ReactCurrentOwner:u,ReactCurrentBatchConfig:D,Scheduler:{__proto__:null,unstable_IdlePriority:5,unstable_ImmediatePriority:1,unstable_LowPriority:4,unstable_NormalPriority:3,unstable_Profiling:null,unstable_UserBlockingPriority:2,unstable_cancelCallback:function(a){a.callback=null},unstable_continueExecution:function(){v||L||(v=!0,U())},unstable_forceFrameRate:function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"): | ||
ma=0<a?Math.floor(1E3/a):5},unstable_getCurrentPriorityLevel:function(){return n},unstable_getFirstCallbackNode:function(){return q(r)},unstable_next:function(a){switch(n){case 1:case 2:case 3:var b=3;break;default:b=n}var c=n;n=b;try{return a()}finally{n=c}},get unstable_now(){return w},unstable_pauseExecution:function(){},unstable_requestPaint:function(){},unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=n;n=a;try{return b()}finally{n=c}}, | ||
unstable_scheduleCallback:function(a,b,c){var d=w();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:Qa++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,S(t,a),null===q(r)&&a===q(t)&&(B?(qa(C),C=-1):B=!0,V(T,c-d))):(a.sortIndex=e,S(r,a),v||L||(v=!0,U()));return a},unstable_shouldYield:ka,unstable_wrapCallback:function(a){var b= | ||
n;return function(){var c=n;n=b;try{return a.apply(this,arguments)}finally{n=c}}}}};var ta="function"===typeof reportError?reportError:function(a){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var b=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof a&&null!==a&&"string"===typeof a.message?String(a.message):String(a),error:a});if(!window.dispatchEvent(b))return}else if("object"===typeof process&&"function"===typeof process.emit){process.emit("uncaughtException", | ||
a);return}console.error(a)};f.Children={map:E,forEach:function(a,b,c){E(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;E(a,function(){b++});return b},toArray:function(a){return E(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}};f.Component=x;f.Fragment=Ba;f.Profiler=Da;f.PureComponent=M;f.StrictMode=Ca;f.Suspense=Ha;f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=u;f.act= | ||
function(a){throw Error("act(...) is not supported in production builds of React.");};f.cache=function(a){return function(){var b=K.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(za);b=c.get(a);void 0===b&&(b=R(),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 h=b.o;null===h&&(b.o=h=new WeakMap);b=h.get(e);void 0===b&&(b=R(),h.set(e,b))}else h=b.p,null===h&&(b.p=h=new Map),b=h.get(e),void 0=== | ||
b&&(b=R(),h.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(k){throw g=b,g.s=2,g.v=k,k;}}};f.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("The argument must be a React element, but you passed "+a+".");var d=oa({},a.props),e=a.key,h=a._owner;if(null!=b){void 0!==b.ref&&(h=da.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(k in b)!ca.call(b,k)||"key"===k||"__self"=== | ||
k||"__source"===k||"ref"===k&&void 0===b.ref||(d[k]=void 0===b[k]&&void 0!==g?g[k]:b[k])}var k=arguments.length-2;if(1===k)d.children=c;else if(1<k){g=Array(k);for(var l=0;l<k;l++)g[l]=arguments[l+2];d.children=g}return N(a.type,e,null,void 0,void 0,h,d)};f.createContext=function(a){a={$$typeof:Fa,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider=a;a.Consumer={$$typeof:Ea,_context:a};return a};f.createElement=ba;f.createFactory=function(a){var b=ba.bind(null, | ||
a);b.type=a;return b};f.createRef=function(){return{current:null}};f.experimental_useEffectEvent=function(a){return m.current.useEffectEvent(a)};f.experimental_useOptimistic=function(a,b){return ja(a,b)};f.forwardRef=function(a){return{$$typeof:Ga,render:a}};f.isValidElement=P;f.lazy=function(a){return{$$typeof:fa,_payload:{_status:-1,_result:a},_init:ya}};f.memo=function(a,b){return{$$typeof:Ja,type:a,compare:void 0===b?null:b}};f.startTransition=function(a,b){b=D.transition;var c=new Set;D.transition= | ||
{_callbacks:c};var d=D.transition;try{var e=a();"object"===typeof e&&null!==e&&"function"===typeof e.then&&(c.forEach(function(h){return h(d,e)}),e.then(Aa,ta))}catch(h){ta(h)}finally{D.transition=b}};f.unstable_Activity=La;f.unstable_Cache=Ma;f.unstable_DebugTracingMode=Ka;f.unstable_SuspenseList=Ia;f.unstable_getCacheForType=function(a){var b=K.current;return b?b.getCacheForType(a):a()};f.unstable_getCacheSignal=function(){var a=K.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)};f.unstable_postpone=function(a){a=Error(a);a.$$typeof=Na;throw a;};f.unstable_useCacheRefresh=function(){return m.current.useCacheRefresh()};f.unstable_useMemoCache=function(a){return m.current.useMemoCache(a)};f.use=function(a){return m.current.use(a)};f.useActionState=function(a,b,c){return m.current.useActionState(a,b,c)};f.useCallback=function(a,b){return m.current.useCallback(a,b)};f.useContext=function(a){return m.current.useContext(a)};f.useDebugValue=function(a,b){};f.useDeferredValue= | ||
function(a,b){return m.current.useDeferredValue(a,b)};f.useEffect=function(a,b){return m.current.useEffect(a,b)};f.useId=function(){return m.current.useId()};f.useImperativeHandle=function(a,b,c){return m.current.useImperativeHandle(a,b,c)};f.useInsertionEffect=function(a,b){return m.current.useInsertionEffect(a,b)};f.useLayoutEffect=function(a,b){return m.current.useLayoutEffect(a,b)};f.useMemo=function(a,b){return m.current.useMemo(a,b)};f.useOptimistic=ja;f.useReducer=function(a,b,c){return m.current.useReducer(a, | ||
b,c)};f.useRef=function(a){return m.current.useRef(a)};f.useState=function(a){return m.current.useState(a)};f.useSyncExternalStore=function(a,b,c){return m.current.useSyncExternalStore(a,b,c)};f.useTransition=function(){return m.current.useTransition()};f.version="19.0.0-experimental-05797cceb-20240328"})})(); |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
@@ -11,25 +11,28 @@ * This source code is licensed under the MIT license found in the | ||
*/ | ||
(function(){'use strict';(function(c,x){"object"===typeof exports&&"undefined"!==typeof module?x(exports):"function"===typeof define&&define.amd?define(["exports"],x):(c=c||self,x(c.React={}))})(this,function(c){function x(a){if(null===a||"object"!==typeof a)return null;a=X&&a[X]||a["@@iterator"];return"function"===typeof a?a:null}function w(a,b,m){this.props=a;this.context=b;this.refs=Y;this.updater=m||Z}function aa(){}function L(a,b,m){this.props=a;this.context=b;this.refs=Y;this.updater=m||Z}function ba(a, | ||
b,m){var d,c={},l=null,g=null;if(null!=b)for(d in void 0!==b.ref&&(g=b.ref),void 0!==b.key&&(l=""+b.key),b)ca.call(b,d)&&!da.hasOwnProperty(d)&&(c[d]=b[d]);var k=arguments.length-2;if(1===k)c.children=m;else if(1<k){for(var f=Array(k),e=0;e<k;e++)f[e]=arguments[e+2];c.children=f}if(a&&a.defaultProps)for(d in k=a.defaultProps,k)void 0===c[d]&&(c[d]=k[d]);return{$$typeof:y,type:a,key:l,ref:g,props:c,_owner:M.current}}function qa(a,b){return{$$typeof:y,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}} | ||
function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===y}function ra(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?ra(""+a.key):b.toString(36)}function B(a,b,m,d,c){var l=typeof a;if("undefined"===l||"boolean"===l)a=null;var g=!1;if(null===a)g=!0;else switch(l){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case y:case sa:g=!0}}if(g)return g=a,c=c(g),a=""===d?"."+ | ||
O(g,0):d,ea(c)?(m="",null!=a&&(m=a.replace(fa,"$&/")+"/"),B(c,b,m,"",function(a){return a})):null!=c&&(N(c)&&(c=qa(c,m+(!c.key||g&&g.key===c.key?"":(""+c.key).replace(fa,"$&/")+"/")+a)),b.push(c)),1;g=0;d=""===d?".":d+":";if(ea(a))for(var k=0;k<a.length;k++){l=a[k];var f=d+O(l,k);g+=B(l,b,m,f,c)}else if(f=x(a),"function"===typeof f)for(a=f.call(a),k=0;!(l=a.next()).done;)l=l.value,f=d+O(l,k++),g+=B(l,b,m,f,c);else if("object"===l)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 C(a,b,m){if(null==a)return a;var c=[],e=0;B(a,c,"","",function(a){return b.call(m,a,e++)});return c}function ta(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status= | ||
0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function P(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<D(e,b))a[d]=b,a[c]=e,c=d;else break a}}function p(a){return 0===a.length?null:a[0]}function E(a){if(0===a.length)return null;var b=a[0],c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length,l=e>>>1;d<l;){var g=2*(d+1)-1,k=a[g],f=g+1,h=a[f];if(0>D(k,c))f<e&&0>D(h,k)?(a[d]=h,a[f]=c,d=f):(a[d]=k,a[g]=c,d=g);else if(f<e&&0>D(h,c))a[d]=h,a[f]=c,d=f;else break a}}return b} | ||
function D(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function Q(a){for(var b=p(r);null!==b;){if(null===b.callback)E(r);else if(b.startTime<=a)E(r),b.sortIndex=b.expirationTime,P(q,b);else break;b=p(r)}}function R(a){z=!1;Q(a);if(!u)if(null!==p(q))u=!0,S(T);else{var b=p(r);null!==b&&U(R,b.startTime-a)}}function T(a,b){u=!1;z&&(z=!1,ha(A),A=-1);F=!0;var c=h;try{Q(b);for(n=p(q);null!==n&&(!(n.expirationTime>b)||a&&!ia());){var d=n.callback;if("function"===typeof d){n.callback=null; | ||
h=n.priorityLevel;var e=d(n.expirationTime<=b);b=v();"function"===typeof e?n.callback=e:n===p(q)&&E(q);Q(b)}else E(q);n=p(q)}if(null!==n)var l=!0;else{var g=p(r);null!==g&&U(R,g.startTime-b);l=!1}return l}finally{n=null,h=c,F=!1}}function ia(){return v()-ja<ka?!1:!0}function S(a){G=a;H||(H=!0,I())}function U(a,b){A=la(function(){a(v())},b)}var y=Symbol.for("react.element"),sa=Symbol.for("react.portal"),ua=Symbol.for("react.fragment"),va=Symbol.for("react.strict_mode"),wa=Symbol.for("react.profiler"), | ||
ma=Symbol.for("react.provider"),xa=Symbol.for("react.context"),ya=Symbol.for("react.server_context"),za=Symbol.for("react.forward_ref"),Aa=Symbol.for("react.suspense"),Ba=Symbol.for("react.suspense_list"),Ca=Symbol.for("react.memo"),Da=Symbol.for("react.lazy"),Ea=Symbol.for("react.debug_trace_mode"),Fa=Symbol.for("react.offscreen"),Ga=Symbol.for("react.cache"),V=Symbol.for("react.default_value"),X=Symbol.iterator,Z={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a, | ||
b,c,d){},enqueueSetState:function(a,b,c,d){}},na=Object.assign,Y={};w.prototype.isReactComponent={};w.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")};w.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};aa.prototype=w.prototype;var t=L.prototype= | ||
new aa;t.constructor=L;na(t,w.prototype);t.isPureReactComponent=!0;var ea=Array.isArray,ca=Object.prototype.hasOwnProperty,M={current:null},da={key:!0,ref:!0,__self:!0,__source:!0},fa=/\/+/g,e={current:null},J={transition:null},K={};if("object"===typeof performance&&"function"===typeof performance.now){var Ha=performance;var v=function(){return Ha.now()}}else{var oa=Date,Ia=oa.now();v=function(){return oa.now()-Ia}}var q=[],r=[],Ja=1,n=null,h=3,F=!1,u=!1,z=!1,la="function"===typeof setTimeout?setTimeout: | ||
null,ha="function"===typeof clearTimeout?clearTimeout:null,pa="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var H=!1,G=null,A=-1,ka=5,ja=-1,W=function(){if(null!==G){var a=v();ja=a;var b=!0;try{b=G(!0,a)}finally{b?I():(H=!1,G=null)}}else H=!1};if("function"===typeof pa)var I=function(){pa(W)};else if("undefined"!==typeof MessageChannel){t= | ||
new MessageChannel;var Ka=t.port2;t.port1.onmessage=W;I=function(){Ka.postMessage(null)}}else I=function(){la(W,0)};t={ReactCurrentDispatcher:e,ReactCurrentOwner:M,ReactCurrentBatchConfig:J,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=h;h=a;try{return b()}finally{h=c}},unstable_next:function(a){switch(h){case 1:case 2:case 3:var b= | ||
3;break;default:b=h}var c=h;h=b;try{return a()}finally{h=c}},unstable_scheduleCallback:function(a,b,c){var d=v();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:Ja++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,P(r,a),null===p(q)&&a===p(r)&&(z?(ha(A),A=-1):z=!0,U(R,c-d))):(a.sortIndex=e,P(q,a),u||F||(u= | ||
!0,S(T)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=h;return function(){var c=h;h=b;try{return a.apply(this,arguments)}finally{h=c}}},unstable_getCurrentPriorityLevel:function(){return h},unstable_shouldYield:ia,unstable_requestPaint:function(){},unstable_continueExecution:function(){u||F||(u=!0,S(T))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)},get unstable_now(){return v},unstable_forceFrameRate:function(a){0> | ||
a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ka=0<a?Math.floor(1E3/a):5},unstable_Profiling:null},ContextRegistry:K};c.Children={map:C,forEach:function(a,b,c){C(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;C(a,function(){b++});return b},toArray:function(a){return C(a,function(a){return a})||[]},only:function(a){if(!N(a))throw Error("React.Children.only expected to receive a single React element child."); | ||
return a}};c.Component=w;c.Fragment=ua;c.Profiler=wa;c.PureComponent=L;c.StrictMode=va;c.Suspense=Aa;c.SuspenseList=Ba;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t;c.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=na({},a.props),e=a.key,m=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(m=b.ref,g=M.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var k=a.type.defaultProps; | ||
for(f in b)ca.call(b,f)&&!da.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==k?k[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){k=Array(f);for(var h=0;h<f;h++)k[h]=arguments[h+2];d.children=k}return{$$typeof:y,type:a.type,key:e,ref:m,props:d,_owner:g}};c.createContext=function(a){a={$$typeof:xa,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:ma,_context:a};return a.Consumer=a};c.createElement= | ||
ba;c.createFactory=function(a){var b=ba.bind(null,a);b.type=a;return b};c.createRef=function(){return{current:null}};c.createServerContext=function(a,b){var c=!0;if(!K[a]){c=!1;var d={$$typeof:ya,_currentValue:b,_currentValue2:b,_defaultValue:b,_threadCount:0,Provider:null,Consumer:null,_globalName:a};d.Provider={$$typeof:ma,_context:d};K[a]=d}d=K[a];if(d._defaultValue===V)d._defaultValue=b,d._currentValue===V&&(d._currentValue=b),d._currentValue2===V&&(d._currentValue2=b);else if(c)throw Error("ServerContext: "+ | ||
a+" already defined");return d};c.forwardRef=function(a){return{$$typeof:za,render:a}};c.isValidElement=N;c.lazy=function(a){return{$$typeof:Da,_payload:{_status:-1,_result:a},_init:ta}};c.memo=function(a,b){return{$$typeof:Ca,type:a,compare:void 0===b?null:b}};c.startTransition=function(a,b){b=J.transition;J.transition={};try{a()}finally{J.transition=b}};c.unstable_Cache=Ga;c.unstable_DebugTracingMode=Ea;c.unstable_Offscreen=Fa;c.unstable_act=function(a){throw Error("act(...) is not supported in production builds of React."); | ||
};c.unstable_getCacheForType=function(a){return e.current.getCacheForType(a)};c.unstable_getCacheSignal=function(){return e.current.getCacheSignal()};c.unstable_useCacheRefresh=function(){return e.current.useCacheRefresh()};c.useCallback=function(a,b){return e.current.useCallback(a,b)};c.useContext=function(a){return e.current.useContext(a)};c.useDebugValue=function(a,b){};c.useDeferredValue=function(a){return e.current.useDeferredValue(a)};c.useEffect=function(a,b){return e.current.useEffect(a,b)}; | ||
c.useId=function(){return e.current.useId()};c.useImperativeHandle=function(a,b,c){return e.current.useImperativeHandle(a,b,c)};c.useInsertionEffect=function(a,b){return e.current.useInsertionEffect(a,b)};c.useLayoutEffect=function(a,b){return e.current.useLayoutEffect(a,b)};c.useMemo=function(a,b){return e.current.useMemo(a,b)};c.useReducer=function(a,b,c){return e.current.useReducer(a,b,c)};c.useRef=function(a){return e.current.useRef(a)};c.useState=function(a){return e.current.useState(a)};c.useSyncExternalStore= | ||
function(a,b,c){return e.current.useSyncExternalStore(a,b,c)};c.useTransition=function(){return e.current.useTransition()};c.version="18.1.0-experimental-057915477-20220407"}); | ||
})(); | ||
'use strict';(function(){(function(f,A){"object"===typeof exports&&"undefined"!==typeof module?A(exports):"function"===typeof define&&define.amd?define(["exports"],A):(f="undefined"!==typeof globalThis?globalThis:f||self,A(f.React={}))})(this,function(f){function A(a){if(null===a||"object"!==typeof a)return null;a=X&&a[X]||a["@@iterator"];return"function"===typeof a?a:null}function x(a,b,c){this.props=a;this.context=b;this.refs=Y;this.updater=c||Z}function aa(){}function M(a,b,c){this.props=a;this.context= | ||
b;this.refs=Y;this.updater=c||Z}function N(a,b,c,d,e,h,g){c=g.ref;return{$$typeof:O,type:a,key:b,ref:void 0!==c?c:null,props:g,_owner:h}}function ba(a,b,c){var d,e={},h=null;if(null!=b)for(d in void 0!==b.key&&(h=""+b.key),b)ca.call(b,d)&&"key"!==d&&"__self"!==d&&"__source"!==d&&(e[d]=b[d]);var g=arguments.length-2;if(1===g)e.children=c;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(d in g=a.defaultProps,g)void 0===e[d]&&(e[d]=g[d]);return N(a, | ||
h,null,void 0,void 0,da.current,e)}function ua(a,b){return N(a.type,b,null,void 0,void 0,a._owner,a.props)}function P(a){return"object"===typeof a&&null!==a&&a.$$typeof===O}function va(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?va(""+a.key):b.toString(36)}function ea(){}function wa(a){switch(a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;default:switch("string"===typeof a.status? | ||
a.then(ea,ea):(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)})),a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;}}throw a;}function y(a,b,c,d,e){var h=typeof a;if("undefined"===h||"boolean"===h)a=null;var g=!1;if(null===a)g=!0;else switch(h){case "bigint":case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case O:case xa:g=!0;break;case fa:return g= | ||
a._init,y(g(a._payload),b,c,d,e)}}if(g)return e=e(a),g=""===d?"."+Q(a,0):d,ha(e)?(c="",null!=g&&(c=g.replace(ia,"$&/")+"/"),y(e,b,c,"",function(z){return z})):null!=e&&(P(e)&&(e=ua(e,c+(!e.key||a&&a.key===e.key?"":(""+e.key).replace(ia,"$&/")+"/")+g)),b.push(e)),1;g=0;var k=""===d?".":d+":";if(ha(a))for(var l=0;l<a.length;l++)d=a[l],h=k+Q(d,l),g+=y(d,b,c,h,e);else if(l=A(a),"function"===typeof l)for(a=l.call(a),l=0;!(d=a.next()).done;)d=d.value,h=k+Q(d,l++),g+=y(d,b,c,h,e);else if("object"===h){if("function"=== | ||
typeof a.then)return y(wa(a),b,c,d,e);b=String(a);throw 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 E(a,b,c){if(null==a)return a;var d=[],e=0;y(a,d,"","",function(h){return b.call(c,h,e++)});return d}function ya(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;}function za(){return new WeakMap}function R(){return{s:0,v:void 0,o:null,p:null}}function ja(a,b){return m.current.useOptimistic(a,b)}function S(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<F(e,b))a[d]=b,a[c]=e,c=d;else break a}}function q(a){return 0===a.length?null:a[0]}function G(a){if(0=== | ||
a.length)return null;var b=a[0],c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length,h=e>>>1;d<h;){var g=2*(d+1)-1,k=a[g],l=g+1,z=a[l];if(0>F(k,c))l<e&&0>F(z,k)?(a[d]=z,a[l]=c,d=l):(a[d]=k,a[g]=c,d=g);else if(l<e&&0>F(z,c))a[d]=z,a[l]=c,d=l;else break a}}return b}function F(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function H(a){for(var b=q(t);null!==b;){if(null===b.callback)G(t);else if(b.startTime<=a)G(t),b.sortIndex=b.expirationTime,S(r,b);else break;b=q(t)}}function T(a){B=!1; | ||
H(a);if(!v)if(null!==q(r))v=!0,U();else{var b=q(t);null!==b&&V(T,b.startTime-a)}}function ka(){return w()-la<ma?!1:!0}function U(){I||(I=!0,J())}function V(a,b){C=na(function(){a(w())},b)}function Aa(){}var O=Symbol.for("react.element"),xa=Symbol.for("react.portal"),Ba=Symbol.for("react.fragment"),Ca=Symbol.for("react.strict_mode"),Da=Symbol.for("react.profiler"),Ea=Symbol.for("react.consumer"),Fa=Symbol.for("react.context"),Ga=Symbol.for("react.forward_ref"),Ha=Symbol.for("react.suspense"),Ia=Symbol.for("react.suspense_list"), | ||
Ja=Symbol.for("react.memo"),fa=Symbol.for("react.lazy"),Ka=Symbol.for("react.debug_trace_mode"),La=Symbol.for("react.offscreen"),Ma=Symbol.for("react.cache"),Na=Symbol.for("react.postpone"),X=Symbol.iterator,Z={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}},oa=Object.assign,Y={};x.prototype.isReactComponent={};x.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("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")};x.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};aa.prototype=x.prototype;var u=M.prototype=new aa;u.constructor=M;oa(u,x.prototype);u.isPureReactComponent=!0;var ha=Array.isArray,m={current:null},K={current:null},D={transition:null};u={current:null};var ca=Object.prototype.hasOwnProperty,da=u,ia=/\/+/g;if("object"===typeof performance&&"function"===typeof performance.now){var Oa=performance;var w=function(){return Oa.now()}}else{var pa= | ||
Date,Pa=pa.now();w=function(){return pa.now()-Pa}}var r=[],t=[],Qa=1,p=null,n=3,L=!1,v=!1,B=!1,na="function"===typeof setTimeout?setTimeout:null,qa="function"===typeof clearTimeout?clearTimeout:null,ra="undefined"!==typeof setImmediate?setImmediate:null,I=!1,C=-1,ma=5,la=-1,W=function(){if(I){var a=w();la=a;var b=!0;try{a:{v=!1;B&&(B=!1,qa(C),C=-1);L=!0;var c=n;try{b:{H(a);for(p=q(r);null!==p&&!(p.expirationTime>a&&ka());){var d=p.callback;if("function"===typeof d){p.callback=null;n=p.priorityLevel; | ||
var e=d(p.expirationTime<=a);a=w();if("function"===typeof e){p.callback=e;H(a);b=!0;break b}p===q(r)&&G(r);H(a)}else G(r);p=q(r)}if(null!==p)b=!0;else{var h=q(t);null!==h&&V(T,h.startTime-a);b=!1}}break a}finally{p=null,n=c,L=!1}b=void 0}}finally{b?J():I=!1}}};if("function"===typeof ra)var J=function(){ra(W)};else if("undefined"!==typeof MessageChannel){var sa=new MessageChannel,Ra=sa.port2;sa.port1.onmessage=W;J=function(){Ra.postMessage(null)}}else J=function(){na(W,0)};u={ReactCurrentDispatcher:m, | ||
ReactCurrentCache:K,ReactCurrentOwner:u,ReactCurrentBatchConfig:D,Scheduler:{__proto__:null,unstable_IdlePriority:5,unstable_ImmediatePriority:1,unstable_LowPriority:4,unstable_NormalPriority:3,unstable_Profiling:null,unstable_UserBlockingPriority:2,unstable_cancelCallback:function(a){a.callback=null},unstable_continueExecution:function(){v||L||(v=!0,U())},unstable_forceFrameRate:function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"): | ||
ma=0<a?Math.floor(1E3/a):5},unstable_getCurrentPriorityLevel:function(){return n},unstable_getFirstCallbackNode:function(){return q(r)},unstable_next:function(a){switch(n){case 1:case 2:case 3:var b=3;break;default:b=n}var c=n;n=b;try{return a()}finally{n=c}},get unstable_now(){return w},unstable_pauseExecution:function(){},unstable_requestPaint:function(){},unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=n;n=a;try{return b()}finally{n=c}}, | ||
unstable_scheduleCallback:function(a,b,c){var d=w();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:Qa++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,S(t,a),null===q(r)&&a===q(t)&&(B?(qa(C),C=-1):B=!0,V(T,c-d))):(a.sortIndex=e,S(r,a),v||L||(v=!0,U()));return a},unstable_shouldYield:ka,unstable_wrapCallback:function(a){var b= | ||
n;return function(){var c=n;n=b;try{return a.apply(this,arguments)}finally{n=c}}}}};var ta="function"===typeof reportError?reportError:function(a){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var b=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof a&&null!==a&&"string"===typeof a.message?String(a.message):String(a),error:a});if(!window.dispatchEvent(b))return}else if("object"===typeof process&&"function"===typeof process.emit){process.emit("uncaughtException", | ||
a);return}console.error(a)};f.Children={map:E,forEach:function(a,b,c){E(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;E(a,function(){b++});return b},toArray:function(a){return E(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}};f.Component=x;f.Fragment=Ba;f.Profiler=Da;f.PureComponent=M;f.StrictMode=Ca;f.Suspense=Ha;f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=u;f.act= | ||
function(a){throw Error("act(...) is not supported in production builds of React.");};f.cache=function(a){return function(){var b=K.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(za);b=c.get(a);void 0===b&&(b=R(),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 h=b.o;null===h&&(b.o=h=new WeakMap);b=h.get(e);void 0===b&&(b=R(),h.set(e,b))}else h=b.p,null===h&&(b.p=h=new Map),b=h.get(e),void 0=== | ||
b&&(b=R(),h.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(k){throw g=b,g.s=2,g.v=k,k;}}};f.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("The argument must be a React element, but you passed "+a+".");var d=oa({},a.props),e=a.key,h=a._owner;if(null!=b){void 0!==b.ref&&(h=da.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(k in b)!ca.call(b,k)||"key"===k||"__self"=== | ||
k||"__source"===k||"ref"===k&&void 0===b.ref||(d[k]=void 0===b[k]&&void 0!==g?g[k]:b[k])}var k=arguments.length-2;if(1===k)d.children=c;else if(1<k){g=Array(k);for(var l=0;l<k;l++)g[l]=arguments[l+2];d.children=g}return N(a.type,e,null,void 0,void 0,h,d)};f.createContext=function(a){a={$$typeof:Fa,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider=a;a.Consumer={$$typeof:Ea,_context:a};return a};f.createElement=ba;f.createFactory=function(a){var b=ba.bind(null, | ||
a);b.type=a;return b};f.createRef=function(){return{current:null}};f.experimental_useEffectEvent=function(a){return m.current.useEffectEvent(a)};f.experimental_useOptimistic=function(a,b){return ja(a,b)};f.forwardRef=function(a){return{$$typeof:Ga,render:a}};f.isValidElement=P;f.lazy=function(a){return{$$typeof:fa,_payload:{_status:-1,_result:a},_init:ya}};f.memo=function(a,b){return{$$typeof:Ja,type:a,compare:void 0===b?null:b}};f.startTransition=function(a,b){b=D.transition;var c=new Set;D.transition= | ||
{_callbacks:c};var d=D.transition;try{var e=a();"object"===typeof e&&null!==e&&"function"===typeof e.then&&(c.forEach(function(h){return h(d,e)}),e.then(Aa,ta))}catch(h){ta(h)}finally{D.transition=b}};f.unstable_Activity=La;f.unstable_Cache=Ma;f.unstable_DebugTracingMode=Ka;f.unstable_SuspenseList=Ia;f.unstable_getCacheForType=function(a){var b=K.current;return b?b.getCacheForType(a):a()};f.unstable_getCacheSignal=function(){var a=K.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)};f.unstable_postpone=function(a){a=Error(a);a.$$typeof=Na;throw a;};f.unstable_useCacheRefresh=function(){return m.current.useCacheRefresh()};f.unstable_useMemoCache=function(a){return m.current.useMemoCache(a)};f.use=function(a){return m.current.use(a)};f.useActionState=function(a,b,c){return m.current.useActionState(a,b,c)};f.useCallback=function(a,b){return m.current.useCallback(a,b)};f.useContext=function(a){return m.current.useContext(a)};f.useDebugValue=function(a,b){};f.useDeferredValue= | ||
function(a,b){return m.current.useDeferredValue(a,b)};f.useEffect=function(a,b){return m.current.useEffect(a,b)};f.useId=function(){return m.current.useId()};f.useImperativeHandle=function(a,b,c){return m.current.useImperativeHandle(a,b,c)};f.useInsertionEffect=function(a,b){return m.current.useInsertionEffect(a,b)};f.useLayoutEffect=function(a,b){return m.current.useLayoutEffect(a,b)};f.useMemo=function(a,b){return m.current.useMemo(a,b)};f.useOptimistic=ja;f.useReducer=function(a,b,c){return m.current.useReducer(a, | ||
b,c)};f.useRef=function(a){return m.current.useRef(a)};f.useState=function(a){return m.current.useState(a)};f.useSyncExternalStore=function(a,b,c){return m.current.useSyncExternalStore(a,b,c)};f.useTransition=function(){return m.current.useTransition()};f.version="19.0.0-experimental-05797cceb-20240328"})})(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
647446
0
37
13886
4
8
6
- Removedloose-envify@^1.1.0
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)