Comparing version 18.3.0-canary-31603f19d-20240109 to 18.3.0-canary-338dddc08-20240307
@@ -28,3 +28,5 @@ /** | ||
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'); | ||
@@ -100,2 +102,3 @@ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | ||
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber | ||
var enableRenderableContext = false; | ||
// stuff. Intended to enable React core members to more easily debug scheduling | ||
@@ -106,26 +109,2 @@ // issues in DEV builds. | ||
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 || enableCacheElement || enableTransitionTracing ) { | ||
return true; | ||
} | ||
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_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
function getWrappedName(outerType, innerType, wrapperName) { | ||
@@ -145,4 +124,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 +135,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 +176,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: | ||
{ | ||
var provider = type; | ||
return getContextName(provider._context) + '.Provider'; | ||
} | ||
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) + '.Consumer'; | ||
} | ||
case REACT_CONSUMER_TYPE: | ||
{ | ||
return null; | ||
} | ||
case REACT_FORWARD_REF_TYPE: | ||
@@ -231,3 +226,2 @@ return getWrappedName(type, type.render, 'ForwardRef'); | ||
} | ||
} | ||
@@ -239,4 +233,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 || enableCacheElement || 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 || type.$$typeof === REACT_PROVIDER_TYPE || enableRenderableContext || 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 | ||
@@ -338,3 +433,3 @@ // replaying on render function. This currently only patches the object | ||
var prefix; | ||
function describeBuiltInComponentFrame(name, source, ownerFn) { | ||
function describeBuiltInComponentFrame(name, ownerFn) { | ||
{ | ||
@@ -603,3 +698,3 @@ if (prefix === undefined) { | ||
} | ||
function describeFunctionComponentFrame(fn, source, ownerFn) { | ||
function describeFunctionComponentFrame(fn, ownerFn) { | ||
{ | ||
@@ -615,3 +710,3 @@ return describeNativeComponentFrame(fn, false); | ||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { | ||
function describeUnknownElementTypeFrameInDEV(type, ownerFn) { | ||
@@ -647,3 +742,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); | ||
@@ -658,3 +753,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) {} | ||
@@ -668,150 +763,5 @@ } | ||
// $FlowFixMe[method-unbinding] | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
var loggedTypeFailures = {}; | ||
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); | ||
} | ||
} | ||
} | ||
function checkPropTypes(typeSpecs, values, location, componentName, element) { | ||
{ | ||
// $FlowFixMe[incompatible-use] 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$1(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$1(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$1(element); | ||
error('Failed %s type: %s', location, error$1.message); | ||
setCurrentlyValidatingElement$1(null); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare | ||
function isArray(a) { | ||
return isArrayImpl(a); | ||
} | ||
/* | ||
* 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 ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; | ||
var RESERVED_PROPS = { | ||
key: true, | ||
ref: true, | ||
__self: true, | ||
__source: true | ||
}; | ||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | ||
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); | ||
var specialPropKeyWarningShown; | ||
@@ -855,7 +805,7 @@ var specialPropRefWarningShown; | ||
{ | ||
if (typeof config.ref === 'string' && ReactCurrentOwner$1.current && self && ReactCurrentOwner$1.current.stateNode !== self) { | ||
var componentName = getComponentNameFromType(ReactCurrentOwner$1.current.type); | ||
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$1.current.type), config.ref); | ||
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://react.dev/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); | ||
@@ -874,3 +824,3 @@ didWarnAboutStringRefs[componentName] = true; | ||
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); | ||
} | ||
@@ -889,15 +839,17 @@ }; | ||
{ | ||
var warnAboutAccessingRef = function () { | ||
if (!specialPropRefWarningShown) { | ||
specialPropRefWarningShown = true; | ||
{ | ||
var warnAboutAccessingRef = function () { | ||
if (!specialPropRefWarningShown) { | ||
specialPropRefWarningShown = true; | ||
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); | ||
} | ||
}; | ||
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://react.dev/link/special-props)', displayName); | ||
} | ||
}; | ||
warnAboutAccessingRef.isReactWarning = true; | ||
Object.defineProperty(props, 'ref', { | ||
get: warnAboutAccessingRef, | ||
configurable: true | ||
}); | ||
warnAboutAccessingRef.isReactWarning = true; | ||
Object.defineProperty(props, 'ref', { | ||
get: warnAboutAccessingRef, | ||
configurable: true | ||
}); | ||
} | ||
} | ||
@@ -927,16 +879,28 @@ } | ||
function ReactElement(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; | ||
{ | ||
ref = _ref; | ||
} | ||
var element; | ||
{ | ||
// In prod, `ref` is a regular property. It will be removed 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, | ||
ref: ref, | ||
props: props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
} | ||
{ | ||
// The validation flag is currently mutative. We put it on | ||
@@ -956,17 +920,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 | ||
}); | ||
@@ -982,2 +938,3 @@ | ||
} | ||
var didWarnAboutKeySpread = {}; | ||
/** | ||
@@ -990,4 +947,74 @@ * https://github.com/reactjs/rfcs/pull/107 | ||
function jsxDEV$1(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 | ||
@@ -1021,4 +1048,9 @@ | ||
if (hasValidRef(config)) { | ||
ref = config.ref; | ||
warnIfStringRefCannotBeAutoConverted(config, self); | ||
{ | ||
ref = config.ref; | ||
} | ||
{ | ||
warnIfStringRefCannotBeAutoConverted(config, self); | ||
} | ||
} // Remaining properties are added to a new props object | ||
@@ -1028,3 +1060,4 @@ | ||
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' && (propName !== 'ref')) { | ||
props[propName] = config[propName]; | ||
@@ -1057,39 +1090,9 @@ } | ||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner$1.current, props); | ||
} | ||
} | ||
var element = ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | ||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | ||
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); | ||
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); | ||
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; | ||
} | ||
@@ -1111,83 +1114,3 @@ } | ||
} | ||
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.current) { | ||
// Give the component that originally created this child. | ||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; | ||
} | ||
setCurrentlyValidatingElement(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(null); | ||
} | ||
} | ||
/** | ||
* Ensure that every element either is passed in a static location, in an | ||
@@ -1243,48 +1166,83 @@ * array with an explicit keys property defined, or in an object literal | ||
/** | ||
* 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; | ||
} | ||
if (type.$$typeof === REACT_CLIENT_REFERENCE) { | ||
element._store.validated = true; | ||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); | ||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { | ||
return; | ||
} | ||
var propTypes; | ||
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. | ||
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; | ||
var childOwner = ''; | ||
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) + "."; | ||
} | ||
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 { | ||
return; | ||
ReactDebugCurrentFrame.setExtraStackFrame(null); | ||
} | ||
} | ||
} | ||
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: | ||
function getCurrentComponentErrorInfo(parentType) { | ||
{ | ||
var info = getDeclarationErrorAddendum(); | ||
var _name = getComponentNameFromType(type); | ||
if (!info) { | ||
var parentName = getComponentNameFromType(parentType); | ||
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); | ||
if (parentName) { | ||
info = "\n\nCheck the top-level render call using <" + parentName + ">."; | ||
} | ||
} | ||
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.'); | ||
} | ||
return info; | ||
} | ||
@@ -1299,2 +1257,3 @@ } | ||
function validateFragmentProps(fragment) { | ||
// TODO: Move this to render phase instead of at element creation. | ||
{ | ||
@@ -1326,101 +1285,4 @@ var keys = Object.keys(fragment.props); | ||
var didWarnAboutKeySpread = {}; | ||
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$1(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 (hasOwnProperty.call(props, 'key')) { | ||
var componentName = getComponentNameFromType(type); | ||
var keys = Object.keys(props).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; | ||
} | ||
} | ||
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 = jsxWithValidation ; | ||
exports.Fragment = REACT_FRAGMENT_TYPE; | ||
@@ -1427,0 +1289,0 @@ exports.jsxDEV = jsxDEV; |
@@ -28,3 +28,5 @@ /** | ||
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'); | ||
@@ -100,2 +102,3 @@ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | ||
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber | ||
var enableRenderableContext = false; | ||
// stuff. Intended to enable React core members to more easily debug scheduling | ||
@@ -106,26 +109,2 @@ // issues in DEV builds. | ||
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 || enableCacheElement || enableTransitionTracing ) { | ||
return true; | ||
} | ||
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_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
function getWrappedName(outerType, innerType, wrapperName) { | ||
@@ -145,4 +124,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 +135,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 +176,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: | ||
{ | ||
var provider = type; | ||
return getContextName(provider._context) + '.Provider'; | ||
} | ||
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) + '.Consumer'; | ||
} | ||
case REACT_CONSUMER_TYPE: | ||
{ | ||
return null; | ||
} | ||
case REACT_FORWARD_REF_TYPE: | ||
@@ -231,3 +226,2 @@ return getWrappedName(type, type.render, 'ForwardRef'); | ||
} | ||
} | ||
@@ -239,4 +233,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 || enableCacheElement || 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 || type.$$typeof === REACT_PROVIDER_TYPE || enableRenderableContext || 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 | ||
@@ -338,3 +433,3 @@ // replaying on render function. This currently only patches the object | ||
var prefix; | ||
function describeBuiltInComponentFrame(name, source, ownerFn) { | ||
function describeBuiltInComponentFrame(name, ownerFn) { | ||
{ | ||
@@ -603,3 +698,3 @@ if (prefix === undefined) { | ||
} | ||
function describeFunctionComponentFrame(fn, source, ownerFn) { | ||
function describeFunctionComponentFrame(fn, ownerFn) { | ||
{ | ||
@@ -615,3 +710,3 @@ return describeNativeComponentFrame(fn, false); | ||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { | ||
function describeUnknownElementTypeFrameInDEV(type, ownerFn) { | ||
@@ -647,3 +742,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); | ||
@@ -658,3 +753,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) {} | ||
@@ -668,150 +763,5 @@ } | ||
// $FlowFixMe[method-unbinding] | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
var loggedTypeFailures = {}; | ||
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); | ||
} | ||
} | ||
} | ||
function checkPropTypes(typeSpecs, values, location, componentName, element) { | ||
{ | ||
// $FlowFixMe[incompatible-use] 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$1(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$1(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$1(element); | ||
error('Failed %s type: %s', location, error$1.message); | ||
setCurrentlyValidatingElement$1(null); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare | ||
function isArray(a) { | ||
return isArrayImpl(a); | ||
} | ||
/* | ||
* 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 ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; | ||
var RESERVED_PROPS = { | ||
key: true, | ||
ref: true, | ||
__self: true, | ||
__source: true | ||
}; | ||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | ||
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); | ||
var specialPropKeyWarningShown; | ||
@@ -855,7 +805,7 @@ var specialPropRefWarningShown; | ||
{ | ||
if (typeof config.ref === 'string' && ReactCurrentOwner$1.current && self && ReactCurrentOwner$1.current.stateNode !== self) { | ||
var componentName = getComponentNameFromType(ReactCurrentOwner$1.current.type); | ||
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$1.current.type), config.ref); | ||
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://react.dev/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); | ||
@@ -874,3 +824,3 @@ didWarnAboutStringRefs[componentName] = true; | ||
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); | ||
} | ||
@@ -889,15 +839,17 @@ }; | ||
{ | ||
var warnAboutAccessingRef = function () { | ||
if (!specialPropRefWarningShown) { | ||
specialPropRefWarningShown = true; | ||
{ | ||
var warnAboutAccessingRef = function () { | ||
if (!specialPropRefWarningShown) { | ||
specialPropRefWarningShown = true; | ||
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); | ||
} | ||
}; | ||
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://react.dev/link/special-props)', displayName); | ||
} | ||
}; | ||
warnAboutAccessingRef.isReactWarning = true; | ||
Object.defineProperty(props, 'ref', { | ||
get: warnAboutAccessingRef, | ||
configurable: true | ||
}); | ||
warnAboutAccessingRef.isReactWarning = true; | ||
Object.defineProperty(props, 'ref', { | ||
get: warnAboutAccessingRef, | ||
configurable: true | ||
}); | ||
} | ||
} | ||
@@ -927,16 +879,28 @@ } | ||
function ReactElement(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; | ||
{ | ||
ref = _ref; | ||
} | ||
var element; | ||
{ | ||
// In prod, `ref` is a regular property. It will be removed 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, | ||
ref: ref, | ||
props: props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
} | ||
{ | ||
// The validation flag is currently mutative. We put it on | ||
@@ -956,17 +920,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 | ||
}); | ||
@@ -982,2 +938,27 @@ | ||
} | ||
// 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 = {}; | ||
/** | ||
@@ -990,4 +971,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 | ||
@@ -1021,4 +1072,9 @@ | ||
if (hasValidRef(config)) { | ||
ref = config.ref; | ||
warnIfStringRefCannotBeAutoConverted(config, self); | ||
{ | ||
ref = config.ref; | ||
} | ||
{ | ||
warnIfStringRefCannotBeAutoConverted(config, self); | ||
} | ||
} // Remaining properties are added to a new props object | ||
@@ -1028,3 +1084,4 @@ | ||
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' && (propName !== 'ref')) { | ||
props[propName] = config[propName]; | ||
@@ -1057,39 +1114,9 @@ } | ||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner$1.current, props); | ||
} | ||
} | ||
var element = ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | ||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | ||
var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'); | ||
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); | ||
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; | ||
} | ||
@@ -1111,83 +1138,3 @@ } | ||
} | ||
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.current) { | ||
// Give the component that originally created this child. | ||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; | ||
} | ||
setCurrentlyValidatingElement(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(null); | ||
} | ||
} | ||
/** | ||
* Ensure that every element either is passed in a static location, in an | ||
@@ -1243,48 +1190,83 @@ * array with an explicit keys property defined, or in an object literal | ||
/** | ||
* 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; | ||
} | ||
if (type.$$typeof === REACT_CLIENT_REFERENCE) { | ||
element._store.validated = true; | ||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); | ||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { | ||
return; | ||
} | ||
var propTypes; | ||
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. | ||
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; | ||
var childOwner = ''; | ||
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) + "."; | ||
} | ||
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 { | ||
return; | ||
ReactDebugCurrentFrame.setExtraStackFrame(null); | ||
} | ||
} | ||
} | ||
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: | ||
function getCurrentComponentErrorInfo(parentType) { | ||
{ | ||
var info = getDeclarationErrorAddendum(); | ||
var _name = getComponentNameFromType(type); | ||
if (!info) { | ||
var parentName = getComponentNameFromType(parentType); | ||
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); | ||
if (parentName) { | ||
info = "\n\nCheck the top-level render call using <" + parentName + ">."; | ||
} | ||
} | ||
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.'); | ||
} | ||
return info; | ||
} | ||
@@ -1299,2 +1281,3 @@ } | ||
function validateFragmentProps(fragment) { | ||
// TODO: Move this to render phase instead of at element creation. | ||
{ | ||
@@ -1326,117 +1309,6 @@ var keys = Object.keys(fragment.props); | ||
var didWarnAboutKeySpread = {}; | ||
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 (hasOwnProperty.call(props, 'key')) { | ||
var componentName = getComponentNameFromType(type); | ||
var keys = Object.keys(props).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; | ||
} | ||
} | ||
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 ; | ||
@@ -1443,0 +1315,0 @@ exports.Fragment = REACT_FRAGMENT_TYPE; |
@@ -28,8 +28,2 @@ /** | ||
const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
const RESERVED_PROPS = { | ||
key: true, | ||
ref: true, | ||
__self: true, | ||
__source: true | ||
}; | ||
@@ -67,15 +61,27 @@ function hasValidRef(config) { | ||
function ReactElement(type, key, ref, self, source, owner, props) { | ||
const 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, | ||
key, | ||
ref, | ||
props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
function ReactElement(type, key, _ref, self, source, owner, props) { | ||
let ref; | ||
{ | ||
ref = _ref; | ||
} | ||
let element; | ||
{ | ||
// In prod, `ref` is a regular property. It will be removed 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, | ||
key, | ||
ref, | ||
props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
} | ||
return element; | ||
@@ -91,3 +97,3 @@ } | ||
function jsx$1(type, config, maybeKey) { | ||
function jsxProd(type, config, maybeKey) { | ||
let propName; // Reserved names are extracted | ||
@@ -115,3 +121,5 @@ | ||
if (hasValidRef(config)) { | ||
ref = config.ref; | ||
{ | ||
ref = config.ref; | ||
} | ||
} // Remaining properties are added to a new props object | ||
@@ -121,3 +129,4 @@ | ||
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' && (propName !== 'ref')) { | ||
props[propName] = config[propName]; | ||
@@ -139,8 +148,8 @@ } | ||
return ReactElement(type, key, ref, undefined, undefined, ReactCurrentOwner.current, props); | ||
} | ||
} // While `jsxDEV` should never be called when running in production, we do | ||
const jsx = jsx$1; // we may want to special case jsxs internally to take advantage of static children. | ||
const jsx = jsxProd; // we may want to special case jsxs internally to take advantage of static children. | ||
// for now we can ship identical prod functions | ||
const jsxs = jsx$1; | ||
const jsxs = jsxProd; | ||
@@ -147,0 +156,0 @@ exports.Fragment = REACT_FRAGMENT_TYPE; |
@@ -10,5 +10,5 @@ /* | ||
*/ | ||
'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; | ||
'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; | ||
function p(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)&&"key"!==b&&"ref"!==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=p;exports.jsxs=p; | ||
//# sourceMappingURL=react-jsx-runtime.production.min.js.map |
@@ -28,8 +28,2 @@ /** | ||
const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
const RESERVED_PROPS = { | ||
key: true, | ||
ref: true, | ||
__self: true, | ||
__source: true | ||
}; | ||
@@ -67,15 +61,27 @@ function hasValidRef(config) { | ||
function ReactElement(type, key, ref, self, source, owner, props) { | ||
const 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, | ||
key, | ||
ref, | ||
props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
function ReactElement(type, key, _ref, self, source, owner, props) { | ||
let ref; | ||
{ | ||
ref = _ref; | ||
} | ||
let element; | ||
{ | ||
// In prod, `ref` is a regular property. It will be removed 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, | ||
key, | ||
ref, | ||
props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
} | ||
return element; | ||
@@ -91,3 +97,3 @@ } | ||
function jsx$1(type, config, maybeKey) { | ||
function jsxProd(type, config, maybeKey) { | ||
let propName; // Reserved names are extracted | ||
@@ -115,3 +121,5 @@ | ||
if (hasValidRef(config)) { | ||
ref = config.ref; | ||
{ | ||
ref = config.ref; | ||
} | ||
} // Remaining properties are added to a new props object | ||
@@ -121,3 +129,4 @@ | ||
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' && (propName !== 'ref')) { | ||
props[propName] = config[propName]; | ||
@@ -139,8 +148,8 @@ } | ||
return ReactElement(type, key, ref, undefined, undefined, ReactCurrentOwner.current, props); | ||
} | ||
} // While `jsxDEV` should never be called when running in production, we do | ||
const jsx = jsx$1; // we may want to special case jsxs internally to take advantage of static children. | ||
const jsx = jsxProd; // we may want to special case jsxs internally to take advantage of static children. | ||
// for now we can ship identical prod functions | ||
const jsxs = jsx$1; | ||
const jsxs = jsxProd; | ||
@@ -147,0 +156,0 @@ exports.Fragment = REACT_FRAGMENT_TYPE; |
@@ -10,5 +10,5 @@ /* | ||
*/ | ||
'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; | ||
'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; | ||
function p(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)&&"key"!==b&&"ref"!==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=p;exports.jsxs=p; | ||
//# sourceMappingURL=react-jsx-runtime.profiling.min.js.map |
@@ -13,3 +13,3 @@ /** | ||
var ReactVersion = '18.3.0-canary-31603f19d-20240109'; | ||
var ReactVersion = '18.3.0-canary-338dddc08-20240307'; | ||
@@ -25,3 +25,3 @@ // ATTENTION | ||
const REACT_PROFILER_TYPE = Symbol.for('react.profiler'); | ||
const REACT_PROVIDER_TYPE = Symbol.for('react.provider'); | ||
const REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext | ||
const REACT_CONTEXT_TYPE = Symbol.for('react.context'); | ||
@@ -162,3 +162,3 @@ const REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | ||
if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) { | ||
throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.'); | ||
throw new Error('takes an object of state variables to update or a ' + 'function which returns an object of state variables.'); | ||
} | ||
@@ -224,6 +224,38 @@ | ||
// $FlowFixMe[method-unbinding] | ||
const hasOwnProperty = Object.prototype.hasOwnProperty; | ||
// ----------------------------------------------------------------------------- | ||
// Ready for next major. | ||
// | ||
// Alias __NEXT_MAJOR__ to false for easier skimming. | ||
// ----------------------------------------------------------------------------- | ||
const __NEXT_MAJOR__ = false; // Not ready to break experimental yet. | ||
// 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. | ||
const enableRefAsProp = __NEXT_MAJOR__; | ||
/** | ||
* Keeps track of the current dispatcher. | ||
*/ | ||
const ReactCurrentDispatcher = { | ||
current: null | ||
}; | ||
/** | ||
* Keeps track of the current Cache dispatcher. | ||
*/ | ||
const ReactCurrentCache = { | ||
current: null | ||
}; | ||
/** | ||
* Keeps track of the current batch's configuration such as how long an update | ||
* should suspend for if it needs to. | ||
*/ | ||
const ReactCurrentBatchConfig = { | ||
transition: null | ||
}; | ||
/** | ||
* Keeps track of the current owner. | ||
@@ -234,3 +266,3 @@ * | ||
*/ | ||
const ReactCurrentOwner = { | ||
const ReactCurrentOwner$1 = { | ||
/** | ||
@@ -243,9 +275,14 @@ * @internal | ||
const RESERVED_PROPS = { | ||
key: true, | ||
ref: true, | ||
__self: true, | ||
__source: true | ||
const ReactSharedInternals = { | ||
ReactCurrentDispatcher, | ||
ReactCurrentCache, | ||
ReactCurrentBatchConfig, | ||
ReactCurrentOwner: ReactCurrentOwner$1 | ||
}; | ||
// $FlowFixMe[method-unbinding] | ||
const hasOwnProperty = Object.prototype.hasOwnProperty; | ||
const ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | ||
function hasValidRef(config) { | ||
@@ -282,15 +319,27 @@ | ||
function ReactElement(type, key, ref, self, source, owner, props) { | ||
const 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) { | ||
let ref; | ||
{ | ||
ref = _ref; | ||
} | ||
let element; | ||
{ | ||
// In prod, `ref` is a regular property. It will be removed 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, | ||
key, | ||
ref, | ||
props, | ||
// Record the component responsible for creating this element. | ||
_owner: owner | ||
}; | ||
} | ||
return element; | ||
@@ -303,3 +352,4 @@ } | ||
function createElement$1(type, config, children) { | ||
function createElement(type, config, children) { | ||
let propName; // Reserved names are extracted | ||
@@ -310,8 +360,8 @@ | ||
let ref = null; | ||
let self = null; | ||
let source = null; | ||
if (config != null) { | ||
if (hasValidRef(config)) { | ||
ref = config.ref; | ||
{ | ||
ref = config.ref; | ||
} | ||
} | ||
@@ -322,9 +372,12 @@ | ||
key = '' + config.key; | ||
} | ||
} // Remaining properties are added to a new props object | ||
self = config.__self === undefined ? null : config.__self; | ||
source = config.__source === undefined ? null : config.__source; // 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' && (propName !== 'ref') && // Even though we don't use these anymore in the runtime, we don't want | ||
// them to appear as props, so in createElement we filter them out. | ||
// We don't have to do this in the jsx() runtime because the jsx() | ||
// transform never passed these as props; it used separate arguments. | ||
propName !== '__self' && propName !== '__source') { | ||
props[propName] = config[propName]; | ||
@@ -362,3 +415,5 @@ } | ||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | ||
const element = ReactElement(type, key, ref, undefined, undefined, ReactCurrentOwner.current, props); | ||
return element; | ||
} | ||
@@ -370,4 +425,4 @@ /** | ||
function createFactory$1(type) { | ||
const factory = createElement$1.bind(null, type); // Expose the type on the factory and the prototype so that it can be | ||
function createFactory(type) { | ||
const factory = createElement.bind(null, type); // Expose the type on the factory and the prototype so that it can be | ||
// easily accessed on elements. E.g. `<Foo />.type === Foo`. | ||
@@ -379,7 +434,9 @@ // This should not be named `constructor` since this may not be the function | ||
factory.type = type; | ||
return factory; | ||
} | ||
function cloneAndReplaceKey(oldElement, newKey) { | ||
const newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); | ||
return newElement; | ||
return ReactElement(oldElement.type, newKey, // When enableRefAsProp is on, this argument is ignored. This check only | ||
// exists to avoid the `ref` access warning. | ||
oldElement.ref, undefined, undefined, oldElement._owner, oldElement.props); | ||
} | ||
@@ -391,5 +448,5 @@ /** | ||
function cloneElement$1(element, config, children) { | ||
function cloneElement(element, config, children) { | ||
if (element === null || element === undefined) { | ||
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); | ||
throw new Error("The argument must be a React element, but you passed " + element + "."); | ||
} | ||
@@ -402,10 +459,4 @@ | ||
let key = element.key; | ||
let ref = element.ref; // Self is preserved since the owner is preserved. | ||
let ref = element.ref; // Owner will be preserved, unless ref is overridden | ||
const self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a | ||
// transpiler, and the original source is probably a better indicator of the | ||
// true owner. | ||
const source = element._source; // Owner will be preserved, unless ref is overridden | ||
let owner = element._owner; | ||
@@ -415,4 +466,7 @@ | ||
if (hasValidRef(config)) { | ||
// Silently steal the ref from the parent. | ||
ref = config.ref; | ||
{ | ||
// Silently steal the ref from the parent. | ||
ref = config.ref; | ||
} | ||
owner = ReactCurrentOwner.current; | ||
@@ -434,3 +488,13 @@ } | ||
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' && (propName !== 'ref') && // ...and maybe these, too, though we currently rely on them for | ||
// warnings and debug information in dev. Need to decide if we're OK | ||
// with dropping them. In the jsx() runtime it's not an issue because | ||
// the data gets passed as separate arguments instead of props, but | ||
// it would be nice to stop relying on them entirely so we can drop | ||
// them from the internal Fiber field. | ||
propName !== '__self' && propName !== '__source' && // Undefined `ref` is ignored by cloneElement. We treat it the same as | ||
// if the property were missing. This is mostly for | ||
// backwards compatibility. | ||
!(enableRefAsProp )) { | ||
if (config[propName] === undefined && defaultProps !== undefined) { | ||
@@ -462,3 +526,5 @@ // Resolve default props | ||
return ReactElement(element.type, key, ref, self, source, owner, props); | ||
const clonedElement = ReactElement(element.type, key, ref, undefined, undefined, owner, props); | ||
return clonedElement; | ||
} | ||
@@ -473,2 +539,3 @@ /** | ||
function isValidElement(object) { | ||
@@ -524,2 +591,68 @@ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | ||
function noop$1() {} | ||
function resolveThenable(thenable) { | ||
switch (thenable.status) { | ||
case 'fulfilled': | ||
{ | ||
const fulfilledValue = thenable.value; | ||
return fulfilledValue; | ||
} | ||
case 'rejected': | ||
{ | ||
const rejectedError = thenable.reason; | ||
throw rejectedError; | ||
} | ||
default: | ||
{ | ||
if (typeof thenable.status === 'string') { | ||
// Only instrument the thenable if the status if not defined. If | ||
// it's defined, but an unknown value, assume it's been instrumented by | ||
// some custom userspace implementation. We treat it as "pending". | ||
// Attach a dummy listener, to ensure that any lazy initialization can | ||
// happen. Flight lazily parses JSON when the value is actually awaited. | ||
thenable.then(noop$1, noop$1); | ||
} else { | ||
// This is an uncached thenable that we haven't seen before. | ||
// TODO: Detect infinite ping loops caused by uncached promises. | ||
const pendingThenable = thenable; | ||
pendingThenable.status = 'pending'; | ||
pendingThenable.then(fulfilledValue => { | ||
if (thenable.status === 'pending') { | ||
const fulfilledThenable = thenable; | ||
fulfilledThenable.status = 'fulfilled'; | ||
fulfilledThenable.value = fulfilledValue; | ||
} | ||
}, error => { | ||
if (thenable.status === 'pending') { | ||
const rejectedThenable = thenable; | ||
rejectedThenable.status = 'rejected'; | ||
rejectedThenable.reason = error; | ||
} | ||
}); | ||
} // Check one more time in case the thenable resolved synchronously. | ||
switch (thenable.status) { | ||
case 'fulfilled': | ||
{ | ||
const fulfilledThenable = thenable; | ||
return fulfilledThenable.value; | ||
} | ||
case 'rejected': | ||
{ | ||
const rejectedThenable = thenable; | ||
const rejectedError = rejectedThenable.reason; | ||
throw rejectedError; | ||
} | ||
} | ||
} | ||
} | ||
throw thenable; | ||
} | ||
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { | ||
@@ -539,2 +672,9 @@ const type = typeof children; | ||
switch (type) { | ||
case 'bigint': | ||
{ | ||
break; | ||
} | ||
// fallthrough for enabled BigInt support | ||
case 'string': | ||
@@ -550,2 +690,8 @@ case 'number': | ||
invokeCallback = true; | ||
break; | ||
case REACT_LAZY_TYPE: | ||
const payload = children._payload; | ||
const init = children._init; | ||
return mapIntoArray(init(payload), array, escapedPrefix, nameSoFar, callback); | ||
} | ||
@@ -616,3 +762,7 @@ | ||
} else if (type === 'object') { | ||
// eslint-disable-next-line react-internal/safe-string-coercion | ||
if (typeof children.then === 'function') { | ||
return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback); | ||
} // eslint-disable-next-line react-internal/safe-string-coercion | ||
const childrenString = String(children); | ||
@@ -743,14 +893,14 @@ throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.'); | ||
Provider: null, | ||
Consumer: null, | ||
// Add these to use same hidden class in VM as ServerContext | ||
_defaultValue: null, | ||
_globalName: null | ||
Consumer: null | ||
}; | ||
context.Provider = { | ||
$$typeof: REACT_PROVIDER_TYPE, | ||
_context: context | ||
}; | ||
{ | ||
context.Consumer = context; | ||
context.Provider = { | ||
$$typeof: REACT_PROVIDER_TYPE, | ||
_context: context | ||
}; | ||
{ | ||
context.Consumer = context; | ||
} | ||
} | ||
@@ -845,9 +995,2 @@ | ||
/** | ||
* Keeps track of the current Cache dispatcher. | ||
*/ | ||
const ReactCurrentCache = { | ||
current: null | ||
}; | ||
const UNTERMINATED = 0; | ||
@@ -874,3 +1017,3 @@ const TERMINATED = 1; | ||
function cache(fn) { | ||
function cache$1(fn) { | ||
return function () { | ||
@@ -959,8 +1102,3 @@ const dispatcher = ReactCurrentCache.current; | ||
/** | ||
* Keeps track of the current dispatcher. | ||
*/ | ||
const ReactCurrentDispatcher = { | ||
current: null | ||
}; | ||
const cache = cache$1; | ||
@@ -1049,28 +1187,41 @@ function resolveDispatcher() { | ||
/** | ||
* Keeps track of the current batch's configuration such as how long an update | ||
* should suspend for if it needs to. | ||
*/ | ||
const ReactCurrentBatchConfig = { | ||
transition: null | ||
}; | ||
function startTransition(scope, options) { | ||
const prevTransition = ReactCurrentBatchConfig.transition; // Each renderer registers a callback to receive the return value of | ||
// the scope function. This is used to implement async actions. | ||
const ReactSharedInternals = { | ||
ReactCurrentDispatcher, | ||
ReactCurrentCache, | ||
ReactCurrentBatchConfig, | ||
ReactCurrentOwner | ||
}; | ||
const callbacks = new Set(); | ||
const transition = { | ||
_callbacks: callbacks | ||
}; | ||
ReactCurrentBatchConfig.transition = transition; | ||
const currentTransition = ReactCurrentBatchConfig.transition; | ||
function startTransition(scope, options) { | ||
const prevTransition = ReactCurrentBatchConfig.transition; | ||
ReactCurrentBatchConfig.transition = {}; | ||
{ | ||
try { | ||
const returnValue = scope(); | ||
try { | ||
scope(); | ||
} finally { | ||
ReactCurrentBatchConfig.transition = prevTransition; | ||
if (typeof returnValue === 'object' && returnValue !== null && typeof returnValue.then === 'function') { | ||
callbacks.forEach(callback => callback(currentTransition, returnValue)); | ||
returnValue.then(noop, onError); | ||
} | ||
} catch (error) { | ||
onError(error); | ||
} finally { | ||
ReactCurrentBatchConfig.transition = prevTransition; | ||
} | ||
} | ||
} | ||
function noop() {} // Use reportError, if it exists. Otherwise console.error. This is the same as | ||
// the default for onRecoverableError. | ||
const onError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event, | ||
// emulating an uncaught JavaScript error. | ||
reportError : error => { | ||
// In older browsers and test environments, fallback to console.error. | ||
// eslint-disable-next-line react-internal/no-production-logging | ||
console['error'](error); | ||
}; | ||
function act(callback) { | ||
@@ -1082,5 +1233,2 @@ { | ||
const createElement = createElement$1; | ||
const cloneElement = cloneElement$1; | ||
const createFactory = createFactory$1; | ||
const Children = { | ||
@@ -1102,2 +1250,3 @@ map: mapChildren, | ||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; | ||
exports.act = act; | ||
exports.cache = cache; | ||
@@ -1114,3 +1263,2 @@ exports.cloneElement = cloneElement; | ||
exports.startTransition = startTransition; | ||
exports.unstable_act = act; | ||
exports.unstable_useCacheRefresh = useCacheRefresh; | ||
@@ -1117,0 +1265,0 @@ exports.use = use; |
@@ -12,21 +12,21 @@ /* | ||
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("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")};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=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0}; | ||
function M(a,b,c){var f,d={},e=null,g=null;if(null!=b)for(f in void 0!==b.ref&&(g=b.ref),void 0!==b.key&&(e=""+b.key),b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=b[f]);var h=arguments.length-2;if(1===h)d.children=c;else if(1<h){for(var k=Array(h),m=0;m<h;m++)k[m]=arguments[m+2];d.children=k}if(a&&a.defaultProps)for(f in h=a.defaultProps,h)void 0===d[f]&&(d[f]=h[f]);return{$$typeof:l,type:a,key:e,ref:g,props:d,_owner:K.current}} | ||
function N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}var P=/\/+/g;function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)} | ||
function R(a,b,c,f,d){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var g=!1;if(null===a)g=!0;else switch(e){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case l:case n:g=!0}}if(g)return g=a,d=d(g),a=""===f?"."+Q(g,0):f,I(d)?(c="",null!=a&&(c=a.replace(P,"$&/")+"/"),R(d,b,c,"",function(m){return m})):null!=d&&(O(d)&&(d=N(d,c+(!d.key||g&&g.key===d.key?"":(""+d.key).replace(P,"$&/")+"/")+a)),b.push(d)),1;g=0;f=""===f?".":f+":";if(I(a))for(var h=0;h<a.length;h++){e= | ||
a[h];var k=f+Q(e,h);g+=R(e,b,c,k,d)}else if(k=A(a),"function"===typeof k)for(a=k.call(a),h=0;!(e=a.next()).done;)e=e.value,k=f+Q(e,h++),g+=R(e,b,c,k,d);else if("object"===e)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 S(a,b,c){if(null==a)return a;var f=[],d=0;R(a,f,"","",function(e){return b.call(c,e,d++)});return f}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(c){if(0===a._status||-1===a._status)a._status=1,a._result=c},function(c){if(0===a._status||-1===a._status)a._status=2,a._result=c});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}var U={current:null};function V(){return new WeakMap} | ||
function W(){return{s:0,v:void 0,o:null,p:null}}var X={current:null},Y={transition:null},Z={ReactCurrentDispatcher:X,ReactCurrentCache:U,ReactCurrentBatchConfig:Y,ReactCurrentOwner:K}; | ||
exports.Children={map:S,forEach:function(a,b,c){S(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(b){return b})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=E;exports.Fragment=p;exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w; | ||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z; | ||
exports.cache=function(a){return function(){var b=U.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(V);b=c.get(a);void 0===b&&(b=W(),c.set(a,b));c=0;for(var f=arguments.length;c<f;c++){var d=arguments[c];if("function"===typeof d||"object"===typeof d&&null!==d){var e=b.o;null===e&&(b.o=e=new WeakMap);b=e.get(d);void 0===b&&(b=W(),e.set(d,b))}else e=b.p,null===e&&(b.p=e=new Map),b=e.get(d),void 0===b&&(b=W(),e.set(d,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var g=a.apply(null, | ||
arguments);c=b;c.s=1;return c.v=g}catch(h){throw g=b,g.s=2,g.v=h,h;}}}; | ||
exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var f=C({},a.props),d=a.key,e=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(e=b.ref,g=K.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var h=a.type.defaultProps;for(k in b)J.call(b,k)&&!L.hasOwnProperty(k)&&(f[k]=void 0===b[k]&&void 0!==h?h[k]:b[k])}var k=arguments.length-2;if(1===k)f.children=c;else if(1<k){h=Array(k); | ||
for(var m=0;m<k;m++)h[m]=arguments[m+2];f.children=h}return{$$typeof:l,type:a.type,key:d,ref:e,props:f,_owner:g}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}}; | ||
exports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=Y.transition;Y.transition={};try{a()}finally{Y.transition=b}};exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};exports.unstable_useCacheRefresh=function(){return X.current.useCacheRefresh()}; | ||
exports.use=function(a){return X.current.use(a)};exports.useCallback=function(a,b){return X.current.useCallback(a,b)};exports.useContext=function(a){return X.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a,b){return X.current.useDeferredValue(a,b)};exports.useEffect=function(a,b){return X.current.useEffect(a,b)};exports.useId=function(){return X.current.useId()};exports.useImperativeHandle=function(a,b,c){return X.current.useImperativeHandle(a,b,c)}; | ||
exports.useInsertionEffect=function(a,b){return X.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return X.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return X.current.useMemo(a,b)};exports.useOptimistic=function(a,b){return X.current.useOptimistic(a,b)};exports.useReducer=function(a,b,c){return X.current.useReducer(a,b,c)};exports.useRef=function(a){return X.current.useRef(a)};exports.useState=function(a){return X.current.useState(a)}; | ||
exports.useSyncExternalStore=function(a,b,c){return X.current.useSyncExternalStore(a,b,c)};exports.useTransition=function(){return X.current.useTransition()};exports.version="18.3.0-canary-31603f19d-20240109"; | ||
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){var e,d={},f=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(f=""+b.key),b)N.call(b,e)&&"key"!==e&&"ref"!==e&&"__self"!==e&&"__source"!==e&&(d[e]=b[e]);var k=arguments.length-2;if(1===k)d.children=c;else if(1<k){for(var g=Array(k),m=0;m<k;m++)g[m]=arguments[m+2];d.children=g}if(a&&a.defaultProps)for(e in k=a.defaultProps,k)void 0===d[e]&&(d[e]=k[e]);return{$$typeof:l,type:a,key:f,ref:h,props:d,_owner:O.current}} | ||
function Q(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(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 V(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 W(a,b,c,e,d){var f=typeof a;if("undefined"===f||"boolean"===f)a=null;var h=!1;if(null===a)h=!0;else switch(f){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0;break;case y:return h=a._init,W(h(a._payload),b,c,e,d)}}if(h)return d=d(a),h=""===e?"."+T(a,0):e,I(d)?(c="",null!=h&&(c=h.replace(S,"$&/")+"/"),W(d,b,c,"",function(m){return m})):null!=d&&(R(d)&&(d=Q(d,c+(!d.key||a&&a.key===d.key?"":(""+d.key).replace(S,"$&/")+"/")+h)),b.push(d)),1;h=0;var k= | ||
""===e?".":e+":";if(I(a))for(var g=0;g<a.length;g++)e=a[g],f=k+T(e,g),h+=W(e,b,c,f,d);else if(g=A(a),"function"===typeof g)for(a=g.call(a),g=0;!(e=a.next()).done;)e=e.value,f=k+T(e,g++),h+=W(e,b,c,f,d);else if("object"===f){if("function"===typeof a.then)return W(V(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 h}function X(a,b,c){if(null==a)return a;var e=[],d=0;W(a,e,"","",function(f){return b.call(c,f,d++)});return e}function aa(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 ba(){return new WeakMap} | ||
function Y(){return{s:0,v:void 0,o:null,p:null}}function ca(){}var Z="function"===typeof reportError?reportError:function(a){console.error(a)};exports.Children={map:X,forEach:function(a,b,c){X(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;X(a,function(){b++});return b},toArray:function(a){return X(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=p;exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;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(ba);b=c.get(a);void 0===b&&(b=Y(),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 f=b.o;null===f&&(b.o=f=new WeakMap);b=f.get(d);void 0===b&&(b=Y(),f.set(d,b))}else f=b.p,null===f&&(b.p=f=new Map),b=f.get(d),void 0===b&&(b=Y(),f.set(d,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var h=a.apply(null, | ||
arguments);c=b;c.s=1;return c.v=h}catch(k){throw h=b,h.s=2,h.v=k,k;}}}; | ||
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,f=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(f=b.ref,h=O.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var k=a.type.defaultProps;for(g in b)N.call(b,g)&&"key"!==g&&"ref"!==g&&"__self"!==g&&"__source"!==g&&(e[g]=void 0===b[g]&&void 0!==k?k[g]:b[g])}var g=arguments.length-2;if(1===g)e.children=c;else if(1<g){k=Array(g); | ||
for(var m=0;m<g;m++)k[m]=arguments[m+2];e.children=k}return{$$typeof:l,type:a.type,key:d,ref:f,props:e,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=P;exports.createFactory=function(a){var b=P.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:v,render:a}}; | ||
exports.isValidElement=R;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:aa}};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(f){return f(e,d)}),d.then(ca,Z))}catch(f){Z(f)}finally{L.transition=b}}; | ||
exports.unstable_useCacheRefresh=function(){return J.current.useCacheRefresh()};exports.use=function(a){return J.current.use(a)};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=function(a,b){return J.current.useOptimistic(a,b)};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="18.3.0-canary-338dddc08-20240307"; | ||
//# sourceMappingURL=react.production.min.js.map |
@@ -7,4 +7,4 @@ { | ||
], | ||
"version": "18.3.0-canary-31603f19d-20240109", | ||
"homepage": "https://reactjs.org/", | ||
"version": "18.3.0-canary-338dddc08-20240307", | ||
"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" | ||
] | ||
} | ||
} |
@@ -11,24 +11,25 @@ /** | ||
'use strict';(function(){(function(f,z){"object"===typeof exports&&"undefined"!==typeof module?z(exports):"function"===typeof define&&define.amd?define(["exports"],z):(f="undefined"!==typeof globalThis?globalThis:f||self,z(f.React={}))})(this,function(f){function z(a){if(null===a||"object"!==typeof a)return null;a=W&&a[W]||a["@@iterator"];return"function"===typeof a?a:null}function y(a,b,c){this.props=a;this.context=b;this.refs=X;this.updater=c||Y}function Z(){}function M(a,b,c){this.props=a;this.context= | ||
b;this.refs=X;this.updater=c||Y}function aa(a,b,c){var e,d={},g=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)ba.call(b,e)&&!ca.hasOwnProperty(e)&&(d[e]=b[e]);var l=arguments.length-2;if(1===l)d.children=c;else if(1<l){for(var k=Array(l),n=0;n<l;n++)k[n]=arguments[n+2];d.children=k}if(a&&a.defaultProps)for(e in l=a.defaultProps,l)void 0===d[e]&&(d[e]=l[e]);return{$$typeof:A,type:a,key:g,ref:h,props:d,_owner:N.current}}function pa(a,b){return{$$typeof:A,type:a.type, | ||
key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===A}function qa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}function P(a,b){return"object"===typeof a&&null!==a&&null!=a.key?qa(""+a.key):b.toString(36)}function D(a,b,c,e,d){var g=typeof a;if("undefined"===g||"boolean"===g)a=null;var h=!1;if(null===a)h=!0;else switch(g){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case A:case ra:h= | ||
!0}}if(h)return h=a,d=d(h),a=""===e?"."+P(h,0):e,da(d)?(c="",null!=a&&(c=a.replace(ea,"$&/")+"/"),D(d,b,c,"",function(n){return n})):null!=d&&(O(d)&&(d=pa(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(ea,"$&/")+"/")+a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(da(a))for(var l=0;l<a.length;l++){g=a[l];var k=e+P(g,l);h+=D(g,b,c,k,d)}else if(k=z(a),"function"===typeof k)for(a=k.call(a),l=0;!(g=a.next()).done;)g=g.value,k=e+P(g,l++),h+=D(g,b,c,k,d);else if("object"===g)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 E(a,b,c){if(null==a)return a;var e=[],d=0;D(a,e,"","",function(g){return b.call(c,g,d++)});return e}function sa(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 ta(){return new WeakMap}function Q(){return{s:0,v:void 0,o:null,p:null}}function R(a,b){var c=a.length;a.push(b);a:for(;0<c;){var e=c-1>>>1,d=a[e];if(0<F(d,b))a[e]=b,a[c]=d,c=e;else break a}}function r(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 e=0,d=a.length,g=d>>>1;e<g;){var h=2*(e+1)-1,l=a[h],k=h+1,n=a[k];if(0>F(l,c))k<d&&0>F(n,l)?(a[e]= | ||
n,a[k]=c,e=k):(a[e]=l,a[h]=c,e=h);else if(k<d&&0>F(n,c))a[e]=n,a[k]=c,e=k;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=r(u);null!==b;){if(null===b.callback)G(u);else if(b.startTime<=a)G(u),b.sortIndex=b.expirationTime,R(t,b);else break;b=r(u)}}function S(a){B=!1;H(a);if(!w)if(null!==r(t))w=!0,T();else{var b=r(u);null!==b&&U(S,b.startTime-a)}}function fa(){return x()-ha<ia?!1:!0}function T(){I||(I=!0,J())}function U(a,b){C=ja(function(){a(x())}, | ||
b)}var A=Symbol.for("react.element"),ra=Symbol.for("react.portal"),ua=Symbol.for("react.fragment"),va=Symbol.for("react.strict_mode"),wa=Symbol.for("react.profiler"),xa=Symbol.for("react.provider"),ya=Symbol.for("react.context"),za=Symbol.for("react.forward_ref"),Aa=Symbol.for("react.suspense"),Ba=Symbol.for("react.memo"),Ca=Symbol.for("react.lazy"),W=Symbol.iterator,Y={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,e){},enqueueSetState:function(a, | ||
b,c,e){}},ka=Object.assign,X={};y.prototype.isReactComponent={};y.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")};y.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Z.prototype=y.prototype;var v=M.prototype=new Z;v.constructor=M;ka(v,y.prototype); | ||
v.isPureReactComponent=!0;var da=Array.isArray,ba=Object.prototype.hasOwnProperty,N={current:null},ca={key:!0,ref:!0,__self:!0,__source:!0},ea=/\/+/g,la={current:null},m={current:null},K={transition:null};if("object"===typeof performance&&"function"===typeof performance.now){var Da=performance;var x=function(){return Da.now()}}else{var ma=Date,Ea=ma.now();x=function(){return ma.now()-Ea}}var t=[],u=[],Fa=1,q=null,p=3,L=!1,w=!1,B=!1,ja="function"===typeof setTimeout?setTimeout:null,na="function"=== | ||
typeof clearTimeout?clearTimeout:null,oa="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;var I=!1,C=-1,ia=5,ha=-1,V=function(){if(I){var a=x();ha=a;var b=!0;try{a:{w=!1;B&&(B=!1,na(C),C=-1);L=!0;var c=p;try{b:{H(a);for(q=r(t);null!==q&&!(q.expirationTime>a&&fa());){var e=q.callback;if("function"===typeof e){q.callback=null; | ||
p=q.priorityLevel;var d=e(q.expirationTime<=a);a=x();if("function"===typeof d){q.callback=d;H(a);b=!0;break b}q===r(t)&&G(t);H(a)}else G(t);q=r(t)}if(null!==q)b=!0;else{var g=r(u);null!==g&&U(S,g.startTime-a);b=!1}}break a}finally{q=null,p=c,L=!1}b=void 0}}finally{b?J():I=!1}}};if("function"===typeof oa)var J=function(){oa(V)};else if("undefined"!==typeof MessageChannel){v=new MessageChannel;var Ga=v.port2;v.port1.onmessage=V;J=function(){Ga.postMessage(null)}}else J=function(){ja(V,0)};v={ReactCurrentDispatcher:m, | ||
ReactCurrentCache:la,ReactCurrentOwner:N,ReactCurrentBatchConfig:K,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(){w||L||(w=!0,T())},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"): | ||
ia=0<a?Math.floor(1E3/a):5},unstable_getCurrentPriorityLevel:function(){return p},unstable_getFirstCallbackNode:function(){return r(t)},unstable_next:function(a){switch(p){case 1:case 2:case 3:var b=3;break;default:b=p}var c=p;p=b;try{return a()}finally{p=c}},get unstable_now(){return x},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=p;p=a;try{return b()}finally{p=c}}, | ||
unstable_scheduleCallback:function(a,b,c){var e=x();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?e+c:e):c=e;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:Fa++,callback:b,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>e?(a.sortIndex=c,R(u,a),null===r(t)&&a===r(u)&&(B?(na(C),C=-1):B=!0,U(S,c-e))):(a.sortIndex=d,R(t,a),w||L||(w=!0,T()));return a},unstable_shouldYield:fa,unstable_wrapCallback:function(a){var b= | ||
p;return function(){var c=p;p=b;try{return a.apply(this,arguments)}finally{p=c}}}}};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(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};f.Component=y;f.Fragment=ua;f.Profiler=wa;f.PureComponent=M;f.StrictMode=va;f.Suspense=Aa;f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED= | ||
v;f.cache=function(a){return function(){var b=la.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(ta);b=c.get(a);void 0===b&&(b=Q(),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=Q(),g.set(d,b))}else g=b.p,null===g&&(b.p=g=new Map),b=g.get(d),void 0===b&&(b=Q(),g.set(d,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var h=a.apply(null, | ||
arguments);c=b;c.s=1;return c.v=h}catch(l){throw h=b,h.s=2,h.v=l,l;}}};f.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 e=ka({},a.props),d=a.key,g=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,h=N.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(k in b)ba.call(b,k)&&!ca.hasOwnProperty(k)&&(e[k]=void 0===b[k]&&void 0!==l?l[k]:b[k])}var k= | ||
arguments.length-2;if(1===k)e.children=c;else if(1<k){l=Array(k);for(var n=0;n<k;n++)l[n]=arguments[n+2];e.children=l}return{$$typeof:A,type:a.type,key:d,ref:g,props:e,_owner:h}};f.createContext=function(a){a={$$typeof:ya,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:xa,_context:a};return a.Consumer=a};f.createElement=aa;f.createFactory=function(a){var b=aa.bind(null,a);b.type=a;return b};f.createRef=function(){return{current:null}}; | ||
f.forwardRef=function(a){return{$$typeof:za,render:a}};f.isValidElement=O;f.lazy=function(a){return{$$typeof:Ca,_payload:{_status:-1,_result:a},_init:sa}};f.memo=function(a,b){return{$$typeof:Ba,type:a,compare:void 0===b?null:b}};f.startTransition=function(a,b){b=K.transition;K.transition={};try{a()}finally{K.transition=b}};f.unstable_act=function(a){throw Error("act(...) is not supported in production builds of React.");};f.unstable_useCacheRefresh=function(){return m.current.useCacheRefresh()}; | ||
f.use=function(a){return m.current.use(a)};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=function(a,b){return m.current.useOptimistic(a,b)};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="18.3.0-canary-31603f19d-20240109"})})(); | ||
'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=V&&a[V]||a["@@iterator"];return"function"===typeof a?a:null}function y(a,b,c){this.props=a;this.context=b;this.refs=W;this.updater=c||X}function Y(){}function M(a,b,c){this.props=a;this.context= | ||
b;this.refs=W;this.updater=c||X}function Z(a,b,c){var d,e={},g=null,k=null;if(null!=b)for(d in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)aa.call(b,d)&&"key"!==d&&"ref"!==d&&"__self"!==d&&"__source"!==d&&(e[d]=b[d]);var l=arguments.length-2;if(1===l)e.children=c;else if(1<l){for(var h=Array(l),n=0;n<l;n++)h[n]=arguments[n+2];e.children=h}if(a&&a.defaultProps)for(d in l=a.defaultProps,l)void 0===e[d]&&(e[d]=l[d]);return{$$typeof:B,type:a,key:g,ref:k,props:e,_owner:ba.current}}function sa(a, | ||
b){return{$$typeof:B,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===B}function ta(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?ta(""+a.key):b.toString(36)}function ca(){}function ua(a){switch(a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;default:switch("string"===typeof a.status?a.then(ca,ca):(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 z(a,b,c,d,e){var g=typeof a;if("undefined"===g||"boolean"===g)a=null;var k=!1;if(null===a)k=!0;else switch(g){case "string":case "number":k=!0;break;case "object":switch(a.$$typeof){case B:case va:k=!0;break;case da:return k=a._init,z(k(a._payload),b,c, | ||
d,e)}}if(k)return e=e(a),k=""===d?"."+O(a,0):d,ea(e)?(c="",null!=k&&(c=k.replace(fa,"$&/")+"/"),z(e,b,c,"",function(n){return n})):null!=e&&(N(e)&&(e=sa(e,c+(!e.key||a&&a.key===e.key?"":(""+e.key).replace(fa,"$&/")+"/")+k)),b.push(e)),1;k=0;var l=""===d?".":d+":";if(ea(a))for(var h=0;h<a.length;h++)d=a[h],g=l+O(d,h),k+=z(d,b,c,g,e);else if(h=A(a),"function"===typeof h)for(a=h.call(a),h=0;!(d=a.next()).done;)d=d.value,g=l+O(d,h++),k+=z(d,b,c,g,e);else if("object"===g){if("function"===typeof a.then)return z(ua(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 k}function F(a,b,c){if(null==a)return a;var d=[],e=0;z(a,d,"","",function(g){return b.call(c,g,e++)});return d}function wa(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 xa(){return new WeakMap}function P(){return{s:0,v:void 0,o:null,p:null}}function Q(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<G(e,b))a[d]=b,a[c]=e,c=d;else break a}}function r(a){return 0===a.length?null:a[0]}function H(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, | ||
g=e>>>1;d<g;){var k=2*(d+1)-1,l=a[k],h=k+1,n=a[h];if(0>G(l,c))h<e&&0>G(n,l)?(a[d]=n,a[h]=c,d=h):(a[d]=l,a[k]=c,d=k);else if(h<e&&0>G(n,c))a[d]=n,a[h]=c,d=h;else break a}}return b}function G(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function I(a){for(var b=r(u);null!==b;){if(null===b.callback)H(u);else if(b.startTime<=a)H(u),b.sortIndex=b.expirationTime,Q(t,b);else break;b=r(u)}}function R(a){C=!1;I(a);if(!w)if(null!==r(t))w=!0,S();else{var b=r(u);null!==b&&T(R,b.startTime-a)}}function ha(){return x()- | ||
ia<ja?!1:!0}function S(){J||(J=!0,K())}function T(a,b){D=ka(function(){a(x())},b)}function ya(){}var B=Symbol.for("react.element"),va=Symbol.for("react.portal"),za=Symbol.for("react.fragment"),Aa=Symbol.for("react.strict_mode"),Ba=Symbol.for("react.profiler"),Ca=Symbol.for("react.provider"),Da=Symbol.for("react.context"),Ea=Symbol.for("react.forward_ref"),Fa=Symbol.for("react.suspense"),Ga=Symbol.for("react.memo"),da=Symbol.for("react.lazy"),V=Symbol.iterator,X={isMounted:function(a){return!1},enqueueForceUpdate:function(a, | ||
b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}},la=Object.assign,W={};y.prototype.isReactComponent={};y.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")};y.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Y.prototype=y.prototype; | ||
var v=M.prototype=new Y;v.constructor=M;la(v,y.prototype);v.isPureReactComponent=!0;var ea=Array.isArray,m={current:null},ma={current:null},E={transition:null};v={current:null};var aa=Object.prototype.hasOwnProperty,ba=v,fa=/\/+/g;if("object"===typeof performance&&"function"===typeof performance.now){var Ha=performance;var x=function(){return Ha.now()}}else{var na=Date,Ia=na.now();x=function(){return na.now()-Ia}}var t=[],u=[],Ja=1,q=null,p=3,L=!1,w=!1,C=!1,ka="function"===typeof setTimeout?setTimeout: | ||
null,oa="function"===typeof clearTimeout?clearTimeout:null,pa="undefined"!==typeof setImmediate?setImmediate:null,J=!1,D=-1,ja=5,ia=-1,U=function(){if(J){var a=x();ia=a;var b=!0;try{a:{w=!1;C&&(C=!1,oa(D),D=-1);L=!0;var c=p;try{b:{I(a);for(q=r(t);null!==q&&!(q.expirationTime>a&&ha());){var d=q.callback;if("function"===typeof d){q.callback=null;p=q.priorityLevel;var e=d(q.expirationTime<=a);a=x();if("function"===typeof e){q.callback=e;I(a);b=!0;break b}q===r(t)&&H(t);I(a)}else H(t);q=r(t)}if(null!== | ||
q)b=!0;else{var g=r(u);null!==g&&T(R,g.startTime-a);b=!1}}break a}finally{q=null,p=c,L=!1}b=void 0}}finally{b?K():J=!1}}};if("function"===typeof pa)var K=function(){pa(U)};else if("undefined"!==typeof MessageChannel){var qa=new MessageChannel,Ka=qa.port2;qa.port1.onmessage=U;K=function(){Ka.postMessage(null)}}else K=function(){ka(U,0)};v={ReactCurrentDispatcher:m,ReactCurrentCache:ma,ReactCurrentOwner:v,ReactCurrentBatchConfig:E,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(){w||L||(w=!0,S())},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"):ja=0<a?Math.floor(1E3/a):5},unstable_getCurrentPriorityLevel:function(){return p},unstable_getFirstCallbackNode:function(){return r(t)}, | ||
unstable_next:function(a){switch(p){case 1:case 2:case 3:var b=3;break;default:b=p}var c=p;p=b;try{return a()}finally{p=c}},get unstable_now(){return x},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=p;p=a;try{return b()}finally{p=c}},unstable_scheduleCallback:function(a,b,c){var d=x();"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,Q(u,a),null===r(t)&&a===r(u)&&(C?(oa(D),D=-1):C=!0,T(R,c-d))):(a.sortIndex=e,Q(t,a),w||L||(w=!0,S()));return a},unstable_shouldYield:ha,unstable_wrapCallback:function(a){var b=p;return function(){var c=p;p=b;try{return a.apply(this,arguments)}finally{p=c}}}}};var ra="function"===typeof reportError?reportError: | ||
function(a){console.error(a)};f.Children={map:F,forEach:function(a,b,c){F(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;F(a,function(){b++});return b},toArray:function(a){return F(a,function(b){return b})||[]},only:function(a){if(!N(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};f.Component=y;f.Fragment=za;f.Profiler=Ba;f.PureComponent=M;f.StrictMode=Aa;f.Suspense=Fa;f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v;f.act= | ||
function(a){throw Error("act(...) is not supported in production builds of React.");};f.cache=function(a){return function(){var b=ma.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(xa);b=c.get(a);void 0===b&&(b=P(),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 g=b.o;null===g&&(b.o=g=new WeakMap);b=g.get(e);void 0===b&&(b=P(),g.set(e,b))}else g=b.p,null===g&&(b.p=g=new Map),b=g.get(e),void 0=== | ||
b&&(b=P(),g.set(e,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var k=a.apply(null,arguments);c=b;c.s=1;return c.v=k}catch(l){throw k=b,k.s=2,k.v=l,l;}}};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=la({},a.props),e=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=ba.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(h in b)aa.call(b,h)&&"key"!== | ||
h&&"ref"!==h&&"__self"!==h&&"__source"!==h&&(d[h]=void 0===b[h]&&void 0!==l?l[h]:b[h])}var h=arguments.length-2;if(1===h)d.children=c;else if(1<h){l=Array(h);for(var n=0;n<h;n++)l[n]=arguments[n+2];d.children=l}return{$$typeof:B,type:a.type,key:e,ref:g,props:d,_owner:k}};f.createContext=function(a){a={$$typeof:Da,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:Ca,_context:a};return a.Consumer=a};f.createElement=Z;f.createFactory=function(a){var b= | ||
Z.bind(null,a);b.type=a;return b};f.createRef=function(){return{current:null}};f.forwardRef=function(a){return{$$typeof:Ea,render:a}};f.isValidElement=N;f.lazy=function(a){return{$$typeof:da,_payload:{_status:-1,_result:a},_init:wa}};f.memo=function(a,b){return{$$typeof:Ga,type:a,compare:void 0===b?null:b}};f.startTransition=function(a,b){b=E.transition;var c=new Set;E.transition={_callbacks:c};var d=E.transition;try{var e=a();"object"===typeof e&&null!==e&&"function"===typeof e.then&&(c.forEach(function(g){return g(d, | ||
e)}),e.then(ya,ra))}catch(g){ra(g)}finally{E.transition=b}};f.unstable_useCacheRefresh=function(){return m.current.useCacheRefresh()};f.use=function(a){return m.current.use(a)};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=function(a,b){return m.current.useOptimistic(a,b)};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="18.3.0-canary-338dddc08-20240307"})})(); |
@@ -11,24 +11,25 @@ /** | ||
'use strict';(function(){(function(f,z){"object"===typeof exports&&"undefined"!==typeof module?z(exports):"function"===typeof define&&define.amd?define(["exports"],z):(f="undefined"!==typeof globalThis?globalThis:f||self,z(f.React={}))})(this,function(f){function z(a){if(null===a||"object"!==typeof a)return null;a=W&&a[W]||a["@@iterator"];return"function"===typeof a?a:null}function y(a,b,c){this.props=a;this.context=b;this.refs=X;this.updater=c||Y}function Z(){}function M(a,b,c){this.props=a;this.context= | ||
b;this.refs=X;this.updater=c||Y}function aa(a,b,c){var e,d={},g=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)ba.call(b,e)&&!ca.hasOwnProperty(e)&&(d[e]=b[e]);var l=arguments.length-2;if(1===l)d.children=c;else if(1<l){for(var k=Array(l),n=0;n<l;n++)k[n]=arguments[n+2];d.children=k}if(a&&a.defaultProps)for(e in l=a.defaultProps,l)void 0===d[e]&&(d[e]=l[e]);return{$$typeof:A,type:a,key:g,ref:h,props:d,_owner:N.current}}function pa(a,b){return{$$typeof:A,type:a.type, | ||
key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===A}function qa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}function P(a,b){return"object"===typeof a&&null!==a&&null!=a.key?qa(""+a.key):b.toString(36)}function D(a,b,c,e,d){var g=typeof a;if("undefined"===g||"boolean"===g)a=null;var h=!1;if(null===a)h=!0;else switch(g){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case A:case ra:h= | ||
!0}}if(h)return h=a,d=d(h),a=""===e?"."+P(h,0):e,da(d)?(c="",null!=a&&(c=a.replace(ea,"$&/")+"/"),D(d,b,c,"",function(n){return n})):null!=d&&(O(d)&&(d=pa(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(ea,"$&/")+"/")+a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(da(a))for(var l=0;l<a.length;l++){g=a[l];var k=e+P(g,l);h+=D(g,b,c,k,d)}else if(k=z(a),"function"===typeof k)for(a=k.call(a),l=0;!(g=a.next()).done;)g=g.value,k=e+P(g,l++),h+=D(g,b,c,k,d);else if("object"===g)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 E(a,b,c){if(null==a)return a;var e=[],d=0;D(a,e,"","",function(g){return b.call(c,g,d++)});return e}function sa(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 ta(){return new WeakMap}function Q(){return{s:0,v:void 0,o:null,p:null}}function R(a,b){var c=a.length;a.push(b);a:for(;0<c;){var e=c-1>>>1,d=a[e];if(0<F(d,b))a[e]=b,a[c]=d,c=e;else break a}}function r(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 e=0,d=a.length,g=d>>>1;e<g;){var h=2*(e+1)-1,l=a[h],k=h+1,n=a[k];if(0>F(l,c))k<d&&0>F(n,l)?(a[e]= | ||
n,a[k]=c,e=k):(a[e]=l,a[h]=c,e=h);else if(k<d&&0>F(n,c))a[e]=n,a[k]=c,e=k;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=r(u);null!==b;){if(null===b.callback)G(u);else if(b.startTime<=a)G(u),b.sortIndex=b.expirationTime,R(t,b);else break;b=r(u)}}function S(a){B=!1;H(a);if(!w)if(null!==r(t))w=!0,T();else{var b=r(u);null!==b&&U(S,b.startTime-a)}}function fa(){return x()-ha<ia?!1:!0}function T(){I||(I=!0,J())}function U(a,b){C=ja(function(){a(x())}, | ||
b)}var A=Symbol.for("react.element"),ra=Symbol.for("react.portal"),ua=Symbol.for("react.fragment"),va=Symbol.for("react.strict_mode"),wa=Symbol.for("react.profiler"),xa=Symbol.for("react.provider"),ya=Symbol.for("react.context"),za=Symbol.for("react.forward_ref"),Aa=Symbol.for("react.suspense"),Ba=Symbol.for("react.memo"),Ca=Symbol.for("react.lazy"),W=Symbol.iterator,Y={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,e){},enqueueSetState:function(a, | ||
b,c,e){}},ka=Object.assign,X={};y.prototype.isReactComponent={};y.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")};y.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Z.prototype=y.prototype;var v=M.prototype=new Z;v.constructor=M;ka(v,y.prototype); | ||
v.isPureReactComponent=!0;var da=Array.isArray,ba=Object.prototype.hasOwnProperty,N={current:null},ca={key:!0,ref:!0,__self:!0,__source:!0},ea=/\/+/g,la={current:null},m={current:null},K={transition:null};if("object"===typeof performance&&"function"===typeof performance.now){var Da=performance;var x=function(){return Da.now()}}else{var ma=Date,Ea=ma.now();x=function(){return ma.now()-Ea}}var t=[],u=[],Fa=1,q=null,p=3,L=!1,w=!1,B=!1,ja="function"===typeof setTimeout?setTimeout:null,na="function"=== | ||
typeof clearTimeout?clearTimeout:null,oa="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;var I=!1,C=-1,ia=5,ha=-1,V=function(){if(I){var a=x();ha=a;var b=!0;try{a:{w=!1;B&&(B=!1,na(C),C=-1);L=!0;var c=p;try{b:{H(a);for(q=r(t);null!==q&&!(q.expirationTime>a&&fa());){var e=q.callback;if("function"===typeof e){q.callback=null; | ||
p=q.priorityLevel;var d=e(q.expirationTime<=a);a=x();if("function"===typeof d){q.callback=d;H(a);b=!0;break b}q===r(t)&&G(t);H(a)}else G(t);q=r(t)}if(null!==q)b=!0;else{var g=r(u);null!==g&&U(S,g.startTime-a);b=!1}}break a}finally{q=null,p=c,L=!1}b=void 0}}finally{b?J():I=!1}}};if("function"===typeof oa)var J=function(){oa(V)};else if("undefined"!==typeof MessageChannel){v=new MessageChannel;var Ga=v.port2;v.port1.onmessage=V;J=function(){Ga.postMessage(null)}}else J=function(){ja(V,0)};v={ReactCurrentDispatcher:m, | ||
ReactCurrentCache:la,ReactCurrentOwner:N,ReactCurrentBatchConfig:K,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(){w||L||(w=!0,T())},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"): | ||
ia=0<a?Math.floor(1E3/a):5},unstable_getCurrentPriorityLevel:function(){return p},unstable_getFirstCallbackNode:function(){return r(t)},unstable_next:function(a){switch(p){case 1:case 2:case 3:var b=3;break;default:b=p}var c=p;p=b;try{return a()}finally{p=c}},get unstable_now(){return x},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=p;p=a;try{return b()}finally{p=c}}, | ||
unstable_scheduleCallback:function(a,b,c){var e=x();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?e+c:e):c=e;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:Fa++,callback:b,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>e?(a.sortIndex=c,R(u,a),null===r(t)&&a===r(u)&&(B?(na(C),C=-1):B=!0,U(S,c-e))):(a.sortIndex=d,R(t,a),w||L||(w=!0,T()));return a},unstable_shouldYield:fa,unstable_wrapCallback:function(a){var b= | ||
p;return function(){var c=p;p=b;try{return a.apply(this,arguments)}finally{p=c}}}}};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(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};f.Component=y;f.Fragment=ua;f.Profiler=wa;f.PureComponent=M;f.StrictMode=va;f.Suspense=Aa;f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED= | ||
v;f.cache=function(a){return function(){var b=la.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(ta);b=c.get(a);void 0===b&&(b=Q(),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=Q(),g.set(d,b))}else g=b.p,null===g&&(b.p=g=new Map),b=g.get(d),void 0===b&&(b=Q(),g.set(d,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var h=a.apply(null, | ||
arguments);c=b;c.s=1;return c.v=h}catch(l){throw h=b,h.s=2,h.v=l,l;}}};f.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 e=ka({},a.props),d=a.key,g=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,h=N.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(k in b)ba.call(b,k)&&!ca.hasOwnProperty(k)&&(e[k]=void 0===b[k]&&void 0!==l?l[k]:b[k])}var k= | ||
arguments.length-2;if(1===k)e.children=c;else if(1<k){l=Array(k);for(var n=0;n<k;n++)l[n]=arguments[n+2];e.children=l}return{$$typeof:A,type:a.type,key:d,ref:g,props:e,_owner:h}};f.createContext=function(a){a={$$typeof:ya,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:xa,_context:a};return a.Consumer=a};f.createElement=aa;f.createFactory=function(a){var b=aa.bind(null,a);b.type=a;return b};f.createRef=function(){return{current:null}}; | ||
f.forwardRef=function(a){return{$$typeof:za,render:a}};f.isValidElement=O;f.lazy=function(a){return{$$typeof:Ca,_payload:{_status:-1,_result:a},_init:sa}};f.memo=function(a,b){return{$$typeof:Ba,type:a,compare:void 0===b?null:b}};f.startTransition=function(a,b){b=K.transition;K.transition={};try{a()}finally{K.transition=b}};f.unstable_act=function(a){throw Error("act(...) is not supported in production builds of React.");};f.unstable_useCacheRefresh=function(){return m.current.useCacheRefresh()}; | ||
f.use=function(a){return m.current.use(a)};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=function(a,b){return m.current.useOptimistic(a,b)};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="18.3.0-canary-31603f19d-20240109"})})(); | ||
'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=V&&a[V]||a["@@iterator"];return"function"===typeof a?a:null}function y(a,b,c){this.props=a;this.context=b;this.refs=W;this.updater=c||X}function Y(){}function M(a,b,c){this.props=a;this.context= | ||
b;this.refs=W;this.updater=c||X}function Z(a,b,c){var d,e={},g=null,k=null;if(null!=b)for(d in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)aa.call(b,d)&&"key"!==d&&"ref"!==d&&"__self"!==d&&"__source"!==d&&(e[d]=b[d]);var l=arguments.length-2;if(1===l)e.children=c;else if(1<l){for(var h=Array(l),n=0;n<l;n++)h[n]=arguments[n+2];e.children=h}if(a&&a.defaultProps)for(d in l=a.defaultProps,l)void 0===e[d]&&(e[d]=l[d]);return{$$typeof:B,type:a,key:g,ref:k,props:e,_owner:ba.current}}function sa(a, | ||
b){return{$$typeof:B,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===B}function ta(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(c){return b[c]})}function O(a,b){return"object"===typeof a&&null!==a&&null!=a.key?ta(""+a.key):b.toString(36)}function ca(){}function ua(a){switch(a.status){case "fulfilled":return a.value;case "rejected":throw a.reason;default:switch("string"===typeof a.status?a.then(ca,ca):(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 z(a,b,c,d,e){var g=typeof a;if("undefined"===g||"boolean"===g)a=null;var k=!1;if(null===a)k=!0;else switch(g){case "string":case "number":k=!0;break;case "object":switch(a.$$typeof){case B:case va:k=!0;break;case da:return k=a._init,z(k(a._payload),b,c, | ||
d,e)}}if(k)return e=e(a),k=""===d?"."+O(a,0):d,ea(e)?(c="",null!=k&&(c=k.replace(fa,"$&/")+"/"),z(e,b,c,"",function(n){return n})):null!=e&&(N(e)&&(e=sa(e,c+(!e.key||a&&a.key===e.key?"":(""+e.key).replace(fa,"$&/")+"/")+k)),b.push(e)),1;k=0;var l=""===d?".":d+":";if(ea(a))for(var h=0;h<a.length;h++)d=a[h],g=l+O(d,h),k+=z(d,b,c,g,e);else if(h=A(a),"function"===typeof h)for(a=h.call(a),h=0;!(d=a.next()).done;)d=d.value,g=l+O(d,h++),k+=z(d,b,c,g,e);else if("object"===g){if("function"===typeof a.then)return z(ua(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 k}function F(a,b,c){if(null==a)return a;var d=[],e=0;z(a,d,"","",function(g){return b.call(c,g,e++)});return d}function wa(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 xa(){return new WeakMap}function P(){return{s:0,v:void 0,o:null,p:null}}function Q(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<G(e,b))a[d]=b,a[c]=e,c=d;else break a}}function r(a){return 0===a.length?null:a[0]}function H(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, | ||
g=e>>>1;d<g;){var k=2*(d+1)-1,l=a[k],h=k+1,n=a[h];if(0>G(l,c))h<e&&0>G(n,l)?(a[d]=n,a[h]=c,d=h):(a[d]=l,a[k]=c,d=k);else if(h<e&&0>G(n,c))a[d]=n,a[h]=c,d=h;else break a}}return b}function G(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function I(a){for(var b=r(u);null!==b;){if(null===b.callback)H(u);else if(b.startTime<=a)H(u),b.sortIndex=b.expirationTime,Q(t,b);else break;b=r(u)}}function R(a){C=!1;I(a);if(!w)if(null!==r(t))w=!0,S();else{var b=r(u);null!==b&&T(R,b.startTime-a)}}function ha(){return x()- | ||
ia<ja?!1:!0}function S(){J||(J=!0,K())}function T(a,b){D=ka(function(){a(x())},b)}function ya(){}var B=Symbol.for("react.element"),va=Symbol.for("react.portal"),za=Symbol.for("react.fragment"),Aa=Symbol.for("react.strict_mode"),Ba=Symbol.for("react.profiler"),Ca=Symbol.for("react.provider"),Da=Symbol.for("react.context"),Ea=Symbol.for("react.forward_ref"),Fa=Symbol.for("react.suspense"),Ga=Symbol.for("react.memo"),da=Symbol.for("react.lazy"),V=Symbol.iterator,X={isMounted:function(a){return!1},enqueueForceUpdate:function(a, | ||
b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}},la=Object.assign,W={};y.prototype.isReactComponent={};y.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")};y.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Y.prototype=y.prototype; | ||
var v=M.prototype=new Y;v.constructor=M;la(v,y.prototype);v.isPureReactComponent=!0;var ea=Array.isArray,m={current:null},ma={current:null},E={transition:null};v={current:null};var aa=Object.prototype.hasOwnProperty,ba=v,fa=/\/+/g;if("object"===typeof performance&&"function"===typeof performance.now){var Ha=performance;var x=function(){return Ha.now()}}else{var na=Date,Ia=na.now();x=function(){return na.now()-Ia}}var t=[],u=[],Ja=1,q=null,p=3,L=!1,w=!1,C=!1,ka="function"===typeof setTimeout?setTimeout: | ||
null,oa="function"===typeof clearTimeout?clearTimeout:null,pa="undefined"!==typeof setImmediate?setImmediate:null,J=!1,D=-1,ja=5,ia=-1,U=function(){if(J){var a=x();ia=a;var b=!0;try{a:{w=!1;C&&(C=!1,oa(D),D=-1);L=!0;var c=p;try{b:{I(a);for(q=r(t);null!==q&&!(q.expirationTime>a&&ha());){var d=q.callback;if("function"===typeof d){q.callback=null;p=q.priorityLevel;var e=d(q.expirationTime<=a);a=x();if("function"===typeof e){q.callback=e;I(a);b=!0;break b}q===r(t)&&H(t);I(a)}else H(t);q=r(t)}if(null!== | ||
q)b=!0;else{var g=r(u);null!==g&&T(R,g.startTime-a);b=!1}}break a}finally{q=null,p=c,L=!1}b=void 0}}finally{b?K():J=!1}}};if("function"===typeof pa)var K=function(){pa(U)};else if("undefined"!==typeof MessageChannel){var qa=new MessageChannel,Ka=qa.port2;qa.port1.onmessage=U;K=function(){Ka.postMessage(null)}}else K=function(){ka(U,0)};v={ReactCurrentDispatcher:m,ReactCurrentCache:ma,ReactCurrentOwner:v,ReactCurrentBatchConfig:E,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(){w||L||(w=!0,S())},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"):ja=0<a?Math.floor(1E3/a):5},unstable_getCurrentPriorityLevel:function(){return p},unstable_getFirstCallbackNode:function(){return r(t)}, | ||
unstable_next:function(a){switch(p){case 1:case 2:case 3:var b=3;break;default:b=p}var c=p;p=b;try{return a()}finally{p=c}},get unstable_now(){return x},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=p;p=a;try{return b()}finally{p=c}},unstable_scheduleCallback:function(a,b,c){var d=x();"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,Q(u,a),null===r(t)&&a===r(u)&&(C?(oa(D),D=-1):C=!0,T(R,c-d))):(a.sortIndex=e,Q(t,a),w||L||(w=!0,S()));return a},unstable_shouldYield:ha,unstable_wrapCallback:function(a){var b=p;return function(){var c=p;p=b;try{return a.apply(this,arguments)}finally{p=c}}}}};var ra="function"===typeof reportError?reportError: | ||
function(a){console.error(a)};f.Children={map:F,forEach:function(a,b,c){F(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;F(a,function(){b++});return b},toArray:function(a){return F(a,function(b){return b})||[]},only:function(a){if(!N(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};f.Component=y;f.Fragment=za;f.Profiler=Ba;f.PureComponent=M;f.StrictMode=Aa;f.Suspense=Fa;f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v;f.act= | ||
function(a){throw Error("act(...) is not supported in production builds of React.");};f.cache=function(a){return function(){var b=ma.current;if(!b)return a.apply(null,arguments);var c=b.getCacheForType(xa);b=c.get(a);void 0===b&&(b=P(),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 g=b.o;null===g&&(b.o=g=new WeakMap);b=g.get(e);void 0===b&&(b=P(),g.set(e,b))}else g=b.p,null===g&&(b.p=g=new Map),b=g.get(e),void 0=== | ||
b&&(b=P(),g.set(e,b))}if(1===b.s)return b.v;if(2===b.s)throw b.v;try{var k=a.apply(null,arguments);c=b;c.s=1;return c.v=k}catch(l){throw k=b,k.s=2,k.v=l,l;}}};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=la({},a.props),e=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=ba.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(h in b)aa.call(b,h)&&"key"!== | ||
h&&"ref"!==h&&"__self"!==h&&"__source"!==h&&(d[h]=void 0===b[h]&&void 0!==l?l[h]:b[h])}var h=arguments.length-2;if(1===h)d.children=c;else if(1<h){l=Array(h);for(var n=0;n<h;n++)l[n]=arguments[n+2];d.children=l}return{$$typeof:B,type:a.type,key:e,ref:g,props:d,_owner:k}};f.createContext=function(a){a={$$typeof:Da,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:Ca,_context:a};return a.Consumer=a};f.createElement=Z;f.createFactory=function(a){var b= | ||
Z.bind(null,a);b.type=a;return b};f.createRef=function(){return{current:null}};f.forwardRef=function(a){return{$$typeof:Ea,render:a}};f.isValidElement=N;f.lazy=function(a){return{$$typeof:da,_payload:{_status:-1,_result:a},_init:wa}};f.memo=function(a,b){return{$$typeof:Ga,type:a,compare:void 0===b?null:b}};f.startTransition=function(a,b){b=E.transition;var c=new Set;E.transition={_callbacks:c};var d=E.transition;try{var e=a();"object"===typeof e&&null!==e&&"function"===typeof e.then&&(c.forEach(function(g){return g(d, | ||
e)}),e.then(ya,ra))}catch(g){ra(g)}finally{E.transition=b}};f.unstable_useCacheRefresh=function(){return m.current.useCacheRefresh()};f.use=function(a){return m.current.use(a)};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=function(a,b){return m.current.useOptimistic(a,b)};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="18.3.0-canary-338dddc08-20240307"})})(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
601447
0
37
13320
4
8
- Removedloose-envify@^1.1.0
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)