mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Delete duplicate jsx() implementation (#28258)
Not sure how this happened but there are two identical implementations
of the jsx and jsxDEV functions. One of them was unreachable. I deleted
that one.
DiffTrain build for [6692445759](https://github.com/facebook/react/commit/66924457594bc28eb2f3f39c7c61d54b931c188e)
This commit is contained in:
@@ -1 +1 @@
|
||||
7cbd026ff4ff833db2a2f2271f95cb2b91cb3895
|
||||
66924457594bc28eb2f3f39c7c61d54b931c188e
|
||||
|
||||
@@ -24,7 +24,7 @@ if (__DEV__) {
|
||||
) {
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
||||
}
|
||||
var ReactVersion = "18.3.0-www-classic-14d23768";
|
||||
var ReactVersion = "18.3.0-www-classic-12d69e63";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -1677,6 +1677,287 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.ref !== undefined;
|
||||
}
|
||||
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.key !== undefined;
|
||||
}
|
||||
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (
|
||||
typeof config.ref === "string" &&
|
||||
ReactCurrentOwner$1.current &&
|
||||
self &&
|
||||
ReactCurrentOwner$1.current.stateNode !== self
|
||||
) {
|
||||
var componentName = getComponentNameFromType(
|
||||
ReactCurrentOwner$1.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
|
||||
);
|
||||
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function () {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = 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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Factory method to create a new React element. This no longer adheres to
|
||||
* the class pattern, so do not use new to call it. Also, instanceof check
|
||||
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
||||
* if something is a React Element.
|
||||
*
|
||||
* @param {*} type
|
||||
* @param {*} props
|
||||
* @param {*} key
|
||||
* @param {string|object} ref
|
||||
* @param {*} owner
|
||||
* @param {*} self A *temporary* helper to detect places where `this` is
|
||||
* different from the `owner` when React.createElement is called, so that we
|
||||
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
||||
* functions, and as long as `this` and owner are the same, there will be no
|
||||
* change in behavior.
|
||||
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
||||
* indicating filename, line number, and/or other information.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
{
|
||||
// The validation flag is currently mutative. We put it on
|
||||
// an external backing store so that we can freeze the whole object.
|
||||
// This can be replaced with a WeakMap once they are implemented in
|
||||
// commonly used development environments.
|
||||
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
||||
// the validation flag non-enumerable (where possible, which should
|
||||
// include every environment we run tests in), so the test framework
|
||||
// ignores it.
|
||||
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
}); // self and source are DEV only properties.
|
||||
|
||||
Object.defineProperty(element, "_self", {
|
||||
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
|
||||
});
|
||||
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
/**
|
||||
* https://github.com/reactjs/rfcs/pull/107
|
||||
* @param {*} type
|
||||
* @param {object} props
|
||||
* @param {string} key
|
||||
*/
|
||||
|
||||
function jsxDEV$1(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName; // Reserved names are extracted
|
||||
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||||
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
||||
// but as an intermediary step, we will use jsxDEV for everything except
|
||||
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
||||
// key is explicitly declared to be undefined or not.
|
||||
|
||||
if (maybeKey !== undefined) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
|
||||
key = "" + config.key;
|
||||
}
|
||||
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
} // Remaining properties are added to a new props object
|
||||
|
||||
for (propName in config) {
|
||||
if (
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName)
|
||||
) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
} // Resolve default props
|
||||
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (key || ref) {
|
||||
var displayName =
|
||||
typeof type === "function"
|
||||
? type.displayName || type.name || "Unknown"
|
||||
: type;
|
||||
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
|
||||
return ReactElement(
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
self,
|
||||
source,
|
||||
ReactCurrentOwner$1.current,
|
||||
props
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference");
|
||||
|
||||
function setCurrentlyValidatingElement$1(element) {
|
||||
@@ -3409,287 +3690,6 @@ if (__DEV__) {
|
||||
only: onlyChild
|
||||
};
|
||||
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.ref !== undefined;
|
||||
}
|
||||
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.key !== undefined;
|
||||
}
|
||||
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (
|
||||
typeof config.ref === "string" &&
|
||||
ReactCurrentOwner$1.current &&
|
||||
self &&
|
||||
ReactCurrentOwner$1.current.stateNode !== self
|
||||
) {
|
||||
var componentName = getComponentNameFromType(
|
||||
ReactCurrentOwner$1.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
|
||||
);
|
||||
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function () {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = 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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Factory method to create a new React element. This no longer adheres to
|
||||
* the class pattern, so do not use new to call it. Also, instanceof check
|
||||
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
||||
* if something is a React Element.
|
||||
*
|
||||
* @param {*} type
|
||||
* @param {*} props
|
||||
* @param {*} key
|
||||
* @param {string|object} ref
|
||||
* @param {*} owner
|
||||
* @param {*} self A *temporary* helper to detect places where `this` is
|
||||
* different from the `owner` when React.createElement is called, so that we
|
||||
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
||||
* functions, and as long as `this` and owner are the same, there will be no
|
||||
* change in behavior.
|
||||
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
||||
* indicating filename, line number, and/or other information.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
{
|
||||
// The validation flag is currently mutative. We put it on
|
||||
// an external backing store so that we can freeze the whole object.
|
||||
// This can be replaced with a WeakMap once they are implemented in
|
||||
// commonly used development environments.
|
||||
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
||||
// the validation flag non-enumerable (where possible, which should
|
||||
// include every environment we run tests in), so the test framework
|
||||
// ignores it.
|
||||
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
}); // self and source are DEV only properties.
|
||||
|
||||
Object.defineProperty(element, "_self", {
|
||||
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
|
||||
});
|
||||
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
/**
|
||||
* https://github.com/reactjs/rfcs/pull/107
|
||||
* @param {*} type
|
||||
* @param {object} props
|
||||
* @param {string} key
|
||||
*/
|
||||
|
||||
function jsxDEV$1(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName; // Reserved names are extracted
|
||||
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||||
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
||||
// but as an intermediary step, we will use jsxDEV for everything except
|
||||
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
||||
// key is explicitly declared to be undefined or not.
|
||||
|
||||
if (maybeKey !== undefined) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
|
||||
key = "" + config.key;
|
||||
}
|
||||
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
} // Remaining properties are added to a new props object
|
||||
|
||||
for (propName in config) {
|
||||
if (
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName)
|
||||
) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
} // Resolve default props
|
||||
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (key || ref) {
|
||||
var displayName =
|
||||
typeof type === "function"
|
||||
? type.displayName || type.name || "Unknown"
|
||||
: type;
|
||||
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
|
||||
return ReactElement(
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
self,
|
||||
source,
|
||||
ReactCurrentOwner$1.current,
|
||||
props
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
|
||||
@@ -24,7 +24,7 @@ if (__DEV__) {
|
||||
) {
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
||||
}
|
||||
var ReactVersion = "18.3.0-www-modern-7437533c";
|
||||
var ReactVersion = "18.3.0-www-modern-3d181aee";
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -1677,6 +1677,287 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.ref !== undefined;
|
||||
}
|
||||
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.key !== undefined;
|
||||
}
|
||||
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (
|
||||
typeof config.ref === "string" &&
|
||||
ReactCurrentOwner$1.current &&
|
||||
self &&
|
||||
ReactCurrentOwner$1.current.stateNode !== self
|
||||
) {
|
||||
var componentName = getComponentNameFromType(
|
||||
ReactCurrentOwner$1.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
|
||||
);
|
||||
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function () {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = 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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Factory method to create a new React element. This no longer adheres to
|
||||
* the class pattern, so do not use new to call it. Also, instanceof check
|
||||
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
||||
* if something is a React Element.
|
||||
*
|
||||
* @param {*} type
|
||||
* @param {*} props
|
||||
* @param {*} key
|
||||
* @param {string|object} ref
|
||||
* @param {*} owner
|
||||
* @param {*} self A *temporary* helper to detect places where `this` is
|
||||
* different from the `owner` when React.createElement is called, so that we
|
||||
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
||||
* functions, and as long as `this` and owner are the same, there will be no
|
||||
* change in behavior.
|
||||
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
||||
* indicating filename, line number, and/or other information.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
{
|
||||
// The validation flag is currently mutative. We put it on
|
||||
// an external backing store so that we can freeze the whole object.
|
||||
// This can be replaced with a WeakMap once they are implemented in
|
||||
// commonly used development environments.
|
||||
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
||||
// the validation flag non-enumerable (where possible, which should
|
||||
// include every environment we run tests in), so the test framework
|
||||
// ignores it.
|
||||
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
}); // self and source are DEV only properties.
|
||||
|
||||
Object.defineProperty(element, "_self", {
|
||||
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
|
||||
});
|
||||
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
/**
|
||||
* https://github.com/reactjs/rfcs/pull/107
|
||||
* @param {*} type
|
||||
* @param {object} props
|
||||
* @param {string} key
|
||||
*/
|
||||
|
||||
function jsxDEV$1(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName; // Reserved names are extracted
|
||||
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||||
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
||||
// but as an intermediary step, we will use jsxDEV for everything except
|
||||
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
||||
// key is explicitly declared to be undefined or not.
|
||||
|
||||
if (maybeKey !== undefined) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
|
||||
key = "" + config.key;
|
||||
}
|
||||
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
} // Remaining properties are added to a new props object
|
||||
|
||||
for (propName in config) {
|
||||
if (
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName)
|
||||
) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
} // Resolve default props
|
||||
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (key || ref) {
|
||||
var displayName =
|
||||
typeof type === "function"
|
||||
? type.displayName || type.name || "Unknown"
|
||||
: type;
|
||||
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
|
||||
return ReactElement(
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
self,
|
||||
source,
|
||||
ReactCurrentOwner$1.current,
|
||||
props
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference");
|
||||
|
||||
function setCurrentlyValidatingElement$1(element) {
|
||||
@@ -3374,287 +3655,6 @@ if (__DEV__) {
|
||||
only: onlyChild
|
||||
};
|
||||
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.ref !== undefined;
|
||||
}
|
||||
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.key !== undefined;
|
||||
}
|
||||
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (
|
||||
typeof config.ref === "string" &&
|
||||
ReactCurrentOwner$1.current &&
|
||||
self &&
|
||||
ReactCurrentOwner$1.current.stateNode !== self
|
||||
) {
|
||||
var componentName = getComponentNameFromType(
|
||||
ReactCurrentOwner$1.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
|
||||
);
|
||||
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function () {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = 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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Factory method to create a new React element. This no longer adheres to
|
||||
* the class pattern, so do not use new to call it. Also, instanceof check
|
||||
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
||||
* if something is a React Element.
|
||||
*
|
||||
* @param {*} type
|
||||
* @param {*} props
|
||||
* @param {*} key
|
||||
* @param {string|object} ref
|
||||
* @param {*} owner
|
||||
* @param {*} self A *temporary* helper to detect places where `this` is
|
||||
* different from the `owner` when React.createElement is called, so that we
|
||||
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
||||
* functions, and as long as `this` and owner are the same, there will be no
|
||||
* change in behavior.
|
||||
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
||||
* indicating filename, line number, and/or other information.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
{
|
||||
// The validation flag is currently mutative. We put it on
|
||||
// an external backing store so that we can freeze the whole object.
|
||||
// This can be replaced with a WeakMap once they are implemented in
|
||||
// commonly used development environments.
|
||||
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
||||
// the validation flag non-enumerable (where possible, which should
|
||||
// include every environment we run tests in), so the test framework
|
||||
// ignores it.
|
||||
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
}); // self and source are DEV only properties.
|
||||
|
||||
Object.defineProperty(element, "_self", {
|
||||
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
|
||||
});
|
||||
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
/**
|
||||
* https://github.com/reactjs/rfcs/pull/107
|
||||
* @param {*} type
|
||||
* @param {object} props
|
||||
* @param {string} key
|
||||
*/
|
||||
|
||||
function jsxDEV$1(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName; // Reserved names are extracted
|
||||
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||||
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
||||
// but as an intermediary step, we will use jsxDEV for everything except
|
||||
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
||||
// key is explicitly declared to be undefined or not.
|
||||
|
||||
if (maybeKey !== undefined) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
|
||||
key = "" + config.key;
|
||||
}
|
||||
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
} // Remaining properties are added to a new props object
|
||||
|
||||
for (propName in config) {
|
||||
if (
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName)
|
||||
) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
} // Resolve default props
|
||||
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (key || ref) {
|
||||
var displayName =
|
||||
typeof type === "function"
|
||||
? type.displayName || type.name || "Unknown"
|
||||
: type;
|
||||
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
|
||||
return ReactElement(
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
self,
|
||||
source,
|
||||
ReactCurrentOwner$1.current,
|
||||
props
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
|
||||
@@ -144,7 +144,33 @@ var ReactCurrentDispatcher = { current: null },
|
||||
ReactCurrentCache: ReactCurrentCache,
|
||||
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
||||
ReactCurrentOwner: ReactCurrentOwner$1
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
function escape(key) {
|
||||
var escaperLookup = { "=": "=0", ":": "=2" };
|
||||
return (
|
||||
@@ -283,37 +309,11 @@ function lazyInitializer(payload) {
|
||||
}
|
||||
function noop() {}
|
||||
var onError =
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
};
|
||||
exports.Children = {
|
||||
map: mapChildren,
|
||||
forEach: function (children, forEachFunc, forEachContext) {
|
||||
@@ -570,4 +570,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-f4740bf5";
|
||||
exports.version = "18.3.0-www-classic-b2425be8";
|
||||
|
||||
@@ -111,7 +111,33 @@ var ReactCurrentDispatcher = { current: null },
|
||||
ReactCurrentCache: ReactCurrentCache,
|
||||
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
||||
ReactCurrentOwner: ReactCurrentOwner$1
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
function escape(key) {
|
||||
var escaperLookup = { "=": "=0", ":": "=2" };
|
||||
return (
|
||||
@@ -250,37 +276,11 @@ function lazyInitializer(payload) {
|
||||
}
|
||||
function noop() {}
|
||||
var onError =
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
};
|
||||
exports.Children = {
|
||||
map: mapChildren,
|
||||
forEach: function (children, forEachFunc, forEachContext) {
|
||||
@@ -562,4 +562,4 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-ec0970fd";
|
||||
exports.version = "18.3.0-www-modern-1e4811e0";
|
||||
|
||||
@@ -148,7 +148,33 @@ var ReactCurrentDispatcher = { current: null },
|
||||
ReactCurrentCache: ReactCurrentCache,
|
||||
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
||||
ReactCurrentOwner: ReactCurrentOwner$1
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
function escape(key) {
|
||||
var escaperLookup = { "=": "=0", ":": "=2" };
|
||||
return (
|
||||
@@ -287,37 +313,11 @@ function lazyInitializer(payload) {
|
||||
}
|
||||
function noop() {}
|
||||
var onError =
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
};
|
||||
exports.Children = {
|
||||
map: mapChildren,
|
||||
forEach: function (children, forEachFunc, forEachContext) {
|
||||
@@ -574,7 +574,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-b75b6a09";
|
||||
exports.version = "18.3.0-www-classic-65d179d4";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -115,7 +115,33 @@ var ReactCurrentDispatcher = { current: null },
|
||||
ReactCurrentCache: ReactCurrentCache,
|
||||
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
||||
ReactCurrentOwner: ReactCurrentOwner$1
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
function escape(key) {
|
||||
var escaperLookup = { "=": "=0", ":": "=2" };
|
||||
return (
|
||||
@@ -254,37 +280,11 @@ function lazyInitializer(payload) {
|
||||
}
|
||||
function noop() {}
|
||||
var onError =
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
};
|
||||
exports.Children = {
|
||||
map: mapChildren,
|
||||
forEach: function (children, forEachFunc, forEachContext) {
|
||||
@@ -566,7 +566,7 @@ exports.useSyncExternalStore = function (
|
||||
exports.useTransition = function () {
|
||||
return ReactCurrentDispatcher.current.useTransition();
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-aeab456d";
|
||||
exports.version = "18.3.0-www-modern-751434a6";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
||||
"function" ===
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
||||
|
||||
@@ -36374,7 +36374,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "18.3.0-www-classic-f4740bf5";
|
||||
var ReactVersion = "18.3.0-www-classic-b2425be8";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -17490,7 +17490,7 @@ Internals.Events = [
|
||||
var devToolsConfig$jscomp$inline_1828 = {
|
||||
findFiberByHostInstance: getClosestInstanceFromNode,
|
||||
bundleType: 0,
|
||||
version: "18.3.0-www-classic-b75b6a09",
|
||||
version: "18.3.0-www-classic-65d179d4",
|
||||
rendererPackageName: "react-dom"
|
||||
};
|
||||
var internals$jscomp$inline_2197 = {
|
||||
@@ -17520,7 +17520,7 @@ var internals$jscomp$inline_2197 = {
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "18.3.0-www-classic-b75b6a09"
|
||||
reconcilerVersion: "18.3.0-www-classic-65d179d4"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_2198 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
@@ -18021,4 +18021,4 @@ exports.useFormStatus = function () {
|
||||
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
|
||||
throw Error(formatProdErrorMessage(248));
|
||||
};
|
||||
exports.version = "18.3.0-www-classic-b75b6a09";
|
||||
exports.version = "18.3.0-www-classic-65d179d4";
|
||||
|
||||
@@ -1390,6 +1390,287 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.ref !== undefined;
|
||||
}
|
||||
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.key !== undefined;
|
||||
}
|
||||
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (
|
||||
typeof config.ref === "string" &&
|
||||
ReactCurrentOwner$1.current &&
|
||||
self &&
|
||||
ReactCurrentOwner$1.current.stateNode !== self
|
||||
) {
|
||||
var componentName = getComponentNameFromType(
|
||||
ReactCurrentOwner$1.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
|
||||
);
|
||||
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function () {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = 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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Factory method to create a new React element. This no longer adheres to
|
||||
* the class pattern, so do not use new to call it. Also, instanceof check
|
||||
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
||||
* if something is a React Element.
|
||||
*
|
||||
* @param {*} type
|
||||
* @param {*} props
|
||||
* @param {*} key
|
||||
* @param {string|object} ref
|
||||
* @param {*} owner
|
||||
* @param {*} self A *temporary* helper to detect places where `this` is
|
||||
* different from the `owner` when React.createElement is called, so that we
|
||||
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
||||
* functions, and as long as `this` and owner are the same, there will be no
|
||||
* change in behavior.
|
||||
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
||||
* indicating filename, line number, and/or other information.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
{
|
||||
// The validation flag is currently mutative. We put it on
|
||||
// an external backing store so that we can freeze the whole object.
|
||||
// This can be replaced with a WeakMap once they are implemented in
|
||||
// commonly used development environments.
|
||||
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
||||
// the validation flag non-enumerable (where possible, which should
|
||||
// include every environment we run tests in), so the test framework
|
||||
// ignores it.
|
||||
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
}); // self and source are DEV only properties.
|
||||
|
||||
Object.defineProperty(element, "_self", {
|
||||
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
|
||||
});
|
||||
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
/**
|
||||
* https://github.com/reactjs/rfcs/pull/107
|
||||
* @param {*} type
|
||||
* @param {object} props
|
||||
* @param {string} key
|
||||
*/
|
||||
|
||||
function jsxDEV$1(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName; // Reserved names are extracted
|
||||
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||||
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
||||
// but as an intermediary step, we will use jsxDEV for everything except
|
||||
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
||||
// key is explicitly declared to be undefined or not.
|
||||
|
||||
if (maybeKey !== undefined) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
|
||||
key = "" + config.key;
|
||||
}
|
||||
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
} // Remaining properties are added to a new props object
|
||||
|
||||
for (propName in config) {
|
||||
if (
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName)
|
||||
) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
} // Resolve default props
|
||||
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (key || ref) {
|
||||
var displayName =
|
||||
typeof type === "function"
|
||||
? type.displayName || type.name || "Unknown"
|
||||
: type;
|
||||
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
|
||||
return ReactElement(
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
self,
|
||||
source,
|
||||
ReactCurrentOwner$1.current,
|
||||
props
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var REACT_CLIENT_REFERENCE$1 = Symbol.for("react.client.reference");
|
||||
|
||||
function setCurrentlyValidatingElement$1(element) {
|
||||
@@ -2593,7 +2874,7 @@ if (__DEV__) {
|
||||
console["error"](error);
|
||||
};
|
||||
|
||||
var ReactVersion = "18.3.0-www-modern-813d6bf7";
|
||||
var ReactVersion = "18.3.0-www-modern-303a3284";
|
||||
|
||||
// Patch fetch
|
||||
var Children = {
|
||||
@@ -2604,287 +2885,6 @@ if (__DEV__) {
|
||||
only: onlyChild
|
||||
};
|
||||
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.ref !== undefined;
|
||||
}
|
||||
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config.key !== undefined;
|
||||
}
|
||||
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (
|
||||
typeof config.ref === "string" &&
|
||||
ReactCurrentOwner$1.current &&
|
||||
self &&
|
||||
ReactCurrentOwner$1.current.stateNode !== self
|
||||
) {
|
||||
var componentName = getComponentNameFromType(
|
||||
ReactCurrentOwner$1.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
|
||||
);
|
||||
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function () {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = 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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
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
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Factory method to create a new React element. This no longer adheres to
|
||||
* the class pattern, so do not use new to call it. Also, instanceof check
|
||||
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
||||
* if something is a React Element.
|
||||
*
|
||||
* @param {*} type
|
||||
* @param {*} props
|
||||
* @param {*} key
|
||||
* @param {string|object} ref
|
||||
* @param {*} owner
|
||||
* @param {*} self A *temporary* helper to detect places where `this` is
|
||||
* different from the `owner` when React.createElement is called, so that we
|
||||
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
||||
* functions, and as long as `this` and owner are the same, there will be no
|
||||
* change in behavior.
|
||||
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
||||
* indicating filename, line number, and/or other information.
|
||||
* @internal
|
||||
*/
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
{
|
||||
// The validation flag is currently mutative. We put it on
|
||||
// an external backing store so that we can freeze the whole object.
|
||||
// This can be replaced with a WeakMap once they are implemented in
|
||||
// commonly used development environments.
|
||||
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
||||
// the validation flag non-enumerable (where possible, which should
|
||||
// include every environment we run tests in), so the test framework
|
||||
// ignores it.
|
||||
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
}); // self and source are DEV only properties.
|
||||
|
||||
Object.defineProperty(element, "_self", {
|
||||
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
|
||||
});
|
||||
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
/**
|
||||
* https://github.com/reactjs/rfcs/pull/107
|
||||
* @param {*} type
|
||||
* @param {object} props
|
||||
* @param {string} key
|
||||
*/
|
||||
|
||||
function jsxDEV$1(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName; // Reserved names are extracted
|
||||
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||||
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
||||
// but as an intermediary step, we will use jsxDEV for everything except
|
||||
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
||||
// key is explicitly declared to be undefined or not.
|
||||
|
||||
if (maybeKey !== undefined) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
|
||||
key = "" + config.key;
|
||||
}
|
||||
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
} // Remaining properties are added to a new props object
|
||||
|
||||
for (propName in config) {
|
||||
if (
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName)
|
||||
) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
} // Resolve default props
|
||||
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === undefined) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (key || ref) {
|
||||
var displayName =
|
||||
typeof type === "function"
|
||||
? type.displayName || type.name || "Unknown"
|
||||
: type;
|
||||
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
|
||||
return ReactElement(
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
self,
|
||||
source,
|
||||
ReactCurrentOwner$1.current,
|
||||
props
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
||||
|
||||
@@ -75,6 +75,32 @@ function isValidElement(object) {
|
||||
object.$$typeof === REACT_ELEMENT_TYPE
|
||||
);
|
||||
}
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
function escape(key) {
|
||||
var escaperLookup = { "=": "=0", ":": "=2" };
|
||||
return (
|
||||
@@ -221,37 +247,11 @@ function createCacheNode() {
|
||||
var ReactCurrentBatchConfig = { transition: null };
|
||||
function noop() {}
|
||||
var onError =
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
},
|
||||
ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner,
|
||||
RESERVED_PROPS = { key: !0, ref: !0, __self: !0, __source: !0 };
|
||||
function jsx$1(type, config, maybeKey) {
|
||||
var propName,
|
||||
props = {},
|
||||
key = null,
|
||||
ref = null;
|
||||
void 0 !== maybeKey && (key = "" + maybeKey);
|
||||
void 0 !== config.key && (key = "" + config.key);
|
||||
void 0 !== config.ref && (ref = config.ref);
|
||||
for (propName in config)
|
||||
hasOwnProperty.call(config, propName) &&
|
||||
!RESERVED_PROPS.hasOwnProperty(propName) &&
|
||||
(props[propName] = config[propName]);
|
||||
if (type && type.defaultProps)
|
||||
for (propName in ((config = type.defaultProps), config))
|
||||
void 0 === props[propName] && (props[propName] = config[propName]);
|
||||
return {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type: type,
|
||||
key: key,
|
||||
ref: ref,
|
||||
props: props,
|
||||
_owner: ReactCurrentOwner.current
|
||||
};
|
||||
}
|
||||
"function" === typeof reportError
|
||||
? reportError
|
||||
: function (error) {
|
||||
console.error(error);
|
||||
};
|
||||
exports.Children = {
|
||||
map: mapChildren,
|
||||
forEach: function (children, forEachFunc, forEachContext) {
|
||||
@@ -468,4 +468,4 @@ exports.useId = function () {
|
||||
exports.useMemo = function (create, deps) {
|
||||
return ReactCurrentDispatcher.current.useMemo(create, deps);
|
||||
};
|
||||
exports.version = "18.3.0-www-modern-4fd18aea";
|
||||
exports.version = "18.3.0-www-modern-6a0476d6";
|
||||
|
||||
Reference in New Issue
Block a user