aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/react-dom
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/react-dom')
-rw-r--r--node_modules/react-dom/build-info.json10
-rw-r--r--node_modules/react-dom/cjs/react-dom-server.browser.development.js1065
-rw-r--r--node_modules/react-dom/cjs/react-dom-server.browser.production.min.js91
-rw-r--r--node_modules/react-dom/cjs/react-dom-server.node.development.js1078
-rw-r--r--node_modules/react-dom/cjs/react-dom-server.node.production.min.js91
-rw-r--r--node_modules/react-dom/cjs/react-dom-test-utils.development.js2068
-rw-r--r--node_modules/react-dom/cjs/react-dom-test-utils.production.min.js64
-rw-r--r--node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.development.js141
-rw-r--r--node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.production.min.js11
-rw-r--r--node_modules/react-dom/cjs/react-dom-unstable-fizz.node.development.js162
-rw-r--r--node_modules/react-dom/cjs/react-dom-unstable-fizz.node.production.min.js12
-rw-r--r--node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.development.js1629
-rw-r--r--node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.production.min.js31
-rw-r--r--node_modules/react-dom/cjs/react-dom.development.js20158
-rw-r--r--node_modules/react-dom/cjs/react-dom.production.min.js569
-rw-r--r--node_modules/react-dom/cjs/react-dom.profiling.min.js589
-rw-r--r--node_modules/react-dom/package.json61
-rw-r--r--node_modules/react-dom/umd/react-dom-server.browser.development.js1114
-rw-r--r--node_modules/react-dom/umd/react-dom-server.browser.production.min.js77
-rw-r--r--node_modules/react-dom/umd/react-dom-test-utils.development.js2077
-rw-r--r--node_modules/react-dom/umd/react-dom-test-utils.production.min.js51
-rw-r--r--node_modules/react-dom/umd/react-dom-unstable-fizz.browser.development.js141
-rw-r--r--node_modules/react-dom/umd/react-dom-unstable-fizz.browser.production.min.js10
-rw-r--r--node_modules/react-dom/umd/react-dom-unstable-native-dependencies.development.js1628
-rw-r--r--node_modules/react-dom/umd/react-dom-unstable-native-dependencies.production.min.js28
-rw-r--r--node_modules/react-dom/umd/react-dom.development.js20345
-rw-r--r--node_modules/react-dom/umd/react-dom.production.min.js466
-rw-r--r--node_modules/react-dom/umd/react-dom.profiling.min.js481
-rw-r--r--node_modules/react-dom/unstable-fizz.browser.js7
-rw-r--r--node_modules/react-dom/unstable-fizz.js3
-rw-r--r--node_modules/react-dom/unstable-fizz.node.js7
-rw-r--r--node_modules/react-dom/unstable-native-dependencies.js7
32 files changed, 27470 insertions, 26802 deletions
diff --git a/node_modules/react-dom/build-info.json b/node_modules/react-dom/build-info.json
index 4094da6..db5dbe5 100644
--- a/node_modules/react-dom/build-info.json
+++ b/node_modules/react-dom/build-info.json
@@ -1,8 +1,8 @@
{
- "branch": "pull/18344",
- "buildNumber": "106499",
- "checksum": "7fe5a2e",
- "commit": "da834083c",
+ "branch": "pull/21051",
+ "buildNumber": "287151",
+ "checksum": "94f5c65",
+ "commit": "12adaffef",
"environment": "ci",
- "reactVersion": "16.12.0-da834083c"
+ "reactVersion": "17.0.0-12adaffef"
}
diff --git a/node_modules/react-dom/cjs/react-dom-server.browser.development.js b/node_modules/react-dom/cjs/react-dom-server.browser.development.js
index 599bc94..37fe89d 100644
--- a/node_modules/react-dom/cjs/react-dom-server.browser.development.js
+++ b/node_modules/react-dom/cjs/react-dom-server.browser.development.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-server.browser.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -9,15 +9,12 @@
'use strict';
-
-
if (process.env.NODE_ENV !== "production") {
(function() {
'use strict';
var React = require('react');
var _assign = require('object-assign');
-var checkPropTypes = require('prop-types/checkPropTypes');
// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be replaced with error codes
@@ -32,23 +29,10 @@ function formatProdErrorMessage(code) {
return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
}
-var ReactVersion = '16.14.0';
-
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
-// Current owner and dispatcher used to share the same ref,
-// but PR #14548 split them out to better support the react-debug-tools package.
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
-}
+// TODO: this is special because it gets imported during build.
+var ReactVersion = '17.0.2';
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
-}
+var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
// by calls to these methods by a Babel plugin.
//
@@ -78,16 +62,12 @@ function printWarning(level, format, args) {
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
}
var argsWithFormat = args.map(function (item) {
@@ -99,72 +79,57 @@ function printWarning(level, format, args) {
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
}
}
+// ATTENTION
+// When adding new symbols to this file,
+// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
-var hasSymbol = typeof Symbol === 'function' && Symbol.for;
-var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
-var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
-var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
-var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
-var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
-var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
-var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
-var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
-var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
-var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
-var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
-var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
-var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
-var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
-
-var Uninitialized = -1;
-var Pending = 0;
-var Resolved = 1;
-var Rejected = 2;
-function refineResolvedLazyComponent(lazyComponent) {
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
-}
-function initializeLazyComponentType(lazyComponent) {
- if (lazyComponent._status === Uninitialized) {
- lazyComponent._status = Pending;
- var ctor = lazyComponent._ctor;
- var thenable = ctor();
- lazyComponent._result = thenable;
- thenable.then(function (moduleObject) {
- if (lazyComponent._status === Pending) {
- var defaultExport = moduleObject.default;
-
- {
- if (defaultExport === undefined) {
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
- }
- }
-
- lazyComponent._status = Resolved;
- lazyComponent._result = defaultExport;
- }
- }, function (error) {
- if (lazyComponent._status === Pending) {
- lazyComponent._status = Rejected;
- lazyComponent._result = error;
- }
- });
- }
+var REACT_ELEMENT_TYPE = 0xeac7;
+var REACT_PORTAL_TYPE = 0xeaca;
+var REACT_FRAGMENT_TYPE = 0xeacb;
+var REACT_STRICT_MODE_TYPE = 0xeacc;
+var REACT_PROFILER_TYPE = 0xead2;
+var REACT_PROVIDER_TYPE = 0xeacd;
+var REACT_CONTEXT_TYPE = 0xeace;
+var REACT_FORWARD_REF_TYPE = 0xead0;
+var REACT_SUSPENSE_TYPE = 0xead1;
+var REACT_SUSPENSE_LIST_TYPE = 0xead8;
+var REACT_MEMO_TYPE = 0xead3;
+var REACT_LAZY_TYPE = 0xead4;
+var REACT_BLOCK_TYPE = 0xead9;
+var REACT_SERVER_BLOCK_TYPE = 0xeada;
+var REACT_FUNDAMENTAL_TYPE = 0xead5;
+var REACT_SCOPE_TYPE = 0xead7;
+var REACT_OPAQUE_ID_TYPE = 0xeae0;
+var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
+var REACT_OFFSCREEN_TYPE = 0xeae2;
+var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
+
+if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor = Symbol.for;
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
+ REACT_MEMO_TYPE = symbolFor('react.memo');
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
+ REACT_BLOCK_TYPE = symbolFor('react.block');
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
}
function getWrappedName(outerType, innerType, wrapperName) {
@@ -172,6 +137,10 @@ function getWrappedName(outerType, innerType, wrapperName) {
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
}
+function getContextName(type) {
+ return type.displayName || 'Context';
+}
+
function getComponentName(type) {
if (type == null) {
// Host root, text node or just invalid type.
@@ -200,7 +169,7 @@ function getComponentName(type) {
return 'Portal';
case REACT_PROFILER_TYPE:
- return "Profiler";
+ return 'Profiler';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
@@ -215,10 +184,12 @@ function getComponentName(type) {
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
- return 'Context.Consumer';
+ var context = type;
+ return getContextName(context) + '.Consumer';
case REACT_PROVIDER_TYPE:
- return 'Context.Provider';
+ var provider = type;
+ return getContextName(provider._context) + '.Provider';
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, 'ForwardRef');
@@ -227,18 +198,19 @@ function getComponentName(type) {
return getComponentName(type.type);
case REACT_BLOCK_TYPE:
- return getComponentName(type.render);
+ return getComponentName(type._render);
case REACT_LAZY_TYPE:
{
- var thenable = type;
- var resolvedThenable = refineResolvedLazyComponent(thenable);
-
- if (resolvedThenable) {
- return getComponentName(resolvedThenable);
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ return getComponentName(init(payload));
+ } catch (x) {
+ return null;
}
-
- break;
}
}
}
@@ -246,48 +218,412 @@ function getComponentName(type) {
return null;
}
-var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
-function describeComponentFrame (name, source, ownerName) {
- var sourceInfo = '';
+// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
- if (source) {
- var path = source.fileName;
- var fileName = path.replace(BEFORE_SLASH_RE, '');
+var enableSuspenseServerRenderer = false;
- {
- // In DEV, include code for a common special case:
- // prefer "folder/index.js" instead of just "index.js".
- if (/^index\./.test(fileName)) {
- var match = path.match(BEFORE_SLASH_RE);
+// Helpers to patch console.logs to avoid logging during side-effect free
+// replaying on render function. This currently only patches the object
+// lazily which won't cover if the log function was extracted eagerly.
+// We could also eagerly patch the method.
+var disabledDepth = 0;
+var prevLog;
+var prevInfo;
+var prevWarn;
+var prevError;
+var prevGroup;
+var prevGroupCollapsed;
+var prevGroupEnd;
+
+function disabledLog() {}
+
+disabledLog.__reactDisabledLog = true;
+function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
+
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ disabledDepth++;
+ }
+}
+function reenableLogs() {
+ {
+ disabledDepth--;
+
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ log: _assign({}, props, {
+ value: prevLog
+ }),
+ info: _assign({}, props, {
+ value: prevInfo
+ }),
+ warn: _assign({}, props, {
+ value: prevWarn
+ }),
+ error: _assign({}, props, {
+ value: prevError
+ }),
+ group: _assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: _assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: _assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ if (disabledDepth < 0) {
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
+ }
+ }
+}
+
+var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
+var prefix;
+function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === undefined) {
+ // Extract the VM specific prefix used by each line.
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || '';
+ }
+ } // We use the prefix to ensure our stacks line up with native stack frames.
+
+
+ return '\n' + prefix + name;
+ }
+}
+var reentry = false;
+var componentFrameCache;
+
+{
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+}
+
+function describeNativeComponentFrame(fn, construct) {
+ // If something asked for a stack inside a fake render, it should get ignored.
+ if (!fn || reentry) {
+ return '';
+ }
+
+ {
+ var frame = componentFrameCache.get(fn);
+
+ if (frame !== undefined) {
+ return frame;
+ }
+ }
+
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
+
+ Error.prepareStackTrace = undefined;
+ var previousDispatcher;
+
+ {
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
+ // for warnings.
+
+ ReactCurrentDispatcher.current = null;
+ disableLogs();
+ }
+
+ try {
+ // This should throw.
+ if (construct) {
+ // Something should be setting the props in the constructor.
+ var Fake = function () {
+ throw Error();
+ }; // $FlowFixMe
+
+
+ Object.defineProperty(Fake.prototype, 'props', {
+ set: function () {
+ // We use a throwing setter instead of frozen or non-writable props
+ // because that won't throw in a non-strict mode function.
+ throw Error();
+ }
+ });
+
+ if (typeof Reflect === 'object' && Reflect.construct) {
+ // We construct a different control for this case to include any extra
+ // frames added by the construct call.
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
+ }
+
+ fn.call(Fake.prototype);
+ }
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
- if (match) {
- var pathBeforeSlash = match[1];
+ fn();
+ }
+ } catch (sample) {
+ // This is inlined manually because closure doesn't do it for us.
+ if (sample && control && typeof sample.stack === 'string') {
+ // This extracts the first frame from the sample that isn't also in the control.
+ // Skipping one frame that we assume is the frame that calls the two.
+ var sampleLines = sample.stack.split('\n');
+ var controlLines = control.stack.split('\n');
+ var s = sampleLines.length - 1;
+ var c = controlLines.length - 1;
+
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
+ // We expect at least one stack frame to be shared.
+ // Typically this will be the root most one. However, stack frames may be
+ // cut off due to maximum stack limits. In this case, one maybe cut off
+ // earlier than the other. We assume that the sample is longer or the same
+ // and there for cut off earlier. So we should find the root most frame in
+ // the sample somewhere in the control.
+ c--;
+ }
- if (pathBeforeSlash) {
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
- fileName = folderName + '/' + fileName;
+ for (; s >= 1 && c >= 0; s--, c--) {
+ // Next we find the first one that isn't the same which should be the
+ // frame that called our sample function and the control.
+ if (sampleLines[s] !== controlLines[c]) {
+ // In V8, the first line is describing the message but other VMs don't.
+ // If we're about to return the first line, and the control is also on the same
+ // line, that's a pretty good indicator that our sample threw at same line as
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
+ // This can happen if you passed a class to function component, or non-function.
+ if (s !== 1 || c !== 1) {
+ do {
+ s--;
+ c--; // We may still have similar intermediate frames from the construct call.
+ // The next one that isn't the same should be our match though.
+
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, _frame);
+ }
+ } // Return the line we found.
+
+
+ return _frame;
+ }
+ } while (s >= 1 && c >= 0);
}
+
+ break;
}
}
}
+ } finally {
+ reentry = false;
+
+ {
+ ReactCurrentDispatcher.current = previousDispatcher;
+ reenableLogs();
+ }
+
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ } // Fallback to just using the name if we couldn't make it throw.
+
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
- } else if (ownerName) {
- sourceInfo = ' (created by ' + ownerName + ')';
+ var name = fn ? fn.displayName || fn.name : '';
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
}
- return '\n in ' + (name || 'Unknown') + sourceInfo;
+ return syntheticFrame;
+}
+function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
}
-var enableSuspenseServerRenderer = false;
+function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+}
+
+function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+
+ if (type == null) {
+ return '';
+ }
+
+ if (typeof type === 'function') {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
+
+ if (typeof type === 'string') {
+ return describeBuiltInComponentFrame(type);
+ }
+
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame('Suspense');
+
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame('SuspenseList');
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+
+ case REACT_MEMO_TYPE:
+ // Memo may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+
+ case REACT_BLOCK_TYPE:
+ return describeFunctionComponentFrame(type._render);
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ // Lazy may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {}
+ }
+ }
+ }
+
+ return '';
+}
+
+var loggedTypeFailures = {};
+var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+
+function setCurrentlyValidatingElement(element) {
+ {
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
+ } else {
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
+ }
+ }
+}
+
+function checkPropTypes(typeSpecs, values, location, componentName, element) {
+ {
+ // $FlowFixMe This is okay but Flow doesn't know it.
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
-var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
+ 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') {
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
+ err.name = 'Invariant Violation';
+ throw err;
+ }
+
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
+ } catch (ex) {
+ error$1 = ex;
+ }
+
+ if (error$1 && !(error$1 instanceof Error)) {
+ setCurrentlyValidatingElement(element);
+
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
+
+ setCurrentlyValidatingElement(null);
+ }
+
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error$1.message] = true;
+ setCurrentlyValidatingElement(element);
+
+ error('Failed %s type: %s', location, error$1.message);
+
+ setCurrentlyValidatingElement(null);
+ }
+ }
+ }
+ }
+}
-var ReactDebugCurrentFrame;
var didWarnAboutInvalidateContextType;
{
- ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
didWarnAboutInvalidateContextType = new Set();
}
@@ -315,7 +651,7 @@ function maskContext(type, context) {
function checkContextTypes(typeSpecs, values, location) {
{
- checkPropTypes(typeSpecs, values, location, 'Component', ReactDebugCurrentFrame.getCurrentStack);
+ checkPropTypes(typeSpecs, values, location, 'Component');
}
}
@@ -444,7 +780,7 @@ function freeThreadID(id) {
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
-// Attributes that aren't in the whitelist are presumed to have this type.
+// Attributes that aren't in the filter are presumed to have this type.
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
@@ -559,6 +895,7 @@ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)
}
if (propertyInfo !== null) {
+
switch (propertyInfo.type) {
case BOOLEAN:
return !value;
@@ -580,7 +917,7 @@ function getPropertyInfo(name) {
return properties.hasOwnProperty(name) ? properties[name] : null;
}
-function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
+function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
this.attributeName = attributeName;
this.attributeNamespace = attributeNamespace;
@@ -588,6 +925,7 @@ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attribut
this.propertyName = name;
this.type = type;
this.sanitizeURL = sanitizeURL;
+ this.removeEmptyString = removeEmptyString;
} // When adding attributes to this list, be sure to also add them to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.
@@ -599,11 +937,11 @@ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This preven
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
-
reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // A few React string attributes have a different name.
// This is a mapping from React prop names to the attribute names.
@@ -614,6 +952,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" HTML attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -623,6 +962,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" SVG attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -633,16 +973,18 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML boolean attributes.
['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
-'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
+'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
'itemScope'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are the few React props that we set as DOM properties
// rather than attributes. These are all booleans.
@@ -656,6 +998,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.
@@ -667,6 +1010,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be positive numbers.
@@ -677,6 +1021,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be numbers.
@@ -684,6 +1029,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
});
var CAMELIZE = /[\-\:]([a-z])/g;
@@ -692,7 +1038,7 @@ var capitalize = function (token) {
return token[1].toUpperCase();
}; // This is a list of all SVG attributes that need special casing, namespacing,
// or boolean value assignment. Regular attributes that just accept strings
-// and have the same names are omitted, just like in the HTML whitelist.
+// and have the same names are omitted, just like in the HTML attribute filter.
// Some of these attributes can be hard to find. This list was created by
// scraping the MDN documentation.
@@ -704,6 +1050,7 @@ var capitalize = function (token) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // String SVG attributes with the xlink namespace.
@@ -713,7 +1060,8 @@ var capitalize = function (token) {
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false);
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
+ false);
}); // String SVG attributes with the xml namespace.
['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
@@ -722,7 +1070,8 @@ var capitalize = function (token) {
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false);
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
+ false);
}); // These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.
@@ -731,25 +1080,23 @@ var capitalize = function (token) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These attributes accept URLs. These must not allow javascript: URLS.
// These will also need to accept Trusted Types object in the future.
var xlinkHref = 'xlinkHref';
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
-'xlink:href', 'http://www.w3.org/1999/xlink', true);
+'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
+false);
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ true, // sanitizeURL
true);
});
-var ReactDebugCurrentFrame$1 = null;
-
-{
- ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-} // A javascript: URL can contain leading C0 control or \u0020 SPACE,
// and any newline or tab are filtered out as if they're not part of the URL.
// https://url.spec.whatwg.org/#url-parsing
// Tab or newline are defined as \r\n\t:
@@ -760,7 +1107,6 @@ var ReactDebugCurrentFrame$1 = null;
/* eslint-disable max-len */
-
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
var didWarn = false;
@@ -963,13 +1309,13 @@ var currentHookNameInDev;
function resolveCurrentlyRenderingComponent() {
if (!(currentlyRenderingComponent !== null)) {
{
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
+ throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
}
}
{
if (isInHookUserCodeInDev) {
- error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
}
}
@@ -1074,28 +1420,25 @@ function finishHooks(Component, props, children, refOrContext) {
children = Component(props, refOrContext);
}
+ resetHooksState();
+ return children;
+} // Reset the internal hooks state if an error occurs while rendering a component
+
+function resetHooksState() {
+ {
+ isInHookUserCodeInDev = false;
+ }
+
currentlyRenderingComponent = null;
+ didScheduleRenderPhaseUpdate = false;
firstWorkInProgressHook = null;
numberOfReRenders = 0;
renderPhaseUpdates = null;
workInProgressHook = null;
-
- {
- isInHookUserCodeInDev = false;
- } // These were reset above
- // currentlyRenderingComponent = null;
- // didScheduleRenderPhaseUpdate = false;
- // firstWorkInProgressHook = null;
- // numberOfReRenders = 0;
- // renderPhaseUpdates = null;
- // workInProgressHook = null;
-
-
- return children;
}
function readContext(context, observedBits) {
- var threadID = currentThreadID;
+ var threadID = currentPartialRenderer.threadID;
validateContextBounds(context, threadID);
{
@@ -1113,7 +1456,7 @@ function useContext(context, observedBits) {
}
resolveCurrentlyRenderingComponent();
- var threadID = currentThreadID;
+ var threadID = currentPartialRenderer.threadID;
validateContextBounds(context, threadID);
return context[threadID];
}
@@ -1270,7 +1613,7 @@ function useLayoutEffect(create, inputs) {
{
currentHookNameInDev = 'useLayoutEffect';
- error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.');
+ error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');
}
}
@@ -1313,23 +1656,24 @@ function dispatchAction(componentIdentity, queue, action) {
}
function useCallback(callback, deps) {
- // Callbacks are passed as they are in the server environment.
- return callback;
-}
-
-function useResponder(responder, props) {
- return {
- props: props,
- responder: responder
- };
+ return useMemo(function () {
+ return callback;
+ }, deps);
+} // TODO Decide on how to implement this hook for server rendering.
+// If a mutation occurs during render, consider triggering a Suspense boundary
+// and falling back to client rendering.
+
+function useMutableSource(source, getSnapshot, subscribe) {
+ resolveCurrentlyRenderingComponent();
+ return getSnapshot(source._source);
}
-function useDeferredValue(value, config) {
+function useDeferredValue(value) {
resolveCurrentlyRenderingComponent();
return value;
}
-function useTransition(config) {
+function useTransition() {
resolveCurrentlyRenderingComponent();
var startTransition = function (callback) {
@@ -1339,11 +1683,15 @@ function useTransition(config) {
return [startTransition, false];
}
+function useOpaqueIdentifier() {
+ return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
+}
+
function noop() {}
-var currentThreadID = 0;
-function setCurrentThreadID(threadID) {
- currentThreadID = threadID;
+var currentPartialRenderer = null;
+function setCurrentPartialRenderer(renderer) {
+ currentPartialRenderer = renderer;
}
var Dispatcher = {
readContext: readContext,
@@ -1360,9 +1708,11 @@ var Dispatcher = {
useEffect: noop,
// Debugging effect
useDebugValue: noop,
- useResponder: useResponder,
useDeferredValue: useDeferredValue,
- useTransition: useTransition
+ useTransition: useTransition,
+ useOpaqueIdentifier: useOpaqueIdentifier,
+ // Subscriptions are not setup in a server environment.
+ useMutableSource: useMutableSource
};
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
@@ -1401,49 +1751,28 @@ function getChildNamespace(parentNamespace, type) {
return parentNamespace;
}
-var ReactDebugCurrentFrame$2 = null;
-var ReactControlledValuePropTypes = {
- checkPropTypes: null
+var hasReadOnlyValue = {
+ button: true,
+ checkbox: true,
+ image: true,
+ hidden: true,
+ radio: true,
+ reset: true,
+ submit: true
};
-
-{
- ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
- var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
- };
- var propTypes = {
- value: function (props, propName, componentName) {
- if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
- },
- checked: function (props, propName, componentName) {
- if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+function checkControlledValueProps(tagName, props) {
+ {
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
+ error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
}
- };
- /**
- * Provide a linked `value` attribute for controlled forms. You should not use
- * this outside of the ReactDOM controlled form components.
- */
- ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
- checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
- };
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
+ error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+ }
+ }
}
-// For HTML, certain tags should omit their close tag. We keep a whitelist for
+// For HTML, certain tags should omit their close tag. We keep a list for
// those special-case tags.
var omittedCloseTags = {
area: true,
@@ -1471,11 +1800,6 @@ var voidElementTags = _assign({
}, omittedCloseTags);
var HTML = '__html';
-var ReactDebugCurrentFrame$3 = null;
-
-{
- ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
-}
function assertValidProps(tag, props) {
if (!props) {
@@ -1486,7 +1810,7 @@ function assertValidProps(tag, props) {
if (voidElementTags[tag]) {
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
{
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
}
}
}
@@ -1500,7 +1824,7 @@ function assertValidProps(tag, props) {
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
{
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
}
}
}
@@ -1513,7 +1837,7 @@ function assertValidProps(tag, props) {
if (!(props.style == null || typeof props.style === 'object')) {
{
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
}
}
}
@@ -1651,7 +1975,7 @@ function isCustomComponent(tagName, props) {
switch (tagName) {
// These are reserved SVG and MathML elements.
- // We don't mind this whitelist too much because we expect it to never grow.
+ // We don't mind this list too much because we expect it to never grow.
// The alternative is to track the namespace in a few places which is convoluted.
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
case 'annotation-xml':
@@ -1894,9 +2218,9 @@ function warnInvalidARIAProps(type, props) {
}).join(', ');
if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
} else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
}
}
}
@@ -1928,21 +2252,7 @@ function validateProperties$1(type, props) {
}
}
-/**
- * Mapping from registration name to plugin module
- */
-
-var registrationNameModules = {};
-/**
- * Mapping from lowercase registration names to the properly cased version,
- * used to warn in the case of missing event handlers. Available
- * only in true.
- * @type {Object}
- */
-
-var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
-
-// When adding attributes to the HTML or SVG whitelist, be sure to
+// When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
@@ -1992,9 +2302,11 @@ var possibleStandardNames = {
dir: 'dir',
disabled: 'disabled',
disablepictureinpicture: 'disablePictureInPicture',
+ disableremoteplayback: 'disableRemotePlayback',
download: 'download',
draggable: 'draggable',
enctype: 'encType',
+ enterkeyhint: 'enterKeyHint',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
@@ -2441,7 +2753,7 @@ var validateProperty$1 = function () {};
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
return true;
}
@@ -2456,8 +2768,11 @@ var validateProperty$1 = function () {};
} // We can't rely on the event system being injected on the server.
- if (canUseEventSystem) {
- if (registrationNameModules.hasOwnProperty(name)) {
+ if (eventRegistry != null) {
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
+
+ if (registrationNameDependencies.hasOwnProperty(name)) {
return true;
}
@@ -2577,12 +2892,12 @@ var validateProperty$1 = function () {};
};
}
-var warnUnknownProperties = function (type, props, canUseEventSystem) {
+var warnUnknownProperties = function (type, props, eventRegistry) {
{
var unknownProps = [];
for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
if (!isValid) {
unknownProps.push(key);
@@ -2594,19 +2909,19 @@ var warnUnknownProperties = function (type, props, canUseEventSystem) {
}).join(', ');
if (unknownProps.length === 1) {
- error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
} else if (unknownProps.length > 1) {
- error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
}
}
};
-function validateProperties$2(type, props, canUseEventSystem) {
+function validateProperties$2(type, props, eventRegistry) {
if (isCustomComponent(type, props)) {
return;
}
- warnUnknownProperties(type, props, canUseEventSystem);
+ warnUnknownProperties(type, props, eventRegistry);
}
var toArray = React.Children.toArray; // This is only used in DEV.
@@ -2615,8 +2930,8 @@ var toArray = React.Children.toArray; // This is only used in DEV.
// Each stack is an array of frames which may contain nested stacks of elements.
var currentDebugStacks = [];
-var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
-var ReactDebugCurrentFrame$4;
+var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
+var ReactDebugCurrentFrame$1;
var prevGetCurrentStackImpl = null;
var getCurrentServerStackImpl = function () {
@@ -2638,22 +2953,16 @@ var popCurrentDebugStack = function () {};
var hasWarnedAboutUsingContextAsConsumer = false;
{
- ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame;
+ ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
validatePropertiesInDevelopment = function (type, props) {
validateProperties(type, props);
validateProperties$1(type, props);
- validateProperties$2(type, props,
- /* canUseEventSystem */
- false);
+ validateProperties$2(type, props, null);
};
describeStackFrame = function (element) {
- var source = element._source;
- var type = element.type;
- var name = getComponentName(type);
- var ownerName = null;
- return describeComponentFrame(name, source, ownerName);
+ return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
};
pushCurrentDebugStack = function (stack) {
@@ -2662,8 +2971,8 @@ var hasWarnedAboutUsingContextAsConsumer = false;
if (currentDebugStacks.length === 1) {
// We are entering a server renderer.
// Remember the previous (e.g. client) global stack implementation.
- prevGetCurrentStackImpl = ReactDebugCurrentFrame$4.getCurrentStack;
- ReactDebugCurrentFrame$4.getCurrentStack = getCurrentServerStackImpl;
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
+ ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
}
};
@@ -2684,7 +2993,7 @@ var hasWarnedAboutUsingContextAsConsumer = false;
if (currentDebugStacks.length === 0) {
// We are exiting the server renderer.
// Restore the previous (e.g. client) global stack implementation.
- ReactDebugCurrentFrame$4.getCurrentStack = prevGetCurrentStackImpl;
+ ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
prevGetCurrentStackImpl = null;
}
};
@@ -2808,7 +3117,7 @@ function warnNoop(publicInstance, callerName) {
}
}
-function shouldConstruct(Component) {
+function shouldConstruct$1(Component) {
return Component.prototype && Component.prototype.isReactComponent;
}
@@ -2888,6 +3197,7 @@ var RESERVED_PROPS = {
function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
var ret = '<' + tagVerbatim;
+ var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
for (var propKey in props) {
if (!hasOwnProperty$2.call(props, propKey)) {
@@ -2906,7 +3216,7 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
var markup = null;
- if (isCustomComponent(tagLowercase, props)) {
+ if (isCustomComponent$1) {
if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
markup = createMarkupForCustomAttribute(propKey, propValue);
}
@@ -2961,7 +3271,7 @@ function resolve(child, context, threadID) {
function processChild(element, Component) {
- var isClass = shouldConstruct(Component);
+ var isClass = shouldConstruct$1(Component);
var publicContext = processContext(Component, context, threadID, isClass);
var queue = [];
var replace = false;
@@ -3042,20 +3352,26 @@ function resolve(child, context, threadID) {
inst = Component(element.props, publicContext, updater);
inst = finishHooks(Component, element.props, inst, publicContext);
- if (inst == null || inst.render == null) {
- child = inst;
- validateRenderResult(child, Component);
- return;
- }
-
{
- var _componentName3 = getComponentName(Component) || 'Unknown';
+ // Support for module components is deprecated and is removed behind a flag.
+ // Whether or not it would crash later, we want to show a good message in DEV first.
+ if (inst != null && inst.render != null) {
+ var _componentName3 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutModulePatternComponent[_componentName3]) {
- error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
+ if (!didWarnAboutModulePatternComponent[_componentName3]) {
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
- didWarnAboutModulePatternComponent[_componentName3] = true;
+ didWarnAboutModulePatternComponent[_componentName3] = true;
+ }
}
+ } // If the flag is on, everything is assumed to be a function component.
+ // Otherwise, we also do the unfortunate dynamic checks.
+
+
+ if ( inst == null || inst.render == null) {
+ child = inst;
+ validateRenderResult(child, Component);
+ return;
}
}
@@ -3076,7 +3392,7 @@ function resolve(child, context, threadID) {
if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
warn( // keep this warning in sync with ReactStrictModeWarning.js
- 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
+ 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
didWarnAboutDeprecatedWillMount[_componentName4] = true;
}
@@ -3176,12 +3492,10 @@ function resolve(child, context, threadID) {
};
}
-var ReactDOMServerRenderer =
-/*#__PURE__*/
-function () {
+var ReactDOMServerRenderer = /*#__PURE__*/function () {
// TODO: type this more strictly:
// DEV-only
- function ReactDOMServerRenderer(children, makeStaticMarkup) {
+ function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
var flatChildren = flattenTopLevelChildren(children);
var topFrame = {
type: null,
@@ -3208,7 +3522,10 @@ function () {
this.contextIndex = -1;
this.contextStack = [];
- this.contextValueStack = [];
+ this.contextValueStack = []; // useOpaqueIdentifier ID
+
+ this.uniqueID = 0;
+ this.identifierPrefix = options && options.identifierPrefix || '';
{
this.contextProviderStack = [];
@@ -3296,10 +3613,10 @@ function () {
return null;
}
- var prevThreadID = currentThreadID;
- setCurrentThreadID(this.threadID);
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = Dispatcher;
+ var prevPartialRenderer = currentPartialRenderer;
+ setCurrentPartialRenderer(this);
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = Dispatcher;
try {
// Markup generated within <Suspense> ends up buffered until we know
@@ -3405,8 +3722,9 @@ function () {
return out[0];
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- setCurrentThreadID(prevThreadID);
+ ReactCurrentDispatcher$1.current = prevDispatcher;
+ setCurrentPartialRenderer(prevPartialRenderer);
+ resetHooksState();
}
};
@@ -3484,8 +3802,16 @@ function () {
}
switch (elementType) {
+ // TODO: LegacyHidden acts the same as a fragment. This only works
+ // because we currently assume that every instance of LegacyHidden is
+ // accompanied by a host component wrapper. In the hidden mode, the host
+ // component is given a `hidden` attribute, which ensures that the
+ // initial HTML is not visible. To support the use of LegacyHidden as a
+ // true fragment, without an extra DOM node, we would have to hide the
+ // initial HTML in some other way.
+ case REACT_LEGACY_HIDDEN_TYPE:
+ case REACT_DEBUG_TRACING_MODE_TYPE:
case REACT_STRICT_MODE_TYPE:
- case REACT_CONCURRENT_MODE_TYPE:
case REACT_PROFILER_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
case REACT_FRAGMENT_TYPE:
@@ -3519,6 +3845,17 @@ function () {
}
}
}
+ // eslint-disable-next-line-no-fallthrough
+
+ case REACT_SCOPE_TYPE:
+ {
+
+ {
+ {
+ throw Error( "ReactDOMServer does not yet support scope components." );
+ }
+ }
+ }
}
if (typeof elementType === 'object' && elementType !== null) {
@@ -3527,50 +3864,50 @@ function () {
{
var element = nextChild;
- var _nextChildren4;
+ var _nextChildren5;
var componentIdentity = {};
prepareToUseHooks(componentIdentity);
- _nextChildren4 = elementType.render(element.props, element.ref);
- _nextChildren4 = finishHooks(elementType.render, element.props, _nextChildren4, element.ref);
- _nextChildren4 = toArray(_nextChildren4);
- var _frame4 = {
+ _nextChildren5 = elementType.render(element.props, element.ref);
+ _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
+ _nextChildren5 = toArray(_nextChildren5);
+ var _frame5 = {
type: null,
domNamespace: parentNamespace,
- children: _nextChildren4,
+ children: _nextChildren5,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame4.debugElementStack = [];
+ _frame5.debugElementStack = [];
}
- this.stack.push(_frame4);
+ this.stack.push(_frame5);
return '';
}
case REACT_MEMO_TYPE:
{
var _element = nextChild;
- var _nextChildren5 = [React.createElement(elementType.type, _assign({
+ var _nextChildren6 = [React.createElement(elementType.type, _assign({
ref: _element.ref
}, _element.props))];
- var _frame5 = {
+ var _frame6 = {
type: null,
domNamespace: parentNamespace,
- children: _nextChildren5,
+ children: _nextChildren6,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame5.debugElementStack = [];
+ _frame6.debugElementStack = [];
}
- this.stack.push(_frame5);
+ this.stack.push(_frame6);
return '';
}
@@ -3579,23 +3916,23 @@ function () {
var provider = nextChild;
var nextProps = provider.props;
- var _nextChildren6 = toArray(nextProps.children);
+ var _nextChildren7 = toArray(nextProps.children);
- var _frame6 = {
+ var _frame7 = {
type: provider,
domNamespace: parentNamespace,
- children: _nextChildren6,
+ children: _nextChildren7,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame6.debugElementStack = [];
+ _frame7.debugElementStack = [];
}
this.pushProvider(provider);
- this.stack.push(_frame6);
+ this.stack.push(_frame7);
return '';
}
@@ -3631,22 +3968,22 @@ function () {
validateContextBounds(reactContext, threadID);
var nextValue = reactContext[threadID];
- var _nextChildren7 = toArray(_nextProps.children(nextValue));
+ var _nextChildren8 = toArray(_nextProps.children(nextValue));
- var _frame7 = {
+ var _frame8 = {
type: nextChild,
domNamespace: parentNamespace,
- children: _nextChildren7,
+ children: _nextChildren8,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame7.debugElementStack = [];
+ _frame8.debugElementStack = [];
}
- this.stack.push(_frame7);
+ this.stack.push(_frame8);
return '';
}
// eslint-disable-next-line-no-fallthrough
@@ -3669,54 +4006,27 @@ function () {
// suspense server-side renderer is enabled so synchronously
// resolved constructors are supported.
- initializeLazyComponentType(lazyComponent);
-
- switch (lazyComponent._status) {
- case Resolved:
- {
- var _nextChildren9 = [React.createElement(lazyComponent._result, _assign({
- ref: _element2.ref
- }, _element2.props))];
- var _frame9 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren9,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame9.debugElementStack = [];
- }
-
- this.stack.push(_frame9);
- return '';
- }
-
- case Rejected:
- throw lazyComponent._result;
-
- case Pending:
- default:
- {
- {
- throw Error( "ReactDOMServer does not yet support lazy-loaded components." );
- }
- }
-
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_SCOPE_TYPE:
- {
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ var result = init(payload);
+ var _nextChildren10 = [React.createElement(result, _assign({
+ ref: _element2.ref
+ }, _element2.props))];
+ var _frame10 = {
+ type: null,
+ domNamespace: parentNamespace,
+ children: _nextChildren10,
+ childIndex: 0,
+ context: context,
+ footer: ''
+ };
{
- {
- throw Error( "ReactDOMServer does not yet support scope components." );
- }
+ _frame10.debugElementStack = [];
}
+
+ this.stack.push(_frame10);
+ return '';
}
}
}
@@ -3768,16 +4078,16 @@ function () {
if (tag === 'input') {
{
- ReactControlledValuePropTypes.checkPropTypes('input', props);
+ checkControlledValueProps('input', props);
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
- error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
+ error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
didWarnDefaultChecked = true;
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
- error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
+ error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
didWarnDefaultInputValue = true;
}
@@ -3793,10 +4103,10 @@ function () {
});
} else if (tag === 'textarea') {
{
- ReactControlledValuePropTypes.checkPropTypes('textarea', props);
+ checkControlledValueProps('textarea', props);
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
- error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
+ error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnDefaultTextareaValue = true;
}
@@ -3846,7 +4156,7 @@ function () {
});
} else if (tag === 'select') {
{
- ReactControlledValuePropTypes.checkPropTypes('select', props);
+ checkControlledValueProps('select', props);
for (var i = 0; i < valuePropNames.length; i++) {
var propName = valuePropNames[i];
@@ -3865,7 +4175,7 @@ function () {
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
- error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
+ error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnDefaultSelectValue = true;
}
@@ -3980,8 +4290,8 @@ function () {
* See https://reactjs.org/docs/react-dom-server.html#rendertostring
*/
-function renderToString(element) {
- var renderer = new ReactDOMServerRenderer(element, false);
+function renderToString(element, options) {
+ var renderer = new ReactDOMServerRenderer(element, false, options);
try {
var markup = renderer.read(Infinity);
@@ -3996,8 +4306,8 @@ function renderToString(element) {
* See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
*/
-function renderToStaticMarkup(element) {
- var renderer = new ReactDOMServerRenderer(element, true);
+function renderToStaticMarkup(element, options) {
+ var renderer = new ReactDOMServerRenderer(element, true, options);
try {
var markup = renderer.read(Infinity);
@@ -4021,23 +4331,12 @@ function renderToStaticNodeStream() {
throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
}
}
-} // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
-
-
-var ReactDOMServer = {
- renderToString: renderToString,
- renderToStaticMarkup: renderToStaticMarkup,
- renderToNodeStream: renderToNodeStream,
- renderToStaticNodeStream: renderToStaticNodeStream,
- version: ReactVersion
-};
-
-// TODO: decide on the top-level export form.
-// This is hacky but makes it work with both Rollup and Jest
-
-
-var server_browser = ReactDOMServer.default || ReactDOMServer;
+}
-module.exports = server_browser;
+exports.renderToNodeStream = renderToNodeStream;
+exports.renderToStaticMarkup = renderToStaticMarkup;
+exports.renderToStaticNodeStream = renderToStaticNodeStream;
+exports.renderToString = renderToString;
+exports.version = ReactVersion;
})();
}
diff --git a/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js
index c8c55bb..a38fc31 100644
--- a/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js
+++ b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-server.browser.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,49 +6,46 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-
-'use strict';var k=require("object-assign"),l=require("react");function q(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-var t="function"===typeof Symbol&&Symbol.for,aa=t?Symbol.for("react.portal"):60106,u=t?Symbol.for("react.fragment"):60107,ba=t?Symbol.for("react.strict_mode"):60108,ca=t?Symbol.for("react.profiler"):60114,v=t?Symbol.for("react.provider"):60109,da=t?Symbol.for("react.context"):60110,ea=t?Symbol.for("react.concurrent_mode"):60111,fa=t?Symbol.for("react.forward_ref"):60112,B=t?Symbol.for("react.suspense"):60113,ha=t?Symbol.for("react.suspense_list"):60120,ia=t?Symbol.for("react.memo"):60115,ja=t?Symbol.for("react.lazy"):
-60116,ka=t?Symbol.for("react.block"):60121,la=t?Symbol.for("react.fundamental"):60117,ma=t?Symbol.for("react.scope"):60119;function na(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(c){0===a._status&&(c=c.default,a._status=1,a._result=c)},function(c){0===a._status&&(a._status=2,a._result=c)})}}
-function C(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case u:return"Fragment";case aa:return"Portal";case ca:return"Profiler";case ba:return"StrictMode";case B:return"Suspense";case ha:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case da:return"Context.Consumer";case v:return"Context.Provider";case fa:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");
-case ia:return C(a.type);case ka:return C(a.render);case ja:if(a=1===a._status?a._result:null)return C(a)}return null}var D=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;D.hasOwnProperty("ReactCurrentDispatcher")||(D.ReactCurrentDispatcher={current:null});D.hasOwnProperty("ReactCurrentBatchConfig")||(D.ReactCurrentBatchConfig={suspense:null});var oa={};function E(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}
-function pa(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return E(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=oa;return b}for(var F=new Uint16Array(16),H=0;15>H;H++)F[H]=H+1;F[15]=0;
-var qa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ra=Object.prototype.hasOwnProperty,sa={},ta={};
-function ua(a){if(ra.call(ta,a))return!0;if(ra.call(sa,a))return!1;if(qa.test(a))return ta[a]=!0;sa[a]=!0;return!1}function va(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
-function wa(a,b,c,d){if(null===b||"undefined"===typeof b||va(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function J(a,b,c,d,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g}var K={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){K[a]=new J(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];K[b]=new J(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){K[a]=new J(a,2,!1,a.toLowerCase(),null,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){K[a]=new J(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){K[a]=new J(a,3,!1,a.toLowerCase(),null,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){K[a]=new J(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){K[a]=new J(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){K[a]=new J(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){K[a]=new J(a,5,!1,a.toLowerCase(),null,!1)});var L=/[\-:]([a-z])/g;function M(a){return a[1].toUpperCase()}
-"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(L,
-M);K[b]=new J(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(L,M);K[b]=new J(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(L,M);K[b]=new J(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){K[a]=new J(a,1,!1,a.toLowerCase(),null,!1)});
-K.xlinkHref=new J("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){K[a]=new J(a,1,!1,a.toLowerCase(),null,!0)});var xa=/["'&<>]/;
-function N(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=xa.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}
-function ya(a,b){var c=K.hasOwnProperty(a)?K[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||wa(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(N(b)+'"')}return ua(a)?a+'="'+(N(b)+'"'):""}function za(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
-var Aa="function"===typeof Object.is?Object.is:za,O=null,P=null,Q=null,R=!1,S=!1,U=null,V=0;function W(){if(null===O)throw Error(q(321));return O}function Ba(){if(0<V)throw Error(q(312));return{memoizedState:null,queue:null,next:null}}function Ca(){null===Q?null===P?(R=!1,P=Q=Ba()):(R=!0,Q=P):null===Q.next?(R=!1,Q=Q.next=Ba()):(R=!0,Q=Q.next);return Q}function Da(a,b,c,d){for(;S;)S=!1,V+=1,Q=null,c=a(b,d);P=O=null;V=0;Q=U=null;return c}function Ea(a,b){return"function"===typeof b?b(a):b}
-function Fa(a,b,c){O=W();Q=Ca();if(R){var d=Q.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=Q.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);Q.memoizedState=d;return[d,b]}return[Q.memoizedState,b]}a=a===Ea?"function"===typeof b?b():b:void 0!==c?c(b):b;Q.memoizedState=a;a=Q.queue={last:null,dispatch:null};a=a.dispatch=Ga.bind(null,O,a);return[Q.memoizedState,a]}
-function Ga(a,b,c){if(!(25>V))throw Error(q(301));if(a===O)if(S=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ha(){}
-var X=0,Ia={readContext:function(a){var b=X;E(a,b);return a[b]},useContext:function(a){W();var b=X;E(a,b);return a[b]},useMemo:function(a,b){O=W();Q=Ca();b=void 0===b?null:b;if(null!==Q){var c=Q.memoizedState;if(null!==c&&null!==b){a:{var d=c[1];if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Aa(b[f],d[f])){d=!1;break a}d=!0}}if(d)return c[0]}}a=a();Q.memoizedState=[a,b];return a},useReducer:Fa,useRef:function(a){O=W();Q=Ca();var b=Q.memoizedState;return null===b?(a={current:a},Q.memoizedState=
-a):b},useState:function(a){return Fa(Ea,a)},useLayoutEffect:function(){},useCallback:function(a){return a},useImperativeHandle:Ha,useEffect:Ha,useDebugValue:Ha,useResponder:function(a,b){return{props:b,responder:a}},useDeferredValue:function(a){W();return a},useTransition:function(){W();return[function(a){a()},!1]}},Ja={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
-function Ka(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
-var La={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Ma=k({menuitem:!0},La),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
-gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Na=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Na.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});
-var Oa=/([A-Z])/g,Pa=/^ms-/,Z=l.Children.toArray,Qa=D.ReactCurrentDispatcher,Ra={listing:!0,pre:!0,textarea:!0},Sa=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ta={},Ua={};function Va(a){if(void 0===a||null===a)return a;var b="";l.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Wa=Object.prototype.hasOwnProperty,Xa={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Ya(a,b){if(void 0===a)throw Error(q(152,C(b)||"Component"));}
-function Za(a,b,c){function d(d,g){var e=g.prototype&&g.prototype.isReactComponent,f=pa(g,b,c,e),x=[],h=!1,m={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===x)return null},enqueueReplaceState:function(a,c){h=!0;x=[c]},enqueueSetState:function(a,c){if(null===x)return null;x.push(c)}};if(e){if(e=new g(d.props,f,m),"function"===typeof g.getDerivedStateFromProps){var w=g.getDerivedStateFromProps.call(null,d.props,e.state);null!=w&&(e.state=k({},e.state,w))}}else if(O={},e=g(d.props,
-f,m),e=Da(g,d.props,e,f),null==e||null==e.render){a=e;Ya(a,g);return}e.props=d.props;e.context=f;e.updater=m;m=e.state;void 0===m&&(e.state=m=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof g.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof g.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),x.length){m=x;var r=
-h;x=null;h=!1;if(r&&1===m.length)e.state=m[0];else{w=r?m[0]:e.state;var y=!0;for(r=r?1:0;r<m.length;r++){var p=m[r];p="function"===typeof p?p.call(e,w,d.props,f):p;null!=p&&(y?(y=!1,w=k({},w,p)):k(w,p))}e.state=w}}else x=null;a=e.render();Ya(a,g);if("function"===typeof e.getChildContext&&(d=g.childContextTypes,"object"===typeof d)){var A=e.getChildContext();for(var T in A)if(!(T in d))throw Error(q(108,C(g)||"Unknown",T));}A&&(b=k({},b,A))}for(;l.isValidElement(a);){var f=a,g=f.type;if("function"!==
-typeof g)break;d(f,g)}return{child:a,context:b}}
-var $a=function(){function a(a,b){l.isValidElement(a)?a.type!==u?a=[a]:(a=a.props.children,a=l.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:Ja.html,children:a,childIndex:0,context:oa,footer:""};var c=F[0];if(0===c){var g=F;c=g.length;var d=2*c;if(!(65536>=d))throw Error(q(304));var h=new Uint16Array(d);h.set(g);F=h;F[0]=c+1;for(g=c;g<d-1;g++)F[g]=g+1;F[d-1]=0}else F[0]=F[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=
-b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[]}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;F[a]=F[0];F[0]=a}};b.pushProvider=function(a){var c=++this.contextIndex,b=a.type._context,g=this.threadID;E(b,g);var x=b[g];this.contextStack[c]=b;this.contextValueStack[c]=x;b[g]=a.props.value};b.popProvider=function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];
-this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this.threadID;var c=Qa.current;Qa.current=Ia;try{for(var g=[""],x=!1;g[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var h=this.threadID;F[h]=F[0];F[0]=h;break}var e=this.stack[this.stack.length-1];if(x||e.childIndex>=
-e.children.length){var I=e.footer;""!==I&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===v)this.popProvider(e.type);else if(e.type===B){this.suspenseDepth--;var G=g.pop();if(x){x=!1;var n=e.fallbackFrame;if(!n)throw Error(q(303));this.stack.push(n);g[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else g[this.suspenseDepth]+=G}g[this.suspenseDepth]+=I}else{var m=e.children[e.childIndex++],
-w="";try{w+=this.render(m,e.context,e.domNamespace)}catch(r){if(null!=r&&"function"===typeof r.then)throw Error(q(294));throw r;}finally{}g.length<=this.suspenseDepth&&g.push("");g[this.suspenseDepth]+=w}}return g[0]}finally{Qa.current=c,X=b}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return N(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+N(f);this.previousWasTextNode=!0;return N(f)}b=Za(a,b,this.threadID);a=b.child;
-b=b.context;if(null===a||!1===a)return"";if(!l.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===aa)throw Error(q(257));throw Error(q(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case ba:case ea:case ca:case ha:case u:return a=Z(a.props.children),this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
-"";case B:throw Error(q(294));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case fa:O={};var d=c.render(a.props,a.ref);d=Da(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return"";case ia:return a=[l.createElement(c.type,k({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case v:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,
-context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case da:c=a.type;d=a.props;var h=this.threadID;E(c,h);c=Z(d.children(c[h]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";case la:throw Error(q(338));case ja:switch(c=a.type,na(c),c._status){case 1:return a=[l.createElement(c._result,k({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case 2:throw c._result;default:throw Error(q(295));
-}case ma:throw Error(q(343));}throw Error(q(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===Ja.html&&Ka(c);if(!Ta.hasOwnProperty(c)){if(!Sa.test(c))throw Error(q(65,c));Ta[c]=!0}var d=a.props;if("input"===c)d=k({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var h=d.value;if(null==h){h=d.defaultValue;var e=d.children;if(null!=e){if(null!=
-h)throw Error(q(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(q(93));e=e[0]}h=""+e}null==h&&(h="")}d=k({},d,{value:void 0,children:""+h})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=k({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var I=Va(d.children);if(null!=e){var G=null!=d.value?d.value+"":I;h=!1;if(Array.isArray(e))for(var n=0;n<e.length;n++){if(""+e[n]===G){h=!0;break}}else h=""+e===G;d=k({selected:void 0,children:void 0},
-d,{selected:h,children:I})}}if(h=d){if(Ma[c]&&(null!=h.children||null!=h.dangerouslySetInnerHTML))throw Error(q(137,c,""));if(null!=h.dangerouslySetInnerHTML){if(null!=h.children)throw Error(q(60));if(!("object"===typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML))throw Error(q(61));}if(null!=h.style&&"object"!==typeof h.style)throw Error(q(62,""));}h=d;e=this.makeStaticMarkup;I=1===this.stack.length;G="<"+a.type;for(z in h)if(Wa.call(h,z)){var m=h[z];if(null!=m){if("style"===
-z){n=void 0;var w="",r="";for(n in m)if(m.hasOwnProperty(n)){var y=0===n.indexOf("--"),p=m[n];if(null!=p){if(y)var A=n;else if(A=n,Ua.hasOwnProperty(A))A=Ua[A];else{var T=A.replace(Oa,"-$1").toLowerCase().replace(Pa,"-ms-");A=Ua[A]=T}w+=r+A+":";r=n;y=null==p||"boolean"===typeof p||""===p?"":y||"number"!==typeof p||0===p||Y.hasOwnProperty(r)&&Y[r]?(""+p).trim():p+"px";w+=y;r=";"}}m=w||null}n=null;b:if(y=c,p=h,-1===y.indexOf("-"))y="string"===typeof p.is;else switch(y){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":y=
-!1;break b;default:y=!0}y?Xa.hasOwnProperty(z)||(n=z,n=ua(n)&&null!=m?n+'="'+(N(m)+'"'):""):n=ya(z,m);n&&(G+=" "+n)}}e||I&&(G+=' data-reactroot=""');var z=G;h="";La.hasOwnProperty(c)?z+="/>":(z+=">",h="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=N(e);break a}e=null}null!=e?(d=[],Ra.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(z+="\n"),z+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===
-f?Ka(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:h});this.previousWasTextNode=!1;return z};return a}(),ab={renderToString:function(a){a=new $a(a,!1);try{return a.read(Infinity)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=new $a(a,!0);try{return a.read(Infinity)}finally{a.destroy()}},renderToNodeStream:function(){throw Error(q(207));},renderToStaticNodeStream:function(){throw Error(q(208));
-},version:"16.14.0"};module.exports=ab.default||ab;
+'use strict';var l=require("object-assign"),m=require("react");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
+var q=60106,r=60107,u=60108,z=60114,B=60109,aa=60110,ba=60112,D=60113,ca=60120,da=60115,ea=60116,fa=60121,ha=60117,ia=60119,ja=60129,ka=60131;
+if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;q=E("react.portal");r=E("react.fragment");u=E("react.strict_mode");z=E("react.profiler");B=E("react.provider");aa=E("react.context");ba=E("react.forward_ref");D=E("react.suspense");ca=E("react.suspense_list");da=E("react.memo");ea=E("react.lazy");fa=E("react.block");ha=E("react.fundamental");ia=E("react.scope");ja=E("react.debug_trace_mode");ka=E("react.legacy_hidden")}
+function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case r:return"Fragment";case q:return"Portal";case z:return"Profiler";case u:return"StrictMode";case D:return"Suspense";case ca:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case aa:return(a.displayName||"Context")+".Consumer";case B:return(a._context.displayName||"Context")+".Provider";case ba:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
+(""!==b?"ForwardRef("+b+")":"ForwardRef");case da:return F(a.type);case fa:return F(a._render);case ea:b=a._payload;a=a._init;try{return F(a(b))}catch(c){}}return null}var la=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ma={};function I(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function na(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return I(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=ma;return b}
+for(var J=new Uint16Array(16),K=0;15>K;K++)J[K]=K+1;J[15]=0;var oa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pa=Object.prototype.hasOwnProperty,qa={},ra={};
+function sa(a){if(pa.call(ra,a))return!0;if(pa.call(qa,a))return!1;if(oa.test(a))return ra[a]=!0;qa[a]=!0;return!1}function ta(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
+function ua(a,b,c,d){if(null===b||"undefined"===typeof b||ta(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function M(a,b,c,d,f,h,t){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=h;this.removeEmptyString=t}var N={};
+"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){N[a]=new M(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];N[b]=new M(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){N[a]=new M(a,2,!1,a.toLowerCase(),null,!1,!1)});
+["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){N[a]=new M(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){N[a]=new M(a,3,!1,a.toLowerCase(),null,!1,!1)});
+["checked","multiple","muted","selected"].forEach(function(a){N[a]=new M(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){N[a]=new M(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){N[a]=new M(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){N[a]=new M(a,5,!1,a.toLowerCase(),null,!1,!1)});var va=/[\-:]([a-z])/g;function wa(a){return a[1].toUpperCase()}
+"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(va,
+wa);N[b]=new M(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!1,!1)});
+N.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!0,!0)});var xa=/["'&<>]/;
+function O(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=xa.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}
+function ya(a,b){var c=N.hasOwnProperty(a)?N[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||ua(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(O(b)+'"')}return sa(a)?a+'="'+(O(b)+'"'):""}function za(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
+var Aa="function"===typeof Object.is?Object.is:za,P=null,Q=null,R=null,S=!1,T=!1,U=null,V=0;function W(){if(null===P)throw Error(p(321));return P}function Ba(){if(0<V)throw Error(p(312));return{memoizedState:null,queue:null,next:null}}function Ca(){null===R?null===Q?(S=!1,Q=R=Ba()):(S=!0,R=Q):null===R.next?(S=!1,R=R.next=Ba()):(S=!0,R=R.next);return R}function Da(a,b,c,d){for(;T;)T=!1,V+=1,R=null,c=a(b,d);Ea();return c}function Ea(){P=null;T=!1;Q=null;V=0;R=U=null}
+function Fa(a,b){return"function"===typeof b?b(a):b}function Ga(a,b,c){P=W();R=Ca();if(S){var d=R.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=R.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);R.memoizedState=d;return[d,b]}return[R.memoizedState,b]}a=a===Fa?"function"===typeof b?b():b:void 0!==c?c(b):b;R.memoizedState=a;a=R.queue={last:null,dispatch:null};a=a.dispatch=Ha.bind(null,P,a);return[R.memoizedState,a]}
+function Ia(a,b){P=W();R=Ca();b=void 0===b?null:b;if(null!==R){var c=R.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Aa(b[f],d[f])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();R.memoizedState=[a,b];return a}function Ha(a,b,c){if(!(25>V))throw Error(p(301));if(a===P)if(T=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ja(){}
+var X=null,Ka={readContext:function(a){var b=X.threadID;I(a,b);return a[b]},useContext:function(a){W();var b=X.threadID;I(a,b);return a[b]},useMemo:Ia,useReducer:Ga,useRef:function(a){P=W();R=Ca();var b=R.memoizedState;return null===b?(a={current:a},R.memoizedState=a):b},useState:function(a){return Ga(Fa,a)},useLayoutEffect:function(){},useCallback:function(a,b){return Ia(function(){return a},b)},useImperativeHandle:Ja,useEffect:Ja,useDebugValue:Ja,useDeferredValue:function(a){W();return a},useTransition:function(){W();
+return[function(a){a()},!1]},useOpaqueIdentifier:function(){return(X.identifierPrefix||"")+"R:"+(X.uniqueID++).toString(36)},useMutableSource:function(a,b){W();return b(a._source)}},La={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Ma(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
+var Na={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Oa=l({menuitem:!0},Na),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
+gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pa=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});
+var Qa=/([A-Z])/g,Ra=/^ms-/,Z=m.Children.toArray,Sa=la.ReactCurrentDispatcher,Ta={listing:!0,pre:!0,textarea:!0},Ua=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Va={},Wa={};function Xa(a){if(void 0===a||null===a)return a;var b="";m.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Ya=Object.prototype.hasOwnProperty,Za={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function $a(a,b){if(void 0===a)throw Error(p(152,F(b)||"Component"));}
+function ab(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=na(h,b,c,e),t=[],g=!1,n={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===t)return null},enqueueReplaceState:function(a,c){g=!0;t=[c]},enqueueSetState:function(a,c){if(null===t)return null;t.push(c)}};if(e){if(e=new h(d.props,f,n),"function"===typeof h.getDerivedStateFromProps){var k=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=k&&(e.state=l({},e.state,k))}}else if(P={},e=h(d.props,
+f,n),e=Da(h,d.props,e,f),null==e||null==e.render){a=e;$a(a,h);return}e.props=d.props;e.context=f;e.updater=n;n=e.state;void 0===n&&(e.state=n=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),t.length){n=t;var v=
+g;t=null;g=!1;if(v&&1===n.length)e.state=n[0];else{k=v?n[0]:e.state;var H=!0;for(v=v?1:0;v<n.length;v++){var x=n[v];x="function"===typeof x?x.call(e,k,d.props,f):x;null!=x&&(H?(H=!1,k=l({},k,x)):l(k,x))}e.state=k}}else t=null;a=e.render();$a(a,h);if("function"===typeof e.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var y=e.getChildContext();for(var A in y)if(!(A in d))throw Error(p(108,F(h)||"Unknown",A));}y&&(b=l({},b,y))}for(;m.isValidElement(a);){var f=a,h=f.type;if("function"!==
+typeof h)break;d(f,h)}return{child:a,context:b}}
+var bb=function(){function a(a,b,f){m.isValidElement(a)?a.type!==r?a=[a]:(a=a.props.children,a=m.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:La.html,children:a,childIndex:0,context:ma,footer:""};var c=J[0];if(0===c){var d=J;c=d.length;var g=2*c;if(!(65536>=g))throw Error(p(304));var e=new Uint16Array(g);e.set(d);J=e;J[0]=c+1;for(d=c;d<g-1;d++)J[d]=d+1;J[g-1]=0}else J[0]=J[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;
+this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||""}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;J[a]=J[0];J[0]=a}};b.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;I(c,h);var t=c[h];this.contextStack[b]=c;this.contextValueStack[b]=t;c[h]=a.props.value};b.popProvider=
+function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this;var c=Sa.current;Sa.current=Ka;try{for(var h=[""],t=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var g=this.threadID;
+J[g]=J[0];J[0]=g;break}var e=this.stack[this.stack.length-1];if(t||e.childIndex>=e.children.length){var L=e.footer;""!==L&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===B)this.popProvider(e.type);else if(e.type===D){this.suspenseDepth--;var G=h.pop();if(t){t=!1;var C=e.fallbackFrame;if(!C)throw Error(p(303));this.stack.push(C);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=
+G}h[this.suspenseDepth]+=L}else{var n=e.children[e.childIndex++],k="";try{k+=this.render(n,e.context,e.domNamespace)}catch(v){if(null!=v&&"function"===typeof v.then)throw Error(p(294));throw v;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=k}}return h[0]}finally{Sa.current=c,X=b,Ea()}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return O(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+O(f);
+this.previousWasTextNode=!0;return O(f)}b=ab(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return"";if(!m.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===q)throw Error(p(257));throw Error(p(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case ka:case ja:case u:case z:case ca:case r:return a=Z(a.props.children),this.stack.push({type:null,
+domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case D:throw Error(p(294));case ia:throw Error(p(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ba:P={};var d=c.render(a.props,a.ref);d=Da(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return"";case da:return a=[m.createElement(c.type,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
+"";case B:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case aa:c=a.type;d=a.props;var g=this.threadID;I(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";case ha:throw Error(p(338));case ea:return c=a.type,d=c._init,c=d(c._payload),a=[m.createElement(c,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,
+context:b,footer:""}),""}throw Error(p(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===La.html&&Ma(c);if(!Va.hasOwnProperty(c)){if(!Ua.test(c))throw Error(p(65,c));Va[c]=!0}var d=a.props;if("input"===c)d=l({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=
+g)throw Error(p(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(p(93));e=e[0]}g=""+e}null==g&&(g="")}d=l({},d,{value:void 0,children:""+g})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=l({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var L=Xa(d.children);if(null!=e){var G=null!=d.value?d.value+"":L;g=!1;if(Array.isArray(e))for(var C=0;C<e.length;C++){if(""+e[C]===G){g=!0;break}}else g=""+e===G;d=l({selected:void 0,children:void 0},
+d,{selected:g,children:L})}}if(g=d){if(Oa[c]&&(null!=g.children||null!=g.dangerouslySetInnerHTML))throw Error(p(137,c));if(null!=g.dangerouslySetInnerHTML){if(null!=g.children)throw Error(p(60));if(!("object"===typeof g.dangerouslySetInnerHTML&&"__html"in g.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=g.style&&"object"!==typeof g.style)throw Error(p(62));}g=d;e=this.makeStaticMarkup;L=1===this.stack.length;G="<"+a.type;b:if(-1===c.indexOf("-"))C="string"===typeof g.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":C=
+!1;break b;default:C=!0}for(w in g)if(Ya.call(g,w)){var n=g[w];if(null!=n){if("style"===w){var k=void 0,v="",H="";for(k in n)if(n.hasOwnProperty(k)){var x=0===k.indexOf("--"),y=n[k];if(null!=y){if(x)var A=k;else if(A=k,Wa.hasOwnProperty(A))A=Wa[A];else{var cb=A.replace(Qa,"-$1").toLowerCase().replace(Ra,"-ms-");A=Wa[A]=cb}v+=H+A+":";H=k;x=null==y||"boolean"===typeof y||""===y?"":x||"number"!==typeof y||0===y||Y.hasOwnProperty(H)&&Y[H]?(""+y).trim():y+"px";v+=x;H=";"}}n=v||null}k=null;C?Za.hasOwnProperty(w)||
+(k=w,k=sa(k)&&null!=n?k+'="'+(O(n)+'"'):""):k=ya(w,n);k&&(G+=" "+k)}}e||L&&(G+=' data-reactroot=""');var w=G;g="";Na.hasOwnProperty(c)?w+="/>":(w+=">",g="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=O(e);break a}e=null}null!=e?(d=[],Ta.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(w+="\n"),w+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?Ma(a):"http://www.w3.org/2000/svg"===
+f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=!1;return w};return a}();exports.renderToNodeStream=function(){throw Error(p(207));};exports.renderToStaticMarkup=function(a,b){a=new bb(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};exports.renderToStaticNodeStream=function(){throw Error(p(208));};exports.renderToString=function(a,b){a=new bb(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};
+exports.version="17.0.2";
diff --git a/node_modules/react-dom/cjs/react-dom-server.node.development.js b/node_modules/react-dom/cjs/react-dom-server.node.development.js
index 780fbd7..405bd3a 100644
--- a/node_modules/react-dom/cjs/react-dom-server.node.development.js
+++ b/node_modules/react-dom/cjs/react-dom-server.node.development.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-server.node.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -9,18 +9,16 @@
'use strict';
-
-
if (process.env.NODE_ENV !== "production") {
(function() {
'use strict';
var React = require('react');
var _assign = require('object-assign');
-var checkPropTypes = require('prop-types/checkPropTypes');
var stream = require('stream');
-var ReactVersion = '16.14.0';
+// TODO: this is special because it gets imported during build.
+var ReactVersion = '17.0.2';
// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be replaced with error codes
@@ -35,21 +33,7 @@ function formatProdErrorMessage(code) {
return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
}
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
-// Current owner and dispatcher used to share the same ref,
-// but PR #14548 split them out to better support the react-debug-tools package.
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
-}
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
-}
+var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
// by calls to these methods by a Babel plugin.
//
@@ -79,16 +63,12 @@ function printWarning(level, format, args) {
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
}
var argsWithFormat = args.map(function (item) {
@@ -100,72 +80,57 @@ function printWarning(level, format, args) {
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
}
}
+// ATTENTION
+// When adding new symbols to this file,
+// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
-var hasSymbol = typeof Symbol === 'function' && Symbol.for;
-var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
-var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
-var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
-var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
-var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
-var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
-var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
-var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
-var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
-var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
-var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
-var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
-var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
-var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
-
-var Uninitialized = -1;
-var Pending = 0;
-var Resolved = 1;
-var Rejected = 2;
-function refineResolvedLazyComponent(lazyComponent) {
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
-}
-function initializeLazyComponentType(lazyComponent) {
- if (lazyComponent._status === Uninitialized) {
- lazyComponent._status = Pending;
- var ctor = lazyComponent._ctor;
- var thenable = ctor();
- lazyComponent._result = thenable;
- thenable.then(function (moduleObject) {
- if (lazyComponent._status === Pending) {
- var defaultExport = moduleObject.default;
-
- {
- if (defaultExport === undefined) {
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
- }
- }
-
- lazyComponent._status = Resolved;
- lazyComponent._result = defaultExport;
- }
- }, function (error) {
- if (lazyComponent._status === Pending) {
- lazyComponent._status = Rejected;
- lazyComponent._result = error;
- }
- });
- }
+var REACT_ELEMENT_TYPE = 0xeac7;
+var REACT_PORTAL_TYPE = 0xeaca;
+var REACT_FRAGMENT_TYPE = 0xeacb;
+var REACT_STRICT_MODE_TYPE = 0xeacc;
+var REACT_PROFILER_TYPE = 0xead2;
+var REACT_PROVIDER_TYPE = 0xeacd;
+var REACT_CONTEXT_TYPE = 0xeace;
+var REACT_FORWARD_REF_TYPE = 0xead0;
+var REACT_SUSPENSE_TYPE = 0xead1;
+var REACT_SUSPENSE_LIST_TYPE = 0xead8;
+var REACT_MEMO_TYPE = 0xead3;
+var REACT_LAZY_TYPE = 0xead4;
+var REACT_BLOCK_TYPE = 0xead9;
+var REACT_SERVER_BLOCK_TYPE = 0xeada;
+var REACT_FUNDAMENTAL_TYPE = 0xead5;
+var REACT_SCOPE_TYPE = 0xead7;
+var REACT_OPAQUE_ID_TYPE = 0xeae0;
+var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
+var REACT_OFFSCREEN_TYPE = 0xeae2;
+var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
+
+if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor = Symbol.for;
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
+ REACT_MEMO_TYPE = symbolFor('react.memo');
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
+ REACT_BLOCK_TYPE = symbolFor('react.block');
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
}
function getWrappedName(outerType, innerType, wrapperName) {
@@ -173,6 +138,10 @@ function getWrappedName(outerType, innerType, wrapperName) {
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
}
+function getContextName(type) {
+ return type.displayName || 'Context';
+}
+
function getComponentName(type) {
if (type == null) {
// Host root, text node or just invalid type.
@@ -201,7 +170,7 @@ function getComponentName(type) {
return 'Portal';
case REACT_PROFILER_TYPE:
- return "Profiler";
+ return 'Profiler';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
@@ -216,10 +185,12 @@ function getComponentName(type) {
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
- return 'Context.Consumer';
+ var context = type;
+ return getContextName(context) + '.Consumer';
case REACT_PROVIDER_TYPE:
- return 'Context.Provider';
+ var provider = type;
+ return getContextName(provider._context) + '.Provider';
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, 'ForwardRef');
@@ -228,18 +199,19 @@ function getComponentName(type) {
return getComponentName(type.type);
case REACT_BLOCK_TYPE:
- return getComponentName(type.render);
+ return getComponentName(type._render);
case REACT_LAZY_TYPE:
{
- var thenable = type;
- var resolvedThenable = refineResolvedLazyComponent(thenable);
-
- if (resolvedThenable) {
- return getComponentName(resolvedThenable);
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ return getComponentName(init(payload));
+ } catch (x) {
+ return null;
}
-
- break;
}
}
}
@@ -247,48 +219,412 @@ function getComponentName(type) {
return null;
}
-var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
-function describeComponentFrame (name, source, ownerName) {
- var sourceInfo = '';
+// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
- if (source) {
- var path = source.fileName;
- var fileName = path.replace(BEFORE_SLASH_RE, '');
+var enableSuspenseServerRenderer = false;
- {
- // In DEV, include code for a common special case:
- // prefer "folder/index.js" instead of just "index.js".
- if (/^index\./.test(fileName)) {
- var match = path.match(BEFORE_SLASH_RE);
+// Helpers to patch console.logs to avoid logging during side-effect free
+// replaying on render function. This currently only patches the object
+// lazily which won't cover if the log function was extracted eagerly.
+// We could also eagerly patch the method.
+var disabledDepth = 0;
+var prevLog;
+var prevInfo;
+var prevWarn;
+var prevError;
+var prevGroup;
+var prevGroupCollapsed;
+var prevGroupEnd;
+
+function disabledLog() {}
+
+disabledLog.__reactDisabledLog = true;
+function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
+
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ disabledDepth++;
+ }
+}
+function reenableLogs() {
+ {
+ disabledDepth--;
+
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ log: _assign({}, props, {
+ value: prevLog
+ }),
+ info: _assign({}, props, {
+ value: prevInfo
+ }),
+ warn: _assign({}, props, {
+ value: prevWarn
+ }),
+ error: _assign({}, props, {
+ value: prevError
+ }),
+ group: _assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: _assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: _assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
- if (match) {
- var pathBeforeSlash = match[1];
+ if (disabledDepth < 0) {
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
+ }
+ }
+}
+
+var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
+var prefix;
+function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === undefined) {
+ // Extract the VM specific prefix used by each line.
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || '';
+ }
+ } // We use the prefix to ensure our stacks line up with native stack frames.
+
+
+ return '\n' + prefix + name;
+ }
+}
+var reentry = false;
+var componentFrameCache;
+
+{
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+}
+
+function describeNativeComponentFrame(fn, construct) {
+ // If something asked for a stack inside a fake render, it should get ignored.
+ if (!fn || reentry) {
+ return '';
+ }
+
+ {
+ var frame = componentFrameCache.get(fn);
- if (pathBeforeSlash) {
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
- fileName = folderName + '/' + fileName;
+ if (frame !== undefined) {
+ return frame;
+ }
+ }
+
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
+
+ Error.prepareStackTrace = undefined;
+ var previousDispatcher;
+
+ {
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
+ // for warnings.
+
+ ReactCurrentDispatcher.current = null;
+ disableLogs();
+ }
+
+ try {
+ // This should throw.
+ if (construct) {
+ // Something should be setting the props in the constructor.
+ var Fake = function () {
+ throw Error();
+ }; // $FlowFixMe
+
+
+ Object.defineProperty(Fake.prototype, 'props', {
+ set: function () {
+ // We use a throwing setter instead of frozen or non-writable props
+ // because that won't throw in a non-strict mode function.
+ throw Error();
+ }
+ });
+
+ if (typeof Reflect === 'object' && Reflect.construct) {
+ // We construct a different control for this case to include any extra
+ // frames added by the construct call.
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
+ }
+
+ fn.call(Fake.prototype);
+ }
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+
+ fn();
+ }
+ } catch (sample) {
+ // This is inlined manually because closure doesn't do it for us.
+ if (sample && control && typeof sample.stack === 'string') {
+ // This extracts the first frame from the sample that isn't also in the control.
+ // Skipping one frame that we assume is the frame that calls the two.
+ var sampleLines = sample.stack.split('\n');
+ var controlLines = control.stack.split('\n');
+ var s = sampleLines.length - 1;
+ var c = controlLines.length - 1;
+
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
+ // We expect at least one stack frame to be shared.
+ // Typically this will be the root most one. However, stack frames may be
+ // cut off due to maximum stack limits. In this case, one maybe cut off
+ // earlier than the other. We assume that the sample is longer or the same
+ // and there for cut off earlier. So we should find the root most frame in
+ // the sample somewhere in the control.
+ c--;
+ }
+
+ for (; s >= 1 && c >= 0; s--, c--) {
+ // Next we find the first one that isn't the same which should be the
+ // frame that called our sample function and the control.
+ if (sampleLines[s] !== controlLines[c]) {
+ // In V8, the first line is describing the message but other VMs don't.
+ // If we're about to return the first line, and the control is also on the same
+ // line, that's a pretty good indicator that our sample threw at same line as
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
+ // This can happen if you passed a class to function component, or non-function.
+ if (s !== 1 || c !== 1) {
+ do {
+ s--;
+ c--; // We may still have similar intermediate frames from the construct call.
+ // The next one that isn't the same should be our match though.
+
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, _frame);
+ }
+ } // Return the line we found.
+
+
+ return _frame;
+ }
+ } while (s >= 1 && c >= 0);
}
+
+ break;
}
}
}
+ } finally {
+ reentry = false;
+
+ {
+ ReactCurrentDispatcher.current = previousDispatcher;
+ reenableLogs();
+ }
+
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ } // Fallback to just using the name if we couldn't make it throw.
+
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
- } else if (ownerName) {
- sourceInfo = ' (created by ' + ownerName + ')';
+ var name = fn ? fn.displayName || fn.name : '';
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
}
- return '\n in ' + (name || 'Unknown') + sourceInfo;
+ return syntheticFrame;
+}
+function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
}
-var enableSuspenseServerRenderer = false;
+function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+}
+
+function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+
+ if (type == null) {
+ return '';
+ }
+
+ if (typeof type === 'function') {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
+
+ if (typeof type === 'string') {
+ return describeBuiltInComponentFrame(type);
+ }
+
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame('Suspense');
+
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame('SuspenseList');
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+
+ case REACT_MEMO_TYPE:
+ // Memo may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+
+ case REACT_BLOCK_TYPE:
+ return describeFunctionComponentFrame(type._render);
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ // Lazy may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {}
+ }
+ }
+ }
+
+ return '';
+}
+
+var loggedTypeFailures = {};
+var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+
+function setCurrentlyValidatingElement(element) {
+ {
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
+ } else {
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
+ }
+ }
+}
+
+function checkPropTypes(typeSpecs, values, location, componentName, element) {
+ {
+ // $FlowFixMe This is okay but Flow doesn't know it.
+ var has = Function.call.bind(Object.prototype.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') {
+ var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
+ err.name = 'Invariant Violation';
+ throw err;
+ }
+
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
+ } catch (ex) {
+ error$1 = ex;
+ }
+
+ if (error$1 && !(error$1 instanceof Error)) {
+ setCurrentlyValidatingElement(element);
+
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
-var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
+ setCurrentlyValidatingElement(null);
+ }
+
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error$1.message] = true;
+ setCurrentlyValidatingElement(element);
+
+ error('Failed %s type: %s', location, error$1.message);
+
+ setCurrentlyValidatingElement(null);
+ }
+ }
+ }
+ }
+}
-var ReactDebugCurrentFrame;
var didWarnAboutInvalidateContextType;
{
- ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
didWarnAboutInvalidateContextType = new Set();
}
@@ -316,7 +652,7 @@ function maskContext(type, context) {
function checkContextTypes(typeSpecs, values, location) {
{
- checkPropTypes(typeSpecs, values, location, 'Component', ReactDebugCurrentFrame.getCurrentStack);
+ checkPropTypes(typeSpecs, values, location, 'Component');
}
}
@@ -445,7 +781,7 @@ function freeThreadID(id) {
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
-// Attributes that aren't in the whitelist are presumed to have this type.
+// Attributes that aren't in the filter are presumed to have this type.
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
@@ -560,6 +896,7 @@ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)
}
if (propertyInfo !== null) {
+
switch (propertyInfo.type) {
case BOOLEAN:
return !value;
@@ -581,7 +918,7 @@ function getPropertyInfo(name) {
return properties.hasOwnProperty(name) ? properties[name] : null;
}
-function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
+function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
this.attributeName = attributeName;
this.attributeNamespace = attributeNamespace;
@@ -589,6 +926,7 @@ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attribut
this.propertyName = name;
this.type = type;
this.sanitizeURL = sanitizeURL;
+ this.removeEmptyString = removeEmptyString;
} // When adding attributes to this list, be sure to also add them to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.
@@ -600,11 +938,11 @@ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This preven
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
-
reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // A few React string attributes have a different name.
// This is a mapping from React prop names to the attribute names.
@@ -615,6 +953,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" HTML attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -624,6 +963,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" SVG attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -634,16 +974,18 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML boolean attributes.
['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
-'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
+'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
'itemScope'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are the few React props that we set as DOM properties
// rather than attributes. These are all booleans.
@@ -657,6 +999,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.
@@ -668,6 +1011,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be positive numbers.
@@ -678,6 +1022,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be numbers.
@@ -685,6 +1030,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
});
var CAMELIZE = /[\-\:]([a-z])/g;
@@ -693,7 +1039,7 @@ var capitalize = function (token) {
return token[1].toUpperCase();
}; // This is a list of all SVG attributes that need special casing, namespacing,
// or boolean value assignment. Regular attributes that just accept strings
-// and have the same names are omitted, just like in the HTML whitelist.
+// and have the same names are omitted, just like in the HTML attribute filter.
// Some of these attributes can be hard to find. This list was created by
// scraping the MDN documentation.
@@ -705,6 +1051,7 @@ var capitalize = function (token) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // String SVG attributes with the xlink namespace.
@@ -714,7 +1061,8 @@ var capitalize = function (token) {
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false);
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
+ false);
}); // String SVG attributes with the xml namespace.
['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
@@ -723,7 +1071,8 @@ var capitalize = function (token) {
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false);
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
+ false);
}); // These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.
@@ -732,25 +1081,23 @@ var capitalize = function (token) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These attributes accept URLs. These must not allow javascript: URLS.
// These will also need to accept Trusted Types object in the future.
var xlinkHref = 'xlinkHref';
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
-'xlink:href', 'http://www.w3.org/1999/xlink', true);
+'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
+false);
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ true, // sanitizeURL
true);
});
-var ReactDebugCurrentFrame$1 = null;
-
-{
- ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-} // A javascript: URL can contain leading C0 control or \u0020 SPACE,
// and any newline or tab are filtered out as if they're not part of the URL.
// https://url.spec.whatwg.org/#url-parsing
// Tab or newline are defined as \r\n\t:
@@ -761,7 +1108,6 @@ var ReactDebugCurrentFrame$1 = null;
/* eslint-disable max-len */
-
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
var didWarn = false;
@@ -964,13 +1310,13 @@ var currentHookNameInDev;
function resolveCurrentlyRenderingComponent() {
if (!(currentlyRenderingComponent !== null)) {
{
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
+ throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
}
}
{
if (isInHookUserCodeInDev) {
- error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
}
}
@@ -1075,28 +1421,25 @@ function finishHooks(Component, props, children, refOrContext) {
children = Component(props, refOrContext);
}
+ resetHooksState();
+ return children;
+} // Reset the internal hooks state if an error occurs while rendering a component
+
+function resetHooksState() {
+ {
+ isInHookUserCodeInDev = false;
+ }
+
currentlyRenderingComponent = null;
+ didScheduleRenderPhaseUpdate = false;
firstWorkInProgressHook = null;
numberOfReRenders = 0;
renderPhaseUpdates = null;
workInProgressHook = null;
-
- {
- isInHookUserCodeInDev = false;
- } // These were reset above
- // currentlyRenderingComponent = null;
- // didScheduleRenderPhaseUpdate = false;
- // firstWorkInProgressHook = null;
- // numberOfReRenders = 0;
- // renderPhaseUpdates = null;
- // workInProgressHook = null;
-
-
- return children;
}
function readContext(context, observedBits) {
- var threadID = currentThreadID;
+ var threadID = currentPartialRenderer.threadID;
validateContextBounds(context, threadID);
{
@@ -1114,7 +1457,7 @@ function useContext(context, observedBits) {
}
resolveCurrentlyRenderingComponent();
- var threadID = currentThreadID;
+ var threadID = currentPartialRenderer.threadID;
validateContextBounds(context, threadID);
return context[threadID];
}
@@ -1271,7 +1614,7 @@ function useLayoutEffect(create, inputs) {
{
currentHookNameInDev = 'useLayoutEffect';
- error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.');
+ error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');
}
}
@@ -1314,23 +1657,24 @@ function dispatchAction(componentIdentity, queue, action) {
}
function useCallback(callback, deps) {
- // Callbacks are passed as they are in the server environment.
- return callback;
-}
-
-function useResponder(responder, props) {
- return {
- props: props,
- responder: responder
- };
+ return useMemo(function () {
+ return callback;
+ }, deps);
+} // TODO Decide on how to implement this hook for server rendering.
+// If a mutation occurs during render, consider triggering a Suspense boundary
+// and falling back to client rendering.
+
+function useMutableSource(source, getSnapshot, subscribe) {
+ resolveCurrentlyRenderingComponent();
+ return getSnapshot(source._source);
}
-function useDeferredValue(value, config) {
+function useDeferredValue(value) {
resolveCurrentlyRenderingComponent();
return value;
}
-function useTransition(config) {
+function useTransition() {
resolveCurrentlyRenderingComponent();
var startTransition = function (callback) {
@@ -1340,11 +1684,15 @@ function useTransition(config) {
return [startTransition, false];
}
+function useOpaqueIdentifier() {
+ return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
+}
+
function noop() {}
-var currentThreadID = 0;
-function setCurrentThreadID(threadID) {
- currentThreadID = threadID;
+var currentPartialRenderer = null;
+function setCurrentPartialRenderer(renderer) {
+ currentPartialRenderer = renderer;
}
var Dispatcher = {
readContext: readContext,
@@ -1361,9 +1709,11 @@ var Dispatcher = {
useEffect: noop,
// Debugging effect
useDebugValue: noop,
- useResponder: useResponder,
useDeferredValue: useDeferredValue,
- useTransition: useTransition
+ useTransition: useTransition,
+ useOpaqueIdentifier: useOpaqueIdentifier,
+ // Subscriptions are not setup in a server environment.
+ useMutableSource: useMutableSource
};
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
@@ -1402,49 +1752,28 @@ function getChildNamespace(parentNamespace, type) {
return parentNamespace;
}
-var ReactDebugCurrentFrame$2 = null;
-var ReactControlledValuePropTypes = {
- checkPropTypes: null
+var hasReadOnlyValue = {
+ button: true,
+ checkbox: true,
+ image: true,
+ hidden: true,
+ radio: true,
+ reset: true,
+ submit: true
};
-
-{
- ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
- var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
- };
- var propTypes = {
- value: function (props, propName, componentName) {
- if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
- },
- checked: function (props, propName, componentName) {
- if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+function checkControlledValueProps(tagName, props) {
+ {
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
+ error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
}
- };
- /**
- * Provide a linked `value` attribute for controlled forms. You should not use
- * this outside of the ReactDOM controlled form components.
- */
- ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
- checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
- };
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
+ error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+ }
+ }
}
-// For HTML, certain tags should omit their close tag. We keep a whitelist for
+// For HTML, certain tags should omit their close tag. We keep a list for
// those special-case tags.
var omittedCloseTags = {
area: true,
@@ -1472,11 +1801,6 @@ var voidElementTags = _assign({
}, omittedCloseTags);
var HTML = '__html';
-var ReactDebugCurrentFrame$3 = null;
-
-{
- ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
-}
function assertValidProps(tag, props) {
if (!props) {
@@ -1487,7 +1811,7 @@ function assertValidProps(tag, props) {
if (voidElementTags[tag]) {
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
{
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
}
}
}
@@ -1501,7 +1825,7 @@ function assertValidProps(tag, props) {
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
{
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
}
}
}
@@ -1514,7 +1838,7 @@ function assertValidProps(tag, props) {
if (!(props.style == null || typeof props.style === 'object')) {
{
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
}
}
}
@@ -1652,7 +1976,7 @@ function isCustomComponent(tagName, props) {
switch (tagName) {
// These are reserved SVG and MathML elements.
- // We don't mind this whitelist too much because we expect it to never grow.
+ // We don't mind this list too much because we expect it to never grow.
// The alternative is to track the namespace in a few places which is convoluted.
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
case 'annotation-xml':
@@ -1895,9 +2219,9 @@ function warnInvalidARIAProps(type, props) {
}).join(', ');
if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
} else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
}
}
}
@@ -1929,21 +2253,7 @@ function validateProperties$1(type, props) {
}
}
-/**
- * Mapping from registration name to plugin module
- */
-
-var registrationNameModules = {};
-/**
- * Mapping from lowercase registration names to the properly cased version,
- * used to warn in the case of missing event handlers. Available
- * only in true.
- * @type {Object}
- */
-
-var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
-
-// When adding attributes to the HTML or SVG whitelist, be sure to
+// When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
@@ -1993,9 +2303,11 @@ var possibleStandardNames = {
dir: 'dir',
disabled: 'disabled',
disablepictureinpicture: 'disablePictureInPicture',
+ disableremoteplayback: 'disableRemotePlayback',
download: 'download',
draggable: 'draggable',
enctype: 'encType',
+ enterkeyhint: 'enterKeyHint',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
@@ -2442,7 +2754,7 @@ var validateProperty$1 = function () {};
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
return true;
}
@@ -2457,8 +2769,11 @@ var validateProperty$1 = function () {};
} // We can't rely on the event system being injected on the server.
- if (canUseEventSystem) {
- if (registrationNameModules.hasOwnProperty(name)) {
+ if (eventRegistry != null) {
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
+
+ if (registrationNameDependencies.hasOwnProperty(name)) {
return true;
}
@@ -2578,12 +2893,12 @@ var validateProperty$1 = function () {};
};
}
-var warnUnknownProperties = function (type, props, canUseEventSystem) {
+var warnUnknownProperties = function (type, props, eventRegistry) {
{
var unknownProps = [];
for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
if (!isValid) {
unknownProps.push(key);
@@ -2595,19 +2910,19 @@ var warnUnknownProperties = function (type, props, canUseEventSystem) {
}).join(', ');
if (unknownProps.length === 1) {
- error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
} else if (unknownProps.length > 1) {
- error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
}
}
};
-function validateProperties$2(type, props, canUseEventSystem) {
+function validateProperties$2(type, props, eventRegistry) {
if (isCustomComponent(type, props)) {
return;
}
- warnUnknownProperties(type, props, canUseEventSystem);
+ warnUnknownProperties(type, props, eventRegistry);
}
var toArray = React.Children.toArray; // This is only used in DEV.
@@ -2616,8 +2931,8 @@ var toArray = React.Children.toArray; // This is only used in DEV.
// Each stack is an array of frames which may contain nested stacks of elements.
var currentDebugStacks = [];
-var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
-var ReactDebugCurrentFrame$4;
+var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
+var ReactDebugCurrentFrame$1;
var prevGetCurrentStackImpl = null;
var getCurrentServerStackImpl = function () {
@@ -2639,22 +2954,16 @@ var popCurrentDebugStack = function () {};
var hasWarnedAboutUsingContextAsConsumer = false;
{
- ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame;
+ ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
validatePropertiesInDevelopment = function (type, props) {
validateProperties(type, props);
validateProperties$1(type, props);
- validateProperties$2(type, props,
- /* canUseEventSystem */
- false);
+ validateProperties$2(type, props, null);
};
describeStackFrame = function (element) {
- var source = element._source;
- var type = element.type;
- var name = getComponentName(type);
- var ownerName = null;
- return describeComponentFrame(name, source, ownerName);
+ return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
};
pushCurrentDebugStack = function (stack) {
@@ -2663,8 +2972,8 @@ var hasWarnedAboutUsingContextAsConsumer = false;
if (currentDebugStacks.length === 1) {
// We are entering a server renderer.
// Remember the previous (e.g. client) global stack implementation.
- prevGetCurrentStackImpl = ReactDebugCurrentFrame$4.getCurrentStack;
- ReactDebugCurrentFrame$4.getCurrentStack = getCurrentServerStackImpl;
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
+ ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
}
};
@@ -2685,7 +2994,7 @@ var hasWarnedAboutUsingContextAsConsumer = false;
if (currentDebugStacks.length === 0) {
// We are exiting the server renderer.
// Restore the previous (e.g. client) global stack implementation.
- ReactDebugCurrentFrame$4.getCurrentStack = prevGetCurrentStackImpl;
+ ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
prevGetCurrentStackImpl = null;
}
};
@@ -2809,7 +3118,7 @@ function warnNoop(publicInstance, callerName) {
}
}
-function shouldConstruct(Component) {
+function shouldConstruct$1(Component) {
return Component.prototype && Component.prototype.isReactComponent;
}
@@ -2889,6 +3198,7 @@ var RESERVED_PROPS = {
function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
var ret = '<' + tagVerbatim;
+ var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
for (var propKey in props) {
if (!hasOwnProperty$2.call(props, propKey)) {
@@ -2907,7 +3217,7 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
var markup = null;
- if (isCustomComponent(tagLowercase, props)) {
+ if (isCustomComponent$1) {
if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
markup = createMarkupForCustomAttribute(propKey, propValue);
}
@@ -2962,7 +3272,7 @@ function resolve(child, context, threadID) {
function processChild(element, Component) {
- var isClass = shouldConstruct(Component);
+ var isClass = shouldConstruct$1(Component);
var publicContext = processContext(Component, context, threadID, isClass);
var queue = [];
var replace = false;
@@ -3043,20 +3353,26 @@ function resolve(child, context, threadID) {
inst = Component(element.props, publicContext, updater);
inst = finishHooks(Component, element.props, inst, publicContext);
- if (inst == null || inst.render == null) {
- child = inst;
- validateRenderResult(child, Component);
- return;
- }
-
{
- var _componentName3 = getComponentName(Component) || 'Unknown';
+ // Support for module components is deprecated and is removed behind a flag.
+ // Whether or not it would crash later, we want to show a good message in DEV first.
+ if (inst != null && inst.render != null) {
+ var _componentName3 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutModulePatternComponent[_componentName3]) {
- error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
+ if (!didWarnAboutModulePatternComponent[_componentName3]) {
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
- didWarnAboutModulePatternComponent[_componentName3] = true;
+ didWarnAboutModulePatternComponent[_componentName3] = true;
+ }
}
+ } // If the flag is on, everything is assumed to be a function component.
+ // Otherwise, we also do the unfortunate dynamic checks.
+
+
+ if ( inst == null || inst.render == null) {
+ child = inst;
+ validateRenderResult(child, Component);
+ return;
}
}
@@ -3077,7 +3393,7 @@ function resolve(child, context, threadID) {
if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
warn( // keep this warning in sync with ReactStrictModeWarning.js
- 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
+ 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
didWarnAboutDeprecatedWillMount[_componentName4] = true;
}
@@ -3177,12 +3493,10 @@ function resolve(child, context, threadID) {
};
}
-var ReactDOMServerRenderer =
-/*#__PURE__*/
-function () {
+var ReactDOMServerRenderer = /*#__PURE__*/function () {
// TODO: type this more strictly:
// DEV-only
- function ReactDOMServerRenderer(children, makeStaticMarkup) {
+ function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
var flatChildren = flattenTopLevelChildren(children);
var topFrame = {
type: null,
@@ -3209,7 +3523,10 @@ function () {
this.contextIndex = -1;
this.contextStack = [];
- this.contextValueStack = [];
+ this.contextValueStack = []; // useOpaqueIdentifier ID
+
+ this.uniqueID = 0;
+ this.identifierPrefix = options && options.identifierPrefix || '';
{
this.contextProviderStack = [];
@@ -3297,10 +3614,10 @@ function () {
return null;
}
- var prevThreadID = currentThreadID;
- setCurrentThreadID(this.threadID);
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = Dispatcher;
+ var prevPartialRenderer = currentPartialRenderer;
+ setCurrentPartialRenderer(this);
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = Dispatcher;
try {
// Markup generated within <Suspense> ends up buffered until we know
@@ -3406,8 +3723,9 @@ function () {
return out[0];
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- setCurrentThreadID(prevThreadID);
+ ReactCurrentDispatcher$1.current = prevDispatcher;
+ setCurrentPartialRenderer(prevPartialRenderer);
+ resetHooksState();
}
};
@@ -3485,8 +3803,16 @@ function () {
}
switch (elementType) {
+ // TODO: LegacyHidden acts the same as a fragment. This only works
+ // because we currently assume that every instance of LegacyHidden is
+ // accompanied by a host component wrapper. In the hidden mode, the host
+ // component is given a `hidden` attribute, which ensures that the
+ // initial HTML is not visible. To support the use of LegacyHidden as a
+ // true fragment, without an extra DOM node, we would have to hide the
+ // initial HTML in some other way.
+ case REACT_LEGACY_HIDDEN_TYPE:
+ case REACT_DEBUG_TRACING_MODE_TYPE:
case REACT_STRICT_MODE_TYPE:
- case REACT_CONCURRENT_MODE_TYPE:
case REACT_PROFILER_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
case REACT_FRAGMENT_TYPE:
@@ -3520,6 +3846,17 @@ function () {
}
}
}
+ // eslint-disable-next-line-no-fallthrough
+
+ case REACT_SCOPE_TYPE:
+ {
+
+ {
+ {
+ throw Error( "ReactDOMServer does not yet support scope components." );
+ }
+ }
+ }
}
if (typeof elementType === 'object' && elementType !== null) {
@@ -3528,50 +3865,50 @@ function () {
{
var element = nextChild;
- var _nextChildren4;
+ var _nextChildren5;
var componentIdentity = {};
prepareToUseHooks(componentIdentity);
- _nextChildren4 = elementType.render(element.props, element.ref);
- _nextChildren4 = finishHooks(elementType.render, element.props, _nextChildren4, element.ref);
- _nextChildren4 = toArray(_nextChildren4);
- var _frame4 = {
+ _nextChildren5 = elementType.render(element.props, element.ref);
+ _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
+ _nextChildren5 = toArray(_nextChildren5);
+ var _frame5 = {
type: null,
domNamespace: parentNamespace,
- children: _nextChildren4,
+ children: _nextChildren5,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame4.debugElementStack = [];
+ _frame5.debugElementStack = [];
}
- this.stack.push(_frame4);
+ this.stack.push(_frame5);
return '';
}
case REACT_MEMO_TYPE:
{
var _element = nextChild;
- var _nextChildren5 = [React.createElement(elementType.type, _assign({
+ var _nextChildren6 = [React.createElement(elementType.type, _assign({
ref: _element.ref
}, _element.props))];
- var _frame5 = {
+ var _frame6 = {
type: null,
domNamespace: parentNamespace,
- children: _nextChildren5,
+ children: _nextChildren6,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame5.debugElementStack = [];
+ _frame6.debugElementStack = [];
}
- this.stack.push(_frame5);
+ this.stack.push(_frame6);
return '';
}
@@ -3580,23 +3917,23 @@ function () {
var provider = nextChild;
var nextProps = provider.props;
- var _nextChildren6 = toArray(nextProps.children);
+ var _nextChildren7 = toArray(nextProps.children);
- var _frame6 = {
+ var _frame7 = {
type: provider,
domNamespace: parentNamespace,
- children: _nextChildren6,
+ children: _nextChildren7,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame6.debugElementStack = [];
+ _frame7.debugElementStack = [];
}
this.pushProvider(provider);
- this.stack.push(_frame6);
+ this.stack.push(_frame7);
return '';
}
@@ -3632,22 +3969,22 @@ function () {
validateContextBounds(reactContext, threadID);
var nextValue = reactContext[threadID];
- var _nextChildren7 = toArray(_nextProps.children(nextValue));
+ var _nextChildren8 = toArray(_nextProps.children(nextValue));
- var _frame7 = {
+ var _frame8 = {
type: nextChild,
domNamespace: parentNamespace,
- children: _nextChildren7,
+ children: _nextChildren8,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame7.debugElementStack = [];
+ _frame8.debugElementStack = [];
}
- this.stack.push(_frame7);
+ this.stack.push(_frame8);
return '';
}
// eslint-disable-next-line-no-fallthrough
@@ -3670,54 +4007,27 @@ function () {
// suspense server-side renderer is enabled so synchronously
// resolved constructors are supported.
- initializeLazyComponentType(lazyComponent);
-
- switch (lazyComponent._status) {
- case Resolved:
- {
- var _nextChildren9 = [React.createElement(lazyComponent._result, _assign({
- ref: _element2.ref
- }, _element2.props))];
- var _frame9 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren9,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame9.debugElementStack = [];
- }
-
- this.stack.push(_frame9);
- return '';
- }
-
- case Rejected:
- throw lazyComponent._result;
-
- case Pending:
- default:
- {
- {
- throw Error( "ReactDOMServer does not yet support lazy-loaded components." );
- }
- }
-
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_SCOPE_TYPE:
- {
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ var result = init(payload);
+ var _nextChildren10 = [React.createElement(result, _assign({
+ ref: _element2.ref
+ }, _element2.props))];
+ var _frame10 = {
+ type: null,
+ domNamespace: parentNamespace,
+ children: _nextChildren10,
+ childIndex: 0,
+ context: context,
+ footer: ''
+ };
{
- {
- throw Error( "ReactDOMServer does not yet support scope components." );
- }
+ _frame10.debugElementStack = [];
}
+
+ this.stack.push(_frame10);
+ return '';
}
}
}
@@ -3769,16 +4079,16 @@ function () {
if (tag === 'input') {
{
- ReactControlledValuePropTypes.checkPropTypes('input', props);
+ checkControlledValueProps('input', props);
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
- error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
+ error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
didWarnDefaultChecked = true;
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
- error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
+ error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
didWarnDefaultInputValue = true;
}
@@ -3794,10 +4104,10 @@ function () {
});
} else if (tag === 'textarea') {
{
- ReactControlledValuePropTypes.checkPropTypes('textarea', props);
+ checkControlledValueProps('textarea', props);
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
- error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
+ error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnDefaultTextareaValue = true;
}
@@ -3847,7 +4157,7 @@ function () {
});
} else if (tag === 'select') {
{
- ReactControlledValuePropTypes.checkPropTypes('select', props);
+ checkControlledValueProps('select', props);
for (var i = 0; i < valuePropNames.length; i++) {
var propName = valuePropNames[i];
@@ -3866,7 +4176,7 @@ function () {
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
- error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
+ error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnDefaultSelectValue = true;
}
@@ -3981,8 +4291,8 @@ function () {
* See https://reactjs.org/docs/react-dom-server.html#rendertostring
*/
-function renderToString(element) {
- var renderer = new ReactDOMServerRenderer(element, false);
+function renderToString(element, options) {
+ var renderer = new ReactDOMServerRenderer(element, false, options);
try {
var markup = renderer.read(Infinity);
@@ -3997,8 +4307,8 @@ function renderToString(element) {
* See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
*/
-function renderToStaticMarkup(element) {
- var renderer = new ReactDOMServerRenderer(element, true);
+function renderToStaticMarkup(element, options) {
+ var renderer = new ReactDOMServerRenderer(element, true, options);
try {
var markup = renderer.read(Infinity);
@@ -4014,18 +4324,16 @@ function _inheritsLoose(subClass, superClass) {
subClass.__proto__ = superClass;
}
-var ReactMarkupReadableStream =
-/*#__PURE__*/
-function (_Readable) {
+var ReactMarkupReadableStream = /*#__PURE__*/function (_Readable) {
_inheritsLoose(ReactMarkupReadableStream, _Readable);
- function ReactMarkupReadableStream(element, makeStaticMarkup) {
+ function ReactMarkupReadableStream(element, makeStaticMarkup, options) {
var _this;
// Calls the stream.Readable(options) constructor. Consider exposing built-in
// features like highWaterMark in the future.
_this = _Readable.call(this, {}) || this;
- _this.partialRenderer = new ReactDOMServerRenderer(element, makeStaticMarkup);
+ _this.partialRenderer = new ReactDOMServerRenderer(element, makeStaticMarkup, options);
return _this;
}
@@ -4053,8 +4361,8 @@ function (_Readable) {
*/
-function renderToNodeStream(element) {
- return new ReactMarkupReadableStream(element, false);
+function renderToNodeStream(element, options) {
+ return new ReactMarkupReadableStream(element, false, options);
}
/**
* Similar to renderToNodeStream, except this doesn't create extra DOM attributes
@@ -4062,24 +4370,14 @@ function renderToNodeStream(element) {
* See https://reactjs.org/docs/react-dom-server.html#rendertostaticnodestream
*/
-function renderToStaticNodeStream(element) {
- return new ReactMarkupReadableStream(element, true);
+function renderToStaticNodeStream(element, options) {
+ return new ReactMarkupReadableStream(element, true, options);
}
-var ReactDOMServer = {
- renderToString: renderToString,
- renderToStaticMarkup: renderToStaticMarkup,
- renderToNodeStream: renderToNodeStream,
- renderToStaticNodeStream: renderToStaticNodeStream,
- version: ReactVersion
-};
-
-// TODO: decide on the top-level export form.
-// This is hacky but makes it work with both Rollup and Jest
-
-
-var server_node = ReactDOMServer.default || ReactDOMServer;
-
-module.exports = server_node;
+exports.renderToNodeStream = renderToNodeStream;
+exports.renderToStaticMarkup = renderToStaticMarkup;
+exports.renderToStaticNodeStream = renderToStaticNodeStream;
+exports.renderToString = renderToString;
+exports.version = ReactVersion;
})();
}
diff --git a/node_modules/react-dom/cjs/react-dom-server.node.production.min.js b/node_modules/react-dom/cjs/react-dom-server.node.production.min.js
index 6f0e871..685483d 100644
--- a/node_modules/react-dom/cjs/react-dom-server.node.production.min.js
+++ b/node_modules/react-dom/cjs/react-dom-server.node.production.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-server.node.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,50 +6,47 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-
-'use strict';var k=require("object-assign"),m=require("react"),aa=require("stream");function r(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-var u="function"===typeof Symbol&&Symbol.for,ba=u?Symbol.for("react.portal"):60106,v=u?Symbol.for("react.fragment"):60107,ca=u?Symbol.for("react.strict_mode"):60108,da=u?Symbol.for("react.profiler"):60114,w=u?Symbol.for("react.provider"):60109,ea=u?Symbol.for("react.context"):60110,fa=u?Symbol.for("react.concurrent_mode"):60111,ha=u?Symbol.for("react.forward_ref"):60112,B=u?Symbol.for("react.suspense"):60113,ia=u?Symbol.for("react.suspense_list"):60120,ja=u?Symbol.for("react.memo"):60115,ka=u?Symbol.for("react.lazy"):
-60116,la=u?Symbol.for("react.block"):60121,ma=u?Symbol.for("react.fundamental"):60117,na=u?Symbol.for("react.scope"):60119;function oa(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(c){0===a._status&&(c=c.default,a._status=1,a._result=c)},function(c){0===a._status&&(a._status=2,a._result=c)})}}
-function C(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case v:return"Fragment";case ba:return"Portal";case da:return"Profiler";case ca:return"StrictMode";case B:return"Suspense";case ia:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case ea:return"Context.Consumer";case w:return"Context.Provider";case ha:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");
-case ja:return C(a.type);case la:return C(a.render);case ka:if(a=1===a._status?a._result:null)return C(a)}return null}var D=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;D.hasOwnProperty("ReactCurrentDispatcher")||(D.ReactCurrentDispatcher={current:null});D.hasOwnProperty("ReactCurrentBatchConfig")||(D.ReactCurrentBatchConfig={suspense:null});var pa={};function E(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}
-function qa(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return E(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=pa;return b}for(var F=new Uint16Array(16),H=0;15>H;H++)F[H]=H+1;F[15]=0;
-var ra=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,sa=Object.prototype.hasOwnProperty,ta={},ua={};
-function va(a){if(sa.call(ua,a))return!0;if(sa.call(ta,a))return!1;if(ra.test(a))return ua[a]=!0;ta[a]=!0;return!1}function wa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
-function xa(a,b,c,d){if(null===b||"undefined"===typeof b||wa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function J(a,b,c,d,f,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=h}var K={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){K[a]=new J(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];K[b]=new J(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){K[a]=new J(a,2,!1,a.toLowerCase(),null,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){K[a]=new J(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){K[a]=new J(a,3,!1,a.toLowerCase(),null,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){K[a]=new J(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){K[a]=new J(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){K[a]=new J(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){K[a]=new J(a,5,!1,a.toLowerCase(),null,!1)});var L=/[\-:]([a-z])/g;function M(a){return a[1].toUpperCase()}
-"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(L,
-M);K[b]=new J(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(L,M);K[b]=new J(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(L,M);K[b]=new J(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){K[a]=new J(a,1,!1,a.toLowerCase(),null,!1)});
-K.xlinkHref=new J("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){K[a]=new J(a,1,!1,a.toLowerCase(),null,!0)});var ya=/["'&<>]/;
-function N(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ya.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}
-function za(a,b){var c=K.hasOwnProperty(a)?K[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||xa(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(N(b)+'"')}return va(a)?a+'="'+(N(b)+'"'):""}function Aa(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
-var Ba="function"===typeof Object.is?Object.is:Aa,O=null,P=null,Q=null,R=!1,S=!1,U=null,V=0;function W(){if(null===O)throw Error(r(321));return O}function Ca(){if(0<V)throw Error(r(312));return{memoizedState:null,queue:null,next:null}}function Da(){null===Q?null===P?(R=!1,P=Q=Ca()):(R=!0,Q=P):null===Q.next?(R=!1,Q=Q.next=Ca()):(R=!0,Q=Q.next);return Q}function Ea(a,b,c,d){for(;S;)S=!1,V+=1,Q=null,c=a(b,d);P=O=null;V=0;Q=U=null;return c}function Fa(a,b){return"function"===typeof b?b(a):b}
-function Ga(a,b,c){O=W();Q=Da();if(R){var d=Q.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=Q.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);Q.memoizedState=d;return[d,b]}return[Q.memoizedState,b]}a=a===Fa?"function"===typeof b?b():b:void 0!==c?c(b):b;Q.memoizedState=a;a=Q.queue={last:null,dispatch:null};a=a.dispatch=Ha.bind(null,O,a);return[Q.memoizedState,a]}
-function Ha(a,b,c){if(!(25>V))throw Error(r(301));if(a===O)if(S=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ia(){}
-var X=0,Ja={readContext:function(a){var b=X;E(a,b);return a[b]},useContext:function(a){W();var b=X;E(a,b);return a[b]},useMemo:function(a,b){O=W();Q=Da();b=void 0===b?null:b;if(null!==Q){var c=Q.memoizedState;if(null!==c&&null!==b){a:{var d=c[1];if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Ba(b[f],d[f])){d=!1;break a}d=!0}}if(d)return c[0]}}a=a();Q.memoizedState=[a,b];return a},useReducer:Ga,useRef:function(a){O=W();Q=Da();var b=Q.memoizedState;return null===b?(a={current:a},Q.memoizedState=
-a):b},useState:function(a){return Ga(Fa,a)},useLayoutEffect:function(){},useCallback:function(a){return a},useImperativeHandle:Ia,useEffect:Ia,useDebugValue:Ia,useResponder:function(a,b){return{props:b,responder:a}},useDeferredValue:function(a){W();return a},useTransition:function(){W();return[function(a){a()},!1]}},Ka={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
-function La(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
-var Ma={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Na=k({menuitem:!0},Ma),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
-gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Oa=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Oa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});
-var Pa=/([A-Z])/g,Qa=/^ms-/,Z=m.Children.toArray,Ra=D.ReactCurrentDispatcher,Sa={listing:!0,pre:!0,textarea:!0},Ta=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ua={},Va={};function Wa(a){if(void 0===a||null===a)return a;var b="";m.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Xa=Object.prototype.hasOwnProperty,Ya={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function Za(a,b){if(void 0===a)throw Error(r(152,C(b)||"Component"));}
-function $a(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=qa(h,b,c,e),p=[],g=!1,l={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===p)return null},enqueueReplaceState:function(a,c){g=!0;p=[c]},enqueueSetState:function(a,c){if(null===p)return null;p.push(c)}};if(e){if(e=new h(d.props,f,l),"function"===typeof h.getDerivedStateFromProps){var x=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=x&&(e.state=k({},e.state,x))}}else if(O={},e=h(d.props,
-f,l),e=Ea(h,d.props,e,f),null==e||null==e.render){a=e;Za(a,h);return}e.props=d.props;e.context=f;e.updater=l;l=e.state;void 0===l&&(e.state=l=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),p.length){l=p;var t=
-g;p=null;g=!1;if(t&&1===l.length)e.state=l[0];else{x=t?l[0]:e.state;var y=!0;for(t=t?1:0;t<l.length;t++){var q=l[t];q="function"===typeof q?q.call(e,x,d.props,f):q;null!=q&&(y?(y=!1,x=k({},x,q)):k(x,q))}e.state=x}}else p=null;a=e.render();Za(a,h);if("function"===typeof e.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var A=e.getChildContext();for(var T in A)if(!(T in d))throw Error(r(108,C(h)||"Unknown",T));}A&&(b=k({},b,A))}for(;m.isValidElement(a);){var f=a,h=f.type;if("function"!==
+'use strict';var l=require("object-assign"),n=require("react"),aa=require("stream");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
+var q=60106,r=60107,u=60108,z=60114,B=60109,ba=60110,ca=60112,D=60113,da=60120,ea=60115,fa=60116,ha=60121,ia=60117,ja=60119,ka=60129,la=60131;
+if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;q=E("react.portal");r=E("react.fragment");u=E("react.strict_mode");z=E("react.profiler");B=E("react.provider");ba=E("react.context");ca=E("react.forward_ref");D=E("react.suspense");da=E("react.suspense_list");ea=E("react.memo");fa=E("react.lazy");ha=E("react.block");ia=E("react.fundamental");ja=E("react.scope");ka=E("react.debug_trace_mode");la=E("react.legacy_hidden")}
+function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case r:return"Fragment";case q:return"Portal";case z:return"Profiler";case u:return"StrictMode";case D:return"Suspense";case da:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case ba:return(a.displayName||"Context")+".Consumer";case B:return(a._context.displayName||"Context")+".Provider";case ca:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
+(""!==b?"ForwardRef("+b+")":"ForwardRef");case ea:return F(a.type);case ha:return F(a._render);case fa:b=a._payload;a=a._init;try{return F(a(b))}catch(c){}}return null}var ma=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,na={};function I(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function oa(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return I(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=na;return b}
+for(var J=new Uint16Array(16),K=0;15>K;K++)J[K]=K+1;J[15]=0;var pa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qa=Object.prototype.hasOwnProperty,ra={},sa={};
+function ta(a){if(qa.call(sa,a))return!0;if(qa.call(ra,a))return!1;if(pa.test(a))return sa[a]=!0;ra[a]=!0;return!1}function ua(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
+function va(a,b,c,d){if(null===b||"undefined"===typeof b||ua(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function M(a,b,c,d,f,h,t){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=h;this.removeEmptyString=t}var N={};
+"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){N[a]=new M(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];N[b]=new M(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){N[a]=new M(a,2,!1,a.toLowerCase(),null,!1,!1)});
+["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){N[a]=new M(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){N[a]=new M(a,3,!1,a.toLowerCase(),null,!1,!1)});
+["checked","multiple","muted","selected"].forEach(function(a){N[a]=new M(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){N[a]=new M(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){N[a]=new M(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){N[a]=new M(a,5,!1,a.toLowerCase(),null,!1,!1)});var wa=/[\-:]([a-z])/g;function xa(a){return a[1].toUpperCase()}
+"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(wa,
+xa);N[b]=new M(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(wa,xa);N[b]=new M(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(wa,xa);N[b]=new M(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!1,!1)});
+N.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!0,!0)});var ya=/["'&<>]/;
+function O(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ya.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}
+function za(a,b){var c=N.hasOwnProperty(a)?N[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||va(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(O(b)+'"')}return ta(a)?a+'="'+(O(b)+'"'):""}function Aa(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
+var Ba="function"===typeof Object.is?Object.is:Aa,P=null,Q=null,R=null,S=!1,T=!1,U=null,V=0;function W(){if(null===P)throw Error(p(321));return P}function Ca(){if(0<V)throw Error(p(312));return{memoizedState:null,queue:null,next:null}}function Da(){null===R?null===Q?(S=!1,Q=R=Ca()):(S=!0,R=Q):null===R.next?(S=!1,R=R.next=Ca()):(S=!0,R=R.next);return R}function Ea(a,b,c,d){for(;T;)T=!1,V+=1,R=null,c=a(b,d);Fa();return c}function Fa(){P=null;T=!1;Q=null;V=0;R=U=null}
+function Ga(a,b){return"function"===typeof b?b(a):b}function Ha(a,b,c){P=W();R=Da();if(S){var d=R.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=R.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);R.memoizedState=d;return[d,b]}return[R.memoizedState,b]}a=a===Ga?"function"===typeof b?b():b:void 0!==c?c(b):b;R.memoizedState=a;a=R.queue={last:null,dispatch:null};a=a.dispatch=Ia.bind(null,P,a);return[R.memoizedState,a]}
+function Ja(a,b){P=W();R=Da();b=void 0===b?null:b;if(null!==R){var c=R.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Ba(b[f],d[f])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();R.memoizedState=[a,b];return a}function Ia(a,b,c){if(!(25>V))throw Error(p(301));if(a===P)if(T=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ka(){}
+var X=null,La={readContext:function(a){var b=X.threadID;I(a,b);return a[b]},useContext:function(a){W();var b=X.threadID;I(a,b);return a[b]},useMemo:Ja,useReducer:Ha,useRef:function(a){P=W();R=Da();var b=R.memoizedState;return null===b?(a={current:a},R.memoizedState=a):b},useState:function(a){return Ha(Ga,a)},useLayoutEffect:function(){},useCallback:function(a,b){return Ja(function(){return a},b)},useImperativeHandle:Ka,useEffect:Ka,useDebugValue:Ka,useDeferredValue:function(a){W();return a},useTransition:function(){W();
+return[function(a){a()},!1]},useOpaqueIdentifier:function(){return(X.identifierPrefix||"")+"R:"+(X.uniqueID++).toString(36)},useMutableSource:function(a,b){W();return b(a._source)}},Ma={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Na(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
+var Oa={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Pa=l({menuitem:!0},Oa),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
+gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qa=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Qa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});
+var Ra=/([A-Z])/g,Sa=/^ms-/,Z=n.Children.toArray,Ta=ma.ReactCurrentDispatcher,Ua={listing:!0,pre:!0,textarea:!0},Va=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Wa={},Xa={};function Ya(a){if(void 0===a||null===a)return a;var b="";n.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Za=Object.prototype.hasOwnProperty,$a={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ab(a,b){if(void 0===a)throw Error(p(152,F(b)||"Component"));}
+function bb(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=oa(h,b,c,e),t=[],g=!1,m={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===t)return null},enqueueReplaceState:function(a,b){g=!0;t=[b]},enqueueSetState:function(a,b){if(null===t)return null;t.push(b)}};if(e){if(e=new h(d.props,f,m),"function"===typeof h.getDerivedStateFromProps){var k=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=k&&(e.state=l({},e.state,k))}}else if(P={},e=h(d.props,
+f,m),e=Ea(h,d.props,e,f),null==e||null==e.render){a=e;ab(a,h);return}e.props=d.props;e.context=f;e.updater=m;m=e.state;void 0===m&&(e.state=m=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),t.length){m=t;var v=
+g;t=null;g=!1;if(v&&1===m.length)e.state=m[0];else{k=v?m[0]:e.state;var H=!0;for(v=v?1:0;v<m.length;v++){var x=m[v];x="function"===typeof x?x.call(e,k,d.props,f):x;null!=x&&(H?(H=!1,k=l({},k,x)):l(k,x))}e.state=k}}else t=null;a=e.render();ab(a,h);if("function"===typeof e.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var y=e.getChildContext();for(var A in y)if(!(A in d))throw Error(p(108,F(h)||"Unknown",A));}y&&(b=l({},b,y))}for(;n.isValidElement(a);){var f=a,h=f.type;if("function"!==
typeof h)break;d(f,h)}return{child:a,context:b}}
-var ab=function(){function a(a,b){m.isValidElement(a)?a.type!==v?a=[a]:(a=a.props.children,a=m.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:Ka.html,children:a,childIndex:0,context:pa,footer:""};var c=F[0];if(0===c){var d=F;c=d.length;var p=2*c;if(!(65536>=p))throw Error(r(304));var g=new Uint16Array(p);g.set(d);F=g;F[0]=c+1;for(d=c;d<p-1;d++)F[d]=d+1;F[p-1]=0}else F[0]=F[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=
-b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[]}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;F[a]=F[0];F[0]=a}};b.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;E(c,h);var p=c[h];this.contextStack[b]=c;this.contextValueStack[b]=p;c[h]=a.props.value};b.popProvider=function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];
-this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this.threadID;var c=Ra.current;Ra.current=Ja;try{for(var h=[""],p=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var g=this.threadID;F[g]=F[0];F[0]=g;break}var e=this.stack[this.stack.length-1];if(p||e.childIndex>=
-e.children.length){var I=e.footer;""!==I&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===w)this.popProvider(e.type);else if(e.type===B){this.suspenseDepth--;var G=h.pop();if(p){p=!1;var n=e.fallbackFrame;if(!n)throw Error(r(303));this.stack.push(n);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=G}h[this.suspenseDepth]+=I}else{var l=e.children[e.childIndex++],
-x="";try{x+=this.render(l,e.context,e.domNamespace)}catch(t){if(null!=t&&"function"===typeof t.then)throw Error(r(294));throw t;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=x}}return h[0]}finally{Ra.current=c,X=b}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return N(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+N(f);this.previousWasTextNode=!0;return N(f)}b=$a(a,b,this.threadID);a=b.child;
-b=b.context;if(null===a||!1===a)return"";if(!m.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===ba)throw Error(r(257));throw Error(r(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case ca:case fa:case da:case ia:case v:return a=Z(a.props.children),this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
-"";case B:throw Error(r(294));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ha:O={};var d=c.render(a.props,a.ref);d=Ea(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return"";case ja:return a=[m.createElement(c.type,k({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case w:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,
-context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case ea:c=a.type;d=a.props;var g=this.threadID;E(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";case ma:throw Error(r(338));case ka:switch(c=a.type,oa(c),c._status){case 1:return a=[m.createElement(c._result,k({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case 2:throw c._result;default:throw Error(r(295));
-}case na:throw Error(r(343));}throw Error(r(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===Ka.html&&La(c);if(!Ua.hasOwnProperty(c)){if(!Ta.test(c))throw Error(r(65,c));Ua[c]=!0}var d=a.props;if("input"===c)d=k({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=
-g)throw Error(r(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(r(93));e=e[0]}g=""+e}null==g&&(g="")}d=k({},d,{value:void 0,children:""+g})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=k({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var I=Wa(d.children);if(null!=e){var G=null!=d.value?d.value+"":I;g=!1;if(Array.isArray(e))for(var n=0;n<e.length;n++){if(""+e[n]===G){g=!0;break}}else g=""+e===G;d=k({selected:void 0,children:void 0},
-d,{selected:g,children:I})}}if(g=d){if(Na[c]&&(null!=g.children||null!=g.dangerouslySetInnerHTML))throw Error(r(137,c,""));if(null!=g.dangerouslySetInnerHTML){if(null!=g.children)throw Error(r(60));if(!("object"===typeof g.dangerouslySetInnerHTML&&"__html"in g.dangerouslySetInnerHTML))throw Error(r(61));}if(null!=g.style&&"object"!==typeof g.style)throw Error(r(62,""));}g=d;e=this.makeStaticMarkup;I=1===this.stack.length;G="<"+a.type;for(z in g)if(Xa.call(g,z)){var l=g[z];if(null!=l){if("style"===
-z){n=void 0;var x="",t="";for(n in l)if(l.hasOwnProperty(n)){var y=0===n.indexOf("--"),q=l[n];if(null!=q){if(y)var A=n;else if(A=n,Va.hasOwnProperty(A))A=Va[A];else{var T=A.replace(Pa,"-$1").toLowerCase().replace(Qa,"-ms-");A=Va[A]=T}x+=t+A+":";t=n;y=null==q||"boolean"===typeof q||""===q?"":y||"number"!==typeof q||0===q||Y.hasOwnProperty(t)&&Y[t]?(""+q).trim():q+"px";x+=y;t=";"}}l=x||null}n=null;b:if(y=c,q=g,-1===y.indexOf("-"))y="string"===typeof q.is;else switch(y){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":y=
-!1;break b;default:y=!0}y?Ya.hasOwnProperty(z)||(n=z,n=va(n)&&null!=l?n+'="'+(N(l)+'"'):""):n=za(z,l);n&&(G+=" "+n)}}e||I&&(G+=' data-reactroot=""');var z=G;g="";Ma.hasOwnProperty(c)?z+="/>":(z+=">",g="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=N(e);break a}e=null}null!=e?(d=[],Sa.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(z+="\n"),z+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===
-f?La(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=!1;return z};return a}();function bb(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;a.__proto__=b}
-var cb=function(a){function b(b,c){var d=a.call(this,{})||this;d.partialRenderer=new ab(b,c);return d}bb(b,a);var c=b.prototype;c._destroy=function(a,b){this.partialRenderer.destroy();b(a)};c._read=function(a){try{this.push(this.partialRenderer.read(a))}catch(f){this.destroy(f)}};return b}(aa.Readable),db={renderToString:function(a){a=new ab(a,!1);try{return a.read(Infinity)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=new ab(a,!0);try{return a.read(Infinity)}finally{a.destroy()}},renderToNodeStream:function(a){return new cb(a,
-!1)},renderToStaticNodeStream:function(a){return new cb(a,!0)},version:"16.14.0"};module.exports=db.default||db;
+var cb=function(){function a(a,b,f){n.isValidElement(a)?a.type!==r?a=[a]:(a=a.props.children,a=n.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:Ma.html,children:a,childIndex:0,context:na,footer:""};var c=J[0];if(0===c){var d=J;c=d.length;var g=2*c;if(!(65536>=g))throw Error(p(304));var e=new Uint16Array(g);e.set(d);J=e;J[0]=c+1;for(d=c;d<g-1;d++)J[d]=d+1;J[g-1]=0}else J[0]=J[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;
+this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||""}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;J[a]=J[0];J[0]=a}};b.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;I(c,h);var t=c[h];this.contextStack[b]=c;this.contextValueStack[b]=t;c[h]=a.props.value};b.popProvider=
+function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this;var c=Ta.current;Ta.current=La;try{for(var h=[""],t=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var g=this.threadID;
+J[g]=J[0];J[0]=g;break}var e=this.stack[this.stack.length-1];if(t||e.childIndex>=e.children.length){var L=e.footer;""!==L&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===B)this.popProvider(e.type);else if(e.type===D){this.suspenseDepth--;var G=h.pop();if(t){t=!1;var C=e.fallbackFrame;if(!C)throw Error(p(303));this.stack.push(C);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=
+G}h[this.suspenseDepth]+=L}else{var m=e.children[e.childIndex++],k="";try{k+=this.render(m,e.context,e.domNamespace)}catch(v){if(null!=v&&"function"===typeof v.then)throw Error(p(294));throw v;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=k}}return h[0]}finally{Ta.current=c,X=b,Fa()}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return O(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+O(f);
+this.previousWasTextNode=!0;return O(f)}b=bb(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return"";if(!n.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===q)throw Error(p(257));throw Error(p(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case la:case ka:case u:case z:case da:case r:return a=Z(a.props.children),this.stack.push({type:null,
+domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case D:throw Error(p(294));case ja:throw Error(p(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ca:P={};var d=c.render(a.props,a.ref);d=Ea(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return"";case ea:return a=[n.createElement(c.type,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
+"";case B:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case ba:c=a.type;d=a.props;var g=this.threadID;I(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";case ia:throw Error(p(338));case fa:return c=a.type,d=c._init,c=d(c._payload),a=[n.createElement(c,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,
+context:b,footer:""}),""}throw Error(p(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===Ma.html&&Na(c);if(!Wa.hasOwnProperty(c)){if(!Va.test(c))throw Error(p(65,c));Wa[c]=!0}var d=a.props;if("input"===c)d=l({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=
+g)throw Error(p(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(p(93));e=e[0]}g=""+e}null==g&&(g="")}d=l({},d,{value:void 0,children:""+g})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=l({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var L=Ya(d.children);if(null!=e){var G=null!=d.value?d.value+"":L;g=!1;if(Array.isArray(e))for(var C=0;C<e.length;C++){if(""+e[C]===G){g=!0;break}}else g=""+e===G;d=l({selected:void 0,children:void 0},
+d,{selected:g,children:L})}}if(g=d){if(Pa[c]&&(null!=g.children||null!=g.dangerouslySetInnerHTML))throw Error(p(137,c));if(null!=g.dangerouslySetInnerHTML){if(null!=g.children)throw Error(p(60));if(!("object"===typeof g.dangerouslySetInnerHTML&&"__html"in g.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=g.style&&"object"!==typeof g.style)throw Error(p(62));}g=d;e=this.makeStaticMarkup;L=1===this.stack.length;G="<"+a.type;b:if(-1===c.indexOf("-"))C="string"===typeof g.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":C=
+!1;break b;default:C=!0}for(w in g)if(Za.call(g,w)){var m=g[w];if(null!=m){if("style"===w){var k=void 0,v="",H="";for(k in m)if(m.hasOwnProperty(k)){var x=0===k.indexOf("--"),y=m[k];if(null!=y){if(x)var A=k;else if(A=k,Xa.hasOwnProperty(A))A=Xa[A];else{var eb=A.replace(Ra,"-$1").toLowerCase().replace(Sa,"-ms-");A=Xa[A]=eb}v+=H+A+":";H=k;x=null==y||"boolean"===typeof y||""===y?"":x||"number"!==typeof y||0===y||Y.hasOwnProperty(H)&&Y[H]?(""+y).trim():y+"px";v+=x;H=";"}}m=v||null}k=null;C?$a.hasOwnProperty(w)||
+(k=w,k=ta(k)&&null!=m?k+'="'+(O(m)+'"'):""):k=za(w,m);k&&(G+=" "+k)}}e||L&&(G+=' data-reactroot=""');var w=G;g="";Oa.hasOwnProperty(c)?w+="/>":(w+=">",g="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=O(e);break a}e=null}null!=e?(d=[],Ua.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(w+="\n"),w+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?Na(a):"http://www.w3.org/2000/svg"===
+f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=!1;return w};return a}();function db(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;a.__proto__=b}
+var fb=function(a){function b(b,c,h){var d=a.call(this,{})||this;d.partialRenderer=new cb(b,c,h);return d}db(b,a);var c=b.prototype;c._destroy=function(a,b){this.partialRenderer.destroy();b(a)};c._read=function(a){try{this.push(this.partialRenderer.read(a))}catch(f){this.destroy(f)}};return b}(aa.Readable);exports.renderToNodeStream=function(a,b){return new fb(a,!1,b)};exports.renderToStaticMarkup=function(a,b){a=new cb(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};
+exports.renderToStaticNodeStream=function(a,b){return new fb(a,!0,b)};exports.renderToString=function(a,b){a=new cb(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};exports.version="17.0.2";
diff --git a/node_modules/react-dom/cjs/react-dom-test-utils.development.js b/node_modules/react-dom/cjs/react-dom-test-utils.development.js
index 6452950..a3adf21 100644
--- a/node_modules/react-dom/cjs/react-dom-test-utils.development.js
+++ b/node_modules/react-dom/cjs/react-dom-test-utils.development.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-test-utils.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -9,8 +9,6 @@
'use strict';
-
-
if (process.env.NODE_ENV !== "production") {
(function() {
'use strict';
@@ -20,21 +18,7 @@ var React = require('react');
var ReactDOM = require('react-dom');
var Scheduler = require('scheduler');
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
-// Current owner and dispatcher used to share the same ref,
-// but PR #14548 split them out to better support the react-debug-tools package.
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
-}
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
-}
+var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
// by calls to these methods by a Babel plugin.
//
@@ -64,16 +48,12 @@ function printWarning(level, format, args) {
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
-
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
}
var argsWithFormat = args.map(function (item) {
@@ -85,17 +65,6 @@ function printWarning(level, format, args) {
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
}
}
@@ -109,7 +78,57 @@ function printWarning(level, format, args) {
* If this becomes an actual Map, that will break.
*/
function get(key) {
- return key._reactInternalFiber;
+ return key._reactInternals;
+}
+
+// ATTENTION
+// When adding new symbols to this file,
+// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
+// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
+// nor polyfill, then a plain number is used for performance.
+var REACT_ELEMENT_TYPE = 0xeac7;
+var REACT_PORTAL_TYPE = 0xeaca;
+var REACT_FRAGMENT_TYPE = 0xeacb;
+var REACT_STRICT_MODE_TYPE = 0xeacc;
+var REACT_PROFILER_TYPE = 0xead2;
+var REACT_PROVIDER_TYPE = 0xeacd;
+var REACT_CONTEXT_TYPE = 0xeace;
+var REACT_FORWARD_REF_TYPE = 0xead0;
+var REACT_SUSPENSE_TYPE = 0xead1;
+var REACT_SUSPENSE_LIST_TYPE = 0xead8;
+var REACT_MEMO_TYPE = 0xead3;
+var REACT_LAZY_TYPE = 0xead4;
+var REACT_BLOCK_TYPE = 0xead9;
+var REACT_SERVER_BLOCK_TYPE = 0xeada;
+var REACT_FUNDAMENTAL_TYPE = 0xead5;
+var REACT_SCOPE_TYPE = 0xead7;
+var REACT_OPAQUE_ID_TYPE = 0xeae0;
+var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
+var REACT_OFFSCREEN_TYPE = 0xeae2;
+var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
+
+if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor = Symbol.for;
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
+ REACT_MEMO_TYPE = symbolFor('react.memo');
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
+ REACT_BLOCK_TYPE = symbolFor('react.block');
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
}
var FunctionComponent = 0;
@@ -121,15 +140,15 @@ var HostComponent = 5;
var HostText = 6;
// Don't change these two values. They're used by React Dev Tools.
-var NoEffect =
-/* */
+var NoFlags =
+/* */
0;
var Placement =
-/* */
+/* */
2;
var Hydrating =
-/* */
+/* */
1024;
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
@@ -145,7 +164,7 @@ function getNearestMountedFiber(fiber) {
do {
node = nextNode;
- if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {
+ if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
// This is an insertion or in-progress hydration. The nearest possible
// mounted fiber is the parent but we need to continue to figure out
// if that one is still mounted.
@@ -350,28 +369,45 @@ function findCurrentFiberUsingSlowPath(fiber) {
return alternate;
}
-var EVENT_POOL_SIZE = 10;
/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ * `charCode` represents the actual "character code" and is safe to use with
+ * `String.fromCharCode`. As such, only keys that correspond to printable
+ * characters produce a valid `charCode`, the only exception to this is Enter.
+ * The Tab-key is considered non-printable and does not have a `charCode`,
+ * presumably because it does not produce a tab-character in browsers.
+ *
+ * @param {object} nativeEvent Native browser event.
+ * @return {number} Normalized `charCode` property.
*/
+function getEventCharCode(nativeEvent) {
+ var charCode;
+ var keyCode = nativeEvent.keyCode;
-var EventInterface = {
- type: null,
- target: null,
- // currentTarget is set when dispatching; no use in copying it here
- currentTarget: function () {
- return null;
- },
- eventPhase: null,
- bubbles: null,
- cancelable: null,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: null,
- isTrusted: null
-};
+ if ('charCode' in nativeEvent) {
+ charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
+
+ if (charCode === 0 && keyCode === 13) {
+ charCode = 13;
+ }
+ } else {
+ // IE8 does not implement `charCode`, but `keyCode` has the correct value.
+ charCode = keyCode;
+ } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
+ // report Enter as charCode 10 when ctrl is pressed.
+
+
+ if (charCode === 10) {
+ charCode = 13;
+ } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
+ // Must not discard the (non-)printable Enter-key.
+
+
+ if (charCode >= 32 || charCode === 13) {
+ return charCode;
+ }
+
+ return 0;
+}
function functionThatReturnsTrue() {
return true;
@@ -379,433 +415,518 @@ function functionThatReturnsTrue() {
function functionThatReturnsFalse() {
return false;
-}
-/**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- *
- * @param {object} dispatchConfig Configuration used to dispatch this event.
- * @param {*} targetInst Marker identifying the event target.
- * @param {object} nativeEvent Native browser event.
- * @param {DOMEventTarget} nativeEventTarget Target node.
- */
+} // This is intentionally a factory so that we have different returned constructors.
+// If we had a single constructor, it would be megamorphic and engines would deopt.
-function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
- {
- // these have a getter/setter for warnings
- delete this.nativeEvent;
- delete this.preventDefault;
- delete this.stopPropagation;
- delete this.isDefaultPrevented;
- delete this.isPropagationStopped;
- }
-
- this.dispatchConfig = dispatchConfig;
- this._targetInst = targetInst;
- this.nativeEvent = nativeEvent;
- var Interface = this.constructor.Interface;
+function createSyntheticEvent(Interface) {
+ /**
+ * Synthetic events are dispatched by event plugins, typically in response to a
+ * top-level event delegation handler.
+ *
+ * These systems should generally use pooling to reduce the frequency of garbage
+ * collection. The system should check `isPersistent` to determine whether the
+ * event should be released into the pool after being dispatched. Users that
+ * need a persisted event should invoke `persist`.
+ *
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
+ * DOM interface; custom application-specific events can also subclass this.
+ */
+ function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
+ this._reactName = reactName;
+ this._targetInst = targetInst;
+ this.type = reactEventType;
+ this.nativeEvent = nativeEvent;
+ this.target = nativeEventTarget;
+ this.currentTarget = null;
+
+ for (var _propName in Interface) {
+ if (!Interface.hasOwnProperty(_propName)) {
+ continue;
+ }
- for (var propName in Interface) {
- if (!Interface.hasOwnProperty(propName)) {
- continue;
- }
+ var normalize = Interface[_propName];
- {
- delete this[propName]; // this has a getter/setter for warnings
+ if (normalize) {
+ this[_propName] = normalize(nativeEvent);
+ } else {
+ this[_propName] = nativeEvent[_propName];
+ }
}
- var normalize = Interface[propName];
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
- if (normalize) {
- this[propName] = normalize(nativeEvent);
+ if (defaultPrevented) {
+ this.isDefaultPrevented = functionThatReturnsTrue;
} else {
- if (propName === 'target') {
- this.target = nativeEventTarget;
- } else {
- this[propName] = nativeEvent[propName];
- }
+ this.isDefaultPrevented = functionThatReturnsFalse;
}
+
+ this.isPropagationStopped = functionThatReturnsFalse;
+ return this;
}
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
+ _assign(SyntheticBaseEvent.prototype, {
+ preventDefault: function () {
+ this.defaultPrevented = true;
+ var event = this.nativeEvent;
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
+ if (!event) {
+ return;
+ }
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
-}
+ if (event.preventDefault) {
+ event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
+ } else if (typeof event.returnValue !== 'unknown') {
+ event.returnValue = false;
+ }
-_assign(SyntheticEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
+ this.isDefaultPrevented = functionThatReturnsTrue;
+ },
+ stopPropagation: function () {
+ var event = this.nativeEvent;
- if (!event) {
- return;
- }
+ if (!event) {
+ return;
+ }
- if (event.preventDefault) {
- event.preventDefault();
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
+ if (event.stopPropagation) {
+ event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
+ } else if (typeof event.cancelBubble !== 'unknown') {
+ // The ChangeEventPlugin registers a "propertychange" event for
+ // IE. This event does not support bubbling or cancelling, and
+ // any references to cancelBubble throw "Member not found". A
+ // typeof check of "unknown" circumvents this issue (and is also
+ // IE specific).
+ event.cancelBubble = true;
+ }
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
+ this.isPropagationStopped = functionThatReturnsTrue;
+ },
- if (!event) {
- return;
- }
+ /**
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
+ * them back into the pool. This allows a way to hold onto a reference that
+ * won't be added back into the pool.
+ */
+ persist: function () {// Modern event system doesn't use pooling.
+ },
- if (event.stopPropagation) {
- event.stopPropagation();
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
+ /**
+ * Checks if this event should be released back into the pool.
+ *
+ * @return {boolean} True if this should not be released, false otherwise.
+ */
+ isPersistent: functionThatReturnsTrue
+ });
- this.isPropagationStopped = functionThatReturnsTrue;
- },
+ return SyntheticBaseEvent;
+}
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {
- this.isPersistent = functionThatReturnsTrue;
+
+var EventInterface = {
+ eventPhase: 0,
+ bubbles: 0,
+ cancelable: 0,
+ timeStamp: function (event) {
+ return event.timeStamp || Date.now();
},
+ defaultPrevented: 0,
+ isTrusted: 0
+};
+var SyntheticEvent = createSyntheticEvent(EventInterface);
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsFalse,
+var UIEventInterface = _assign({}, EventInterface, {
+ view: 0,
+ detail: 0
+});
- /**
- * `PooledClass` looks for `destructor` on each instance it releases.
- */
- destructor: function () {
- var Interface = this.constructor.Interface;
+var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
+var lastMovementX;
+var lastMovementY;
+var lastMouseEvent;
- for (var propName in Interface) {
- {
- Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
- }
+function updateMouseMovementPolyfillState(event) {
+ if (event !== lastMouseEvent) {
+ if (lastMouseEvent && event.type === 'mousemove') {
+ lastMovementX = event.screenX - lastMouseEvent.screenX;
+ lastMovementY = event.screenY - lastMouseEvent.screenY;
+ } else {
+ lastMovementX = 0;
+ lastMovementY = 0;
}
- this.dispatchConfig = null;
- this._targetInst = null;
- this.nativeEvent = null;
- this.isDefaultPrevented = functionThatReturnsFalse;
- this.isPropagationStopped = functionThatReturnsFalse;
- this._dispatchListeners = null;
- this._dispatchInstances = null;
+ lastMouseEvent = event;
+ }
+}
+/**
+ * @interface MouseEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
- {
- Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
- Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
- Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
- Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
- Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
+
+var MouseEventInterface = _assign({}, UIEventInterface, {
+ screenX: 0,
+ screenY: 0,
+ clientX: 0,
+ clientY: 0,
+ pageX: 0,
+ pageY: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ getModifierState: getEventModifierState,
+ button: 0,
+ buttons: 0,
+ relatedTarget: function (event) {
+ if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
+ return event.relatedTarget;
+ },
+ movementX: function (event) {
+ if ('movementX' in event) {
+ return event.movementX;
}
+
+ updateMouseMovementPolyfillState(event);
+ return lastMovementX;
+ },
+ movementY: function (event) {
+ if ('movementY' in event) {
+ return event.movementY;
+ } // Don't need to call updateMouseMovementPolyfillState() here
+ // because it's guaranteed to have already run when movementX
+ // was copied.
+
+
+ return lastMovementY;
}
});
-SyntheticEvent.Interface = EventInterface;
+var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
+/**
+ * @interface DragEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+var DragEventInterface = _assign({}, MouseEventInterface, {
+ dataTransfer: 0
+});
+
+var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
/**
- * Helper to reduce boilerplate when creating subclasses.
+ * @interface FocusEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
-SyntheticEvent.extend = function (Interface) {
- var Super = this;
+var FocusEventInterface = _assign({}, UIEventInterface, {
+ relatedTarget: 0
+});
- var E = function () {};
+var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
+ */
- E.prototype = Super.prototype;
- var prototype = new E();
+var AnimationEventInterface = _assign({}, EventInterface, {
+ animationName: 0,
+ elapsedTime: 0,
+ pseudoElement: 0
+});
- function Class() {
- return Super.apply(this, arguments);
+var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/clipboard-apis/
+ */
+
+var ClipboardEventInterface = _assign({}, EventInterface, {
+ clipboardData: function (event) {
+ return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
}
+});
- _assign(prototype, Class.prototype);
+var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
+ */
- Class.prototype = prototype;
- Class.prototype.constructor = Class;
- Class.Interface = _assign({}, Super.Interface, Interface);
- Class.extend = Super.extend;
- addEventPoolingTo(Class);
- return Class;
-};
+var CompositionEventInterface = _assign({}, EventInterface, {
+ data: 0
+});
-addEventPoolingTo(SyntheticEvent);
+var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
/**
- * Helper to nullify syntheticEvent instance properties when destructing
- *
- * @param {String} propName
- * @param {?object} getVal
- * @return {object} defineProperty object
+ * Normalization of deprecated HTML5 `key` values
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
*/
-function getPooledWarningPropertyDefinition(propName, getVal) {
- var isFunction = typeof getVal === 'function';
- return {
- configurable: true,
- set: set,
- get: get
- };
+var normalizeKey = {
+ Esc: 'Escape',
+ Spacebar: ' ',
+ Left: 'ArrowLeft',
+ Up: 'ArrowUp',
+ Right: 'ArrowRight',
+ Down: 'ArrowDown',
+ Del: 'Delete',
+ Win: 'OS',
+ Menu: 'ContextMenu',
+ Apps: 'ContextMenu',
+ Scroll: 'ScrollLock',
+ MozPrintableKey: 'Unidentified'
+};
+/**
+ * Translation from legacy `keyCode` to HTML5 `key`
+ * Only special keys supported, all others depend on keyboard layout or browser
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
+ */
- function set(val) {
- var action = isFunction ? 'setting the method' : 'setting the property';
- warn(action, 'This is effectively a no-op');
- return val;
- }
+var translateToKey = {
+ '8': 'Backspace',
+ '9': 'Tab',
+ '12': 'Clear',
+ '13': 'Enter',
+ '16': 'Shift',
+ '17': 'Control',
+ '18': 'Alt',
+ '19': 'Pause',
+ '20': 'CapsLock',
+ '27': 'Escape',
+ '32': ' ',
+ '33': 'PageUp',
+ '34': 'PageDown',
+ '35': 'End',
+ '36': 'Home',
+ '37': 'ArrowLeft',
+ '38': 'ArrowUp',
+ '39': 'ArrowRight',
+ '40': 'ArrowDown',
+ '45': 'Insert',
+ '46': 'Delete',
+ '112': 'F1',
+ '113': 'F2',
+ '114': 'F3',
+ '115': 'F4',
+ '116': 'F5',
+ '117': 'F6',
+ '118': 'F7',
+ '119': 'F8',
+ '120': 'F9',
+ '121': 'F10',
+ '122': 'F11',
+ '123': 'F12',
+ '144': 'NumLock',
+ '145': 'ScrollLock',
+ '224': 'Meta'
+};
+/**
+ * @param {object} nativeEvent Native browser event.
+ * @return {string} Normalized `key` property.
+ */
- function get() {
- var action = isFunction ? 'accessing the method' : 'accessing the property';
- var result = isFunction ? 'This is a no-op function' : 'This is set to null';
- warn(action, result);
- return getVal;
- }
+function getEventKey(nativeEvent) {
+ if (nativeEvent.key) {
+ // Normalize inconsistent values reported by browsers due to
+ // implementations of a working draft specification.
+ // FireFox implements `key` but returns `MozPrintableKey` for all
+ // printable characters (normalized to `Unidentified`), ignore it.
+ var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
- function warn(action, result) {
- {
- error("This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
+ if (key !== 'Unidentified') {
+ return key;
}
- }
-}
+ } // Browser does not implement `key`, polyfill as much of it as we can.
+
+
+ if (nativeEvent.type === 'keypress') {
+ var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
+ // thus be captured by `keypress`, no other non-printable key should.
-function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
- var EventConstructor = this;
+ return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
+ }
- if (EventConstructor.eventPool.length) {
- var instance = EventConstructor.eventPool.pop();
- EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
- return instance;
+ if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
+ // While user keyboard layout determines the actual meaning of each
+ // `keyCode` value, almost all function keys have a universal value.
+ return translateToKey[nativeEvent.keyCode] || 'Unidentified';
}
- return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
+ return '';
}
+/**
+ * Translation from modifier key to the associated property in the event.
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
+ */
-function releasePooledEvent(event) {
- var EventConstructor = this;
- if (!(event instanceof EventConstructor)) {
- {
- throw Error( "Trying to release an event instance into a pool of a different type." );
- }
- }
+var modifierKeyToProp = {
+ Alt: 'altKey',
+ Control: 'ctrlKey',
+ Meta: 'metaKey',
+ Shift: 'shiftKey'
+}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
+// getModifierState. If getModifierState is not supported, we map it to a set of
+// modifier keys exposed by the event. In this case, Lock-keys are not supported.
- event.destructor();
+function modifierStateGetter(keyArg) {
+ var syntheticEvent = this;
+ var nativeEvent = syntheticEvent.nativeEvent;
- if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
- EventConstructor.eventPool.push(event);
+ if (nativeEvent.getModifierState) {
+ return nativeEvent.getModifierState(keyArg);
}
-}
-function addEventPoolingTo(EventConstructor) {
- EventConstructor.eventPool = [];
- EventConstructor.getPooled = getPooledEvent;
- EventConstructor.release = releasePooledEvent;
+ var keyProp = modifierKeyToProp[keyArg];
+ return keyProp ? !!nativeEvent[keyProp] : false;
}
+function getEventModifierState(nativeEvent) {
+ return modifierStateGetter;
+}
/**
- * HTML nodeType values that represent the type of the node
+ * @interface KeyboardEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
-var ELEMENT_NODE = 1;
-// Do not use the below two methods directly!
-// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
-// (It is the only module that is allowed to access these methods.)
-function unsafeCastStringToDOMTopLevelType(topLevelType) {
- return topLevelType;
-}
-var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
+var KeyboardEventInterface = _assign({}, UIEventInterface, {
+ key: getEventKey,
+ code: 0,
+ location: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ repeat: 0,
+ locale: 0,
+ getModifierState: getEventModifierState,
+ // Legacy Interface
+ charCode: function (event) {
+ // `charCode` is the result of a KeyPress event and represents the value of
+ // the actual printable character.
+ // KeyPress is deprecated, but its replacement is not yet final and not
+ // implemented in any major browser. Only KeyPress has charCode.
+ if (event.type === 'keypress') {
+ return getEventCharCode(event);
+ }
-/**
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
- *
- * @param {string} styleProp
- * @param {string} eventName
- * @returns {object}
- */
+ return 0;
+ },
+ keyCode: function (event) {
+ // `keyCode` is the result of a KeyDown/Up event and represents the value of
+ // physical keyboard key.
+ // The actual meaning of the value depends on the users' keyboard layout
+ // which cannot be detected. Assuming that it is a US keyboard layout
+ // provides a surprisingly accurate mapping for US and European users.
+ // Due to this, it is left to the user to implement at this time.
+ if (event.type === 'keydown' || event.type === 'keyup') {
+ return event.keyCode;
+ }
-function makePrefixMap(styleProp, eventName) {
- var prefixes = {};
- prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
- prefixes['Webkit' + styleProp] = 'webkit' + eventName;
- prefixes['Moz' + styleProp] = 'moz' + eventName;
- return prefixes;
-}
-/**
- * A list of event names to a configurable list of vendor prefixes.
- */
+ return 0;
+ },
+ which: function (event) {
+ // `which` is an alias for either `keyCode` or `charCode` depending on the
+ // type of the event.
+ if (event.type === 'keypress') {
+ return getEventCharCode(event);
+ }
+ if (event.type === 'keydown' || event.type === 'keyup') {
+ return event.keyCode;
+ }
-var vendorPrefixes = {
- animationend: makePrefixMap('Animation', 'AnimationEnd'),
- animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
- animationstart: makePrefixMap('Animation', 'AnimationStart'),
- transitionend: makePrefixMap('Transition', 'TransitionEnd')
-};
-/**
- * Event names that have already been detected and prefixed (if applicable).
- */
+ return 0;
+ }
+});
-var prefixedEventNames = {};
+var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
/**
- * Element to check for prefixes on.
+ * @interface PointerEvent
+ * @see http://www.w3.org/TR/pointerevents/
*/
-var style = {};
+var PointerEventInterface = _assign({}, MouseEventInterface, {
+ pointerId: 0,
+ width: 0,
+ height: 0,
+ pressure: 0,
+ tangentialPressure: 0,
+ tiltX: 0,
+ tiltY: 0,
+ twist: 0,
+ pointerType: 0,
+ isPrimary: 0
+});
+
+var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
/**
- * Bootstrap if a DOM exists.
+ * @interface TouchEvent
+ * @see http://www.w3.org/TR/touch-events/
*/
-if (canUseDOM) {
- style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
- // the un-prefixed "animation" and "transition" properties are defined on the
- // style object but the events that fire will still be prefixed, so we need
- // to check if the un-prefixed events are usable, and if not remove them from the map.
-
- if (!('AnimationEvent' in window)) {
- delete vendorPrefixes.animationend.animation;
- delete vendorPrefixes.animationiteration.animation;
- delete vendorPrefixes.animationstart.animation;
- } // Same as above
-
+var TouchEventInterface = _assign({}, UIEventInterface, {
+ touches: 0,
+ targetTouches: 0,
+ changedTouches: 0,
+ altKey: 0,
+ metaKey: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ getModifierState: getEventModifierState
+});
- if (!('TransitionEvent' in window)) {
- delete vendorPrefixes.transitionend.transition;
- }
-}
+var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
/**
- * Attempts to determine the correct vendor prefixed event name.
- *
- * @param {string} eventName
- * @returns {string}
+ * @interface Event
+ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
*/
+var TransitionEventInterface = _assign({}, EventInterface, {
+ propertyName: 0,
+ elapsedTime: 0,
+ pseudoElement: 0
+});
-function getVendorPrefixedEventName(eventName) {
- if (prefixedEventNames[eventName]) {
- return prefixedEventNames[eventName];
- } else if (!vendorPrefixes[eventName]) {
- return eventName;
- }
-
- var prefixMap = vendorPrefixes[eventName];
+var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
+/**
+ * @interface WheelEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
- for (var styleProp in prefixMap) {
- if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
- return prefixedEventNames[eventName] = prefixMap[styleProp];
- }
- }
+var WheelEventInterface = _assign({}, MouseEventInterface, {
+ deltaX: function (event) {
+ return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
+ 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
+ },
+ deltaY: function (event) {
+ return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
+ 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
+ 'wheelDelta' in event ? -event.wheelDelta : 0;
+ },
+ deltaZ: 0,
+ // Browsers without "deltaMode" is reporting in raw wheel delta where one
+ // notch on the scroll is always +/- 120, roughly equivalent to pixels.
+ // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
+ // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
+ deltaMode: 0
+});
- return eventName;
-}
+var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
/**
- * To identify top level events in ReactDOM, we use constants defined by this
- * module. This is the only module that uses the unsafe* methods to express
- * that the constants actually correspond to the browser event names. This lets
- * us save some bundle size by avoiding a top level type -> event name map.
- * The rest of ReactDOM code should import top level types from this file.
+ * HTML nodeType values that represent the type of the node
*/
-
-var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
-var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
-var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
-var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
-var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
-var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
-var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
-var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
-var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
-var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
-var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
-var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
-var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
-var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
-var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
-var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
-var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
-var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
-var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
-var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
-var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
-var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
-var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
-var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
-var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
-var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
-var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
-var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
-var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
-var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
-var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
-var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
-var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
-var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
-var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
-var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
-var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
-var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
-var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
-var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
-var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
-var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
-var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
-var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
-var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
-var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
-var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
-var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
-var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
-var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
-var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
-var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
-var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
-var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
-var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
-var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
-var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
-var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
-var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
-var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
-var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
-var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
-var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
-var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
-var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
-var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
-var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
-var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.
-
-var PLUGIN_EVENT_SYSTEM = 1;
+var ELEMENT_NODE = 1;
var didWarnAboutMessageChannel = false;
var enqueueTaskImpl = null;
@@ -818,7 +939,7 @@ function enqueueTask(task) {
var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
// version of setImmediate, bypassing fake timers if any.
- enqueueTaskImpl = nodeRequire('timers').setImmediate;
+ enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
} catch (_err) {
// we're in a browser
// we can't use regular timers because they may still be faked
@@ -844,29 +965,24 @@ function enqueueTask(task) {
return enqueueTaskImpl(task);
}
-// ReactDOM.js, and ReactTestUtils.js:
-
-var _ReactDOM$__SECRET_IN = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,
-
-/* eslint-disable no-unused-vars */
-getInstanceFromNode = _ReactDOM$__SECRET_IN[0],
- getNodeFromInstance = _ReactDOM$__SECRET_IN[1],
- getFiberCurrentPropsFromNode = _ReactDOM$__SECRET_IN[2],
- injectEventPluginsByName = _ReactDOM$__SECRET_IN[3],
- eventNameDispatchConfigs = _ReactDOM$__SECRET_IN[4],
- accumulateTwoPhaseDispatches = _ReactDOM$__SECRET_IN[5],
- accumulateDirectDispatches = _ReactDOM$__SECRET_IN[6],
- enqueueStateRestore = _ReactDOM$__SECRET_IN[7],
- restoreStateIfNeeded = _ReactDOM$__SECRET_IN[8],
- dispatchEvent = _ReactDOM$__SECRET_IN[9],
- runEventsInBatch = _ReactDOM$__SECRET_IN[10],
-
-/* eslint-enable no-unused-vars */
-flushPassiveEffects = _ReactDOM$__SECRET_IN[11],
- IsThisRendererActing = _ReactDOM$__SECRET_IN[12];
+var EventInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
+// const getNodeFromInstance = EventInternals[1];
+// const getFiberCurrentPropsFromNode = EventInternals[2];
+// const enqueueStateRestore = EventInternals[3];
+// const restoreStateIfNeeded = EventInternals[4];
+
+var flushPassiveEffects = EventInternals[5];
+var IsThisRendererActing = EventInternals[6];
var batchedUpdates = ReactDOM.unstable_batchedUpdates;
-var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; // this implementation should be exactly the same in
-// ReactTestUtilsAct.js, ReactTestRendererAct.js, createReactNoop.js
+var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; // This is the public version of `ReactTestUtils.act`. It is implemented in
+// "userspace" (i.e. not the reconciler), so that it doesn't add to the
+// production bundle size.
+// TODO: Remove this implementation of `act` in favor of the one exported by
+// the reconciler. To do this, we must first drop support for `act` in
+// production mode.
+// TODO: Remove support for the mock scheduler build, which was only added for
+// the purposes of internal testing. Internal tests should use
+// `unstable_concurrentAct` instead.
var isSchedulerMocked = typeof Scheduler.unstable_flushAllWithoutAsserting === 'function';
@@ -898,15 +1014,12 @@ function flushWorkAndMicroTasks(onDone) {
var actingUpdatesScopeDepth = 0;
-
function act(callback) {
var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth;
- var previousIsSomeRendererActing;
- var previousIsThisRendererActing;
actingUpdatesScopeDepth++;
- previousIsSomeRendererActing = IsSomeRendererActing.current;
- previousIsThisRendererActing = IsThisRendererActing.current;
+ var previousIsSomeRendererActing = IsSomeRendererActing.current;
+ var previousIsThisRendererActing = IsThisRendererActing.current;
IsSomeRendererActing.current = true;
IsThisRendererActing.current = true;
@@ -1013,64 +1126,381 @@ function act(callback) {
}
}
-var findDOMNode = ReactDOM.findDOMNode; // Keep in sync with ReactDOMUnstableNativeDependencies.js
-// ReactDOM.js, and ReactTestUtilsAct.js:
+var EventInternals$1 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
+// const getNodeFromInstance = EventInternals[1];
+// const getFiberCurrentPropsFromNode = EventInternals[2];
+// const enqueueStateRestore = EventInternals[3];
+// const restoreStateIfNeeded = EventInternals[4];
+// const flushPassiveEffects = EventInternals[5];
+
+var IsThisRendererActing$1 = EventInternals$1[6];
+var batchedUpdates$1 = ReactDOM.unstable_batchedUpdates;
+var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing; // This version of `act` is only used by our tests. Unlike the public version
+// of `act`, it's designed to work identically in both production and
+// development. It may have slightly different behavior from the public
+// version, too, since our constraints in our test suite are not the same as
+// those of developers using React — we're testing React itself, as opposed to
+// building an app with React.
+
+var actingUpdatesScopeDepth$1 = 0;
+function unstable_concurrentAct(scope) {
+ if (Scheduler.unstable_flushAllWithoutAsserting === undefined) {
+ throw Error('This version of `act` requires a special mock build of Scheduler.');
+ }
-var _ReactDOM$__SECRET_IN$1 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,
- getInstanceFromNode$1 = _ReactDOM$__SECRET_IN$1[0],
+ if (setTimeout._isMockFunction !== true) {
+ throw Error("This version of `act` requires Jest's timer mocks " + '(i.e. jest.useFakeTimers).');
+ }
-/* eslint-disable no-unused-vars */
-getNodeFromInstance$1 = _ReactDOM$__SECRET_IN$1[1],
- getFiberCurrentPropsFromNode$1 = _ReactDOM$__SECRET_IN$1[2],
- injectEventPluginsByName$1 = _ReactDOM$__SECRET_IN$1[3],
+ var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth$1;
+ var previousIsSomeRendererActing = IsSomeRendererActing$1.current;
+ var previousIsThisRendererActing = IsThisRendererActing$1.current;
+ IsSomeRendererActing$1.current = true;
+ IsThisRendererActing$1.current = true;
+ actingUpdatesScopeDepth$1++;
-/* eslint-enable no-unused-vars */
-eventNameDispatchConfigs$1 = _ReactDOM$__SECRET_IN$1[4],
- accumulateTwoPhaseDispatches$1 = _ReactDOM$__SECRET_IN$1[5],
- accumulateDirectDispatches$1 = _ReactDOM$__SECRET_IN$1[6],
- enqueueStateRestore$1 = _ReactDOM$__SECRET_IN$1[7],
- restoreStateIfNeeded$1 = _ReactDOM$__SECRET_IN$1[8],
- dispatchEvent$1 = _ReactDOM$__SECRET_IN$1[9],
- runEventsInBatch$1 = _ReactDOM$__SECRET_IN$1[10],
+ var unwind = function () {
+ actingUpdatesScopeDepth$1--;
+ IsSomeRendererActing$1.current = previousIsSomeRendererActing;
+ IsThisRendererActing$1.current = previousIsThisRendererActing;
-/* eslint-disable no-unused-vars */
-flushPassiveEffects$1 = _ReactDOM$__SECRET_IN$1[11],
- IsThisRendererActing$1
-/* eslint-enable no-unused-vars */
-= _ReactDOM$__SECRET_IN$1[12];
+ {
+ if (actingUpdatesScopeDepth$1 > previousActingUpdatesScopeDepth) {
+ // if it's _less than_ previousActingUpdatesScopeDepth, then we can
+ // assume the 'other' one has warned
+ error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
+ }
+ }
+ }; // TODO: This would be way simpler if 1) we required a promise to be
+ // returned and 2) we could use async/await. Since it's only our used in
+ // our test suite, we should be able to.
-function Event(suffix) {}
-var hasWarnedAboutDeprecatedMockComponent = false;
+ try {
+ var thenable = batchedUpdates$1(scope);
+
+ if (typeof thenable === 'object' && thenable !== null && typeof thenable.then === 'function') {
+ return {
+ then: function (resolve, reject) {
+ thenable.then(function () {
+ flushActWork(function () {
+ unwind();
+ resolve();
+ }, function (error) {
+ unwind();
+ reject(error);
+ });
+ }, function (error) {
+ unwind();
+ reject(error);
+ });
+ }
+ };
+ } else {
+ try {
+ // TODO: Let's not support non-async scopes at all in our tests. Need to
+ // migrate existing tests.
+ var didFlushWork;
+
+ do {
+ didFlushWork = Scheduler.unstable_flushAllWithoutAsserting();
+ } while (didFlushWork);
+ } finally {
+ unwind();
+ }
+ }
+ } catch (error) {
+ unwind();
+ throw error;
+ }
+}
+
+function flushActWork(resolve, reject) {
+ // Flush suspended fallbacks
+ // $FlowFixMe: Flow doesn't know about global Jest object
+ jest.runOnlyPendingTimers();
+ enqueueTask(function () {
+ try {
+ var didFlushWork = Scheduler.unstable_flushAllWithoutAsserting();
+
+ if (didFlushWork) {
+ flushActWork(resolve, reject);
+ } else {
+ resolve();
+ }
+ } catch (error) {
+ reject(error);
+ }
+ });
+}
+
+function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
+
+ try {
+ func.apply(context, funcArgs);
+ } catch (error) {
+ this.onError(error);
+ }
+}
+
+var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
+
+{
+ // In DEV mode, we swap out invokeGuardedCallback for a special version
+ // that plays more nicely with the browser's DevTools. The idea is to preserve
+ // "Pause on exceptions" behavior. Because React wraps all user-provided
+ // functions in invokeGuardedCallback, and the production version of
+ // invokeGuardedCallback uses a try-catch, all user exceptions are treated
+ // like caught exceptions, and the DevTools won't pause unless the developer
+ // takes the extra step of enabling pause on caught exceptions. This is
+ // unintuitive, though, because even though React has caught the error, from
+ // the developer's perspective, the error is uncaught.
+ //
+ // To preserve the expected "Pause on exceptions" behavior, we don't use a
+ // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
+ // DOM node, and call the user-provided callback from inside an event handler
+ // for that fake event. If the callback throws, the error is "captured" using
+ // a global event handler. But because the error happens in a different
+ // event loop context, it does not interrupt the normal program flow.
+ // Effectively, this gives us try-catch behavior without actually using
+ // try-catch. Neat!
+ // Check that the browser supports the APIs we need to implement our special
+ // DEV version of invokeGuardedCallback
+ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
+ var fakeNode = document.createElement('react');
+
+ invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
+ // If document doesn't exist we know for sure we will crash in this method
+ // when we call document.createEvent(). However this can cause confusing
+ // errors: https://github.com/facebookincubator/create-react-app/issues/3482
+ // So we preemptively throw with a better message instead.
+ if (!(typeof document !== 'undefined')) {
+ {
+ throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
+ }
+ }
+
+ var evt = document.createEvent('Event');
+ var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
+ // set this to true at the beginning, then set it to false right after
+ // calling the function. If the function errors, `didError` will never be
+ // set to false. This strategy works even if the browser is flaky and
+ // fails to call our global error handler, because it doesn't rely on
+ // the error event at all.
+
+ var didError = true; // Keeps track of the value of window.event so that we can reset it
+ // during the callback to let user code access window.event in the
+ // browsers that support it.
+
+ var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
+ // dispatching: https://github.com/facebook/react/issues/13688
+
+ var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
+
+ function restoreAfterDispatch() {
+ // We immediately remove the callback from event listeners so that
+ // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
+ // nested call would trigger the fake event handlers of any call higher
+ // in the stack.
+ fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
+ // window.event assignment in both IE <= 10 as they throw an error
+ // "Member not found" in strict mode, and in Firefox which does not
+ // support window.event.
+
+ if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
+ window.event = windowEvent;
+ }
+ } // Create an event handler for our fake event. We will synchronously
+ // dispatch our fake event using `dispatchEvent`. Inside the handler, we
+ // call the user-provided callback.
+
+
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
+
+ function callCallback() {
+ didCall = true;
+ restoreAfterDispatch();
+ func.apply(context, funcArgs);
+ didError = false;
+ } // Create a global error event handler. We use this to capture the value
+ // that was thrown. It's possible that this error handler will fire more
+ // than once; for example, if non-React code also calls `dispatchEvent`
+ // and a handler for that event throws. We should be resilient to most of
+ // those cases. Even if our error event handler fires more than once, the
+ // last error event is always used. If the callback actually does error,
+ // we know that the last error event is the correct one, because it's not
+ // possible for anything else to have happened in between our callback
+ // erroring and the code that follows the `dispatchEvent` call below. If
+ // the callback doesn't error, but the error event was fired, we know to
+ // ignore it because `didError` will be false, as described above.
+
+
+ var error; // Use this to track whether the error event is ever called.
+
+ var didSetError = false;
+ var isCrossOriginError = false;
+
+ function handleWindowError(event) {
+ error = event.error;
+ didSetError = true;
+
+ if (error === null && event.colno === 0 && event.lineno === 0) {
+ isCrossOriginError = true;
+ }
+
+ if (event.defaultPrevented) {
+ // Some other error handler has prevented default.
+ // Browsers silence the error report if this happens.
+ // We'll remember this to later decide whether to log it or not.
+ if (error != null && typeof error === 'object') {
+ try {
+ error._suppressLogging = true;
+ } catch (inner) {// Ignore.
+ }
+ }
+ }
+ } // Create a fake event type.
+
+
+ var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
+
+ window.addEventListener('error', handleWindowError);
+ fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
+ // errors, it will trigger our global error handler.
+
+ evt.initEvent(evtType, false, false);
+ fakeNode.dispatchEvent(evt);
+
+ if (windowEventDescriptor) {
+ Object.defineProperty(window, 'event', windowEventDescriptor);
+ }
+
+ if (didCall && didError) {
+ if (!didSetError) {
+ // The callback errored, but the error event never fired.
+ error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
+ } else if (isCrossOriginError) {
+ error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
+ }
+
+ this.onError(error);
+ } // Remove our event listeners
+
+
+ window.removeEventListener('error', handleWindowError);
+
+ if (!didCall) {
+ // Something went really wrong, and our event was not dispatched.
+ // https://github.com/facebook/react/issues/16734
+ // https://github.com/facebook/react/issues/16585
+ // Fall back to the production implementation.
+ restoreAfterDispatch();
+ return invokeGuardedCallbackProd.apply(this, arguments);
+ }
+ };
+ }
+}
+
+var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
+
+var hasError = false;
+var caughtError = null; // Used by event system to capture/rethrow the first error.
+
+var hasRethrowError = false;
+var rethrowError = null;
+var reporter = {
+ onError: function (error) {
+ hasError = true;
+ caughtError = error;
+ }
+};
/**
- * @class ReactTestUtils
+ * Call a function while guarding against errors that happens within it.
+ * Returns an error if it throws, otherwise null.
+ *
+ * In production, this is implemented using a try-catch. The reason we don't
+ * use a try-catch directly is so that we can swap out a different
+ * implementation in DEV mode.
+ *
+ * @param {String} name of the guard to use for logging or debugging
+ * @param {Function} func The function to invoke
+ * @param {*} context The context to use when calling the function
+ * @param {...*} args Arguments for function
*/
+function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
+ hasError = false;
+ caughtError = null;
+ invokeGuardedCallbackImpl$1.apply(reporter, arguments);
+}
/**
- * Simulates a top level event being dispatched from a raw event that occurred
- * on an `Element` node.
- * @param {number} topLevelType A number from `TopLevelEventTypes`
- * @param {!Element} node The dom to simulate an event occurring on.
- * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
+ * Same as invokeGuardedCallback, but instead of returning an error, it stores
+ * it in a global so it can be rethrown by `rethrowCaughtError` later.
+ * TODO: See if caughtError and rethrowError can be unified.
+ *
+ * @param {String} name of the guard to use for logging or debugging
+ * @param {Function} func The function to invoke
+ * @param {*} context The context to use when calling the function
+ * @param {...*} args Arguments for function
*/
-function simulateNativeEventOnNode(topLevelType, node, fakeNativeEvent) {
- fakeNativeEvent.target = node;
- dispatchEvent$1(topLevelType, PLUGIN_EVENT_SYSTEM, document, fakeNativeEvent);
+function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
+ invokeGuardedCallback.apply(this, arguments);
+
+ if (hasError) {
+ var error = clearCaughtError();
+
+ if (!hasRethrowError) {
+ hasRethrowError = true;
+ rethrowError = error;
+ }
+ }
}
/**
- * Simulates a top level event being dispatched from a raw event that occurred
- * on the `ReactDOMComponent` `comp`.
- * @param {Object} topLevelType A type from `BrowserEventConstants.topLevelTypes`.
- * @param {!ReactDOMComponent} comp
- * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
+ * During execution of guarded functions we will capture the first error which
+ * we will rethrow to be handled by the top level error handler.
*/
-
-function simulateNativeEventOnDOMComponent(topLevelType, comp, fakeNativeEvent) {
- simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent);
+function rethrowCaughtError() {
+ if (hasRethrowError) {
+ var error = rethrowError;
+ hasRethrowError = false;
+ rethrowError = null;
+ throw error;
+ }
+}
+function clearCaughtError() {
+ if (hasError) {
+ var error = caughtError;
+ hasError = false;
+ caughtError = null;
+ return error;
+ } else {
+ {
+ {
+ throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+ }
}
+var EventInternals$2 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
+var getInstanceFromNode = EventInternals$2[0];
+var getNodeFromInstance = EventInternals$2[1];
+var getFiberCurrentPropsFromNode = EventInternals$2[2];
+var enqueueStateRestore = EventInternals$2[3];
+var restoreStateIfNeeded = EventInternals$2[4]; // const flushPassiveEffects = EventInternals[5];
+// TODO: This is related to `act`, not events. Move to separate key?
+// const IsThisRendererActing = EventInternals[6];
+
+function Event(suffix) {}
+
+var hasWarnedAboutDeprecatedMockComponent = false;
+/**
+ * @class ReactTestUtils
+ */
+
function findAllInRenderedFiberTreeInternal(fiber, test) {
if (!fiber) {
return [];
@@ -1158,214 +1588,455 @@ function validateClassInstance(inst, methodName) {
*/
-var ReactTestUtils = {
- renderIntoDocument: function (element) {
- var div = document.createElement('div'); // None of our tests actually require attaching the container to the
- // DOM, and doing so creates a mess that we rely on test isolation to
- // clean up, so we're going to stop honoring the name of this method
- // (and probably rename it eventually) if no problems arise.
- // document.documentElement.appendChild(div);
+function renderIntoDocument(element) {
+ var div = document.createElement('div'); // None of our tests actually require attaching the container to the
+ // DOM, and doing so creates a mess that we rely on test isolation to
+ // clean up, so we're going to stop honoring the name of this method
+ // (and probably rename it eventually) if no problems arise.
+ // document.documentElement.appendChild(div);
- return ReactDOM.render(element, div);
- },
- isElement: function (element) {
- return React.isValidElement(element);
- },
- isElementOfType: function (inst, convenienceConstructor) {
- return React.isValidElement(inst) && inst.type === convenienceConstructor;
- },
- isDOMComponent: function (inst) {
- return !!(inst && inst.nodeType === ELEMENT_NODE && inst.tagName);
- },
- isDOMComponentElement: function (inst) {
- return !!(inst && React.isValidElement(inst) && !!inst.tagName);
- },
- isCompositeComponent: function (inst) {
- if (ReactTestUtils.isDOMComponent(inst)) {
- // Accessing inst.setState warns; just return false as that'll be what
- // this returns when we have DOM nodes as refs directly
- return false;
- }
+ return ReactDOM.render(element, div);
+}
- return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';
- },
- isCompositeComponentWithType: function (inst, type) {
- if (!ReactTestUtils.isCompositeComponent(inst)) {
- return false;
- }
+function isElement(element) {
+ return React.isValidElement(element);
+}
- var internalInstance = get(inst);
- var constructor = internalInstance.type;
- return constructor === type;
- },
- findAllInRenderedTree: function (inst, test) {
- validateClassInstance(inst, 'findAllInRenderedTree');
+function isElementOfType(inst, convenienceConstructor) {
+ return React.isValidElement(inst) && inst.type === convenienceConstructor;
+}
- if (!inst) {
- return [];
- }
+function isDOMComponent(inst) {
+ return !!(inst && inst.nodeType === ELEMENT_NODE && inst.tagName);
+}
- var internalInstance = get(inst);
- return findAllInRenderedFiberTreeInternal(internalInstance, test);
- },
+function isDOMComponentElement(inst) {
+ return !!(inst && React.isValidElement(inst) && !!inst.tagName);
+}
- /**
- * Finds all instance of components in the rendered tree that are DOM
- * components with the class name matching `className`.
- * @return {array} an array of all the matches.
- */
- scryRenderedDOMComponentsWithClass: function (root, classNames) {
- validateClassInstance(root, 'scryRenderedDOMComponentsWithClass');
- return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
- if (ReactTestUtils.isDOMComponent(inst)) {
- var className = inst.className;
-
- if (typeof className !== 'string') {
- // SVG, probably.
- className = inst.getAttribute('class') || '';
- }
+function isCompositeComponent(inst) {
+ if (isDOMComponent(inst)) {
+ // Accessing inst.setState warns; just return false as that'll be what
+ // this returns when we have DOM nodes as refs directly
+ return false;
+ }
- var classList = className.split(/\s+/);
+ return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';
+}
+
+function isCompositeComponentWithType(inst, type) {
+ if (!isCompositeComponent(inst)) {
+ return false;
+ }
+
+ var internalInstance = get(inst);
+ var constructor = internalInstance.type;
+ return constructor === type;
+}
+
+function findAllInRenderedTree(inst, test) {
+ validateClassInstance(inst, 'findAllInRenderedTree');
+
+ if (!inst) {
+ return [];
+ }
+
+ var internalInstance = get(inst);
+ return findAllInRenderedFiberTreeInternal(internalInstance, test);
+}
+/**
+ * Finds all instance of components in the rendered tree that are DOM
+ * components with the class name matching `className`.
+ * @return {array} an array of all the matches.
+ */
- if (!Array.isArray(classNames)) {
- if (!(classNames !== undefined)) {
- {
- throw Error( "TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument." );
- }
- }
- classNames = classNames.split(/\s+/);
+function scryRenderedDOMComponentsWithClass(root, classNames) {
+ validateClassInstance(root, 'scryRenderedDOMComponentsWithClass');
+ return findAllInRenderedTree(root, function (inst) {
+ if (isDOMComponent(inst)) {
+ var className = inst.className;
+
+ if (typeof className !== 'string') {
+ // SVG, probably.
+ className = inst.getAttribute('class') || '';
+ }
+
+ var classList = className.split(/\s+/);
+
+ if (!Array.isArray(classNames)) {
+ if (!(classNames !== undefined)) {
+ {
+ throw Error( "TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument." );
+ }
}
- return classNames.every(function (name) {
- return classList.indexOf(name) !== -1;
- });
+ classNames = classNames.split(/\s+/);
}
- return false;
- });
- },
+ return classNames.every(function (name) {
+ return classList.indexOf(name) !== -1;
+ });
+ }
- /**
- * Like scryRenderedDOMComponentsWithClass but expects there to be one result,
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactDOMComponent} The one match.
- */
- findRenderedDOMComponentWithClass: function (root, className) {
- validateClassInstance(root, 'findRenderedDOMComponentWithClass');
- var all = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className);
+ return false;
+ });
+}
+/**
+ * Like scryRenderedDOMComponentsWithClass but expects there to be one result,
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ * @return {!ReactDOMComponent} The one match.
+ */
+
+
+function findRenderedDOMComponentWithClass(root, className) {
+ validateClassInstance(root, 'findRenderedDOMComponentWithClass');
+ var all = scryRenderedDOMComponentsWithClass(root, className);
+
+ if (all.length !== 1) {
+ throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);
+ }
+
+ return all[0];
+}
+/**
+ * Finds all instance of components in the rendered tree that are DOM
+ * components with the tag name matching `tagName`.
+ * @return {array} an array of all the matches.
+ */
+
+
+function scryRenderedDOMComponentsWithTag(root, tagName) {
+ validateClassInstance(root, 'scryRenderedDOMComponentsWithTag');
+ return findAllInRenderedTree(root, function (inst) {
+ return isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();
+ });
+}
+/**
+ * Like scryRenderedDOMComponentsWithTag but expects there to be one result,
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ * @return {!ReactDOMComponent} The one match.
+ */
+
+
+function findRenderedDOMComponentWithTag(root, tagName) {
+ validateClassInstance(root, 'findRenderedDOMComponentWithTag');
+ var all = scryRenderedDOMComponentsWithTag(root, tagName);
+
+ if (all.length !== 1) {
+ throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);
+ }
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);
+ return all[0];
+}
+/**
+ * Finds all instances of components with type equal to `componentType`.
+ * @return {array} an array of all the matches.
+ */
+
+
+function scryRenderedComponentsWithType(root, componentType) {
+ validateClassInstance(root, 'scryRenderedComponentsWithType');
+ return findAllInRenderedTree(root, function (inst) {
+ return isCompositeComponentWithType(inst, componentType);
+ });
+}
+/**
+ * Same as `scryRenderedComponentsWithType` but expects there to be one result
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ * @return {!ReactComponent} The one match.
+ */
+
+
+function findRenderedComponentWithType(root, componentType) {
+ validateClassInstance(root, 'findRenderedComponentWithType');
+ var all = scryRenderedComponentsWithType(root, componentType);
+
+ if (all.length !== 1) {
+ throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);
+ }
+
+ return all[0];
+}
+/**
+ * Pass a mocked component module to this method to augment it with
+ * useful methods that allow it to be used as a dummy React component.
+ * Instead of rendering as usual, the component will become a simple
+ * <div> containing any provided children.
+ *
+ * @param {object} module the mock function object exported from a
+ * module that defines the component to be mocked
+ * @param {?string} mockTagName optional dummy root tag name to return
+ * from render method (overrides
+ * module.mockTagName if provided)
+ * @return {object} the ReactTestUtils object (for chaining)
+ */
+
+
+function mockComponent(module, mockTagName) {
+ {
+ if (!hasWarnedAboutDeprecatedMockComponent) {
+ hasWarnedAboutDeprecatedMockComponent = true;
+
+ warn('ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + 'See https://reactjs.org/link/test-utils-mock-component for more information.');
}
+ }
- return all[0];
- },
+ mockTagName = mockTagName || module.mockTagName || 'div';
+ module.prototype.render.mockImplementation(function () {
+ return React.createElement(mockTagName, null, this.props.children);
+ });
+ return this;
+}
- /**
- * Finds all instance of components in the rendered tree that are DOM
- * components with the tag name matching `tagName`.
- * @return {array} an array of all the matches.
- */
- scryRenderedDOMComponentsWithTag: function (root, tagName) {
- validateClassInstance(root, 'scryRenderedDOMComponentsWithTag');
- return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
- return ReactTestUtils.isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();
- });
- },
+function nativeTouchData(x, y) {
+ return {
+ touches: [{
+ pageX: x,
+ pageY: y
+ }]
+ };
+} // Start of inline: the below functions were inlined from
+// EventPropagator.js, as they deviated from ReactDOM's newer
+// implementations.
- /**
- * Like scryRenderedDOMComponentsWithTag but expects there to be one result,
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactDOMComponent} The one match.
- */
- findRenderedDOMComponentWithTag: function (root, tagName) {
- validateClassInstance(root, 'findRenderedDOMComponentWithTag');
- var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName);
+/**
+ * Dispatch the event to the listener.
+ * @param {SyntheticEvent} event SyntheticEvent to handle
+ * @param {function} listener Application-level callback
+ * @param {*} inst Internal component instance
+ */
+
+
+function executeDispatch(event, listener, inst) {
+ var type = event.type || 'unknown-event';
+ event.currentTarget = getNodeFromInstance(inst);
+ invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
+ event.currentTarget = null;
+}
+/**
+ * Standard/simple iteration through an event's collected dispatches.
+ */
+
+
+function executeDispatchesInOrder(event) {
+ var dispatchListeners = event._dispatchListeners;
+ var dispatchInstances = event._dispatchInstances;
+
+ if (Array.isArray(dispatchListeners)) {
+ for (var i = 0; i < dispatchListeners.length; i++) {
+ if (event.isPropagationStopped()) {
+ break;
+ } // Listeners and Instances are two parallel arrays that are always in sync.
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);
+
+ executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
}
+ } else if (dispatchListeners) {
+ executeDispatch(event, dispatchListeners, dispatchInstances);
+ }
- return all[0];
- },
+ event._dispatchListeners = null;
+ event._dispatchInstances = null;
+}
+/**
+ * Dispatches an event and releases it back into the pool, unless persistent.
+ *
+ * @param {?object} event Synthetic event to be dispatched.
+ * @private
+ */
- /**
- * Finds all instances of components with type equal to `componentType`.
- * @return {array} an array of all the matches.
- */
- scryRenderedComponentsWithType: function (root, componentType) {
- validateClassInstance(root, 'scryRenderedComponentsWithType');
- return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
- return ReactTestUtils.isCompositeComponentWithType(inst, componentType);
- });
- },
- /**
- * Same as `scryRenderedComponentsWithType` but expects there to be one result
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactComponent} The one match.
- */
- findRenderedComponentWithType: function (root, componentType) {
- validateClassInstance(root, 'findRenderedComponentWithType');
- var all = ReactTestUtils.scryRenderedComponentsWithType(root, componentType);
+var executeDispatchesAndRelease = function (event) {
+ if (event) {
+ executeDispatchesInOrder(event);
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);
+ if (!event.isPersistent()) {
+ event.constructor.release(event);
}
+ }
+};
- return all[0];
- },
+function isInteractive(tag) {
+ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
+}
- /**
- * Pass a mocked component module to this method to augment it with
- * useful methods that allow it to be used as a dummy React component.
- * Instead of rendering as usual, the component will become a simple
- * <div> containing any provided children.
- *
- * @param {object} module the mock function object exported from a
- * module that defines the component to be mocked
- * @param {?string} mockTagName optional dummy root tag name to return
- * from render method (overrides
- * module.mockTagName if provided)
- * @return {object} the ReactTestUtils object (for chaining)
- */
- mockComponent: function (module, mockTagName) {
+function getParent(inst) {
+ do {
+ inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
+ // That is depending on if we want nested subtrees (layers) to bubble
+ // events to their parent. We could also go through parentNode on the
+ // host node but that wouldn't work for React Native and doesn't let us
+ // do the portal feature.
+ } while (inst && inst.tag !== HostComponent);
+
+ if (inst) {
+ return inst;
+ }
+
+ return null;
+}
+/**
+ * Simulates the traversal of a two-phase, capture/bubble event dispatch.
+ */
+
+
+function traverseTwoPhase(inst, fn, arg) {
+ var path = [];
+
+ while (inst) {
+ path.push(inst);
+ inst = getParent(inst);
+ }
+
+ var i;
+
+ for (i = path.length; i-- > 0;) {
+ fn(path[i], 'captured', arg);
+ }
+
+ for (i = 0; i < path.length; i++) {
+ fn(path[i], 'bubbled', arg);
+ }
+}
+
+function shouldPreventMouseEvent(name, type, props) {
+ switch (name) {
+ case 'onClick':
+ case 'onClickCapture':
+ case 'onDoubleClick':
+ case 'onDoubleClickCapture':
+ case 'onMouseDown':
+ case 'onMouseDownCapture':
+ case 'onMouseMove':
+ case 'onMouseMoveCapture':
+ case 'onMouseUp':
+ case 'onMouseUpCapture':
+ case 'onMouseEnter':
+ return !!(props.disabled && isInteractive(type));
+
+ default:
+ return false;
+ }
+}
+/**
+ * @param {object} inst The instance, which is the source of events.
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
+ * @return {?function} The stored callback.
+ */
+
+
+function getListener(inst, registrationName) {
+ // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
+ // live here; needs to be moved to a better place soon
+ var stateNode = inst.stateNode;
+
+ if (!stateNode) {
+ // Work in progress (ex: onload events in incremental mode).
+ return null;
+ }
+
+ var props = getFiberCurrentPropsFromNode(stateNode);
+
+ if (!props) {
+ // Work in progress.
+ return null;
+ }
+
+ var listener = props[registrationName];
+
+ if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
+ return null;
+ }
+
+ if (!(!listener || typeof listener === 'function')) {
{
- if (!hasWarnedAboutDeprecatedMockComponent) {
- hasWarnedAboutDeprecatedMockComponent = true;
+ throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
+ }
+ }
- warn('ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + 'See https://fb.me/test-utils-mock-component for more information.');
+ return listener;
+}
+
+function listenerAtPhase(inst, event, propagationPhase) {
+ var registrationName = event._reactName;
+
+ if (propagationPhase === 'captured') {
+ registrationName += 'Capture';
+ }
+
+ return getListener(inst, registrationName);
+}
+
+function accumulateDispatches(inst, ignoredDirection, event) {
+ if (inst && event && event._reactName) {
+ var registrationName = event._reactName;
+ var listener = getListener(inst, registrationName);
+
+ if (listener) {
+ if (event._dispatchListeners == null) {
+ event._dispatchListeners = [];
+ }
+
+ if (event._dispatchInstances == null) {
+ event._dispatchInstances = [];
}
+
+ event._dispatchListeners.push(listener);
+
+ event._dispatchInstances.push(inst);
}
+ }
+}
- mockTagName = mockTagName || module.mockTagName || 'div';
- module.prototype.render.mockImplementation(function () {
- return React.createElement(mockTagName, null, this.props.children);
- });
- return this;
- },
- nativeTouchData: function (x, y) {
- return {
- touches: [{
- pageX: x,
- pageY: y
- }]
- };
- },
- Simulate: null,
- SimulateNative: {},
- act: act
-};
+function accumulateDirectionalDispatches(inst, phase, event) {
+ {
+ if (!inst) {
+ error('Dispatching inst must not be null');
+ }
+ }
+
+ var listener = listenerAtPhase(inst, event, phase);
+
+ if (listener) {
+ if (event._dispatchListeners == null) {
+ event._dispatchListeners = [];
+ }
+
+ if (event._dispatchInstances == null) {
+ event._dispatchInstances = [];
+ }
+
+ event._dispatchListeners.push(listener);
+
+ event._dispatchInstances.push(inst);
+ }
+}
+
+function accumulateDirectDispatchesSingle(event) {
+ if (event && event._reactName) {
+ accumulateDispatches(event._targetInst, null, event);
+ }
+}
+
+function accumulateTwoPhaseDispatchesSingle(event) {
+ if (event && event._reactName) {
+ traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
+ }
+} // End of inline
+
+
+var Simulate = {};
+var directDispatchEventTypes = new Set(['mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave']);
/**
* Exports:
*
- * - `ReactTestUtils.Simulate.click(Element)`
- * - `ReactTestUtils.Simulate.mouseMove(Element)`
- * - `ReactTestUtils.Simulate.change(Element)`
+ * - `Simulate.click(Element)`
+ * - `Simulate.mouseMove(Element)`
+ * - `Simulate.change(Element)`
* - ... (All keys from event plugin `eventTypes` objects)
*/
@@ -1377,104 +2048,71 @@ function makeSimulator(eventType) {
}
}
- if (!!ReactTestUtils.isCompositeComponent(domNode)) {
+ if (!!isCompositeComponent(domNode)) {
{
throw Error( "TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead." );
}
}
- var dispatchConfig = eventNameDispatchConfigs$1[eventType];
+ var reactName = 'on' + eventType[0].toUpperCase() + eventType.slice(1);
var fakeNativeEvent = new Event();
fakeNativeEvent.target = domNode;
- fakeNativeEvent.type = eventType.toLowerCase(); // We don't use SyntheticEvent.getPooled in order to not have to worry about
- // properly destroying any properties assigned from `eventData` upon release
-
- var targetInst = getInstanceFromNode$1(domNode);
- var event = new SyntheticEvent(dispatchConfig, targetInst, fakeNativeEvent, domNode); // Since we aren't using pooling, always persist the event. This will make
+ fakeNativeEvent.type = eventType.toLowerCase();
+ var targetInst = getInstanceFromNode(domNode);
+ var event = new SyntheticEvent(reactName, fakeNativeEvent.type, targetInst, fakeNativeEvent, domNode); // Since we aren't using pooling, always persist the event. This will make
// sure it's marked and won't warn when setting additional properties.
event.persist();
_assign(event, eventData);
- if (dispatchConfig.phasedRegistrationNames) {
- accumulateTwoPhaseDispatches$1(event);
+ if (directDispatchEventTypes.has(eventType)) {
+ accumulateDirectDispatchesSingle(event);
} else {
- accumulateDirectDispatches$1(event);
+ accumulateTwoPhaseDispatchesSingle(event);
}
ReactDOM.unstable_batchedUpdates(function () {
// Normally extractEvent enqueues a state restore, but we'll just always
// do that since we're by-passing it here.
- enqueueStateRestore$1(domNode);
- runEventsInBatch$1(event);
+ enqueueStateRestore(domNode);
+ executeDispatchesAndRelease(event);
+ rethrowCaughtError();
});
- restoreStateIfNeeded$1();
+ restoreStateIfNeeded();
};
-}
+} // A one-time snapshot with no plans to update. We'll probably want to deprecate Simulate API.
-function buildSimulators() {
- ReactTestUtils.Simulate = {};
- var eventType;
- for (eventType in eventNameDispatchConfigs$1) {
- /**
- * @param {!Element|ReactDOMComponent} domComponentOrNode
- * @param {?object} eventData Fake event data to use in SyntheticEvent.
- */
- ReactTestUtils.Simulate[eventType] = makeSimulator(eventType);
- }
-}
+var simulatedEventTypes = ['blur', 'cancel', 'click', 'close', 'contextMenu', 'copy', 'cut', 'auxClick', 'doubleClick', 'dragEnd', 'dragStart', 'drop', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'mouseDown', 'mouseUp', 'paste', 'pause', 'play', 'pointerCancel', 'pointerDown', 'pointerUp', 'rateChange', 'reset', 'seeked', 'submit', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'drag', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'mouseMove', 'mouseOut', 'mouseOver', 'pointerMove', 'pointerOut', 'pointerOver', 'scroll', 'toggle', 'touchMove', 'wheel', 'abort', 'animationEnd', 'animationIteration', 'animationStart', 'canPlay', 'canPlayThrough', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'playing', 'progress', 'seeking', 'stalled', 'suspend', 'timeUpdate', 'transitionEnd', 'waiting', 'mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave', 'change', 'select', 'beforeInput', 'compositionEnd', 'compositionStart', 'compositionUpdate'];
-buildSimulators();
-/**
- * Exports:
- *
- * - `ReactTestUtils.SimulateNative.click(Element/ReactDOMComponent)`
- * - `ReactTestUtils.SimulateNative.mouseMove(Element/ReactDOMComponent)`
- * - `ReactTestUtils.SimulateNative.mouseIn/ReactDOMComponent)`
- * - `ReactTestUtils.SimulateNative.mouseOut(Element/ReactDOMComponent)`
- * - ... (All keys from `BrowserEventConstants.topLevelTypes`)
- *
- * Note: Top level event types are a subset of the entire set of handler types
- * (which include a broader set of "synthetic" events). For example, onDragDone
- * is a synthetic event. Except when testing an event plugin or React's event
- * handling code specifically, you probably want to use ReactTestUtils.Simulate
- * to dispatch synthetic events.
- */
-
-function makeNativeSimulator(eventType, topLevelType) {
- return function (domComponentOrNode, nativeEventData) {
- var fakeNativeEvent = new Event(eventType);
-
- _assign(fakeNativeEvent, nativeEventData);
-
- if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {
- simulateNativeEventOnDOMComponent(topLevelType, domComponentOrNode, fakeNativeEvent);
- } else if (domComponentOrNode.tagName) {
- // Will allow on actual dom nodes.
- simulateNativeEventOnNode(topLevelType, domComponentOrNode, fakeNativeEvent);
- }
- };
+function buildSimulators() {
+ simulatedEventTypes.forEach(function (eventType) {
+ Simulate[eventType] = makeSimulator(eventType);
+ });
}
-[[TOP_ABORT, 'abort'], [TOP_ANIMATION_END, 'animationEnd'], [TOP_ANIMATION_ITERATION, 'animationIteration'], [TOP_ANIMATION_START, 'animationStart'], [TOP_BLUR, 'blur'], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough'], [TOP_CAN_PLAY, 'canPlay'], [TOP_CANCEL, 'cancel'], [TOP_CHANGE, 'change'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_COMPOSITION_END, 'compositionEnd'], [TOP_COMPOSITION_START, 'compositionStart'], [TOP_COMPOSITION_UPDATE, 'compositionUpdate'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_ENTER, 'dragEnter'], [TOP_DRAG_EXIT, 'dragExit'], [TOP_DRAG_LEAVE, 'dragLeave'], [TOP_DRAG_OVER, 'dragOver'], [TOP_DRAG_START, 'dragStart'], [TOP_DRAG, 'drag'], [TOP_DROP, 'drop'], [TOP_DURATION_CHANGE, 'durationChange'], [TOP_EMPTIED, 'emptied'], [TOP_ENCRYPTED, 'encrypted'], [TOP_ENDED, 'ended'], [TOP_ERROR, 'error'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_LOAD_START, 'loadStart'], [TOP_LOAD_START, 'loadStart'], [TOP_LOAD, 'load'], [TOP_LOADED_DATA, 'loadedData'], [TOP_LOADED_METADATA, 'loadedMetadata'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_MOVE, 'mouseMove'], [TOP_MOUSE_OUT, 'mouseOut'], [TOP_MOUSE_OVER, 'mouseOver'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_PLAYING, 'playing'], [TOP_PROGRESS, 'progress'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_SCROLL, 'scroll'], [TOP_SEEKED, 'seeked'], [TOP_SEEKING, 'seeking'], [TOP_SELECTION_CHANGE, 'selectionChange'], [TOP_STALLED, 'stalled'], [TOP_SUSPEND, 'suspend'], [TOP_TEXT_INPUT, 'textInput'], [TOP_TIME_UPDATE, 'timeUpdate'], [TOP_TOGGLE, 'toggle'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_MOVE, 'touchMove'], [TOP_TOUCH_START, 'touchStart'], [TOP_TRANSITION_END, 'transitionEnd'], [TOP_VOLUME_CHANGE, 'volumeChange'], [TOP_WAITING, 'waiting'], [TOP_WHEEL, 'wheel']].forEach(function (_ref) {
- var topLevelType = _ref[0],
- eventType = _ref[1];
-
- /**
- * @param {!Element|ReactDOMComponent} domComponentOrNode
- * @param {?Event} nativeEventData Fake native event to use in SyntheticEvent.
- */
- ReactTestUtils.SimulateNative[eventType] = makeNativeSimulator(eventType, topLevelType);
-});
-
-// TODO: decide on the top-level export form.
-// This is hacky but makes it work with both Rollup and Jest.
-
-
-var testUtils = ReactTestUtils.default || ReactTestUtils;
+buildSimulators();
-module.exports = testUtils;
+exports.Simulate = Simulate;
+exports.act = act;
+exports.findAllInRenderedTree = findAllInRenderedTree;
+exports.findRenderedComponentWithType = findRenderedComponentWithType;
+exports.findRenderedDOMComponentWithClass = findRenderedDOMComponentWithClass;
+exports.findRenderedDOMComponentWithTag = findRenderedDOMComponentWithTag;
+exports.isCompositeComponent = isCompositeComponent;
+exports.isCompositeComponentWithType = isCompositeComponentWithType;
+exports.isDOMComponent = isDOMComponent;
+exports.isDOMComponentElement = isDOMComponentElement;
+exports.isElement = isElement;
+exports.isElementOfType = isElementOfType;
+exports.mockComponent = mockComponent;
+exports.nativeTouchData = nativeTouchData;
+exports.renderIntoDocument = renderIntoDocument;
+exports.scryRenderedComponentsWithType = scryRenderedComponentsWithType;
+exports.scryRenderedDOMComponentsWithClass = scryRenderedDOMComponentsWithClass;
+exports.scryRenderedDOMComponentsWithTag = scryRenderedDOMComponentsWithTag;
+exports.traverseTwoPhase = traverseTwoPhase;
+exports.unstable_concurrentAct = unstable_concurrentAct;
})();
}
diff --git a/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js b/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js
index 1d00273..64f9692 100644
--- a/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js
+++ b/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-test-utils.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,30 +6,38 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-
-'use strict';var g=require("object-assign"),k=require("react"),m=require("react-dom"),n=require("scheduler");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var q=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-q.hasOwnProperty("ReactCurrentDispatcher")||(q.ReactCurrentDispatcher={current:null});q.hasOwnProperty("ReactCurrentBatchConfig")||(q.ReactCurrentBatchConfig={suspense:null});function r(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function t(a){if(r(a)!==a)throw Error(p(188));}
-function u(a){var b=a.alternate;if(!b){b=r(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,e=b;;){var d=c.return;if(null===d)break;var f=d.alternate;if(null===f){e=d.return;if(null!==e){c=e;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===c)return t(d),a;if(f===e)return t(d),b;f=f.sibling}throw Error(p(188));}if(c.return!==e.return)c=d,e=f;else{for(var h=!1,l=d.child;l;){if(l===c){h=!0;c=d;e=f;break}if(l===e){h=!0;e=d;c=f;break}l=l.sibling}if(!h){for(l=f.child;l;){if(l===
-c){h=!0;c=f;e=d;break}if(l===e){h=!0;e=f;c=d;break}l=l.sibling}if(!h)throw Error(p(189));}}if(c.alternate!==e)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function v(){return!0}function w(){return!1}
-function x(a,b,c,e){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var d in a)a.hasOwnProperty(d)&&((b=a[d])?this[d]=b(c):"target"===d?this.target=e:this[d]=c[d]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?v:w;this.isPropagationStopped=w;return this}
-g(x.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=v)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=v)},persist:function(){this.isPersistent=v},isPersistent:w,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=
-null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=w;this._dispatchInstances=this._dispatchListeners=null}});x.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
-x.extend=function(a){function b(){}function c(){return e.apply(this,arguments)}var e=this;b.prototype=e.prototype;var d=new b;g(d,c.prototype);c.prototype=d;c.prototype.constructor=c;c.Interface=g({},e.Interface,a);c.extend=e.extend;y(c);return c};y(x);function z(a,b,c,e){if(this.eventPool.length){var d=this.eventPool.pop();this.call(d,a,b,c,e);return d}return new this(a,b,c,e)}
-function A(a){if(!(a instanceof this))throw Error(p(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function y(a){a.eventPool=[];a.getPooled=z;a.release=A}var B=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement);function C(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}
-var D={animationend:C("Animation","AnimationEnd"),animationiteration:C("Animation","AnimationIteration"),animationstart:C("Animation","AnimationStart"),transitionend:C("Transition","TransitionEnd")},E={},F={};B&&(F=document.createElement("div").style,"AnimationEvent"in window||(delete D.animationend.animation,delete D.animationiteration.animation,delete D.animationstart.animation),"TransitionEvent"in window||delete D.transitionend.transition);
-function G(a){if(E[a])return E[a];if(!D[a])return a;var b=D[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in F)return E[a]=b[c];return a}var H=G("animationend"),I=G("animationiteration"),J=G("animationstart"),aa=G("transitionend"),K=null;function ba(a){if(null===K)try{var b=("require"+Math.random()).slice(0,7);K=(module&&module[b])("timers").setImmediate}catch(c){K=function(a){var b=new MessageChannel;b.port1.onmessage=a;b.port2.postMessage(void 0)}}return K(a)}
-var L=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,ca=L[11],M=L[12],da=m.unstable_batchedUpdates,N=q.IsSomeRendererActing,O="function"===typeof n.unstable_flushAllWithoutAsserting,P=n.unstable_flushAllWithoutAsserting||function(){for(var a=!1;ca();)a=!0;return a};function Q(a){try{P(),ba(function(){P()?Q(a):a()})}catch(b){a(b)}}var R=0,S=!1,ea=m.findDOMNode,T=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,fa=T[0],U=T[4],ha=T[5],ia=T[6],ja=T[7],ka=T[8],V=T[9],la=T[10];
-function W(){}function ma(a,b){if(!a)return[];a=u(a);if(!a)return[];for(var c=a,e=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var d=c.stateNode;b(d)&&e.push(d)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return e;for(;!c.sibling;){if(!c.return||c.return===a)return e;c=c.return}c.sibling.return=c.return;c=c.sibling}}}
-function X(a,b){if(a&&!a._reactInternalFiber){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw Error(p(286,b,a));}}
-var Y={renderIntoDocument:function(a){var b=document.createElement("div");return m.render(a,b)},isElement:function(a){return k.isValidElement(a)},isElementOfType:function(a,b){return k.isValidElement(a)&&a.type===b},isDOMComponent:function(a){return!(!a||1!==a.nodeType||!a.tagName)},isDOMComponentElement:function(a){return!!(a&&k.isValidElement(a)&&a.tagName)},isCompositeComponent:function(a){return Y.isDOMComponent(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState},isCompositeComponentWithType:function(a,
-b){return Y.isCompositeComponent(a)?a._reactInternalFiber.type===b:!1},findAllInRenderedTree:function(a,b){X(a,"findAllInRenderedTree");return a?ma(a._reactInternalFiber,b):[]},scryRenderedDOMComponentsWithClass:function(a,b){X(a,"scryRenderedDOMComponentsWithClass");return Y.findAllInRenderedTree(a,function(a){if(Y.isDOMComponent(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var d=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===b)throw Error(p(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==
-d.indexOf(a)})}return!1})},findRenderedDOMComponentWithClass:function(a,b){X(a,"findRenderedDOMComponentWithClass");a=Y.scryRenderedDOMComponentsWithClass(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for class:"+b);return a[0]},scryRenderedDOMComponentsWithTag:function(a,b){X(a,"scryRenderedDOMComponentsWithTag");return Y.findAllInRenderedTree(a,function(a){return Y.isDOMComponent(a)&&a.tagName.toUpperCase()===b.toUpperCase()})},findRenderedDOMComponentWithTag:function(a,
-b){X(a,"findRenderedDOMComponentWithTag");a=Y.scryRenderedDOMComponentsWithTag(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]},scryRenderedComponentsWithType:function(a,b){X(a,"scryRenderedComponentsWithType");return Y.findAllInRenderedTree(a,function(a){return Y.isCompositeComponentWithType(a,b)})},findRenderedComponentWithType:function(a,b){X(a,"findRenderedComponentWithType");a=Y.scryRenderedComponentsWithType(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+
-a.length+") for componentType:"+b);return a[0]},mockComponent:function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return k.createElement(b,null,this.props.children)});return this},nativeTouchData:function(a,b){return{touches:[{pageX:a,pageY:b}]}},Simulate:null,SimulateNative:{},act:function(a){function b(){R--;N.current=c;M.current=e}!1===S&&(S=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));R++;var c=
-N.current;var e=M.current;N.current=!0;M.current=!0;try{var d=da(a)}catch(f){throw b(),f;}if(null!==d&&"object"===typeof d&&"function"===typeof d.then)return{then:function(a,e){d.then(function(){1<R||!0===O&&!0===c?(b(),a()):Q(function(c){b();c?e(c):a()})},function(a){b();e(a)})}};try{1!==R||!1!==O&&!1!==c||P(),b()}catch(f){throw b(),f;}return{then:function(a){a()}}}};
-function na(a){return function(b,c){if(k.isValidElement(b))throw Error(p(228));if(Y.isCompositeComponent(b))throw Error(p(229));var e=U[a],d=new W;d.target=b;d.type=a.toLowerCase();var f=fa(b),h=new x(e,f,d,b);h.persist();g(h,c);e.phasedRegistrationNames?ha(h):ia(h);m.unstable_batchedUpdates(function(){ja(b);la(h)});ka()}}Y.Simulate={};for(var Z in U)Y.Simulate[Z]=na(Z);
-function oa(a,b){return function(c,e){var d=new W(a);g(d,e);Y.isDOMComponent(c)?(c=ea(c),d.target=c,V(b,1,document,d)):c.tagName&&(d.target=c,V(b,1,document,d))}}
-[["abort","abort"],[H,"animationEnd"],[I,"animationIteration"],[J,"animationStart"],["blur","blur"],["canplaythrough","canPlayThrough"],["canplay","canPlay"],["cancel","cancel"],["change","change"],["click","click"],["close","close"],["compositionend","compositionEnd"],["compositionstart","compositionStart"],["compositionupdate","compositionUpdate"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragenter","dragEnter"],["dragexit","dragExit"],
-["dragleave","dragLeave"],["dragover","dragOver"],["dragstart","dragStart"],["drag","drag"],["drop","drop"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["focus","focus"],["input","input"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["loadstart","loadStart"],["loadstart","loadStart"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["mousedown","mouseDown"],["mousemove","mouseMove"],
-["mouseout","mouseOut"],["mouseover","mouseOver"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["playing","playing"],["progress","progress"],["ratechange","rateChange"],["scroll","scroll"],["seeked","seeked"],["seeking","seeking"],["selectionchange","selectionChange"],["stalled","stalled"],["suspend","suspend"],["textInput","textInput"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchmove","touchMove"],["touchstart",
-"touchStart"],[aa,"transitionEnd"],["volumechange","volumeChange"],["waiting","waiting"],["wheel","wheel"]].forEach(function(a){var b=a[1];Y.SimulateNative[b]=oa(b,a[0])});module.exports=Y.default||Y;
+'use strict';var h=require("object-assign"),l=require("react"),m=require("react-dom"),n=require("scheduler");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var q=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
+function r(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function t(a){if(r(a)!==a)throw Error(p(188));}
+function aa(a){var b=a.alternate;if(!b){b=r(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var g=e.alternate;if(null===g){d=e.return;if(null!==d){c=d;continue}break}if(e.child===g.child){for(g=e.child;g;){if(g===c)return t(e),a;if(g===d)return t(e),b;g=g.sibling}throw Error(p(188));}if(c.return!==d.return)c=e,d=g;else{for(var f=!1,k=e.child;k;){if(k===c){f=!0;c=e;d=g;break}if(k===d){f=!0;d=e;c=g;break}k=k.sibling}if(!f){for(k=g.child;k;){if(k===
+c){f=!0;c=g;d=e;break}if(k===d){f=!0;d=g;c=e;break}k=k.sibling}if(!f)throw Error(p(189));}}if(c.alternate!==d)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function u(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function v(){return!0}function w(){return!1}
+function x(a){function b(c,b,e,g,f){this._reactName=c;this._targetInst=e;this.type=b;this.nativeEvent=g;this.target=f;this.currentTarget=null;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],this[d]=c?c(g):g[d]);this.isDefaultPrevented=(null!=g.defaultPrevented?g.defaultPrevented:!1===g.returnValue)?v:w;this.isPropagationStopped=w;return this}h(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&
+(a.returnValue=!1),this.isDefaultPrevented=v)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=v)},persist:function(){},isPersistent:v});return b}var y={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ba=x(y),z=h({},y,{view:0,detail:0});x(z);
+var A,B,C,E=h({},z,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:D,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==C&&(C&&"mousemove"===a.type?(A=a.screenX-C.screenX,B=a.screenY-C.screenY):B=A=0,C=a);return A},movementY:function(a){return"movementY"in a?a.movementY:B}});
+x(E);var da=h({},E,{dataTransfer:0});x(da);var ea=h({},z,{relatedTarget:0});x(ea);var fa=h({},y,{animationName:0,elapsedTime:0,pseudoElement:0});x(fa);var ha=h({},y,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});x(ha);var ia=h({},y,{data:0});x(ia);
+var ja={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ka={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
+116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},la={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ma(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=la[a])?!!b[a]:!1}function D(){return ma}
+var na=h({},z,{key:function(a){if(a.key){var b=ja[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=u(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?ka[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:D,charCode:function(a){return"keypress"===a.type?u(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
+a.type?u(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});x(na);var oa=h({},E,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});x(oa);var pa=h({},z,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:D});x(pa);var qa=h({},y,{propertyName:0,elapsedTime:0,pseudoElement:0});x(qa);
+var ra=h({},E,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0});x(ra);var F=null;function G(a){if(null===F)try{var b=("require"+Math.random()).slice(0,7);F=(module&&module[b]).call(module,"timers").setImmediate}catch(c){F=function(a){var b=new MessageChannel;b.port1.onmessage=a;b.port2.postMessage(void 0)}}return F(a)}
+var H=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,sa=H[5],I=H[6],ta=m.unstable_batchedUpdates,J=q.IsSomeRendererActing,K="function"===typeof n.unstable_flushAllWithoutAsserting,L=n.unstable_flushAllWithoutAsserting||function(){for(var a=!1;sa();)a=!0;return a};function M(a){try{L(),G(function(){L()?M(a):a()})}catch(b){a(b)}}var N=0,ua=!1,O=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events[6],va=m.unstable_batchedUpdates,Q=q.IsSomeRendererActing;
+function wa(a,b){jest.runOnlyPendingTimers();G(function(){try{n.unstable_flushAllWithoutAsserting()?wa(a,b):a()}catch(c){b(c)}})}function xa(a,b,c,d,e,g,f,k,ca){var P=Array.prototype.slice.call(arguments,3);try{b.apply(c,P)}catch(Ga){this.onError(Ga)}}var R=!1,S=null,T=!1,U=null,ya={onError:function(a){R=!0;S=a}};function za(a,b,c,d,e,g,f,k,ca){R=!1;S=null;xa.apply(ya,arguments)}
+function Aa(a,b,c,d,e,g,f,k,ca){za.apply(this,arguments);if(R){if(R){var P=S;R=!1;S=null}else throw Error(p(198));T||(T=!0,U=P)}}var V=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,Ba=V[0],Ca=V[1],Da=V[2],Ea=V[3],Fa=V[4];function Ha(){}
+function Ia(a,b){if(!a)return[];a=aa(a);if(!a)return[];for(var c=a,d=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var e=c.stateNode;b(e)&&d.push(e)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return d;for(;!c.sibling;){if(!c.return||c.return===a)return d;c=c.return}c.sibling.return=c.return;c=c.sibling}}}
+function W(a,b){if(a&&!a._reactInternals){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw Error(p(286,b,a));}}function X(a){return!(!a||1!==a.nodeType||!a.tagName)}function Y(a){return X(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState}function Ja(a,b){return Y(a)?a._reactInternals.type===b:!1}
+function Z(a,b){W(a,"findAllInRenderedTree");return a?Ia(a._reactInternals,b):[]}function Ka(a,b){W(a,"scryRenderedDOMComponentsWithClass");return Z(a,function(a){if(X(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var e=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===b)throw Error(p(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==e.indexOf(a)})}return!1})}
+function La(a,b){W(a,"scryRenderedDOMComponentsWithTag");return Z(a,function(a){return X(a)&&a.tagName.toUpperCase()===b.toUpperCase()})}function Ma(a,b){W(a,"scryRenderedComponentsWithType");return Z(a,function(a){return Ja(a,b)})}function Na(a,b,c){var d=a.type||"unknown-event";a.currentTarget=Ca(c);Aa(d,b,void 0,a);a.currentTarget=null}
+function Oa(a,b,c){for(var d=[];a;){d.push(a);do a=a.return;while(a&&5!==a.tag);a=a?a:null}for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}
+function Pa(a,b){var c=a.stateNode;if(!c)return null;var d=Da(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(p(231,
+b,typeof c));return c}function Qa(a,b,c){a&&c&&c._reactName&&(b=Pa(a,c._reactName))&&(null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a))}
+function Ra(a,b,c){var d=c._reactName;"captured"===b&&(d+="Capture");if(b=Pa(a,d))null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a)}var Sa={},Ta=new Set(["mouseEnter","mouseLeave","pointerEnter","pointerLeave"]);
+function Ua(a){return function(b,c){if(l.isValidElement(b))throw Error(p(228));if(Y(b))throw Error(p(229));var d="on"+a[0].toUpperCase()+a.slice(1),e=new Ha;e.target=b;e.type=a.toLowerCase();var g=Ba(b),f=new ba(d,e.type,g,e,b);f.persist();h(f,c);Ta.has(a)?f&&f._reactName&&Qa(f._targetInst,null,f):f&&f._reactName&&Oa(f._targetInst,Ra,f);m.unstable_batchedUpdates(function(){Ea(b);if(f){var a=f._dispatchListeners,c=f._dispatchInstances;if(Array.isArray(a))for(var d=0;d<a.length&&!f.isPropagationStopped();d++)Na(f,
+a[d],c[d]);else a&&Na(f,a,c);f._dispatchListeners=null;f._dispatchInstances=null;f.isPersistent()||f.constructor.release(f)}if(T)throw a=U,T=!1,U=null,a;});Fa()}}
+"blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ").forEach(function(a){Sa[a]=Ua(a)});
+exports.Simulate=Sa;
+exports.act=function(a){function b(){N--;J.current=c;I.current=d}!1===ua&&(ua=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));N++;var c=J.current,d=I.current;J.current=!0;I.current=!0;try{var e=ta(a)}catch(g){throw b(),g;}if(null!==e&&"object"===typeof e&&"function"===typeof e.then)return{then:function(a,d){e.then(function(){1<N||!0===K&&!0===c?(b(),a()):M(function(c){b();c?d(c):a()})},function(a){b();d(a)})}};try{1!==N||!1!==K&&!1!==
+c||L(),b()}catch(g){throw b(),g;}return{then:function(a){a()}}};exports.findAllInRenderedTree=Z;exports.findRenderedComponentWithType=function(a,b){W(a,"findRenderedComponentWithType");a=Ma(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]};
+exports.findRenderedDOMComponentWithClass=function(a,b){W(a,"findRenderedDOMComponentWithClass");a=Ka(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for class:"+b);return a[0]};exports.findRenderedDOMComponentWithTag=function(a,b){W(a,"findRenderedDOMComponentWithTag");a=La(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]};exports.isCompositeComponent=Y;exports.isCompositeComponentWithType=Ja;
+exports.isDOMComponent=X;exports.isDOMComponentElement=function(a){return!!(a&&l.isValidElement(a)&&a.tagName)};exports.isElement=function(a){return l.isValidElement(a)};exports.isElementOfType=function(a,b){return l.isValidElement(a)&&a.type===b};exports.mockComponent=function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return l.createElement(b,null,this.props.children)});return this};exports.nativeTouchData=function(a,b){return{touches:[{pageX:a,pageY:b}]}};
+exports.renderIntoDocument=function(a){var b=document.createElement("div");return m.render(a,b)};exports.scryRenderedComponentsWithType=Ma;exports.scryRenderedDOMComponentsWithClass=Ka;exports.scryRenderedDOMComponentsWithTag=La;exports.traverseTwoPhase=Oa;
+exports.unstable_concurrentAct=function(a){function b(){Q.current=c;O.current=d}if(void 0===n.unstable_flushAllWithoutAsserting)throw Error("This version of `act` requires a special mock build of Scheduler.");if(!0!==setTimeout._isMockFunction)throw Error("This version of `act` requires Jest's timer mocks (i.e. jest.useFakeTimers).");var c=Q.current,d=O.current;Q.current=!0;O.current=!0;try{var e=va(a);if("object"===typeof e&&null!==e&&"function"===typeof e.then)return{then:function(a,c){e.then(function(){wa(function(){b();
+a()},function(a){b();c(a)})},function(a){b();c(a)})}};try{do var g=n.unstable_flushAllWithoutAsserting();while(g)}finally{b()}}catch(f){throw b(),f;}};
diff --git a/node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.development.js b/node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.development.js
deleted file mode 100644
index 0944f7b..0000000
--- a/node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.development.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-fizz.browser.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-function scheduleWork(callback) {
- callback();
-}
-function flushBuffered(destination) {// WHATWG Streams do not yet have a way to flush the underlying
- // transform streams. https://github.com/whatwg/streams/issues/960
-}
-function writeChunk(destination, buffer) {
- destination.enqueue(buffer);
- return destination.desiredSize > 0;
-}
-function close(destination) {
- destination.close();
-}
-var textEncoder = new TextEncoder();
-function convertStringToBuffer(content) {
- return textEncoder.encode(content);
-}
-
-function formatChunkAsString(type, props) {
- var str = '<' + type + '>';
-
- if (typeof props.children === 'string') {
- str += props.children;
- }
-
- str += '</' + type + '>';
- return str;
-}
-function formatChunk(type, props) {
- return convertStringToBuffer(formatChunkAsString(type, props));
-}
-
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var hasSymbol = typeof Symbol === 'function' && Symbol.for;
-var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
-
-function createRequest(children, destination) {
- return {
- destination: destination,
- children: children,
- completedChunks: [],
- flowing: false
- };
-}
-
-function performWork(request) {
- var element = request.children;
- request.children = null;
-
- if (element && element.$$typeof !== REACT_ELEMENT_TYPE) {
- return;
- }
-
- var type = element.type;
- var props = element.props;
-
- if (typeof type !== 'string') {
- return;
- }
-
- request.completedChunks.push(formatChunk(type, props));
-
- if (request.flowing) {
- flushCompletedChunks(request);
- }
-
- flushBuffered(request.destination);
-}
-
-function flushCompletedChunks(request) {
- var destination = request.destination;
- var chunks = request.completedChunks;
- request.completedChunks = [];
-
- try {
- for (var i = 0; i < chunks.length; i++) {
- var chunk = chunks[i];
- writeChunk(destination, chunk);
- }
- } finally {
- }
-
- close(destination);
-}
-
-function startWork(request) {
- request.flowing = true;
- scheduleWork(function () {
- return performWork(request);
- });
-}
-function startFlowing(request) {
- request.flowing = false;
- flushCompletedChunks(request);
-}
-
-function renderToReadableStream(children) {
- var request;
- return new ReadableStream({
- start: function (controller) {
- request = createRequest(children, controller);
- startWork(request);
- },
- pull: function (controller) {
- startFlowing(request);
- },
- cancel: function (reason) {}
- });
-}
-
-var ReactDOMFizzServerBrowser = {
- renderToReadableStream: renderToReadableStream
-};
-
-// TODO: decide on the top-level export form.
-// This is hacky but makes it work with both Rollup and Jest
-
-
-var unstableFizz_browser = ReactDOMFizzServerBrowser.default || ReactDOMFizzServerBrowser;
-
-module.exports = unstableFizz_browser;
- })();
-}
diff --git a/node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.production.min.js b/node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.production.min.js
deleted file mode 100644
index 765b8d8..0000000
--- a/node_modules/react-dom/cjs/react-dom-unstable-fizz.browser.production.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-fizz.browser.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';var e=new TextEncoder;function g(b,c){var a="<"+b+">";"string"===typeof c.children&&(a+=c.children);return a+("</"+b+">")}var h="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function k(b){var c=b.destination,a=b.completedChunks;b.completedChunks=[];for(b=0;b<a.length;b++)c.enqueue(a[b]);c.close()}
-var l={renderToReadableStream:function(b){var c;return new ReadableStream({start:function(a){a=c={destination:a,children:b,completedChunks:[],flowing:!1};a.flowing=!0;var d=a.children;a.children=null;if(!d||d.$$typeof===h){var f=d.type;d=d.props;"string"===typeof f&&(a.completedChunks.push(e.encode(g(f,d))),a.flowing&&k(a))}},pull:function(){var a=c;a.flowing=!1;k(a)},cancel:function(){}})}};module.exports=l.default||l;
diff --git a/node_modules/react-dom/cjs/react-dom-unstable-fizz.node.development.js b/node_modules/react-dom/cjs/react-dom-unstable-fizz.node.development.js
deleted file mode 100644
index 6e5d719..0000000
--- a/node_modules/react-dom/cjs/react-dom-unstable-fizz.node.development.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-fizz.node.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-function scheduleWork(callback) {
- setImmediate(callback);
-}
-function flushBuffered(destination) {
- // If we don't have any more data to send right now.
- // Flush whatever is in the buffer to the wire.
- if (typeof destination.flush === 'function') {
- // http.createServer response have flush(), but it has a different meaning and
- // is deprecated in favor of flushHeaders(). Detect to avoid a warning.
- if (typeof destination.flushHeaders !== 'function') {
- // By convention the Zlib streams provide a flush function for this purpose.
- destination.flush();
- }
- }
-}
-function beginWriting(destination) {
- // Older Node streams like http.createServer don't have this.
- if (typeof destination.cork === 'function') {
- destination.cork();
- }
-}
-function writeChunk(destination, buffer) {
- var nodeBuffer = buffer; // close enough
-
- return destination.write(nodeBuffer);
-}
-function completeWriting(destination) {
- // Older Node streams like http.createServer don't have this.
- if (typeof destination.uncork === 'function') {
- destination.uncork();
- }
-}
-function close(destination) {
- destination.end();
-}
-function convertStringToBuffer(content) {
- return Buffer.from(content, 'utf8');
-}
-
-function formatChunkAsString(type, props) {
- var str = '<' + type + '>';
-
- if (typeof props.children === 'string') {
- str += props.children;
- }
-
- str += '</' + type + '>';
- return str;
-}
-function formatChunk(type, props) {
- return convertStringToBuffer(formatChunkAsString(type, props));
-}
-
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var hasSymbol = typeof Symbol === 'function' && Symbol.for;
-var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
-
-function createRequest(children, destination) {
- return {
- destination: destination,
- children: children,
- completedChunks: [],
- flowing: false
- };
-}
-
-function performWork(request) {
- var element = request.children;
- request.children = null;
-
- if (element && element.$$typeof !== REACT_ELEMENT_TYPE) {
- return;
- }
-
- var type = element.type;
- var props = element.props;
-
- if (typeof type !== 'string') {
- return;
- }
-
- request.completedChunks.push(formatChunk(type, props));
-
- if (request.flowing) {
- flushCompletedChunks(request);
- }
-
- flushBuffered(request.destination);
-}
-
-function flushCompletedChunks(request) {
- var destination = request.destination;
- var chunks = request.completedChunks;
- request.completedChunks = [];
- beginWriting(destination);
-
- try {
- for (var i = 0; i < chunks.length; i++) {
- var chunk = chunks[i];
- writeChunk(destination, chunk);
- }
- } finally {
- completeWriting(destination);
- }
-
- close(destination);
-}
-
-function startWork(request) {
- request.flowing = true;
- scheduleWork(function () {
- return performWork(request);
- });
-}
-function startFlowing(request) {
- request.flowing = false;
- flushCompletedChunks(request);
-}
-
-function createDrainHandler(destination, request) {
- return function () {
- return startFlowing(request);
- };
-}
-
-function pipeToNodeWritable(children, destination) {
- var request = createRequest(children, destination);
- destination.on('drain', createDrainHandler(destination, request));
- startWork(request);
-}
-
-var ReactDOMFizzServerNode = {
- pipeToNodeWritable: pipeToNodeWritable
-};
-
-// TODO: decide on the top-level export form.
-// This is hacky but makes it work with both Rollup and Jest
-
-
-var unstableFizz_node = ReactDOMFizzServerNode.default || ReactDOMFizzServerNode;
-
-module.exports = unstableFizz_node;
- })();
-}
diff --git a/node_modules/react-dom/cjs/react-dom-unstable-fizz.node.production.min.js b/node_modules/react-dom/cjs/react-dom-unstable-fizz.node.production.min.js
deleted file mode 100644
index d15e075..0000000
--- a/node_modules/react-dom/cjs/react-dom-unstable-fizz.node.production.min.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-fizz.node.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';function d(a,b){var c="<"+a+">";"string"===typeof b.children&&(c+=b.children);return c+("</"+a+">")}var e="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function f(a){var b=a.destination,c=a.completedChunks;a.completedChunks=[];"function"===typeof b.cork&&b.cork();try{for(a=0;a<c.length;a++)b.write(c[a])}finally{"function"===typeof b.uncork&&b.uncork()}b.end()}
-function g(a){a.flowing=!0;setImmediate(function(){var b=a.children;a.children=null;if(!b||b.$$typeof===e){var c=b.type;b=b.props;"string"===typeof c&&(a.completedChunks.push(Buffer.from(d(c,b),"utf8")),a.flowing&&f(a),c=a.destination,"function"===typeof c.flush&&"function"!==typeof c.flushHeaders&&c.flush())}})}function h(a,b){return function(){b.flowing=!1;f(b)}}var k={pipeToNodeWritable:function(a,b){a={destination:b,children:a,completedChunks:[],flowing:!1};b.on("drain",h(b,a));g(a)}};
-module.exports=k.default||k;
diff --git a/node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.development.js b/node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.development.js
deleted file mode 100644
index f11a7b8..0000000
--- a/node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.development.js
+++ /dev/null
@@ -1,1629 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-native-dependencies.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var ReactDOM = require('react-dom');
-var React = require('react');
-var _assign = require('object-assign');
-
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
-// Current owner and dispatcher used to share the same ref,
-// but PR #14548 split them out to better support the react-debug-tools package.
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
-}
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
-}
-
-// by calls to these methods by a Babel plugin.
-//
-// In PROD (or in packages without access to React internals),
-// they are left as they are instead.
-
-function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
-}
-function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
-}
-
-function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
-
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
- }
-}
-
-{
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
- }
-}
-
-var getFiberCurrentPropsFromNode = null;
-var getInstanceFromNode = null;
-var getNodeFromInstance = null;
-function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
- getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
- getInstanceFromNode = getInstanceFromNodeImpl;
- getNodeFromInstance = getNodeFromInstanceImpl;
-
- {
- if (!getNodeFromInstance || !getInstanceFromNode) {
- error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
- }
- }
-}
-var validateEventDispatches;
-
-{
- validateEventDispatches = function (event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
- var listenersIsArr = Array.isArray(dispatchListeners);
- var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
- var instancesIsArr = Array.isArray(dispatchInstances);
- var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
-
- if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {
- error('EventPluginUtils: Invalid `event`.');
- }
- };
-}
-/**
- * Standard/simple iteration through an event's collected dispatches, but stops
- * at the first dispatch execution returning true, and returns that id.
- *
- * @return {?string} id of the first dispatch execution who's listener returns
- * true, or null if no listener returned true.
- */
-
-function executeDispatchesInOrderStopAtTrueImpl(event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
-
- {
- validateEventDispatches(event);
- }
-
- if (Array.isArray(dispatchListeners)) {
- for (var i = 0; i < dispatchListeners.length; i++) {
- if (event.isPropagationStopped()) {
- break;
- } // Listeners and Instances are two parallel arrays that are always in sync.
-
-
- if (dispatchListeners[i](event, dispatchInstances[i])) {
- return dispatchInstances[i];
- }
- }
- } else if (dispatchListeners) {
- if (dispatchListeners(event, dispatchInstances)) {
- return dispatchInstances;
- }
- }
-
- return null;
-}
-/**
- * @see executeDispatchesInOrderStopAtTrueImpl
- */
-
-
-function executeDispatchesInOrderStopAtTrue(event) {
- var ret = executeDispatchesInOrderStopAtTrueImpl(event);
- event._dispatchInstances = null;
- event._dispatchListeners = null;
- return ret;
-}
-/**
- * Execution of a "direct" dispatch - there must be at most one dispatch
- * accumulated on the event or it is considered an error. It doesn't really make
- * sense for an event with multiple dispatches (bubbled) to keep track of the
- * return values at each dispatch execution, but it does tend to make sense when
- * dealing with "direct" dispatches.
- *
- * @return {*} The return value of executing the single dispatch.
- */
-
-function executeDirectDispatch(event) {
- {
- validateEventDispatches(event);
- }
-
- var dispatchListener = event._dispatchListeners;
- var dispatchInstance = event._dispatchInstances;
-
- if (!!Array.isArray(dispatchListener)) {
- {
- throw Error( "executeDirectDispatch(...): Invalid `event`." );
- }
- }
-
- event.currentTarget = dispatchListener ? getNodeFromInstance(dispatchInstance) : null;
- var res = dispatchListener ? dispatchListener(event) : null;
- event.currentTarget = null;
- event._dispatchListeners = null;
- event._dispatchInstances = null;
- return res;
-}
-/**
- * @param {SyntheticEvent} event
- * @return {boolean} True iff number of dispatches accumulated is greater than 0.
- */
-
-function hasDispatches(event) {
- return !!event._dispatchListeners;
-}
-
-var HostComponent = 5;
-
-function getParent(inst) {
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
-
- if (inst) {
- return inst;
- }
-
- return null;
-}
-/**
- * Return the lowest common ancestor of A and B, or null if they are in
- * different trees.
- */
-
-
-function getLowestCommonAncestor(instA, instB) {
- var depthA = 0;
-
- for (var tempA = instA; tempA; tempA = getParent(tempA)) {
- depthA++;
- }
-
- var depthB = 0;
-
- for (var tempB = instB; tempB; tempB = getParent(tempB)) {
- depthB++;
- } // If A is deeper, crawl up.
-
-
- while (depthA - depthB > 0) {
- instA = getParent(instA);
- depthA--;
- } // If B is deeper, crawl up.
-
-
- while (depthB - depthA > 0) {
- instB = getParent(instB);
- depthB--;
- } // Walk in lockstep until we find a match.
-
-
- var depth = depthA;
-
- while (depth--) {
- if (instA === instB || instA === instB.alternate) {
- return instA;
- }
-
- instA = getParent(instA);
- instB = getParent(instB);
- }
-
- return null;
-}
-/**
- * Return if A is an ancestor of B.
- */
-
-function isAncestor(instA, instB) {
- while (instB) {
- if (instA === instB || instA === instB.alternate) {
- return true;
- }
-
- instB = getParent(instB);
- }
-
- return false;
-}
-/**
- * Return the parent instance of the passed-in instance.
- */
-
-function getParentInstance(inst) {
- return getParent(inst);
-}
-/**
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
- */
-
-function traverseTwoPhase(inst, fn, arg) {
- var path = [];
-
- while (inst) {
- path.push(inst);
- inst = getParent(inst);
- }
-
- var i;
-
- for (i = path.length; i-- > 0;) {
- fn(path[i], 'captured', arg);
- }
-
- for (i = 0; i < path.length; i++) {
- fn(path[i], 'bubbled', arg);
- }
-}
-
-function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
-}
-
-function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
-
- default:
- return false;
- }
-}
-/**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
-
-
-function getListener(inst, registrationName) {
- var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
- // live here; needs to be moved to a better place soon
-
- var stateNode = inst.stateNode;
-
- if (!stateNode) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
-
- var props = getFiberCurrentPropsFromNode(stateNode);
-
- if (!props) {
- // Work in progress.
- return null;
- }
-
- listener = props[registrationName];
-
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
-
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
-
- return listener;
-}
-
-/**
- * Accumulates items that must not be null or undefined into the first one. This
- * is used to conserve memory by avoiding array allocations, and thus sacrifices
- * API cleanness. Since `current` can be null before being passed in and not
- * null after this function, make sure to assign it back to `current`:
- *
- * `a = accumulateInto(a, b);`
- *
- * This API should be sparingly used. Try `accumulate` for something cleaner.
- *
- * @return {*|array<*>} An accumulation of items.
- */
-
-function accumulateInto(current, next) {
- if (!(next != null)) {
- {
- throw Error( "accumulateInto(...): Accumulated items must not be null or undefined." );
- }
- }
-
- if (current == null) {
- return next;
- } // Both are not empty. Warning: Never call x.concat(y) when you are not
- // certain that x is an Array (x could be a string with concat method).
-
-
- if (Array.isArray(current)) {
- if (Array.isArray(next)) {
- current.push.apply(current, next);
- return current;
- }
-
- current.push(next);
- return current;
- }
-
- if (Array.isArray(next)) {
- // A bit too dangerous to mutate `next`.
- return [current].concat(next);
- }
-
- return [current, next];
-}
-
-/**
- * @param {array} arr an "accumulation" of items which is either an Array or
- * a single item. Useful when paired with the `accumulate` module. This is a
- * simple utility that allows us to reason about a collection of items, but
- * handling the case when there is exactly one item (and we do not need to
- * allocate an array).
- * @param {function} cb Callback invoked with each element or a collection.
- * @param {?} [scope] Scope used as `this` in a callback.
- */
-function forEachAccumulated(arr, cb, scope) {
- if (Array.isArray(arr)) {
- arr.forEach(cb, scope);
- } else if (arr) {
- cb.call(scope, arr);
- }
-}
-
-/**
- * Some event types have a notion of different registration names for different
- * "phases" of propagation. This finds listeners by a given phase.
- */
-function listenerAtPhase(inst, event, propagationPhase) {
- var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
- return getListener(inst, registrationName);
-}
-/**
- * A small set of propagation patterns, each of which will accept a small amount
- * of information, and generate a set of "dispatch ready event objects" - which
- * are sets of events that have already been annotated with a set of dispatched
- * listener functions/ids. The API is designed this way to discourage these
- * propagation strategies from actually executing the dispatches, since we
- * always want to collect the entire set of dispatches before executing even a
- * single one.
- */
-
-/**
- * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
- * here, allows us to not have to bind or create functions for each event.
- * Mutating the event's members allows us to not have to create a wrapping
- * "dispatch" object that pairs the event with the listener.
- */
-
-
-function accumulateDirectionalDispatches(inst, phase, event) {
- {
- if (!inst) {
- error('Dispatching inst must not be null');
- }
- }
-
- var listener = listenerAtPhase(inst, event, phase);
-
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
-}
-/**
- * Collect dispatches (must be entirely collected before dispatching - see unit
- * tests). Lazily allocate the array to conserve memory. We must loop through
- * each event and perform the traversal for each one. We cannot perform a
- * single traversal for the entire collection of events because each event may
- * have a different target.
- */
-
-
-function accumulateTwoPhaseDispatchesSingle(event) {
- if (event && event.dispatchConfig.phasedRegistrationNames) {
- traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
- }
-}
-/**
- * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
- */
-
-
-function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
- if (event && event.dispatchConfig.phasedRegistrationNames) {
- var targetInst = event._targetInst;
- var parentInst = targetInst ? getParentInstance(targetInst) : null;
- traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
- }
-}
-/**
- * Accumulates without regard to direction, does not look for phased
- * registration names. Same as `accumulateDirectDispatchesSingle` but without
- * requiring that the `dispatchMarker` be the same as the dispatched ID.
- */
-
-
-function accumulateDispatches(inst, ignoredDirection, event) {
- if (inst && event && event.dispatchConfig.registrationName) {
- var registrationName = event.dispatchConfig.registrationName;
- var listener = getListener(inst, registrationName);
-
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
- }
-}
-/**
- * Accumulates dispatches on an `SyntheticEvent`, but only for the
- * `dispatchMarker`.
- * @param {SyntheticEvent} event
- */
-
-
-function accumulateDirectDispatchesSingle(event) {
- if (event && event.dispatchConfig.registrationName) {
- accumulateDispatches(event._targetInst, null, event);
- }
-}
-
-function accumulateTwoPhaseDispatches(events) {
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
-}
-function accumulateTwoPhaseDispatchesSkipTarget(events) {
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
-}
-function accumulateDirectDispatches(events) {
- forEachAccumulated(events, accumulateDirectDispatchesSingle);
-}
-
-var EVENT_POOL_SIZE = 10;
-/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var EventInterface = {
- type: null,
- target: null,
- // currentTarget is set when dispatching; no use in copying it here
- currentTarget: function () {
- return null;
- },
- eventPhase: null,
- bubbles: null,
- cancelable: null,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: null,
- isTrusted: null
-};
-
-function functionThatReturnsTrue() {
- return true;
-}
-
-function functionThatReturnsFalse() {
- return false;
-}
-/**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- *
- * @param {object} dispatchConfig Configuration used to dispatch this event.
- * @param {*} targetInst Marker identifying the event target.
- * @param {object} nativeEvent Native browser event.
- * @param {DOMEventTarget} nativeEventTarget Target node.
- */
-
-
-function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
- {
- // these have a getter/setter for warnings
- delete this.nativeEvent;
- delete this.preventDefault;
- delete this.stopPropagation;
- delete this.isDefaultPrevented;
- delete this.isPropagationStopped;
- }
-
- this.dispatchConfig = dispatchConfig;
- this._targetInst = targetInst;
- this.nativeEvent = nativeEvent;
- var Interface = this.constructor.Interface;
-
- for (var propName in Interface) {
- if (!Interface.hasOwnProperty(propName)) {
- continue;
- }
-
- {
- delete this[propName]; // this has a getter/setter for warnings
- }
-
- var normalize = Interface[propName];
-
- if (normalize) {
- this[propName] = normalize(nativeEvent);
- } else {
- if (propName === 'target') {
- this.target = nativeEventTarget;
- } else {
- this[propName] = nativeEvent[propName];
- }
- }
- }
-
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
-
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
-
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
-}
-
-_assign(SyntheticEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.preventDefault) {
- event.preventDefault();
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
-
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.stopPropagation) {
- event.stopPropagation();
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
-
- this.isPropagationStopped = functionThatReturnsTrue;
- },
-
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {
- this.isPersistent = functionThatReturnsTrue;
- },
-
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsFalse,
-
- /**
- * `PooledClass` looks for `destructor` on each instance it releases.
- */
- destructor: function () {
- var Interface = this.constructor.Interface;
-
- for (var propName in Interface) {
- {
- Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
- }
- }
-
- this.dispatchConfig = null;
- this._targetInst = null;
- this.nativeEvent = null;
- this.isDefaultPrevented = functionThatReturnsFalse;
- this.isPropagationStopped = functionThatReturnsFalse;
- this._dispatchListeners = null;
- this._dispatchInstances = null;
-
- {
- Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
- Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
- Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
- Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
- Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
- }
- }
-});
-
-SyntheticEvent.Interface = EventInterface;
-/**
- * Helper to reduce boilerplate when creating subclasses.
- */
-
-SyntheticEvent.extend = function (Interface) {
- var Super = this;
-
- var E = function () {};
-
- E.prototype = Super.prototype;
- var prototype = new E();
-
- function Class() {
- return Super.apply(this, arguments);
- }
-
- _assign(prototype, Class.prototype);
-
- Class.prototype = prototype;
- Class.prototype.constructor = Class;
- Class.Interface = _assign({}, Super.Interface, Interface);
- Class.extend = Super.extend;
- addEventPoolingTo(Class);
- return Class;
-};
-
-addEventPoolingTo(SyntheticEvent);
-/**
- * Helper to nullify syntheticEvent instance properties when destructing
- *
- * @param {String} propName
- * @param {?object} getVal
- * @return {object} defineProperty object
- */
-
-function getPooledWarningPropertyDefinition(propName, getVal) {
- var isFunction = typeof getVal === 'function';
- return {
- configurable: true,
- set: set,
- get: get
- };
-
- function set(val) {
- var action = isFunction ? 'setting the method' : 'setting the property';
- warn(action, 'This is effectively a no-op');
- return val;
- }
-
- function get() {
- var action = isFunction ? 'accessing the method' : 'accessing the property';
- var result = isFunction ? 'This is a no-op function' : 'This is set to null';
- warn(action, result);
- return getVal;
- }
-
- function warn(action, result) {
- {
- error("This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
- }
- }
-}
-
-function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
- var EventConstructor = this;
-
- if (EventConstructor.eventPool.length) {
- var instance = EventConstructor.eventPool.pop();
- EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
- return instance;
- }
-
- return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
-}
-
-function releasePooledEvent(event) {
- var EventConstructor = this;
-
- if (!(event instanceof EventConstructor)) {
- {
- throw Error( "Trying to release an event instance into a pool of a different type." );
- }
- }
-
- event.destructor();
-
- if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
- EventConstructor.eventPool.push(event);
- }
-}
-
-function addEventPoolingTo(EventConstructor) {
- EventConstructor.eventPool = [];
- EventConstructor.getPooled = getPooledEvent;
- EventConstructor.release = releasePooledEvent;
-}
-
-/**
- * `touchHistory` isn't actually on the native event, but putting it in the
- * interface will ensure that it is cleaned up when pooled/destroyed. The
- * `ResponderEventPlugin` will populate it appropriately.
- */
-
-var ResponderSyntheticEvent = SyntheticEvent.extend({
- touchHistory: function (nativeEvent) {
- return null; // Actually doesn't even look at the native event.
- }
-});
-
-// Note: ideally these would be imported from DOMTopLevelEventTypes,
-// but our build system currently doesn't let us do that from a fork.
-var TOP_TOUCH_START = 'touchstart';
-var TOP_TOUCH_MOVE = 'touchmove';
-var TOP_TOUCH_END = 'touchend';
-var TOP_TOUCH_CANCEL = 'touchcancel';
-var TOP_SCROLL = 'scroll';
-var TOP_SELECTION_CHANGE = 'selectionchange';
-var TOP_MOUSE_DOWN = 'mousedown';
-var TOP_MOUSE_MOVE = 'mousemove';
-var TOP_MOUSE_UP = 'mouseup';
-function isStartish(topLevelType) {
- return topLevelType === TOP_TOUCH_START || topLevelType === TOP_MOUSE_DOWN;
-}
-function isMoveish(topLevelType) {
- return topLevelType === TOP_TOUCH_MOVE || topLevelType === TOP_MOUSE_MOVE;
-}
-function isEndish(topLevelType) {
- return topLevelType === TOP_TOUCH_END || topLevelType === TOP_TOUCH_CANCEL || topLevelType === TOP_MOUSE_UP;
-}
-var startDependencies = [TOP_TOUCH_START, TOP_MOUSE_DOWN];
-var moveDependencies = [TOP_TOUCH_MOVE, TOP_MOUSE_MOVE];
-var endDependencies = [TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_MOUSE_UP];
-
-/**
- * Tracks the position and time of each active touch by `touch.identifier`. We
- * should typically only see IDs in the range of 1-20 because IDs get recycled
- * when touches end and start again.
- */
-
-var MAX_TOUCH_BANK = 20;
-var touchBank = [];
-var touchHistory = {
- touchBank: touchBank,
- numberActiveTouches: 0,
- // If there is only one active touch, we remember its location. This prevents
- // us having to loop through all of the touches all the time in the most
- // common case.
- indexOfSingleActiveTouch: -1,
- mostRecentTimeStamp: 0
-};
-
-function timestampForTouch(touch) {
- // The legacy internal implementation provides "timeStamp", which has been
- // renamed to "timestamp". Let both work for now while we iron it out
- // TODO (evv): rename timeStamp to timestamp in internal code
- return touch.timeStamp || touch.timestamp;
-}
-/**
- * TODO: Instead of making gestures recompute filtered velocity, we could
- * include a built in velocity computation that can be reused globally.
- */
-
-
-function createTouchRecord(touch) {
- return {
- touchActive: true,
- startPageX: touch.pageX,
- startPageY: touch.pageY,
- startTimeStamp: timestampForTouch(touch),
- currentPageX: touch.pageX,
- currentPageY: touch.pageY,
- currentTimeStamp: timestampForTouch(touch),
- previousPageX: touch.pageX,
- previousPageY: touch.pageY,
- previousTimeStamp: timestampForTouch(touch)
- };
-}
-
-function resetTouchRecord(touchRecord, touch) {
- touchRecord.touchActive = true;
- touchRecord.startPageX = touch.pageX;
- touchRecord.startPageY = touch.pageY;
- touchRecord.startTimeStamp = timestampForTouch(touch);
- touchRecord.currentPageX = touch.pageX;
- touchRecord.currentPageY = touch.pageY;
- touchRecord.currentTimeStamp = timestampForTouch(touch);
- touchRecord.previousPageX = touch.pageX;
- touchRecord.previousPageY = touch.pageY;
- touchRecord.previousTimeStamp = timestampForTouch(touch);
-}
-
-function getTouchIdentifier(_ref) {
- var identifier = _ref.identifier;
-
- if (!(identifier != null)) {
- {
- throw Error( "Touch object is missing identifier." );
- }
- }
-
- {
- if (identifier > MAX_TOUCH_BANK) {
- error('Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK);
- }
- }
-
- return identifier;
-}
-
-function recordTouchStart(touch) {
- var identifier = getTouchIdentifier(touch);
- var touchRecord = touchBank[identifier];
-
- if (touchRecord) {
- resetTouchRecord(touchRecord, touch);
- } else {
- touchBank[identifier] = createTouchRecord(touch);
- }
-
- touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
-}
-
-function recordTouchMove(touch) {
- var touchRecord = touchBank[getTouchIdentifier(touch)];
-
- if (touchRecord) {
- touchRecord.touchActive = true;
- touchRecord.previousPageX = touchRecord.currentPageX;
- touchRecord.previousPageY = touchRecord.currentPageY;
- touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;
- touchRecord.currentPageX = touch.pageX;
- touchRecord.currentPageY = touch.pageY;
- touchRecord.currentTimeStamp = timestampForTouch(touch);
- touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
- } else {
- {
- warn('Cannot record touch move without a touch start.\n' + 'Touch Move: %s\n' + 'Touch Bank: %s', printTouch(touch), printTouchBank());
- }
- }
-}
-
-function recordTouchEnd(touch) {
- var touchRecord = touchBank[getTouchIdentifier(touch)];
-
- if (touchRecord) {
- touchRecord.touchActive = false;
- touchRecord.previousPageX = touchRecord.currentPageX;
- touchRecord.previousPageY = touchRecord.currentPageY;
- touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;
- touchRecord.currentPageX = touch.pageX;
- touchRecord.currentPageY = touch.pageY;
- touchRecord.currentTimeStamp = timestampForTouch(touch);
- touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
- } else {
- {
- warn('Cannot record touch end without a touch start.\n' + 'Touch End: %s\n' + 'Touch Bank: %s', printTouch(touch), printTouchBank());
- }
- }
-}
-
-function printTouch(touch) {
- return JSON.stringify({
- identifier: touch.identifier,
- pageX: touch.pageX,
- pageY: touch.pageY,
- timestamp: timestampForTouch(touch)
- });
-}
-
-function printTouchBank() {
- var printed = JSON.stringify(touchBank.slice(0, MAX_TOUCH_BANK));
-
- if (touchBank.length > MAX_TOUCH_BANK) {
- printed += ' (original size: ' + touchBank.length + ')';
- }
-
- return printed;
-}
-
-var ResponderTouchHistoryStore = {
- recordTouchTrack: function (topLevelType, nativeEvent) {
- if (isMoveish(topLevelType)) {
- nativeEvent.changedTouches.forEach(recordTouchMove);
- } else if (isStartish(topLevelType)) {
- nativeEvent.changedTouches.forEach(recordTouchStart);
- touchHistory.numberActiveTouches = nativeEvent.touches.length;
-
- if (touchHistory.numberActiveTouches === 1) {
- touchHistory.indexOfSingleActiveTouch = nativeEvent.touches[0].identifier;
- }
- } else if (isEndish(topLevelType)) {
- nativeEvent.changedTouches.forEach(recordTouchEnd);
- touchHistory.numberActiveTouches = nativeEvent.touches.length;
-
- if (touchHistory.numberActiveTouches === 1) {
- for (var i = 0; i < touchBank.length; i++) {
- var touchTrackToCheck = touchBank[i];
-
- if (touchTrackToCheck != null && touchTrackToCheck.touchActive) {
- touchHistory.indexOfSingleActiveTouch = i;
- break;
- }
- }
-
- {
- var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];
-
- if (activeRecord == null || !activeRecord.touchActive) {
- error('Cannot find single active touch.');
- }
- }
- }
- }
- },
- touchHistory: touchHistory
-};
-
-/**
- * Accumulates items that must not be null or undefined.
- *
- * This is used to conserve memory by avoiding array allocations.
- *
- * @return {*|array<*>} An accumulation of items.
- */
-
-function accumulate(current, next) {
- if (!(next != null)) {
- {
- throw Error( "accumulate(...): Accumulated items must not be null or undefined." );
- }
- }
-
- if (current == null) {
- return next;
- } // Both are not empty. Warning: Never call x.concat(y) when you are not
- // certain that x is an Array (x could be a string with concat method).
-
-
- if (Array.isArray(current)) {
- return current.concat(next);
- }
-
- if (Array.isArray(next)) {
- return [current].concat(next);
- }
-
- return [current, next];
-}
-
-/**
- * Instance of element that should respond to touch/move types of interactions,
- * as indicated explicitly by relevant callbacks.
- */
-
-var responderInst = null;
-/**
- * Count of current touches. A textInput should become responder iff the
- * selection changes while there is a touch on the screen.
- */
-
-var trackedTouchCount = 0;
-
-var changeResponder = function (nextResponderInst, blockHostResponder) {
- var oldResponderInst = responderInst;
- responderInst = nextResponderInst;
-
- if (ResponderEventPlugin.GlobalResponderHandler !== null) {
- ResponderEventPlugin.GlobalResponderHandler.onChange(oldResponderInst, nextResponderInst, blockHostResponder);
- }
-};
-
-var eventTypes = {
- /**
- * On a `touchStart`/`mouseDown`, is it desired that this element become the
- * responder?
- */
- startShouldSetResponder: {
- phasedRegistrationNames: {
- bubbled: 'onStartShouldSetResponder',
- captured: 'onStartShouldSetResponderCapture'
- },
- dependencies: startDependencies
- },
-
- /**
- * On a `scroll`, is it desired that this element become the responder? This
- * is usually not needed, but should be used to retroactively infer that a
- * `touchStart` had occurred during momentum scroll. During a momentum scroll,
- * a touch start will be immediately followed by a scroll event if the view is
- * currently scrolling.
- *
- * TODO: This shouldn't bubble.
- */
- scrollShouldSetResponder: {
- phasedRegistrationNames: {
- bubbled: 'onScrollShouldSetResponder',
- captured: 'onScrollShouldSetResponderCapture'
- },
- dependencies: [TOP_SCROLL]
- },
-
- /**
- * On text selection change, should this element become the responder? This
- * is needed for text inputs or other views with native selection, so the
- * JS view can claim the responder.
- *
- * TODO: This shouldn't bubble.
- */
- selectionChangeShouldSetResponder: {
- phasedRegistrationNames: {
- bubbled: 'onSelectionChangeShouldSetResponder',
- captured: 'onSelectionChangeShouldSetResponderCapture'
- },
- dependencies: [TOP_SELECTION_CHANGE]
- },
-
- /**
- * On a `touchMove`/`mouseMove`, is it desired that this element become the
- * responder?
- */
- moveShouldSetResponder: {
- phasedRegistrationNames: {
- bubbled: 'onMoveShouldSetResponder',
- captured: 'onMoveShouldSetResponderCapture'
- },
- dependencies: moveDependencies
- },
-
- /**
- * Direct responder events dispatched directly to responder. Do not bubble.
- */
- responderStart: {
- registrationName: 'onResponderStart',
- dependencies: startDependencies
- },
- responderMove: {
- registrationName: 'onResponderMove',
- dependencies: moveDependencies
- },
- responderEnd: {
- registrationName: 'onResponderEnd',
- dependencies: endDependencies
- },
- responderRelease: {
- registrationName: 'onResponderRelease',
- dependencies: endDependencies
- },
- responderTerminationRequest: {
- registrationName: 'onResponderTerminationRequest',
- dependencies: []
- },
- responderGrant: {
- registrationName: 'onResponderGrant',
- dependencies: []
- },
- responderReject: {
- registrationName: 'onResponderReject',
- dependencies: []
- },
- responderTerminate: {
- registrationName: 'onResponderTerminate',
- dependencies: []
- }
-};
-/**
- *
- * Responder System:
- * ----------------
- *
- * - A global, solitary "interaction lock" on a view.
- * - If a node becomes the responder, it should convey visual feedback
- * immediately to indicate so, either by highlighting or moving accordingly.
- * - To be the responder means, that touches are exclusively important to that
- * responder view, and no other view.
- * - While touches are still occurring, the responder lock can be transferred to
- * a new view, but only to increasingly "higher" views (meaning ancestors of
- * the current responder).
- *
- * Responder being granted:
- * ------------------------
- *
- * - Touch starts, moves, and scrolls can cause an ID to become the responder.
- * - We capture/bubble `startShouldSetResponder`/`moveShouldSetResponder` to
- * the "appropriate place".
- * - If nothing is currently the responder, the "appropriate place" is the
- * initiating event's `targetID`.
- * - If something *is* already the responder, the "appropriate place" is the
- * first common ancestor of the event target and the current `responderInst`.
- * - Some negotiation happens: See the timing diagram below.
- * - Scrolled views automatically become responder. The reasoning is that a
- * platform scroll view that isn't built on top of the responder system has
- * began scrolling, and the active responder must now be notified that the
- * interaction is no longer locked to it - the system has taken over.
- *
- * - Responder being released:
- * As soon as no more touches that *started* inside of descendants of the
- * *current* responderInst, an `onResponderRelease` event is dispatched to the
- * current responder, and the responder lock is released.
- *
- * TODO:
- * - on "end", a callback hook for `onResponderEndShouldRemainResponder` that
- * determines if the responder lock should remain.
- * - If a view shouldn't "remain" the responder, any active touches should by
- * default be considered "dead" and do not influence future negotiations or
- * bubble paths. It should be as if those touches do not exist.
- * -- For multitouch: Usually a translate-z will choose to "remain" responder
- * after one out of many touches ended. For translate-y, usually the view
- * doesn't wish to "remain" responder after one of many touches end.
- * - Consider building this on top of a `stopPropagation` model similar to
- * `W3C` events.
- * - Ensure that `onResponderTerminate` is called on touch cancels, whether or
- * not `onResponderTerminationRequest` returns `true` or `false`.
- *
- */
-
-/* Negotiation Performed
- +-----------------------+
- / \
-Process low level events to + Current Responder + wantsResponderID
-determine who to perform negot-| (if any exists at all) |
-iation/transition | Otherwise just pass through|
--------------------------------+----------------------------+------------------+
-Bubble to find first ID | |
-to return true:wantsResponderID| |
- | |
- +-------------+ | |
- | onTouchStart| | |
- +------+------+ none | |
- | return| |
-+-----------v-------------+true| +------------------------+ |
-|onStartShouldSetResponder|----->|onResponderStart (cur) |<-----------+
-+-----------+-------------+ | +------------------------+ | |
- | | | +--------+-------+
- | returned true for| false:REJECT +-------->|onResponderReject
- | wantsResponderID | | | +----------------+
- | (now attempt | +------------------+-----+ |
- | handoff) | | onResponder | |
- +------------------->| TerminationRequest| |
- | +------------------+-----+ |
- | | | +----------------+
- | true:GRANT +-------->|onResponderGrant|
- | | +--------+-------+
- | +------------------------+ | |
- | | onResponderTerminate |<-----------+
- | +------------------+-----+ |
- | | | +----------------+
- | +-------->|onResponderStart|
- | | +----------------+
-Bubble to find first ID | |
-to return true:wantsResponderID| |
- | |
- +-------------+ | |
- | onTouchMove | | |
- +------+------+ none | |
- | return| |
-+-----------v-------------+true| +------------------------+ |
-|onMoveShouldSetResponder |----->|onResponderMove (cur) |<-----------+
-+-----------+-------------+ | +------------------------+ | |
- | | | +--------+-------+
- | returned true for| false:REJECT +-------->|onResponderRejec|
- | wantsResponderID | | | +----------------+
- | (now attempt | +------------------+-----+ |
- | handoff) | | onResponder | |
- +------------------->| TerminationRequest| |
- | +------------------+-----+ |
- | | | +----------------+
- | true:GRANT +-------->|onResponderGrant|
- | | +--------+-------+
- | +------------------------+ | |
- | | onResponderTerminate |<-----------+
- | +------------------+-----+ |
- | | | +----------------+
- | +-------->|onResponderMove |
- | | +----------------+
- | |
- | |
- Some active touch started| |
- inside current responder | +------------------------+ |
- +------------------------->| onResponderEnd | |
- | | +------------------------+ |
- +---+---------+ | |
- | onTouchEnd | | |
- +---+---------+ | |
- | | +------------------------+ |
- +------------------------->| onResponderEnd | |
- No active touches started| +-----------+------------+ |
- inside current responder | | |
- | v |
- | +------------------------+ |
- | | onResponderRelease | |
- | +------------------------+ |
- | |
- + + */
-
-/**
- * A note about event ordering in the `EventPluginRegistry`.
- *
- * Suppose plugins are injected in the following order:
- *
- * `[R, S, C]`
- *
- * To help illustrate the example, assume `S` is `SimpleEventPlugin` (for
- * `onClick` etc) and `R` is `ResponderEventPlugin`.
- *
- * "Deferred-Dispatched Events":
- *
- * - The current event plugin system will traverse the list of injected plugins,
- * in order, and extract events by collecting the plugin's return value of
- * `extractEvents()`.
- * - These events that are returned from `extractEvents` are "deferred
- * dispatched events".
- * - When returned from `extractEvents`, deferred-dispatched events contain an
- * "accumulation" of deferred dispatches.
- * - These deferred dispatches are accumulated/collected before they are
- * returned, but processed at a later time by the `EventPluginRegistry` (hence the
- * name deferred).
- *
- * In the process of returning their deferred-dispatched events, event plugins
- * themselves can dispatch events on-demand without returning them from
- * `extractEvents`. Plugins might want to do this, so that they can use event
- * dispatching as a tool that helps them decide which events should be extracted
- * in the first place.
- *
- * "On-Demand-Dispatched Events":
- *
- * - On-demand-dispatched events are not returned from `extractEvents`.
- * - On-demand-dispatched events are dispatched during the process of returning
- * the deferred-dispatched events.
- * - They should not have side effects.
- * - They should be avoided, and/or eventually be replaced with another
- * abstraction that allows event plugins to perform multiple "rounds" of event
- * extraction.
- *
- * Therefore, the sequence of event dispatches becomes:
- *
- * - `R`s on-demand events (if any) (dispatched by `R` on-demand)
- * - `S`s on-demand events (if any) (dispatched by `S` on-demand)
- * - `C`s on-demand events (if any) (dispatched by `C` on-demand)
- * - `R`s extracted events (if any) (dispatched by `EventPluginRegistry`)
- * - `S`s extracted events (if any) (dispatched by `EventPluginRegistry`)
- * - `C`s extracted events (if any) (dispatched by `EventPluginRegistry`)
- *
- * In the case of `ResponderEventPlugin`: If the `startShouldSetResponder`
- * on-demand dispatch returns `true` (and some other details are satisfied) the
- * `onResponderGrant` deferred dispatched event is returned from
- * `extractEvents`. The sequence of dispatch executions in this case
- * will appear as follows:
- *
- * - `startShouldSetResponder` (`ResponderEventPlugin` dispatches on-demand)
- * - `touchStartCapture` (`EventPluginRegistry` dispatches as usual)
- * - `touchStart` (`EventPluginRegistry` dispatches as usual)
- * - `responderGrant/Reject` (`EventPluginRegistry` dispatches as usual)
- */
-
-function setResponderAndExtractTransfer(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
- var shouldSetEventType = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : topLevelType === TOP_SELECTION_CHANGE ? eventTypes.selectionChangeShouldSetResponder : eventTypes.scrollShouldSetResponder; // TODO: stop one short of the current responder.
-
- var bubbleShouldSetFrom = !responderInst ? targetInst : getLowestCommonAncestor(responderInst, targetInst); // When capturing/bubbling the "shouldSet" event, we want to skip the target
- // (deepest ID) if it happens to be the current responder. The reasoning:
- // It's strange to get an `onMoveShouldSetResponder` when you're *already*
- // the responder.
-
- var skipOverBubbleShouldSetFrom = bubbleShouldSetFrom === responderInst;
- var shouldSetEvent = ResponderSyntheticEvent.getPooled(shouldSetEventType, bubbleShouldSetFrom, nativeEvent, nativeEventTarget);
- shouldSetEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
-
- if (skipOverBubbleShouldSetFrom) {
- accumulateTwoPhaseDispatchesSkipTarget(shouldSetEvent);
- } else {
- accumulateTwoPhaseDispatches(shouldSetEvent);
- }
-
- var wantsResponderInst = executeDispatchesInOrderStopAtTrue(shouldSetEvent);
-
- if (!shouldSetEvent.isPersistent()) {
- shouldSetEvent.constructor.release(shouldSetEvent);
- }
-
- if (!wantsResponderInst || wantsResponderInst === responderInst) {
- return null;
- }
-
- var extracted;
- var grantEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderGrant, wantsResponderInst, nativeEvent, nativeEventTarget);
- grantEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(grantEvent);
- var blockHostResponder = executeDirectDispatch(grantEvent) === true;
-
- if (responderInst) {
- var terminationRequestEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderTerminationRequest, responderInst, nativeEvent, nativeEventTarget);
- terminationRequestEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(terminationRequestEvent);
- var shouldSwitch = !hasDispatches(terminationRequestEvent) || executeDirectDispatch(terminationRequestEvent);
-
- if (!terminationRequestEvent.isPersistent()) {
- terminationRequestEvent.constructor.release(terminationRequestEvent);
- }
-
- if (shouldSwitch) {
- var terminateEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderTerminate, responderInst, nativeEvent, nativeEventTarget);
- terminateEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(terminateEvent);
- extracted = accumulate(extracted, [grantEvent, terminateEvent]);
- changeResponder(wantsResponderInst, blockHostResponder);
- } else {
- var rejectEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderReject, wantsResponderInst, nativeEvent, nativeEventTarget);
- rejectEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(rejectEvent);
- extracted = accumulate(extracted, rejectEvent);
- }
- } else {
- extracted = accumulate(extracted, grantEvent);
- changeResponder(wantsResponderInst, blockHostResponder);
- }
-
- return extracted;
-}
-/**
- * A transfer is a negotiation between a currently set responder and the next
- * element to claim responder status. Any start event could trigger a transfer
- * of responderInst. Any move event could trigger a transfer.
- *
- * @param {string} topLevelType Record from `BrowserEventConstants`.
- * @return {boolean} True if a transfer of responder could possibly occur.
- */
-
-
-function canTriggerTransfer(topLevelType, topLevelInst, nativeEvent) {
- return topLevelInst && ( // responderIgnoreScroll: We are trying to migrate away from specifically
- // tracking native scroll events here and responderIgnoreScroll indicates we
- // will send topTouchCancel to handle canceling touch events instead
- topLevelType === TOP_SCROLL && !nativeEvent.responderIgnoreScroll || trackedTouchCount > 0 && topLevelType === TOP_SELECTION_CHANGE || isStartish(topLevelType) || isMoveish(topLevelType));
-}
-/**
- * Returns whether or not this touch end event makes it such that there are no
- * longer any touches that started inside of the current `responderInst`.
- *
- * @param {NativeEvent} nativeEvent Native touch end event.
- * @return {boolean} Whether or not this touch end event ends the responder.
- */
-
-
-function noResponderTouches(nativeEvent) {
- var touches = nativeEvent.touches;
-
- if (!touches || touches.length === 0) {
- return true;
- }
-
- for (var i = 0; i < touches.length; i++) {
- var activeTouch = touches[i];
- var target = activeTouch.target;
-
- if (target !== null && target !== undefined && target !== 0) {
- // Is the original touch location inside of the current responder?
- var targetInst = getInstanceFromNode(target);
-
- if (isAncestor(responderInst, targetInst)) {
- return false;
- }
- }
- }
-
- return true;
-}
-
-var ResponderEventPlugin = {
- /* For unit testing only */
- _getResponder: function () {
- return responderInst;
- },
- eventTypes: eventTypes,
-
- /**
- * We must be resilient to `targetInst` being `null` on `touchMove` or
- * `touchEnd`. On certain platforms, this means that a native scroll has
- * assumed control and the original touch targets are destroyed.
- */
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- if (isStartish(topLevelType)) {
- trackedTouchCount += 1;
- } else if (isEndish(topLevelType)) {
- if (trackedTouchCount >= 0) {
- trackedTouchCount -= 1;
- } else {
- {
- warn('Ended a touch event which was not counted in `trackedTouchCount`.');
- }
-
- return null;
- }
- }
-
- ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
- var extracted = canTriggerTransfer(topLevelType, targetInst, nativeEvent) ? setResponderAndExtractTransfer(topLevelType, targetInst, nativeEvent, nativeEventTarget) : null; // Responder may or may not have transferred on a new touch start/move.
- // Regardless, whoever is the responder after any potential transfer, we
- // direct all touch start/move/ends to them in the form of
- // `onResponderMove/Start/End`. These will be called for *every* additional
- // finger that move/start/end, dispatched directly to whoever is the
- // current responder at that moment, until the responder is "released".
- //
- // These multiple individual change touch events are are always bookended
- // by `onResponderGrant`, and one of
- // (`onResponderRelease/onResponderTerminate`).
-
- var isResponderTouchStart = responderInst && isStartish(topLevelType);
- var isResponderTouchMove = responderInst && isMoveish(topLevelType);
- var isResponderTouchEnd = responderInst && isEndish(topLevelType);
- var incrementalTouch = isResponderTouchStart ? eventTypes.responderStart : isResponderTouchMove ? eventTypes.responderMove : isResponderTouchEnd ? eventTypes.responderEnd : null;
-
- if (incrementalTouch) {
- var gesture = ResponderSyntheticEvent.getPooled(incrementalTouch, responderInst, nativeEvent, nativeEventTarget);
- gesture.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(gesture);
- extracted = accumulate(extracted, gesture);
- }
-
- var isResponderTerminate = responderInst && topLevelType === TOP_TOUCH_CANCEL;
- var isResponderRelease = responderInst && !isResponderTerminate && isEndish(topLevelType) && noResponderTouches(nativeEvent);
- var finalTouch = isResponderTerminate ? eventTypes.responderTerminate : isResponderRelease ? eventTypes.responderRelease : null;
-
- if (finalTouch) {
- var finalEvent = ResponderSyntheticEvent.getPooled(finalTouch, responderInst, nativeEvent, nativeEventTarget);
- finalEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(finalEvent);
- extracted = accumulate(extracted, finalEvent);
- changeResponder(null);
- }
-
- return extracted;
- },
- GlobalResponderHandler: null,
- injection: {
- /**
- * @param {{onChange: (ReactID, ReactID) => void} GlobalResponderHandler
- * Object that handles any change in responder. Use this to inject
- * integration with an existing touch handling system etc.
- */
- injectGlobalResponderHandler: function (GlobalResponderHandler) {
- ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
- }
- }
-};
-
-// Keep in sync with ReactDOM.js, ReactTestUtils.js, and ReactTestUtilsAct.js:
-
-var _ReactDOM$__SECRET_IN = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,
- getInstanceFromNode$1 = _ReactDOM$__SECRET_IN[0],
- getNodeFromInstance$1 = _ReactDOM$__SECRET_IN[1],
- getFiberCurrentPropsFromNode$1 = _ReactDOM$__SECRET_IN[2],
- injectEventPluginsByName = _ReactDOM$__SECRET_IN[3];
-setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
-
-var ReactDOMUnstableNativeDependencies = /*#__PURE__*/Object.freeze({
- __proto__: null,
- ResponderEventPlugin: ResponderEventPlugin,
- ResponderTouchHistoryStore: ResponderTouchHistoryStore,
- injectEventPluginsByName: injectEventPluginsByName
-});
-
-var unstableNativeDependencies = ReactDOMUnstableNativeDependencies;
-
-module.exports = unstableNativeDependencies;
- })();
-}
diff --git a/node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.production.min.js b/node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.production.min.js
deleted file mode 100644
index 1dc5679..0000000
--- a/node_modules/react-dom/cjs/react-dom-unstable-native-dependencies.production.min.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-native-dependencies.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';var h=require("react-dom"),k=require("object-assign");function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=null,q=null,r=null;
-function t(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw Error(m(103));a.currentTarget=b?r(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b}function u(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function v(a,b,c){for(var f=[];a;)f.push(a),a=u(a);for(a=f.length;0<a--;)b(f[a],"captured",c);for(a=0;a<f.length;a++)b(f[a],"bubbled",c)}
-function w(a,b){var c=a.stateNode;if(!c)return null;var f=n(c);if(!f)return null;c=f[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(f=!f.disabled)||(a=a.type,f=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!f;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(m(231,
-b,typeof c));return c}function x(a,b){if(null==b)throw Error(m(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function y(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function z(a,b,c){if(b=w(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=x(c._dispatchListeners,b),c._dispatchInstances=x(c._dispatchInstances,a)}
-function A(a){a&&a.dispatchConfig.phasedRegistrationNames&&v(a._targetInst,z,a)}function aa(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?u(b):null;v(b,z,a)}}function B(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=w(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=x(a._dispatchListeners,c),a._dispatchInstances=x(a._dispatchInstances,b))}}}function C(){return!0}function D(){return!1}
-function E(a,b,c,f){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var d in a)a.hasOwnProperty(d)&&((b=a[d])?this[d]=b(c):"target"===d?this.target=f:this[d]=c[d]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?C:D;this.isPropagationStopped=D;return this}
-k(E.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=C)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=C)},persist:function(){this.isPersistent=C},isPersistent:D,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=
-null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=D;this._dispatchInstances=this._dispatchListeners=null}});E.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
-E.extend=function(a){function b(){}function c(){return f.apply(this,arguments)}var f=this;b.prototype=f.prototype;var d=new b;k(d,c.prototype);c.prototype=d;c.prototype.constructor=c;c.Interface=k({},f.Interface,a);c.extend=f.extend;F(c);return c};F(E);function ba(a,b,c,f){if(this.eventPool.length){var d=this.eventPool.pop();this.call(d,a,b,c,f);return d}return new this(a,b,c,f)}
-function ca(a){if(!(a instanceof this))throw Error(m(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function F(a){a.eventPool=[];a.getPooled=ba;a.release=ca}var G=E.extend({touchHistory:function(){return null}});function H(a){return"touchstart"===a||"mousedown"===a}function I(a){return"touchmove"===a||"mousemove"===a}function J(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}
-var K=["touchstart","mousedown"],L=["touchmove","mousemove"],N=["touchcancel","touchend","mouseup"],O=[],P={touchBank:O,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function Q(a){return a.timeStamp||a.timestamp}function R(a){a=a.identifier;if(null==a)throw Error(m(138));return a}
-function da(a){var b=R(a),c=O[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=Q(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=Q(a),c.previousPageX=a.pageX,c.previousPageY=a.pageY,c.previousTimeStamp=Q(a)):(c={touchActive:!0,startPageX:a.pageX,startPageY:a.pageY,startTimeStamp:Q(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:Q(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:Q(a)},O[b]=c);P.mostRecentTimeStamp=Q(a)}
-function ea(a){var b=O[R(a)];b&&(b.touchActive=!0,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=Q(a),P.mostRecentTimeStamp=Q(a))}function fa(a){var b=O[R(a)];b&&(b.touchActive=!1,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=Q(a),P.mostRecentTimeStamp=Q(a))}
-var S={recordTouchTrack:function(a,b){if(I(a))b.changedTouches.forEach(ea);else if(H(a))b.changedTouches.forEach(da),P.numberActiveTouches=b.touches.length,1===P.numberActiveTouches&&(P.indexOfSingleActiveTouch=b.touches[0].identifier);else if(J(a)&&(b.changedTouches.forEach(fa),P.numberActiveTouches=b.touches.length,1===P.numberActiveTouches))for(a=0;a<O.length;a++)if(b=O[a],null!=b&&b.touchActive){P.indexOfSingleActiveTouch=a;break}},touchHistory:P};
-function T(a,b){if(null==b)throw Error(m(334));return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var U=null,V=0;function W(a,b){var c=U;U=a;if(null!==X.GlobalResponderHandler)X.GlobalResponderHandler.onChange(c,a,b)}
-var Y={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:K},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"},dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},
-moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:L},responderStart:{registrationName:"onResponderStart",dependencies:K},responderMove:{registrationName:"onResponderMove",dependencies:L},responderEnd:{registrationName:"onResponderEnd",dependencies:N},responderRelease:{registrationName:"onResponderRelease",dependencies:N},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},
-responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},X={_getResponder:function(){return U},eventTypes:Y,extractEvents:function(a,b,c,f){if(H(a))V+=1;else if(J(a))if(0<=V)--V;else return null;S.recordTouchTrack(a,c);if(b&&("scroll"===a&&!c.responderIgnoreScroll||0<V&&"selectionchange"===a||H(a)||I(a))){var d=H(a)?Y.startShouldSetResponder:
-I(a)?Y.moveShouldSetResponder:"selectionchange"===a?Y.selectionChangeShouldSetResponder:Y.scrollShouldSetResponder;if(U)b:{var e=U;for(var g=0,p=e;p;p=u(p))g++;p=0;for(var M=b;M;M=u(M))p++;for(;0<g-p;)e=u(e),g--;for(;0<p-g;)b=u(b),p--;for(;g--;){if(e===b||e===b.alternate)break b;e=u(e);b=u(b)}e=null}else e=b;b=e===U;e=G.getPooled(d,e,c,f);e.touchHistory=S.touchHistory;b?y(e,aa):y(e,A);b:{d=e._dispatchListeners;b=e._dispatchInstances;if(Array.isArray(d))for(g=0;g<d.length&&!e.isPropagationStopped();g++){if(d[g](e,
-b[g])){d=b[g];break b}}else if(d&&d(e,b)){d=b;break b}d=null}e._dispatchInstances=null;e._dispatchListeners=null;e.isPersistent()||e.constructor.release(e);if(d&&d!==U)if(e=G.getPooled(Y.responderGrant,d,c,f),e.touchHistory=S.touchHistory,y(e,B),b=!0===t(e),U)if(g=G.getPooled(Y.responderTerminationRequest,U,c,f),g.touchHistory=S.touchHistory,y(g,B),p=!g._dispatchListeners||t(g),g.isPersistent()||g.constructor.release(g),p){g=G.getPooled(Y.responderTerminate,U,c,f);g.touchHistory=S.touchHistory;y(g,
-B);var l=T(l,[e,g]);W(d,b)}else d=G.getPooled(Y.responderReject,d,c,f),d.touchHistory=S.touchHistory,y(d,B),l=T(l,d);else l=T(l,e),W(d,b);else l=null}else l=null;d=U&&H(a);e=U&&I(a);b=U&&J(a);if(d=d?Y.responderStart:e?Y.responderMove:b?Y.responderEnd:null)d=G.getPooled(d,U,c,f),d.touchHistory=S.touchHistory,y(d,B),l=T(l,d);d=U&&"touchcancel"===a;if(a=U&&!d&&J(a))a:{if((a=c.touches)&&0!==a.length)for(e=0;e<a.length;e++)if(b=a[e].target,null!==b&&void 0!==b&&0!==b){g=q(b);b:{for(b=U;g;){if(b===g||b===
-g.alternate){b=!0;break b}g=u(g)}b=!1}if(b){a=!1;break a}}a=!0}if(a=d?Y.responderTerminate:a?Y.responderRelease:null)c=G.getPooled(a,U,c,f),c.touchHistory=S.touchHistory,y(c,B),l=T(l,c),W(null);return l},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){X.GlobalResponderHandler=a}}},Z=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,ha=Z[3],ia=Z[0],ja=Z[1];n=Z[2];q=ia;r=ja;module.exports={__proto__:null,ResponderEventPlugin:X,ResponderTouchHistoryStore:S,injectEventPluginsByName:ha};
diff --git a/node_modules/react-dom/cjs/react-dom.development.js b/node_modules/react-dom/cjs/react-dom.development.js
index b2e8c24..f0b9ee7 100644
--- a/node_modules/react-dom/cjs/react-dom.development.js
+++ b/node_modules/react-dom/cjs/react-dom.development.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -9,8 +9,6 @@
'use strict';
-
-
if (process.env.NODE_ENV !== "production") {
(function() {
'use strict';
@@ -18,24 +16,9 @@ if (process.env.NODE_ENV !== "production") {
var React = require('react');
var _assign = require('object-assign');
var Scheduler = require('scheduler');
-var checkPropTypes = require('prop-types/checkPropTypes');
var tracing = require('scheduler/tracing');
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
-// Current owner and dispatcher used to share the same ref,
-// but PR #14548 split them out to better support the react-debug-tools package.
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
-}
-
-if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
-}
+var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
// by calls to these methods by a Babel plugin.
//
@@ -65,16 +48,12 @@ function printWarning(level, format, args) {
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
-
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
}
var argsWithFormat = args.map(function (item) {
@@ -86,17 +65,6 @@ function printWarning(level, format, args) {
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
}
}
@@ -106,318 +74,6 @@ if (!React) {
}
}
-var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- try {
- func.apply(context, funcArgs);
- } catch (error) {
- this.onError(error);
- }
-};
-
-{
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
-
- var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
- // If document doesn't exist we know for sure we will crash in this method
- // when we call document.createEvent(). However this can cause confusing
- // errors: https://github.com/facebookincubator/create-react-app/issues/3482
- // So we preemptively throw with a better message instead.
- if (!(typeof document !== 'undefined')) {
- {
- throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
- }
- }
-
- var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We
- // set this to true at the beginning, then set it to false right after
- // calling the function. If the function errors, `didError` will never be
- // set to false. This strategy works even if the browser is flaky and
- // fails to call our global error handler, because it doesn't rely on
- // the error event at all.
-
- var didError = true; // Keeps track of the value of window.event so that we can reset it
- // during the callback to let user code access window.event in the
- // browsers that support it.
-
- var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
- // dispatching: https://github.com/facebook/react/issues/13688
-
- var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously
- // dispatch our fake event using `dispatchEvent`. Inside the handler, we
- // call the user-provided callback.
-
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- function callCallback() {
- // We immediately remove the callback from event listeners so that
- // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
- // nested call would trigger the fake event handlers of any call higher
- // in the stack.
- fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
- // window.event assignment in both IE <= 10 as they throw an error
- // "Member not found" in strict mode, and in Firefox which does not
- // support window.event.
-
- if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
- window.event = windowEvent;
- }
-
- func.apply(context, funcArgs);
- didError = false;
- } // Create a global error event handler. We use this to capture the value
- // that was thrown. It's possible that this error handler will fire more
- // than once; for example, if non-React code also calls `dispatchEvent`
- // and a handler for that event throws. We should be resilient to most of
- // those cases. Even if our error event handler fires more than once, the
- // last error event is always used. If the callback actually does error,
- // we know that the last error event is the correct one, because it's not
- // possible for anything else to have happened in between our callback
- // erroring and the code that follows the `dispatchEvent` call below. If
- // the callback doesn't error, but the error event was fired, we know to
- // ignore it because `didError` will be false, as described above.
-
-
- var error; // Use this to track whether the error event is ever called.
-
- var didSetError = false;
- var isCrossOriginError = false;
-
- function handleWindowError(event) {
- error = event.error;
- didSetError = true;
-
- if (error === null && event.colno === 0 && event.lineno === 0) {
- isCrossOriginError = true;
- }
-
- if (event.defaultPrevented) {
- // Some other error handler has prevented default.
- // Browsers silence the error report if this happens.
- // We'll remember this to later decide whether to log it or not.
- if (error != null && typeof error === 'object') {
- try {
- error._suppressLogging = true;
- } catch (inner) {// Ignore.
- }
- }
- }
- } // Create a fake event type.
-
-
- var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
-
- window.addEventListener('error', handleWindowError);
- fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
- // errors, it will trigger our global error handler.
-
- evt.initEvent(evtType, false, false);
- fakeNode.dispatchEvent(evt);
-
- if (windowEventDescriptor) {
- Object.defineProperty(window, 'event', windowEventDescriptor);
- }
-
- if (didError) {
- if (!didSetError) {
- // The callback errored, but the error event never fired.
- error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
- } else if (isCrossOriginError) {
- error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');
- }
-
- this.onError(error);
- } // Remove our event listeners
-
-
- window.removeEventListener('error', handleWindowError);
- };
-
- invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
- }
-}
-
-var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
-
-var hasError = false;
-var caughtError = null; // Used by event system to capture/rethrow the first error.
-
-var hasRethrowError = false;
-var rethrowError = null;
-var reporter = {
- onError: function (error) {
- hasError = true;
- caughtError = error;
- }
-};
-/**
- * Call a function while guarding against errors that happens within it.
- * Returns an error if it throws, otherwise null.
- *
- * In production, this is implemented using a try-catch. The reason we don't
- * use a try-catch directly is so that we can swap out a different
- * implementation in DEV mode.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
-function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
- hasError = false;
- caughtError = null;
- invokeGuardedCallbackImpl$1.apply(reporter, arguments);
-}
-/**
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
- * TODO: See if caughtError and rethrowError can be unified.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
-function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
- invokeGuardedCallback.apply(this, arguments);
-
- if (hasError) {
- var error = clearCaughtError();
-
- if (!hasRethrowError) {
- hasRethrowError = true;
- rethrowError = error;
- }
- }
-}
-/**
- * During execution of guarded functions we will capture the first error which
- * we will rethrow to be handled by the top level error handler.
- */
-
-function rethrowCaughtError() {
- if (hasRethrowError) {
- var error = rethrowError;
- hasRethrowError = false;
- rethrowError = null;
- throw error;
- }
-}
-function hasCaughtError() {
- return hasError;
-}
-function clearCaughtError() {
- if (hasError) {
- var error = caughtError;
- hasError = false;
- caughtError = null;
- return error;
- } else {
- {
- {
- throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-}
-
-var getFiberCurrentPropsFromNode = null;
-var getInstanceFromNode = null;
-var getNodeFromInstance = null;
-function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
- getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
- getInstanceFromNode = getInstanceFromNodeImpl;
- getNodeFromInstance = getNodeFromInstanceImpl;
-
- {
- if (!getNodeFromInstance || !getInstanceFromNode) {
- error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
- }
- }
-}
-var validateEventDispatches;
-
-{
- validateEventDispatches = function (event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
- var listenersIsArr = Array.isArray(dispatchListeners);
- var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
- var instancesIsArr = Array.isArray(dispatchInstances);
- var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
-
- if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {
- error('EventPluginUtils: Invalid `event`.');
- }
- };
-}
-/**
- * Dispatch the event to the listener.
- * @param {SyntheticEvent} event SyntheticEvent to handle
- * @param {function} listener Application-level callback
- * @param {*} inst Internal component instance
- */
-
-
-function executeDispatch(event, listener, inst) {
- var type = event.type || 'unknown-event';
- event.currentTarget = getNodeFromInstance(inst);
- invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
- event.currentTarget = null;
-}
-/**
- * Standard/simple iteration through an event's collected dispatches.
- */
-
-function executeDispatchesInOrder(event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
-
- {
- validateEventDispatches(event);
- }
-
- if (Array.isArray(dispatchListeners)) {
- for (var i = 0; i < dispatchListeners.length; i++) {
- if (event.isPropagationStopped()) {
- break;
- } // Listeners and Instances are two parallel arrays that are always in sync.
-
-
- executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
- }
- } else if (dispatchListeners) {
- executeDispatch(event, dispatchListeners, dispatchInstances);
- }
-
- event._dispatchListeners = null;
- event._dispatchInstances = null;
-}
-
var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class
@@ -444,148 +100,23 @@ var SuspenseListComponent = 19;
var FundamentalComponent = 20;
var ScopeComponent = 21;
var Block = 22;
+var OffscreenComponent = 23;
+var LegacyHiddenComponent = 24;
-/**
- * Injectable ordering of event plugins.
- */
-var eventPluginOrder = null;
-/**
- * Injectable mapping from names to event plugin modules.
- */
+// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-var namesToPlugins = {};
-/**
- * Recomputes the plugin list using the injected plugins and plugin ordering.
- *
- * @private
- */
+var enableProfilerTimer = true; // Record durations for commit and passive effects phases.
-function recomputePluginOrdering() {
- if (!eventPluginOrder) {
- // Wait until an `eventPluginOrder` is injected.
- return;
- }
-
- for (var pluginName in namesToPlugins) {
- var pluginModule = namesToPlugins[pluginName];
- var pluginIndex = eventPluginOrder.indexOf(pluginName);
-
- if (!(pluginIndex > -1)) {
- {
- throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`." );
- }
- }
-
- if (plugins[pluginIndex]) {
- continue;
- }
-
- if (!pluginModule.extractEvents) {
- {
- throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not." );
- }
- }
-
- plugins[pluginIndex] = pluginModule;
- var publishedEvents = pluginModule.eventTypes;
-
- for (var eventName in publishedEvents) {
- if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {
- {
- throw Error( "EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`." );
- }
- }
- }
- }
-}
-/**
- * Publishes an event so that it can be dispatched by the supplied plugin.
- *
- * @param {object} dispatchConfig Dispatch configuration for the event.
- * @param {object} PluginModule Plugin publishing the event.
- * @return {boolean} True if the event was successfully published.
- * @private
- */
-
-
-function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
- if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {
- {
- throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" + eventName + "`." );
- }
- }
-
- eventNameDispatchConfigs[eventName] = dispatchConfig;
- var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
-
- if (phasedRegistrationNames) {
- for (var phaseName in phasedRegistrationNames) {
- if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
- var phasedRegistrationName = phasedRegistrationNames[phaseName];
- publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
- }
- }
-
- return true;
- } else if (dispatchConfig.registrationName) {
- publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
- return true;
- }
-
- return false;
-}
-/**
- * Publishes a registration name that is used to identify dispatched events.
- *
- * @param {string} registrationName Registration name to add.
- * @param {object} PluginModule Plugin publishing the event.
- * @private
- */
-
-
-function publishRegistrationName(registrationName, pluginModule, eventName) {
- if (!!registrationNameModules[registrationName]) {
- {
- throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" + registrationName + "`." );
- }
- }
-
- registrationNameModules[registrationName] = pluginModule;
- registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
-
- {
- var lowerCasedName = registrationName.toLowerCase();
- possibleRegistrationNames[lowerCasedName] = registrationName;
-
- if (registrationName === 'onDoubleClick') {
- possibleRegistrationNames.ondblclick = registrationName;
- }
- }
-}
-/**
- * Registers plugins so that they can extract and dispatch events.
- */
-
-/**
- * Ordered list of injected plugins.
- */
-
-
-var plugins = [];
-/**
- * Mapping from event name to dispatch config
- */
-
-var eventNameDispatchConfigs = {};
-/**
- * Mapping from registration name to plugin module
- */
+var enableFundamentalAPI = false; // Experimental Scope support.
+var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)
+var warnAboutStringRefs = false;
-var registrationNameModules = {};
+var allNativeEvents = new Set();
/**
* Mapping from registration name to event name
*/
+
var registrationNameDependencies = {};
/**
* Mapping from lowercase registration names to the properly cased version,
@@ -596,254 +127,39 @@ var registrationNameDependencies = {};
var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
-/**
- * Injects an ordering of plugins (by plugin name). This allows the ordering
- * to be decoupled from injection of the actual plugins so that ordering is
- * always deterministic regardless of packaging, on-the-fly injection, etc.
- *
- * @param {array} InjectedEventPluginOrder
- * @internal
- */
-
-function injectEventPluginOrder(injectedEventPluginOrder) {
- if (!!eventPluginOrder) {
- {
- throw Error( "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React." );
- }
- } // Clone the ordering so it cannot be dynamically mutated.
-
-
- eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
- recomputePluginOrdering();
+function registerTwoPhaseEvent(registrationName, dependencies) {
+ registerDirectEvent(registrationName, dependencies);
+ registerDirectEvent(registrationName + 'Capture', dependencies);
}
-/**
- * Injects plugins to be used by plugin event system. The plugin names must be
- * in the ordering injected by `injectEventPluginOrder`.
- *
- * Plugins can be injected as part of page initialization or on-the-fly.
- *
- * @param {object} injectedNamesToPlugins Map from names to plugin modules.
- * @internal
- */
-
-function injectEventPluginsByName(injectedNamesToPlugins) {
- var isOrderingDirty = false;
-
- for (var pluginName in injectedNamesToPlugins) {
- if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
- continue;
- }
-
- var pluginModule = injectedNamesToPlugins[pluginName];
-
- if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
- if (!!namesToPlugins[pluginName]) {
- {
- throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + pluginName + "`." );
- }
- }
-
- namesToPlugins[pluginName] = pluginModule;
- isOrderingDirty = true;
- }
- }
-
- if (isOrderingDirty) {
- recomputePluginOrdering();
- }
-}
-
-var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
-
-var PLUGIN_EVENT_SYSTEM = 1;
-var IS_REPLAYED = 1 << 5;
-var IS_FIRST_ANCESTOR = 1 << 6;
-
-var restoreImpl = null;
-var restoreTarget = null;
-var restoreQueue = null;
-
-function restoreStateOfTarget(target) {
- // We perform this translation at the end of the event loop so that we
- // always receive the correct fiber here
- var internalInstance = getInstanceFromNode(target);
-
- if (!internalInstance) {
- // Unmounted
- return;
- }
-
- if (!(typeof restoreImpl === 'function')) {
- {
- throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
+function registerDirectEvent(registrationName, dependencies) {
+ {
+ if (registrationNameDependencies[registrationName]) {
+ error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
}
}
- var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
+ registrationNameDependencies[registrationName] = dependencies;
- if (stateNode) {
- var _props = getFiberCurrentPropsFromNode(stateNode);
-
- restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
- }
-}
-
-function setRestoreImplementation(impl) {
- restoreImpl = impl;
-}
-function enqueueStateRestore(target) {
- if (restoreTarget) {
- if (restoreQueue) {
- restoreQueue.push(target);
- } else {
- restoreQueue = [target];
- }
- } else {
- restoreTarget = target;
- }
-}
-function needsStateRestore() {
- return restoreTarget !== null || restoreQueue !== null;
-}
-function restoreStateIfNeeded() {
- if (!restoreTarget) {
- return;
- }
-
- var target = restoreTarget;
- var queuedTargets = restoreQueue;
- restoreTarget = null;
- restoreQueue = null;
- restoreStateOfTarget(target);
+ {
+ var lowerCasedName = registrationName.toLowerCase();
+ possibleRegistrationNames[lowerCasedName] = registrationName;
- if (queuedTargets) {
- for (var i = 0; i < queuedTargets.length; i++) {
- restoreStateOfTarget(queuedTargets[i]);
+ if (registrationName === 'onDoubleClick') {
+ possibleRegistrationNames.ondblclick = registrationName;
}
}
-}
-
-var enableProfilerTimer = true; // Trace which interactions trigger each commit.
-
-var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
-
-var enableFundamentalAPI = false; // Experimental Scope support.
-var warnAboutStringRefs = false;
-
-// the renderer. Such as when we're dispatching events or if third party
-// libraries need to call batchedUpdates. Eventually, this API will go away when
-// everything is batched by default. We'll then have a similar API to opt-out of
-// scheduled work and instead do synchronous work.
-// Defaults
-
-var batchedUpdatesImpl = function (fn, bookkeeping) {
- return fn(bookkeeping);
-};
-
-var discreteUpdatesImpl = function (fn, a, b, c, d) {
- return fn(a, b, c, d);
-};
-
-var flushDiscreteUpdatesImpl = function () {};
-
-var batchedEventUpdatesImpl = batchedUpdatesImpl;
-var isInsideEventHandler = false;
-var isBatchingEventUpdates = false;
-
-function finishEventHandler() {
- // Here we wait until all updates have propagated, which is important
- // when using controlled components within layers:
- // https://github.com/facebook/react/issues/1698
- // Then we restore state of any controlled component.
- var controlledComponentsHavePendingUpdates = needsStateRestore();
-
- if (controlledComponentsHavePendingUpdates) {
- // If a controlled event was fired, we may need to restore the state of
- // the DOM node back to the controlled value. This is necessary when React
- // bails out of the update without touching the DOM.
- flushDiscreteUpdatesImpl();
- restoreStateIfNeeded();
- }
-}
-
-function batchedUpdates(fn, bookkeeping) {
- if (isInsideEventHandler) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(bookkeeping);
- }
-
- isInsideEventHandler = true;
-
- try {
- return batchedUpdatesImpl(fn, bookkeeping);
- } finally {
- isInsideEventHandler = false;
- finishEventHandler();
- }
-}
-function batchedEventUpdates(fn, a, b) {
- if (isBatchingEventUpdates) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(a, b);
- }
-
- isBatchingEventUpdates = true;
-
- try {
- return batchedEventUpdatesImpl(fn, a, b);
- } finally {
- isBatchingEventUpdates = false;
- finishEventHandler();
- }
-} // This is for the React Flare event system
-function discreteUpdates(fn, a, b, c, d) {
- var prevIsInsideEventHandler = isInsideEventHandler;
- isInsideEventHandler = true;
-
- try {
- return discreteUpdatesImpl(fn, a, b, c, d);
- } finally {
- isInsideEventHandler = prevIsInsideEventHandler;
- if (!isInsideEventHandler) {
- finishEventHandler();
- }
- }
-}
-function flushDiscreteUpdatesIfNeeded(timeStamp) {
- // event.timeStamp isn't overly reliable due to inconsistencies in
- // how different browsers have historically provided the time stamp.
- // Some browsers provide high-resolution time stamps for all events,
- // some provide low-resolution time stamps for all events. FF < 52
- // even mixes both time stamps together. Some browsers even report
- // negative time stamps or time stamps that are 0 (iOS9) in some cases.
- // Given we are only comparing two time stamps with equality (!==),
- // we are safe from the resolution differences. If the time stamp is 0
- // we bail-out of preventing the flush, which can affect semantics,
- // such as if an earlier flush removes or adds event listeners that
- // are fired in the subsequent flush. However, this is the same
- // behaviour as we had before this change, so the risks are low.
- if (!isInsideEventHandler && (!enableDeprecatedFlareAPI )) {
- flushDiscreteUpdatesImpl();
+ for (var i = 0; i < dependencies.length; i++) {
+ allNativeEvents.add(dependencies[i]);
}
}
-function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
- batchedUpdatesImpl = _batchedUpdatesImpl;
- discreteUpdatesImpl = _discreteUpdatesImpl;
- flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
- batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
-}
-var DiscreteEvent = 0;
-var UserBlockingEvent = 1;
-var ContinuousEvent = 2;
+var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
-// Attributes that aren't in the whitelist are presumed to have this type.
+// Attributes that aren't in the filter are presumed to have this type.
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
@@ -958,6 +274,7 @@ function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)
}
if (propertyInfo !== null) {
+
switch (propertyInfo.type) {
case BOOLEAN:
return !value;
@@ -979,7 +296,7 @@ function getPropertyInfo(name) {
return properties.hasOwnProperty(name) ? properties[name] : null;
}
-function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
+function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
this.attributeName = attributeName;
this.attributeNamespace = attributeNamespace;
@@ -987,6 +304,7 @@ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attribut
this.propertyName = name;
this.type = type;
this.sanitizeURL = sanitizeURL;
+ this.removeEmptyString = removeEmptyString;
} // When adding attributes to this list, be sure to also add them to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.
@@ -998,11 +316,11 @@ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This preven
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
-
reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // A few React string attributes have a different name.
// This is a mapping from React prop names to the attribute names.
@@ -1013,6 +331,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" HTML attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -1022,6 +341,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" SVG attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -1032,16 +352,18 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML boolean attributes.
['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
-'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
+'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
'itemScope'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are the few React props that we set as DOM properties
// rather than attributes. These are all booleans.
@@ -1055,6 +377,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.
@@ -1066,6 +389,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be positive numbers.
@@ -1076,6 +400,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be numbers.
@@ -1083,6 +408,7 @@ reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
});
var CAMELIZE = /[\-\:]([a-z])/g;
@@ -1091,7 +417,7 @@ var capitalize = function (token) {
return token[1].toUpperCase();
}; // This is a list of all SVG attributes that need special casing, namespacing,
// or boolean value assignment. Regular attributes that just accept strings
-// and have the same names are omitted, just like in the HTML whitelist.
+// and have the same names are omitted, just like in the HTML attribute filter.
// Some of these attributes can be hard to find. This list was created by
// scraping the MDN documentation.
@@ -1103,6 +429,7 @@ var capitalize = function (token) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // String SVG attributes with the xlink namespace.
@@ -1112,7 +439,8 @@ var capitalize = function (token) {
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false);
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
+ false);
}); // String SVG attributes with the xml namespace.
['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
@@ -1121,7 +449,8 @@ var capitalize = function (token) {
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false);
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
+ false);
}); // These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.
@@ -1130,25 +459,23 @@ var capitalize = function (token) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These attributes accept URLs. These must not allow javascript: URLS.
// These will also need to accept Trusted Types object in the future.
var xlinkHref = 'xlinkHref';
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
-'xlink:href', 'http://www.w3.org/1999/xlink', true);
+'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
+false);
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ true, // sanitizeURL
true);
});
-var ReactDebugCurrentFrame = null;
-
-{
- ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
-} // A javascript: URL can contain leading C0 control or \u0020 SPACE,
// and any newline or tab are filtered out as if they're not part of the URL.
// https://url.spec.whatwg.org/#url-parsing
// Tab or newline are defined as \r\n\t:
@@ -1159,7 +486,6 @@ var ReactDebugCurrentFrame = null;
/* eslint-disable max-len */
-
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
var didWarn = false;
@@ -1252,6 +578,13 @@ function getValueForAttribute(node, name, expected) {
{
if (!isAttributeNameSafe(name)) {
return;
+ } // If the object is an opaque reference ID, it's expected that
+ // the next prop is different than the server value, so just return
+ // expected
+
+
+ if (isOpaqueHydratingObject(expected)) {
+ return expected;
}
if (!node.hasAttribute(name)) {
@@ -1352,56 +685,56 @@ function setValueForProperty(node, name, value, isCustomComponentTag) {
}
}
-var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
-function describeComponentFrame (name, source, ownerName) {
- var sourceInfo = '';
-
- if (source) {
- var path = source.fileName;
- var fileName = path.replace(BEFORE_SLASH_RE, '');
-
- {
- // In DEV, include code for a common special case:
- // prefer "folder/index.js" instead of just "index.js".
- if (/^index\./.test(fileName)) {
- var match = path.match(BEFORE_SLASH_RE);
-
- if (match) {
- var pathBeforeSlash = match[1];
-
- if (pathBeforeSlash) {
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
- fileName = folderName + '/' + fileName;
- }
- }
- }
- }
-
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
- } else if (ownerName) {
- sourceInfo = ' (created by ' + ownerName + ')';
- }
-
- return '\n in ' + (name || 'Unknown') + sourceInfo;
-}
-
+// ATTENTION
+// When adding new symbols to this file,
+// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
-var hasSymbol = typeof Symbol === 'function' && Symbol.for;
-var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
-var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
-var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
-var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
-var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
-var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
-var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
-var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
-var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
-var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
-var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
-var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
-var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
+var REACT_ELEMENT_TYPE = 0xeac7;
+var REACT_PORTAL_TYPE = 0xeaca;
+var REACT_FRAGMENT_TYPE = 0xeacb;
+var REACT_STRICT_MODE_TYPE = 0xeacc;
+var REACT_PROFILER_TYPE = 0xead2;
+var REACT_PROVIDER_TYPE = 0xeacd;
+var REACT_CONTEXT_TYPE = 0xeace;
+var REACT_FORWARD_REF_TYPE = 0xead0;
+var REACT_SUSPENSE_TYPE = 0xead1;
+var REACT_SUSPENSE_LIST_TYPE = 0xead8;
+var REACT_MEMO_TYPE = 0xead3;
+var REACT_LAZY_TYPE = 0xead4;
+var REACT_BLOCK_TYPE = 0xead9;
+var REACT_SERVER_BLOCK_TYPE = 0xeada;
+var REACT_FUNDAMENTAL_TYPE = 0xead5;
+var REACT_SCOPE_TYPE = 0xead7;
+var REACT_OPAQUE_ID_TYPE = 0xeae0;
+var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
+var REACT_OFFSCREEN_TYPE = 0xeae2;
+var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
+
+if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor = Symbol.for;
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
+ REACT_MEMO_TYPE = symbolFor('react.memo');
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
+ REACT_BLOCK_TYPE = symbolFor('react.block');
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
+}
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
@@ -1418,38 +751,397 @@ function getIteratorFn(maybeIterable) {
return null;
}
-var Uninitialized = -1;
-var Pending = 0;
-var Resolved = 1;
-var Rejected = 2;
-function refineResolvedLazyComponent(lazyComponent) {
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
+// Helpers to patch console.logs to avoid logging during side-effect free
+// replaying on render function. This currently only patches the object
+// lazily which won't cover if the log function was extracted eagerly.
+// We could also eagerly patch the method.
+var disabledDepth = 0;
+var prevLog;
+var prevInfo;
+var prevWarn;
+var prevError;
+var prevGroup;
+var prevGroupCollapsed;
+var prevGroupEnd;
+
+function disabledLog() {}
+
+disabledLog.__reactDisabledLog = true;
+function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
+
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ disabledDepth++;
+ }
}
-function initializeLazyComponentType(lazyComponent) {
- if (lazyComponent._status === Uninitialized) {
- lazyComponent._status = Pending;
- var ctor = lazyComponent._ctor;
- var thenable = ctor();
- lazyComponent._result = thenable;
- thenable.then(function (moduleObject) {
- if (lazyComponent._status === Pending) {
- var defaultExport = moduleObject.default;
+function reenableLogs() {
+ {
+ disabledDepth--;
+
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ log: _assign({}, props, {
+ value: prevLog
+ }),
+ info: _assign({}, props, {
+ value: prevInfo
+ }),
+ warn: _assign({}, props, {
+ value: prevWarn
+ }),
+ error: _assign({}, props, {
+ value: prevError
+ }),
+ group: _assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: _assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: _assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
- {
- if (defaultExport === undefined) {
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
- }
+ if (disabledDepth < 0) {
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
+ }
+ }
+}
+
+var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
+var prefix;
+function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === undefined) {
+ // Extract the VM specific prefix used by each line.
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || '';
+ }
+ } // We use the prefix to ensure our stacks line up with native stack frames.
+
+
+ return '\n' + prefix + name;
+ }
+}
+var reentry = false;
+var componentFrameCache;
+
+{
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+}
+
+function describeNativeComponentFrame(fn, construct) {
+ // If something asked for a stack inside a fake render, it should get ignored.
+ if (!fn || reentry) {
+ return '';
+ }
+
+ {
+ var frame = componentFrameCache.get(fn);
+
+ if (frame !== undefined) {
+ return frame;
+ }
+ }
+
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
+
+ Error.prepareStackTrace = undefined;
+ var previousDispatcher;
+
+ {
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
+ // for warnings.
+
+ ReactCurrentDispatcher.current = null;
+ disableLogs();
+ }
+
+ try {
+ // This should throw.
+ if (construct) {
+ // Something should be setting the props in the constructor.
+ var Fake = function () {
+ throw Error();
+ }; // $FlowFixMe
+
+
+ Object.defineProperty(Fake.prototype, 'props', {
+ set: function () {
+ // We use a throwing setter instead of frozen or non-writable props
+ // because that won't throw in a non-strict mode function.
+ throw Error();
+ }
+ });
+
+ if (typeof Reflect === 'object' && Reflect.construct) {
+ // We construct a different control for this case to include any extra
+ // frames added by the construct call.
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
}
- lazyComponent._status = Resolved;
- lazyComponent._result = defaultExport;
+ fn.call(Fake.prototype);
}
- }, function (error) {
- if (lazyComponent._status === Pending) {
- lazyComponent._status = Rejected;
- lazyComponent._result = error;
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+
+ fn();
+ }
+ } catch (sample) {
+ // This is inlined manually because closure doesn't do it for us.
+ if (sample && control && typeof sample.stack === 'string') {
+ // This extracts the first frame from the sample that isn't also in the control.
+ // Skipping one frame that we assume is the frame that calls the two.
+ var sampleLines = sample.stack.split('\n');
+ var controlLines = control.stack.split('\n');
+ var s = sampleLines.length - 1;
+ var c = controlLines.length - 1;
+
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
+ // We expect at least one stack frame to be shared.
+ // Typically this will be the root most one. However, stack frames may be
+ // cut off due to maximum stack limits. In this case, one maybe cut off
+ // earlier than the other. We assume that the sample is longer or the same
+ // and there for cut off earlier. So we should find the root most frame in
+ // the sample somewhere in the control.
+ c--;
+ }
+
+ for (; s >= 1 && c >= 0; s--, c--) {
+ // Next we find the first one that isn't the same which should be the
+ // frame that called our sample function and the control.
+ if (sampleLines[s] !== controlLines[c]) {
+ // In V8, the first line is describing the message but other VMs don't.
+ // If we're about to return the first line, and the control is also on the same
+ // line, that's a pretty good indicator that our sample threw at same line as
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
+ // This can happen if you passed a class to function component, or non-function.
+ if (s !== 1 || c !== 1) {
+ do {
+ s--;
+ c--; // We may still have similar intermediate frames from the construct call.
+ // The next one that isn't the same should be our match though.
+
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, _frame);
+ }
+ } // Return the line we found.
+
+
+ return _frame;
+ }
+ } while (s >= 1 && c >= 0);
+ }
+
+ break;
+ }
}
- });
+ }
+ } finally {
+ reentry = false;
+
+ {
+ ReactCurrentDispatcher.current = previousDispatcher;
+ reenableLogs();
+ }
+
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ } // Fallback to just using the name if we couldn't make it throw.
+
+
+ var name = fn ? fn.displayName || fn.name : '';
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
+ }
+
+ return syntheticFrame;
+}
+
+function describeClassComponentFrame(ctor, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(ctor, true);
+ }
+}
+function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
+}
+
+function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+}
+
+function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+
+ if (type == null) {
+ return '';
+ }
+
+ if (typeof type === 'function') {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
+
+ if (typeof type === 'string') {
+ return describeBuiltInComponentFrame(type);
+ }
+
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame('Suspense');
+
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame('SuspenseList');
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+
+ case REACT_MEMO_TYPE:
+ // Memo may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+
+ case REACT_BLOCK_TYPE:
+ return describeFunctionComponentFrame(type._render);
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ // Lazy may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {}
+ }
+ }
+ }
+
+ return '';
+}
+
+function describeFiber(fiber) {
+ var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;
+ var source = fiber._debugSource ;
+
+ switch (fiber.tag) {
+ case HostComponent:
+ return describeBuiltInComponentFrame(fiber.type);
+
+ case LazyComponent:
+ return describeBuiltInComponentFrame('Lazy');
+
+ case SuspenseComponent:
+ return describeBuiltInComponentFrame('Suspense');
+
+ case SuspenseListComponent:
+ return describeBuiltInComponentFrame('SuspenseList');
+
+ case FunctionComponent:
+ case IndeterminateComponent:
+ case SimpleMemoComponent:
+ return describeFunctionComponentFrame(fiber.type);
+
+ case ForwardRef:
+ return describeFunctionComponentFrame(fiber.type.render);
+
+ case Block:
+ return describeFunctionComponentFrame(fiber.type._render);
+
+ case ClassComponent:
+ return describeClassComponentFrame(fiber.type);
+
+ default:
+ return '';
+ }
+}
+
+function getStackByFiberInDevAndProd(workInProgress) {
+ try {
+ var info = '';
+ var node = workInProgress;
+
+ do {
+ info += describeFiber(node);
+ node = node.return;
+ } while (node);
+
+ return info;
+ } catch (x) {
+ return '\nError generating stack: ' + x.message + '\n' + x.stack;
}
}
@@ -1458,6 +1150,10 @@ function getWrappedName(outerType, innerType, wrapperName) {
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
}
+function getContextName(type) {
+ return type.displayName || 'Context';
+}
+
function getComponentName(type) {
if (type == null) {
// Host root, text node or just invalid type.
@@ -1486,7 +1182,7 @@ function getComponentName(type) {
return 'Portal';
case REACT_PROFILER_TYPE:
- return "Profiler";
+ return 'Profiler';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
@@ -1501,10 +1197,12 @@ function getComponentName(type) {
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
- return 'Context.Consumer';
+ var context = type;
+ return getContextName(context) + '.Consumer';
case REACT_PROVIDER_TYPE:
- return 'Context.Provider';
+ var provider = type;
+ return getContextName(provider._context) + '.Provider';
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, 'ForwardRef');
@@ -1513,18 +1211,19 @@ function getComponentName(type) {
return getComponentName(type.type);
case REACT_BLOCK_TYPE:
- return getComponentName(type.render);
+ return getComponentName(type._render);
case REACT_LAZY_TYPE:
{
- var thenable = type;
- var resolvedThenable = refineResolvedLazyComponent(thenable);
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
- if (resolvedThenable) {
- return getComponentName(resolvedThenable);
+ try {
+ return getComponentName(init(payload));
+ } catch (x) {
+ return null;
}
-
- break;
}
}
}
@@ -1532,43 +1231,7 @@ function getComponentName(type) {
return null;
}
-var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function describeFiber(fiber) {
- switch (fiber.tag) {
- case HostRoot:
- case HostPortal:
- case HostText:
- case Fragment:
- case ContextProvider:
- case ContextConsumer:
- return '';
-
- default:
- var owner = fiber._debugOwner;
- var source = fiber._debugSource;
- var name = getComponentName(fiber.type);
- var ownerName = null;
-
- if (owner) {
- ownerName = getComponentName(owner.type);
- }
-
- return describeComponentFrame(name, source, ownerName);
- }
-}
-
-function getStackByFiberInDevAndProd(workInProgress) {
- var info = '';
- var node = workInProgress;
-
- do {
- info += describeFiber(node);
- node = node.return;
- } while (node);
-
- return info;
-}
+var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
var current = null;
var isRendering = false;
function getCurrentFiberOwnerNameInDevOrNull() {
@@ -1586,6 +1249,7 @@ function getCurrentFiberOwnerNameInDevOrNull() {
return null;
}
+
function getCurrentFiberStackInDev() {
{
if (current === null) {
@@ -1597,16 +1261,17 @@ function getCurrentFiberStackInDev() {
return getStackByFiberInDevAndProd(current);
}
}
+
function resetCurrentFiber() {
{
- ReactDebugCurrentFrame$1.getCurrentStack = null;
+ ReactDebugCurrentFrame.getCurrentStack = null;
current = null;
isRendering = false;
}
}
function setCurrentFiber(fiber) {
{
- ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;
+ ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
current = fiber;
isRendering = false;
}
@@ -1616,6 +1281,11 @@ function setIsRendering(rendering) {
isRendering = rendering;
}
}
+function getIsRendering() {
+ {
+ return isRendering;
+ }
+}
// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
@@ -1638,46 +1308,25 @@ function getToStringValue(value) {
}
}
-var ReactDebugCurrentFrame$2 = null;
-var ReactControlledValuePropTypes = {
- checkPropTypes: null
+var hasReadOnlyValue = {
+ button: true,
+ checkbox: true,
+ image: true,
+ hidden: true,
+ radio: true,
+ reset: true,
+ submit: true
};
-
-{
- ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
- var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
- };
- var propTypes = {
- value: function (props, propName, componentName) {
- if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
- },
- checked: function (props, propName, componentName) {
- if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+function checkControlledValueProps(tagName, props) {
+ {
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
+ error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
}
- };
- /**
- * Provide a linked `value` attribute for controlled forms. You should not use
- * this outside of the ReactDOM controlled form components.
- */
- ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
- checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
- };
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
+ error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+ }
+ }
}
function isCheckable(elem) {
@@ -1787,6 +1436,20 @@ function updateValueIfChanged(node) {
return false;
}
+function getActiveElement(doc) {
+ doc = doc || (typeof document !== 'undefined' ? document : undefined);
+
+ if (typeof doc === 'undefined') {
+ return null;
+ }
+
+ try {
+ return doc.activeElement || doc.body;
+ } catch (e) {
+ return doc.body;
+ }
+}
+
var didWarnValueDefaultValue = false;
var didWarnCheckedDefaultChecked = false;
var didWarnControlledToUncontrolled = false;
@@ -1829,16 +1492,16 @@ function getHostProps(element, props) {
}
function initWrapperState(element, props) {
{
- ReactControlledValuePropTypes.checkPropTypes('input', props);
+ checkControlledValueProps('input', props);
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
- error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
+ error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
didWarnCheckedDefaultChecked = true;
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
- error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
+ error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
didWarnValueDefaultValue = true;
}
@@ -1867,13 +1530,13 @@ function updateWrapper(element, props) {
var controlled = isControlled(props);
if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
- error('A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
+ error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
didWarnUncontrolledToControlled = true;
}
if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
- error('A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
+ error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
didWarnControlledToUncontrolled = true;
}
@@ -2021,7 +1684,7 @@ function updateNamedCousins(rootNode, props) {
// mixing React radio buttons with non-React ones.
- var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
+ var otherProps = getFiberCurrentPropsFromNode(otherNode);
if (!otherProps) {
{
@@ -2050,7 +1713,7 @@ function updateNamedCousins(rootNode, props) {
function setDefaultValue(node, type, value) {
if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
- type !== 'number' || node.ownerDocument.activeElement !== node) {
+ type !== 'number' || getActiveElement(node.ownerDocument) !== node) {
if (value == null) {
node.defaultValue = toString(node._wrapperState.initialValue);
} else if (node.defaultValue !== toString(value)) {
@@ -2076,7 +1739,7 @@ function flattenChildren(children) {
content += child; // Note: we don't warn about invalid children here.
// Instead, this is done separately below so that
- // it happens during the hydration codepath too.
+ // it happens during the hydration code path too.
});
return content;
}
@@ -2087,7 +1750,7 @@ function flattenChildren(children) {
function validateProps(element, props) {
{
- // This mirrors the codepath above, but runs for hydration too.
+ // This mirrors the code path above, but runs for hydration too.
// Warn about invalid children here so that client and hydration are consistent.
// TODO: this seems like it could cause a DEV-only throw for hydration
// if children contains a non-element object. We should try to avoid that.
@@ -2164,7 +1827,7 @@ var valuePropNames = ['value', 'defaultValue'];
function checkSelectPropTypes(props) {
{
- ReactControlledValuePropTypes.checkPropTypes('select', props);
+ checkControlledValueProps('select', props);
for (var i = 0; i < valuePropNames.length; i++) {
var propName = valuePropNames[i];
@@ -2270,7 +1933,7 @@ function initWrapperState$1(element, props) {
{
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
- error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
+ error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnValueDefaultValue$1 = true;
}
@@ -2358,10 +2021,10 @@ function initWrapperState$2(element, props) {
var node = element;
{
- ReactControlledValuePropTypes.checkPropTypes('textarea', props);
+ checkControlledValueProps('textarea', props);
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
- error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
+ error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
didWarnValDefaultVal = true;
}
@@ -2573,1704 +2236,6 @@ var setTextContent = function (node, text) {
node.textContent = text;
};
-// Do not use the below two methods directly!
-// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
-// (It is the only module that is allowed to access these methods.)
-function unsafeCastStringToDOMTopLevelType(topLevelType) {
- return topLevelType;
-}
-function unsafeCastDOMTopLevelTypeToString(topLevelType) {
- return topLevelType;
-}
-
-/**
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
- *
- * @param {string} styleProp
- * @param {string} eventName
- * @returns {object}
- */
-
-function makePrefixMap(styleProp, eventName) {
- var prefixes = {};
- prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
- prefixes['Webkit' + styleProp] = 'webkit' + eventName;
- prefixes['Moz' + styleProp] = 'moz' + eventName;
- return prefixes;
-}
-/**
- * A list of event names to a configurable list of vendor prefixes.
- */
-
-
-var vendorPrefixes = {
- animationend: makePrefixMap('Animation', 'AnimationEnd'),
- animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
- animationstart: makePrefixMap('Animation', 'AnimationStart'),
- transitionend: makePrefixMap('Transition', 'TransitionEnd')
-};
-/**
- * Event names that have already been detected and prefixed (if applicable).
- */
-
-var prefixedEventNames = {};
-/**
- * Element to check for prefixes on.
- */
-
-var style = {};
-/**
- * Bootstrap if a DOM exists.
- */
-
-if (canUseDOM) {
- style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
- // the un-prefixed "animation" and "transition" properties are defined on the
- // style object but the events that fire will still be prefixed, so we need
- // to check if the un-prefixed events are usable, and if not remove them from the map.
-
- if (!('AnimationEvent' in window)) {
- delete vendorPrefixes.animationend.animation;
- delete vendorPrefixes.animationiteration.animation;
- delete vendorPrefixes.animationstart.animation;
- } // Same as above
-
-
- if (!('TransitionEvent' in window)) {
- delete vendorPrefixes.transitionend.transition;
- }
-}
-/**
- * Attempts to determine the correct vendor prefixed event name.
- *
- * @param {string} eventName
- * @returns {string}
- */
-
-
-function getVendorPrefixedEventName(eventName) {
- if (prefixedEventNames[eventName]) {
- return prefixedEventNames[eventName];
- } else if (!vendorPrefixes[eventName]) {
- return eventName;
- }
-
- var prefixMap = vendorPrefixes[eventName];
-
- for (var styleProp in prefixMap) {
- if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
- return prefixedEventNames[eventName] = prefixMap[styleProp];
- }
- }
-
- return eventName;
-}
-
-/**
- * To identify top level events in ReactDOM, we use constants defined by this
- * module. This is the only module that uses the unsafe* methods to express
- * that the constants actually correspond to the browser event names. This lets
- * us save some bundle size by avoiding a top level type -> event name map.
- * The rest of ReactDOM code should import top level types from this file.
- */
-
-var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
-var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
-var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
-var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
-var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
-var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
-var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
-var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
-var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
-var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
-var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
-var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
-var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
-var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
-var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
-var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
-var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
-var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
-var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
-var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
-var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
-var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
-var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
-var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
-var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
-var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
-var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
-var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
-var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
-var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
-var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
-var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
-var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
-var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');
-var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
-var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');
-var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
-var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
-var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
-var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
-var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
-var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
-var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
-var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');
-var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
-var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
-var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
-var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
-var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
-var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
-var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
-var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
-var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
-var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');
-var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');
-var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');
-var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');
-var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');
-var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');
-var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
-var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
-var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');
-var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
-var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
-var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
-var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
-var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
-var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');
-var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
-var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
-var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
-var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
-var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
-var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
-var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
-var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
-var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
-var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
-var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
-var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.
-// Note that events in this list will *not* be listened to at the top level
-// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
-
-var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];
-function getRawEventName(topLevelType) {
- return unsafeCastDOMTopLevelTypeToString(topLevelType);
-}
-
-var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // prettier-ignore
-
-var elementListenerMap = new PossiblyWeakMap();
-function getListenerMapForElement(element) {
- var listenerMap = elementListenerMap.get(element);
-
- if (listenerMap === undefined) {
- listenerMap = new Map();
- elementListenerMap.set(element, listenerMap);
- }
-
- return listenerMap;
-}
-
-/**
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
- * instance (key) and the internal representation (value). This allows public
- * methods to accept the user facing instance as an argument and map them back
- * to internal methods.
- *
- * Note that this module is currently shared and assumed to be stateless.
- * If this becomes an actual Map, that will break.
- */
-function get(key) {
- return key._reactInternalFiber;
-}
-function has(key) {
- return key._reactInternalFiber !== undefined;
-}
-function set(key, value) {
- key._reactInternalFiber = value;
-}
-
-// Don't change these two values. They're used by React Dev Tools.
-var NoEffect =
-/* */
-0;
-var PerformedWork =
-/* */
-1; // You can change the rest (and add more).
-
-var Placement =
-/* */
-2;
-var Update =
-/* */
-4;
-var PlacementAndUpdate =
-/* */
-6;
-var Deletion =
-/* */
-8;
-var ContentReset =
-/* */
-16;
-var Callback =
-/* */
-32;
-var DidCapture =
-/* */
-64;
-var Ref =
-/* */
-128;
-var Snapshot =
-/* */
-256;
-var Passive =
-/* */
-512;
-var Hydrating =
-/* */
-1024;
-var HydratingAndUpdate =
-/* */
-1028; // Passive & Update & Callback & Ref & Snapshot
-
-var LifecycleEffectMask =
-/* */
-932; // Union of all host effects
-
-var HostEffectMask =
-/* */
-2047;
-var Incomplete =
-/* */
-2048;
-var ShouldCapture =
-/* */
-4096;
-
-var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
-function getNearestMountedFiber(fiber) {
- var node = fiber;
- var nearestMounted = fiber;
-
- if (!fiber.alternate) {
- // If there is no alternate, this might be a new tree that isn't inserted
- // yet. If it is, then it will have a pending insertion effect on it.
- var nextNode = node;
-
- do {
- node = nextNode;
-
- if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {
- // This is an insertion or in-progress hydration. The nearest possible
- // mounted fiber is the parent but we need to continue to figure out
- // if that one is still mounted.
- nearestMounted = node.return;
- }
-
- nextNode = node.return;
- } while (nextNode);
- } else {
- while (node.return) {
- node = node.return;
- }
- }
-
- if (node.tag === HostRoot) {
- // TODO: Check if this was a nested HostRoot when used with
- // renderContainerIntoSubtree.
- return nearestMounted;
- } // If we didn't hit the root, that means that we're in an disconnected tree
- // that has been unmounted.
-
-
- return null;
-}
-function getSuspenseInstanceFromFiber(fiber) {
- if (fiber.tag === SuspenseComponent) {
- var suspenseState = fiber.memoizedState;
-
- if (suspenseState === null) {
- var current = fiber.alternate;
-
- if (current !== null) {
- suspenseState = current.memoizedState;
- }
- }
-
- if (suspenseState !== null) {
- return suspenseState.dehydrated;
- }
- }
-
- return null;
-}
-function getContainerFromFiber(fiber) {
- return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
-}
-function isFiberMounted(fiber) {
- return getNearestMountedFiber(fiber) === fiber;
-}
-function isMounted(component) {
- {
- var owner = ReactCurrentOwner.current;
-
- if (owner !== null && owner.tag === ClassComponent) {
- var ownerFiber = owner;
- var instance = ownerFiber.stateNode;
-
- if (!instance._warnedAboutRefsInRender) {
- error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
- }
-
- instance._warnedAboutRefsInRender = true;
- }
- }
-
- var fiber = get(component);
-
- if (!fiber) {
- return false;
- }
-
- return getNearestMountedFiber(fiber) === fiber;
-}
-
-function assertIsMounted(fiber) {
- if (!(getNearestMountedFiber(fiber) === fiber)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-}
-
-function findCurrentFiberUsingSlowPath(fiber) {
- var alternate = fiber.alternate;
-
- if (!alternate) {
- // If there is no alternate, then we only need to check if it is mounted.
- var nearestMounted = getNearestMountedFiber(fiber);
-
- if (!(nearestMounted !== null)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (nearestMounted !== fiber) {
- return null;
- }
-
- return fiber;
- } // If we have two possible branches, we'll walk backwards up to the root
- // to see what path the root points to. On the way we may hit one of the
- // special cases and we'll deal with them.
-
-
- var a = fiber;
- var b = alternate;
-
- while (true) {
- var parentA = a.return;
-
- if (parentA === null) {
- // We're at the root.
- break;
- }
-
- var parentB = parentA.alternate;
-
- if (parentB === null) {
- // There is no alternate. This is an unusual case. Currently, it only
- // happens when a Suspense component is hidden. An extra fragment fiber
- // is inserted in between the Suspense fiber and its children. Skip
- // over this extra fragment fiber and proceed to the next parent.
- var nextParent = parentA.return;
-
- if (nextParent !== null) {
- a = b = nextParent;
- continue;
- } // If there's no parent, we're at the root.
-
-
- break;
- } // If both copies of the parent fiber point to the same child, we can
- // assume that the child is current. This happens when we bailout on low
- // priority: the bailed out fiber's child reuses the current child.
-
-
- if (parentA.child === parentB.child) {
- var child = parentA.child;
-
- while (child) {
- if (child === a) {
- // We've determined that A is the current branch.
- assertIsMounted(parentA);
- return fiber;
- }
-
- if (child === b) {
- // We've determined that B is the current branch.
- assertIsMounted(parentA);
- return alternate;
- }
-
- child = child.sibling;
- } // We should never have an alternate for any mounting node. So the only
- // way this could possibly happen is if this was unmounted, if at all.
-
-
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- if (a.return !== b.return) {
- // The return pointer of A and the return pointer of B point to different
- // fibers. We assume that return pointers never criss-cross, so A must
- // belong to the child set of A.return, and B must belong to the child
- // set of B.return.
- a = parentA;
- b = parentB;
- } else {
- // The return pointers point to the same fiber. We'll have to use the
- // default, slow path: scan the child sets of each parent alternate to see
- // which child belongs to which set.
- //
- // Search parent A's child set
- var didFindChild = false;
- var _child = parentA.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentA;
- b = parentB;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentA;
- a = parentB;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- // Search parent B's child set
- _child = parentB.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentB;
- b = parentA;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentB;
- a = parentA;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- {
- throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
- }
- }
- }
- }
-
- if (!(a.alternate === b)) {
- {
- throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } // If the root is not a host container, we're in a disconnected tree. I.e.
- // unmounted.
-
-
- if (!(a.tag === HostRoot)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (a.stateNode.current === a) {
- // We've determined that A is the current branch.
- return fiber;
- } // Otherwise B has to be current branch.
-
-
- return alternate;
-}
-function findCurrentHostFiber(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
-
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
-
-
- var node = currentParent;
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText) {
- return node;
- } else if (node.child) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return null;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
-
-
- return null;
-}
-function findCurrentHostFiberWithNoPortals(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
-
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
-
-
- var node = currentParent;
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
- return node;
- } else if (node.child && node.tag !== HostPortal) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return null;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
-
-
- return null;
-}
-
-/**
- * Accumulates items that must not be null or undefined into the first one. This
- * is used to conserve memory by avoiding array allocations, and thus sacrifices
- * API cleanness. Since `current` can be null before being passed in and not
- * null after this function, make sure to assign it back to `current`:
- *
- * `a = accumulateInto(a, b);`
- *
- * This API should be sparingly used. Try `accumulate` for something cleaner.
- *
- * @return {*|array<*>} An accumulation of items.
- */
-
-function accumulateInto(current, next) {
- if (!(next != null)) {
- {
- throw Error( "accumulateInto(...): Accumulated items must not be null or undefined." );
- }
- }
-
- if (current == null) {
- return next;
- } // Both are not empty. Warning: Never call x.concat(y) when you are not
- // certain that x is an Array (x could be a string with concat method).
-
-
- if (Array.isArray(current)) {
- if (Array.isArray(next)) {
- current.push.apply(current, next);
- return current;
- }
-
- current.push(next);
- return current;
- }
-
- if (Array.isArray(next)) {
- // A bit too dangerous to mutate `next`.
- return [current].concat(next);
- }
-
- return [current, next];
-}
-
-/**
- * @param {array} arr an "accumulation" of items which is either an Array or
- * a single item. Useful when paired with the `accumulate` module. This is a
- * simple utility that allows us to reason about a collection of items, but
- * handling the case when there is exactly one item (and we do not need to
- * allocate an array).
- * @param {function} cb Callback invoked with each element or a collection.
- * @param {?} [scope] Scope used as `this` in a callback.
- */
-function forEachAccumulated(arr, cb, scope) {
- if (Array.isArray(arr)) {
- arr.forEach(cb, scope);
- } else if (arr) {
- cb.call(scope, arr);
- }
-}
-
-/**
- * Internal queue of events that have accumulated their dispatches and are
- * waiting to have their dispatches executed.
- */
-
-var eventQueue = null;
-/**
- * Dispatches an event and releases it back into the pool, unless persistent.
- *
- * @param {?object} event Synthetic event to be dispatched.
- * @private
- */
-
-var executeDispatchesAndRelease = function (event) {
- if (event) {
- executeDispatchesInOrder(event);
-
- if (!event.isPersistent()) {
- event.constructor.release(event);
- }
- }
-};
-
-var executeDispatchesAndReleaseTopLevel = function (e) {
- return executeDispatchesAndRelease(e);
-};
-
-function runEventsInBatch(events) {
- if (events !== null) {
- eventQueue = accumulateInto(eventQueue, events);
- } // Set `eventQueue` to null before processing it so that we can tell if more
- // events get enqueued while processing.
-
-
- var processingEventQueue = eventQueue;
- eventQueue = null;
-
- if (!processingEventQueue) {
- return;
- }
-
- forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
-
- if (!!eventQueue) {
- {
- throw Error( "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented." );
- }
- } // This would be a good time to rethrow if any of the event handlers threw.
-
-
- rethrowCaughtError();
-}
-
-/**
- * Gets the target node from a native browser event by accounting for
- * inconsistencies in browser DOM APIs.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {DOMEventTarget} Target node.
- */
-
-function getEventTarget(nativeEvent) {
- // Fallback to nativeEvent.srcElement for IE9
- // https://github.com/facebook/react/issues/12506
- var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
-
- if (target.correspondingUseElement) {
- target = target.correspondingUseElement;
- } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
- // @see http://www.quirksmode.org/js/events_properties.html
-
-
- return target.nodeType === TEXT_NODE ? target.parentNode : target;
-}
-
-/**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
-
-function isEventSupported(eventNameSuffix) {
- if (!canUseDOM) {
- return false;
- }
-
- var eventName = 'on' + eventNameSuffix;
- var isSupported = eventName in document;
-
- if (!isSupported) {
- var element = document.createElement('div');
- element.setAttribute(eventName, 'return;');
- isSupported = typeof element[eventName] === 'function';
- }
-
- return isSupported;
-}
-
-/**
- * Summary of `DOMEventPluginSystem` event handling:
- *
- * - Top-level delegation is used to trap most native browser events. This
- * may only occur in the main thread and is the responsibility of
- * ReactDOMEventListener, which is injected and can therefore support
- * pluggable event sources. This is the only work that occurs in the main
- * thread.
- *
- * - We normalize and de-duplicate events to account for browser quirks. This
- * may be done in the worker thread.
- *
- * - Forward these native events (with the associated top-level type used to
- * trap it) to `EventPluginRegistry`, which in turn will ask plugins if they want
- * to extract any synthetic events.
- *
- * - The `EventPluginRegistry` will then process each event by annotating them with
- * "dispatches", a sequence of listeners and IDs that care about that event.
- *
- * - The `EventPluginRegistry` then dispatches the events.
- *
- * Overview of React and the event system:
- *
- * +------------+ .
- * | DOM | .
- * +------------+ .
- * | .
- * v .
- * +------------+ .
- * | ReactEvent | .
- * | Listener | .
- * +------------+ . +-----------+
- * | . +--------+|SimpleEvent|
- * | . | |Plugin |
- * +-----|------+ . v +-----------+
- * | | | . +--------------+ +------------+
- * | +-----------.--->|PluginRegistry| | Event |
- * | | . | | +-----------+ | Propagators|
- * | ReactEvent | . | | |TapEvent | |------------|
- * | Emitter | . | |<---+|Plugin | |other plugin|
- * | | . | | +-----------+ | utilities |
- * | +-----------.--->| | +------------+
- * | | | . +--------------+
- * +-----|------+ . ^ +-----------+
- * | . | |Enter/Leave|
- * + . +-------+|Plugin |
- * +-------------+ . +-----------+
- * | application | .
- * |-------------| .
- * | | .
- * | | .
- * +-------------+ .
- * .
- * React Core . General Purpose Event Plugin System
- */
-
-var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
-var callbackBookkeepingPool = [];
-
-function releaseTopLevelCallbackBookKeeping(instance) {
- instance.topLevelType = null;
- instance.nativeEvent = null;
- instance.targetInst = null;
- instance.ancestors.length = 0;
-
- if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
- callbackBookkeepingPool.push(instance);
- }
-} // Used to store ancestor hierarchy in top level callback
-
-
-function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) {
- if (callbackBookkeepingPool.length) {
- var instance = callbackBookkeepingPool.pop();
- instance.topLevelType = topLevelType;
- instance.eventSystemFlags = eventSystemFlags;
- instance.nativeEvent = nativeEvent;
- instance.targetInst = targetInst;
- return instance;
- }
-
- return {
- topLevelType: topLevelType,
- eventSystemFlags: eventSystemFlags,
- nativeEvent: nativeEvent,
- targetInst: targetInst,
- ancestors: []
- };
-}
-/**
- * Find the deepest React component completely containing the root of the
- * passed-in instance (for use when entire React trees are nested within each
- * other). If React trees are not nested, returns null.
- */
-
-
-function findRootContainerNode(inst) {
- if (inst.tag === HostRoot) {
- return inst.stateNode.containerInfo;
- } // TODO: It may be a good idea to cache this to prevent unnecessary DOM
- // traversal, but caching is difficult to do correctly without using a
- // mutation observer to listen for all DOM changes.
-
-
- while (inst.return) {
- inst = inst.return;
- }
-
- if (inst.tag !== HostRoot) {
- // This can happen if we're in a detached tree.
- return null;
- }
-
- return inst.stateNode.containerInfo;
-}
-/**
- * Allows registered plugins an opportunity to extract events from top-level
- * native browser events.
- *
- * @return {*} An accumulation of synthetic events.
- * @internal
- */
-
-
-function extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var events = null;
-
- for (var i = 0; i < plugins.length; i++) {
- // Not every plugin in the ordering may be loaded at runtime.
- var possiblePlugin = plugins[i];
-
- if (possiblePlugin) {
- var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
-
- if (extractedEvents) {
- events = accumulateInto(events, extractedEvents);
- }
- }
- }
-
- return events;
-}
-
-function runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- runEventsInBatch(events);
-}
-
-function handleTopLevel(bookKeeping) {
- var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components.
- // It's important that we build the array of ancestors before calling any
- // event handlers, because event handlers can modify the DOM, leading to
- // inconsistencies with ReactMount's node cache. See #1105.
-
- var ancestor = targetInst;
-
- do {
- if (!ancestor) {
- var ancestors = bookKeeping.ancestors;
- ancestors.push(ancestor);
- break;
- }
-
- var root = findRootContainerNode(ancestor);
-
- if (!root) {
- break;
- }
-
- var tag = ancestor.tag;
-
- if (tag === HostComponent || tag === HostText) {
- bookKeeping.ancestors.push(ancestor);
- }
-
- ancestor = getClosestInstanceFromNode(root);
- } while (ancestor);
-
- for (var i = 0; i < bookKeeping.ancestors.length; i++) {
- targetInst = bookKeeping.ancestors[i];
- var eventTarget = getEventTarget(bookKeeping.nativeEvent);
- var topLevelType = bookKeeping.topLevelType;
- var nativeEvent = bookKeeping.nativeEvent;
- var eventSystemFlags = bookKeeping.eventSystemFlags; // If this is the first ancestor, we mark it on the system flags
-
- if (i === 0) {
- eventSystemFlags |= IS_FIRST_ANCESTOR;
- }
-
- runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, eventTarget, eventSystemFlags);
- }
-}
-
-function dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {
- var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags);
-
- try {
- // Event queue being processed in the same cycle allows
- // `preventDefault`.
- batchedEventUpdates(handleTopLevel, bookKeeping);
- } finally {
- releaseTopLevelCallbackBookKeeping(bookKeeping);
- }
-}
-/**
- * We listen for bubbled touch events on the document object.
- *
- * Firefox v8.01 (and possibly others) exhibited strange behavior when
- * mounting `onmousemove` events at some node that was not the document
- * element. The symptoms were that if your mouse is not moving over something
- * contained within that mount point (for example on the background) the
- * top-level listeners for `onmousemove` won't be called. However, if you
- * register the `mousemove` on the document object, then it will of course
- * catch all `mousemove`s. This along with iOS quirks, justifies restricting
- * top-level listeners to the document object only, at least for these
- * movement types of events and possibly all events.
- *
- * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
- *
- * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
- * they bubble to document.
- *
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @param {object} mountAt Container where to mount the listener
- */
-
-function legacyListenToEvent(registrationName, mountAt) {
- var listenerMap = getListenerMapForElement(mountAt);
- var dependencies = registrationNameDependencies[registrationName];
-
- for (var i = 0; i < dependencies.length; i++) {
- var dependency = dependencies[i];
- legacyListenToTopLevelEvent(dependency, mountAt, listenerMap);
- }
-}
-function legacyListenToTopLevelEvent(topLevelType, mountAt, listenerMap) {
- if (!listenerMap.has(topLevelType)) {
- switch (topLevelType) {
- case TOP_SCROLL:
- trapCapturedEvent(TOP_SCROLL, mountAt);
- break;
-
- case TOP_FOCUS:
- case TOP_BLUR:
- trapCapturedEvent(TOP_FOCUS, mountAt);
- trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function,
- // but this ensures we mark both as attached rather than just one.
-
- listenerMap.set(TOP_BLUR, null);
- listenerMap.set(TOP_FOCUS, null);
- break;
-
- case TOP_CANCEL:
- case TOP_CLOSE:
- if (isEventSupported(getRawEventName(topLevelType))) {
- trapCapturedEvent(topLevelType, mountAt);
- }
-
- break;
-
- case TOP_INVALID:
- case TOP_SUBMIT:
- case TOP_RESET:
- // We listen to them on the target DOM elements.
- // Some of them bubble so we don't want them to fire twice.
- break;
-
- default:
- // By default, listen on the top level to all non-media events.
- // Media events don't bubble so adding the listener wouldn't do anything.
- var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1;
-
- if (!isMediaEvent) {
- trapBubbledEvent(topLevelType, mountAt);
- }
-
- break;
- }
-
- listenerMap.set(topLevelType, null);
- }
-}
-function isListeningToAllDependencies(registrationName, mountAt) {
- var listenerMap = getListenerMapForElement(mountAt);
- var dependencies = registrationNameDependencies[registrationName];
-
- for (var i = 0; i < dependencies.length; i++) {
- var dependency = dependencies[i];
-
- if (!listenerMap.has(dependency)) {
- return false;
- }
- }
-
- return true;
-}
-
-var attemptUserBlockingHydration;
-function setAttemptUserBlockingHydration(fn) {
- attemptUserBlockingHydration = fn;
-}
-var attemptContinuousHydration;
-function setAttemptContinuousHydration(fn) {
- attemptContinuousHydration = fn;
-}
-var attemptHydrationAtCurrentPriority;
-function setAttemptHydrationAtCurrentPriority(fn) {
- attemptHydrationAtCurrentPriority = fn;
-} // TODO: Upgrade this definition once we're on a newer version of Flow that
-var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
-
-var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
-// if the last target was dehydrated.
-
-var queuedFocus = null;
-var queuedDrag = null;
-var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
-
-var queuedPointers = new Map();
-var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
-
-var queuedExplicitHydrationTargets = [];
-function hasQueuedDiscreteEvents() {
- return queuedDiscreteEvents.length > 0;
-}
-var discreteReplayableEvents = [TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_TOUCH_START, TOP_AUX_CLICK, TOP_DOUBLE_CLICK, TOP_POINTER_CANCEL, TOP_POINTER_DOWN, TOP_POINTER_UP, TOP_DRAG_END, TOP_DRAG_START, TOP_DROP, TOP_COMPOSITION_END, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_INPUT, TOP_TEXT_INPUT, TOP_CLOSE, TOP_CANCEL, TOP_COPY, TOP_CUT, TOP_PASTE, TOP_CLICK, TOP_CHANGE, TOP_CONTEXT_MENU, TOP_RESET, TOP_SUBMIT];
-var continuousReplayableEvents = [TOP_FOCUS, TOP_BLUR, TOP_DRAG_ENTER, TOP_DRAG_LEAVE, TOP_MOUSE_OVER, TOP_MOUSE_OUT, TOP_POINTER_OVER, TOP_POINTER_OUT, TOP_GOT_POINTER_CAPTURE, TOP_LOST_POINTER_CAPTURE];
-function isReplayableDiscreteEvent(eventType) {
- return discreteReplayableEvents.indexOf(eventType) > -1;
-}
-
-function trapReplayableEventForDocument(topLevelType, document, listenerMap) {
- legacyListenToTopLevelEvent(topLevelType, document, listenerMap);
-}
-
-function eagerlyTrapReplayableEvents(container, document) {
- var listenerMapForDoc = getListenerMapForElement(document); // Discrete
-
- discreteReplayableEvents.forEach(function (topLevelType) {
- trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
- }); // Continuous
-
- continuousReplayableEvents.forEach(function (topLevelType) {
- trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
- });
-}
-
-function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- return {
- blockedOn: blockedOn,
- topLevelType: topLevelType,
- eventSystemFlags: eventSystemFlags | IS_REPLAYED,
- nativeEvent: nativeEvent,
- container: container
- };
-}
-
-function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
- queuedDiscreteEvents.push(queuedEvent);
-} // Resets the replaying for this type of continuous event to no event.
-
-function clearIfContinuousEvent(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_FOCUS:
- case TOP_BLUR:
- queuedFocus = null;
- break;
-
- case TOP_DRAG_ENTER:
- case TOP_DRAG_LEAVE:
- queuedDrag = null;
- break;
-
- case TOP_MOUSE_OVER:
- case TOP_MOUSE_OUT:
- queuedMouse = null;
- break;
-
- case TOP_POINTER_OVER:
- case TOP_POINTER_OUT:
- {
- var pointerId = nativeEvent.pointerId;
- queuedPointers.delete(pointerId);
- break;
- }
-
- case TOP_GOT_POINTER_CAPTURE:
- case TOP_LOST_POINTER_CAPTURE:
- {
- var _pointerId = nativeEvent.pointerId;
- queuedPointerCaptures.delete(_pointerId);
- break;
- }
- }
-}
-
-function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
-
- if (blockedOn !== null) {
- var _fiber2 = getInstanceFromNode$1(blockedOn);
-
- if (_fiber2 !== null) {
- // Attempt to increase the priority of this target.
- attemptContinuousHydration(_fiber2);
- }
- }
-
- return queuedEvent;
- } // If we have already queued this exact event, then it's because
- // the different event systems have different DOM event listeners.
- // We can accumulate the flags and store a single event to be
- // replayed.
-
-
- existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
- return existingQueuedEvent;
-}
-
-function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- // These set relatedTarget to null because the replayed event will be treated as if we
- // moved from outside the window (no target) onto the target once it hydrates.
- // Instead of mutating we could clone the event.
- switch (topLevelType) {
- case TOP_FOCUS:
- {
- var focusEvent = nativeEvent;
- queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, topLevelType, eventSystemFlags, container, focusEvent);
- return true;
- }
-
- case TOP_DRAG_ENTER:
- {
- var dragEvent = nativeEvent;
- queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, topLevelType, eventSystemFlags, container, dragEvent);
- return true;
- }
-
- case TOP_MOUSE_OVER:
- {
- var mouseEvent = nativeEvent;
- queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, topLevelType, eventSystemFlags, container, mouseEvent);
- return true;
- }
-
- case TOP_POINTER_OVER:
- {
- var pointerEvent = nativeEvent;
- var pointerId = pointerEvent.pointerId;
- queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, topLevelType, eventSystemFlags, container, pointerEvent));
- return true;
- }
-
- case TOP_GOT_POINTER_CAPTURE:
- {
- var _pointerEvent = nativeEvent;
- var _pointerId2 = _pointerEvent.pointerId;
- queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, topLevelType, eventSystemFlags, container, _pointerEvent));
- return true;
- }
- }
-
- return false;
-} // Check if this target is unblocked. Returns true if it's unblocked.
-
-function attemptExplicitHydrationTarget(queuedTarget) {
- // TODO: This function shares a lot of logic with attemptToDispatchEvent.
- // Try to unify them. It's a bit tricky since it would require two return
- // values.
- var targetInst = getClosestInstanceFromNode(queuedTarget.target);
-
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
-
- if (nearestMounted !== null) {
- var tag = nearestMounted.tag;
-
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
-
- if (instance !== null) {
- // We're blocked on hydrating this boundary.
- // Increase its priority.
- queuedTarget.blockedOn = instance;
- Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
- attemptHydrationAtCurrentPriority(nearestMounted);
- });
- return;
- }
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
-
- if (root.hydrate) {
- queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
- // a root other than sync.
-
- return;
- }
- }
- }
- }
-
- queuedTarget.blockedOn = null;
-}
-
-function attemptReplayContinuousQueuedEvent(queuedEvent) {
- if (queuedEvent.blockedOn !== null) {
- return false;
- }
-
- var nextBlockedOn = attemptToDispatchEvent(queuedEvent.topLevelType, queuedEvent.eventSystemFlags, queuedEvent.container, queuedEvent.nativeEvent);
-
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- var _fiber3 = getInstanceFromNode$1(nextBlockedOn);
-
- if (_fiber3 !== null) {
- attemptContinuousHydration(_fiber3);
- }
-
- queuedEvent.blockedOn = nextBlockedOn;
- return false;
- }
-
- return true;
-}
-
-function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
- if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
- map.delete(key);
- }
-}
-
-function replayUnblockedEvents() {
- hasScheduledReplayAttempt = false; // First replay discrete events.
-
- while (queuedDiscreteEvents.length > 0) {
- var nextDiscreteEvent = queuedDiscreteEvents[0];
-
- if (nextDiscreteEvent.blockedOn !== null) {
- // We're still blocked.
- // Increase the priority of this boundary to unblock
- // the next discrete event.
- var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
-
- if (_fiber4 !== null) {
- attemptUserBlockingHydration(_fiber4);
- }
-
- break;
- }
-
- var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);
-
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- nextDiscreteEvent.blockedOn = nextBlockedOn;
- } else {
- // We've successfully replayed the first event. Let's try the next one.
- queuedDiscreteEvents.shift();
- }
- } // Next replay any continuous events.
-
-
- if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
- queuedFocus = null;
- }
-
- if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
- queuedDrag = null;
- }
-
- if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
- queuedMouse = null;
- }
-
- queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
- queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
-}
-
-function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
-
- if (!hasScheduledReplayAttempt) {
- hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
- // now unblocked. This first might not actually be unblocked yet.
- // We could check it early to avoid scheduling an unnecessary callback.
-
- Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
- }
- }
-}
-
-function retryIfBlockedOn(unblocked) {
- // Mark anything that was blocked on this as no longer blocked
- // and eligible for a replay.
- if (queuedDiscreteEvents.length > 0) {
- scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
- // worth it because we expect very few discrete events to queue up and once
- // we are actually fully unblocked it will be fast to replay them.
-
- for (var i = 1; i < queuedDiscreteEvents.length; i++) {
- var queuedEvent = queuedDiscreteEvents[i];
-
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
- }
- }
- }
-
- if (queuedFocus !== null) {
- scheduleCallbackIfUnblocked(queuedFocus, unblocked);
- }
-
- if (queuedDrag !== null) {
- scheduleCallbackIfUnblocked(queuedDrag, unblocked);
- }
-
- if (queuedMouse !== null) {
- scheduleCallbackIfUnblocked(queuedMouse, unblocked);
- }
-
- var unblock = function (queuedEvent) {
- return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
- };
-
- queuedPointers.forEach(unblock);
- queuedPointerCaptures.forEach(unblock);
-
- for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
- var queuedTarget = queuedExplicitHydrationTargets[_i];
-
- if (queuedTarget.blockedOn === unblocked) {
- queuedTarget.blockedOn = null;
- }
- }
-
- while (queuedExplicitHydrationTargets.length > 0) {
- var nextExplicitTarget = queuedExplicitHydrationTargets[0];
-
- if (nextExplicitTarget.blockedOn !== null) {
- // We're still blocked.
- break;
- } else {
- attemptExplicitHydrationTarget(nextExplicitTarget);
-
- if (nextExplicitTarget.blockedOn === null) {
- // We're unblocked.
- queuedExplicitHydrationTargets.shift();
- }
- }
- }
-}
-
-function addEventBubbleListener(element, eventType, listener) {
- element.addEventListener(eventType, listener, false);
-}
-function addEventCaptureListener(element, eventType, listener) {
- element.addEventListener(eventType, listener, true);
-}
-
-// do it in two places, which duplicates logic
-// and increases the bundle size, we do it all
-// here once. If we remove or refactor the
-// SimpleEventPlugin, we should also remove or
-// update the below line.
-
-var simpleEventPluginEventTypes = {};
-var topLevelEventsToDispatchConfig = new Map();
-var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
-// the code required to apply the same logic for event prioritization and that of the
-// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
-// duplication (for which there would be quite a bit). For the events that are not needed
-// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
-// array of top level events.
-// Lastly, we ignore prettier so we can keep the formatting sane.
-// prettier-ignore
-
-var discreteEventPairsForSimpleEventPlugin = [TOP_BLUR, 'blur', TOP_CANCEL, 'cancel', TOP_CLICK, 'click', TOP_CLOSE, 'close', TOP_CONTEXT_MENU, 'contextMenu', TOP_COPY, 'copy', TOP_CUT, 'cut', TOP_AUX_CLICK, 'auxClick', TOP_DOUBLE_CLICK, 'doubleClick', TOP_DRAG_END, 'dragEnd', TOP_DRAG_START, 'dragStart', TOP_DROP, 'drop', TOP_FOCUS, 'focus', TOP_INPUT, 'input', TOP_INVALID, 'invalid', TOP_KEY_DOWN, 'keyDown', TOP_KEY_PRESS, 'keyPress', TOP_KEY_UP, 'keyUp', TOP_MOUSE_DOWN, 'mouseDown', TOP_MOUSE_UP, 'mouseUp', TOP_PASTE, 'paste', TOP_PAUSE, 'pause', TOP_PLAY, 'play', TOP_POINTER_CANCEL, 'pointerCancel', TOP_POINTER_DOWN, 'pointerDown', TOP_POINTER_UP, 'pointerUp', TOP_RATE_CHANGE, 'rateChange', TOP_RESET, 'reset', TOP_SEEKED, 'seeked', TOP_SUBMIT, 'submit', TOP_TOUCH_CANCEL, 'touchCancel', TOP_TOUCH_END, 'touchEnd', TOP_TOUCH_START, 'touchStart', TOP_VOLUME_CHANGE, 'volumeChange'];
-var otherDiscreteEvents = [TOP_CHANGE, TOP_SELECTION_CHANGE, TOP_TEXT_INPUT, TOP_COMPOSITION_START, TOP_COMPOSITION_END, TOP_COMPOSITION_UPDATE]; // prettier-ignore
-
-var userBlockingPairsForSimpleEventPlugin = [TOP_DRAG, 'drag', TOP_DRAG_ENTER, 'dragEnter', TOP_DRAG_EXIT, 'dragExit', TOP_DRAG_LEAVE, 'dragLeave', TOP_DRAG_OVER, 'dragOver', TOP_MOUSE_MOVE, 'mouseMove', TOP_MOUSE_OUT, 'mouseOut', TOP_MOUSE_OVER, 'mouseOver', TOP_POINTER_MOVE, 'pointerMove', TOP_POINTER_OUT, 'pointerOut', TOP_POINTER_OVER, 'pointerOver', TOP_SCROLL, 'scroll', TOP_TOGGLE, 'toggle', TOP_TOUCH_MOVE, 'touchMove', TOP_WHEEL, 'wheel']; // prettier-ignore
-
-var continuousPairsForSimpleEventPlugin = [TOP_ABORT, 'abort', TOP_ANIMATION_END, 'animationEnd', TOP_ANIMATION_ITERATION, 'animationIteration', TOP_ANIMATION_START, 'animationStart', TOP_CAN_PLAY, 'canPlay', TOP_CAN_PLAY_THROUGH, 'canPlayThrough', TOP_DURATION_CHANGE, 'durationChange', TOP_EMPTIED, 'emptied', TOP_ENCRYPTED, 'encrypted', TOP_ENDED, 'ended', TOP_ERROR, 'error', TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', TOP_LOAD, 'load', TOP_LOADED_DATA, 'loadedData', TOP_LOADED_METADATA, 'loadedMetadata', TOP_LOAD_START, 'loadStart', TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', TOP_PLAYING, 'playing', TOP_PROGRESS, 'progress', TOP_SEEKING, 'seeking', TOP_STALLED, 'stalled', TOP_SUSPEND, 'suspend', TOP_TIME_UPDATE, 'timeUpdate', TOP_TRANSITION_END, 'transitionEnd', TOP_WAITING, 'waiting'];
-/**
- * Turns
- * ['abort', ...]
- * into
- * eventTypes = {
- * 'abort': {
- * phasedRegistrationNames: {
- * bubbled: 'onAbort',
- * captured: 'onAbortCapture',
- * },
- * dependencies: [TOP_ABORT],
- * },
- * ...
- * };
- * topLevelEventsToDispatchConfig = new Map([
- * [TOP_ABORT, { sameConfig }],
- * ]);
- */
-
-function processSimpleEventPluginPairsByPriority(eventTypes, priority) {
- // As the event types are in pairs of two, we need to iterate
- // through in twos. The events are in pairs of two to save code
- // and improve init perf of processing this array, as it will
- // result in far fewer object allocations and property accesses
- // if we only use three arrays to process all the categories of
- // instead of tuples.
- for (var i = 0; i < eventTypes.length; i += 2) {
- var topEvent = eventTypes[i];
- var event = eventTypes[i + 1];
- var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
- var onEvent = 'on' + capitalizedEvent;
- var config = {
- phasedRegistrationNames: {
- bubbled: onEvent,
- captured: onEvent + 'Capture'
- },
- dependencies: [topEvent],
- eventPriority: priority
- };
- eventPriorities.set(topEvent, priority);
- topLevelEventsToDispatchConfig.set(topEvent, config);
- simpleEventPluginEventTypes[event] = config;
- }
-}
-
-function processTopEventPairsByPriority(eventTypes, priority) {
- for (var i = 0; i < eventTypes.length; i++) {
- eventPriorities.set(eventTypes[i], priority);
- }
-} // SimpleEventPlugin
-
-
-processSimpleEventPluginPairsByPriority(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
-processSimpleEventPluginPairsByPriority(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
-processSimpleEventPluginPairsByPriority(continuousPairsForSimpleEventPlugin, ContinuousEvent); // Not used by SimpleEventPlugin
-
-processTopEventPairsByPriority(otherDiscreteEvents, DiscreteEvent);
-function getEventPriorityForPluginSystem(topLevelType) {
- var priority = eventPriorities.get(topLevelType); // Default to a ContinuousEvent. Note: we might
- // want to warn if we can't detect the priority
- // for the event.
-
- return priority === undefined ? ContinuousEvent : priority;
-}
-
-// Intentionally not named imports because Rollup would use dynamic dispatch for
-var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
- runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?
-
-var _enabled = true;
-function setEnabled(enabled) {
- _enabled = !!enabled;
-}
-function isEnabled() {
- return _enabled;
-}
-function trapBubbledEvent(topLevelType, element) {
- trapEventForPluginEventSystem(element, topLevelType, false);
-}
-function trapCapturedEvent(topLevelType, element) {
- trapEventForPluginEventSystem(element, topLevelType, true);
-}
-
-function trapEventForPluginEventSystem(container, topLevelType, capture) {
- var listener;
-
- switch (getEventPriorityForPluginSystem(topLevelType)) {
- case DiscreteEvent:
- listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
-
- case UserBlockingEvent:
- listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
-
- case ContinuousEvent:
- default:
- listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
- }
-
- var rawEventName = getRawEventName(topLevelType);
-
- if (capture) {
- addEventCaptureListener(container, rawEventName, listener);
- } else {
- addEventBubbleListener(container, rawEventName, listener);
- }
-}
-
-function dispatchDiscreteEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
- discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, container, nativeEvent);
-}
-
-function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, container, nativeEvent) {
- runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, container, nativeEvent));
-}
-
-function dispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- if (!_enabled) {
- return;
- }
-
- if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) {
- // If we already have a queue of discrete events, and this is another discrete
- // event, then we can't dispatch it regardless of its target, since they
- // need to dispatch in order.
- queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
- topLevelType, eventSystemFlags, container, nativeEvent);
- return;
- }
-
- var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent);
-
- if (blockedOn === null) {
- // We successfully dispatched this event.
- clearIfContinuousEvent(topLevelType, nativeEvent);
- return;
- }
-
- if (isReplayableDiscreteEvent(topLevelType)) {
- // This this to be replayed later once the target is available.
- queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
- return;
- }
-
- if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent)) {
- return;
- } // We need to clear only if we didn't queue because
- // queueing is accummulative.
-
-
- clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target,
- // in case the event system needs to trace it.
-
- {
- dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null);
- }
-} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
-
-function attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- // TODO: Warn if _enabled is false.
- var nativeEventTarget = getEventTarget(nativeEvent);
- var targetInst = getClosestInstanceFromNode(nativeEventTarget);
-
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
-
- if (nearestMounted === null) {
- // This tree has been unmounted already. Dispatch without a target.
- targetInst = null;
- } else {
- var tag = nearestMounted.tag;
-
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
-
- if (instance !== null) {
- // Queue the event to be replayed later. Abort dispatching since we
- // don't want this event dispatched twice through the event system.
- // TODO: If this is the first discrete event in the queue. Schedule an increased
- // priority for this boundary.
- return instance;
- } // This shouldn't happen, something went wrong but to avoid blocking
- // the whole system, dispatch the event without a target.
- // TODO: Warn.
-
-
- targetInst = null;
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
-
- if (root.hydrate) {
- // If this happens during a replay something went wrong and it might block
- // the whole system.
- return getContainerFromFiber(nearestMounted);
- }
-
- targetInst = null;
- } else if (nearestMounted !== targetInst) {
- // If we get an event (ex: img onload) before committing that
- // component's mount, ignore it for now (that is, treat it as if it was an
- // event on a non-React tree). We might also consider queueing events and
- // dispatching them after the mount.
- targetInst = null;
- }
- }
- }
-
- {
- dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);
- } // We're not blocked on anything.
-
-
- return null;
-}
-
// List derived from Gecko source code:
// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
var shorthandToLonghand = {
@@ -4659,7 +2624,6 @@ function expandShorthandMap(styles) {
function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
{
-
if (!nextStyles) {
return;
}
@@ -4687,7 +2651,7 @@ function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
}
}
-// For HTML, certain tags should omit their close tag. We keep a whitelist for
+// For HTML, certain tags should omit their close tag. We keep a list for
// those special-case tags.
var omittedCloseTags = {
area: true,
@@ -4715,11 +2679,6 @@ var voidElementTags = _assign({
}, omittedCloseTags);
var HTML = '__html';
-var ReactDebugCurrentFrame$3 = null;
-
-{
- ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
-}
function assertValidProps(tag, props) {
if (!props) {
@@ -4730,7 +2689,7 @@ function assertValidProps(tag, props) {
if (voidElementTags[tag]) {
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
{
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
}
}
}
@@ -4744,7 +2703,7 @@ function assertValidProps(tag, props) {
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
{
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
}
}
}
@@ -4757,7 +2716,7 @@ function assertValidProps(tag, props) {
if (!(props.style == null || typeof props.style === 'object')) {
{
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
}
}
}
@@ -4769,7 +2728,7 @@ function isCustomComponent(tagName, props) {
switch (tagName) {
// These are reserved SVG and MathML elements.
- // We don't mind this whitelist too much because we expect it to never grow.
+ // We don't mind this list too much because we expect it to never grow.
// The alternative is to track the namespace in a few places which is convoluted.
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
case 'annotation-xml':
@@ -4787,7 +2746,7 @@ function isCustomComponent(tagName, props) {
}
}
-// When adding attributes to the HTML or SVG whitelist, be sure to
+// When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
@@ -4837,9 +2796,11 @@ var possibleStandardNames = {
dir: 'dir',
disabled: 'disabled',
disablepictureinpicture: 'disablePictureInPicture',
+ disableremoteplayback: 'disableRemotePlayback',
download: 'download',
draggable: 'draggable',
enctype: 'encType',
+ enterkeyhint: 'enterKeyHint',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
@@ -5407,9 +3368,9 @@ function warnInvalidARIAProps(type, props) {
}).join(', ');
if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
} else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
}
}
}
@@ -5451,7 +3412,7 @@ var validateProperty$1 = function () {};
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
return true;
}
@@ -5466,8 +3427,11 @@ var validateProperty$1 = function () {};
} // We can't rely on the event system being injected on the server.
- if (canUseEventSystem) {
- if (registrationNameModules.hasOwnProperty(name)) {
+ if (eventRegistry != null) {
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
+
+ if (registrationNameDependencies.hasOwnProperty(name)) {
return true;
}
@@ -5587,12 +3551,12 @@ var validateProperty$1 = function () {};
};
}
-var warnUnknownProperties = function (type, props, canUseEventSystem) {
+var warnUnknownProperties = function (type, props, eventRegistry) {
{
var unknownProps = [];
for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
if (!isValid) {
unknownProps.push(key);
@@ -5604,19 +3568,5163 @@ var warnUnknownProperties = function (type, props, canUseEventSystem) {
}).join(', ');
if (unknownProps.length === 1) {
- error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
} else if (unknownProps.length > 1) {
- error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
}
}
};
-function validateProperties$2(type, props, canUseEventSystem) {
+function validateProperties$2(type, props, eventRegistry) {
if (isCustomComponent(type, props)) {
return;
}
- warnUnknownProperties(type, props, canUseEventSystem);
+ warnUnknownProperties(type, props, eventRegistry);
+}
+
+var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
+var IS_NON_DELEGATED = 1 << 1;
+var IS_CAPTURE_PHASE = 1 << 2;
+var IS_REPLAYED = 1 << 4;
+// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
+// we call willDeferLaterForLegacyFBSupport, thus not bailing out
+// will result in endless cycles like an infinite loop.
+// We also don't want to defer during event replaying.
+
+var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;
+
+/**
+ * Gets the target node from a native browser event by accounting for
+ * inconsistencies in browser DOM APIs.
+ *
+ * @param {object} nativeEvent Native browser event.
+ * @return {DOMEventTarget} Target node.
+ */
+
+function getEventTarget(nativeEvent) {
+ // Fallback to nativeEvent.srcElement for IE9
+ // https://github.com/facebook/react/issues/12506
+ var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
+
+ if (target.correspondingUseElement) {
+ target = target.correspondingUseElement;
+ } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
+ // @see http://www.quirksmode.org/js/events_properties.html
+
+
+ return target.nodeType === TEXT_NODE ? target.parentNode : target;
+}
+
+var restoreImpl = null;
+var restoreTarget = null;
+var restoreQueue = null;
+
+function restoreStateOfTarget(target) {
+ // We perform this translation at the end of the event loop so that we
+ // always receive the correct fiber here
+ var internalInstance = getInstanceFromNode(target);
+
+ if (!internalInstance) {
+ // Unmounted
+ return;
+ }
+
+ if (!(typeof restoreImpl === 'function')) {
+ {
+ throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+
+ var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
+
+ if (stateNode) {
+ var _props = getFiberCurrentPropsFromNode(stateNode);
+
+ restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
+ }
+}
+
+function setRestoreImplementation(impl) {
+ restoreImpl = impl;
+}
+function enqueueStateRestore(target) {
+ if (restoreTarget) {
+ if (restoreQueue) {
+ restoreQueue.push(target);
+ } else {
+ restoreQueue = [target];
+ }
+ } else {
+ restoreTarget = target;
+ }
+}
+function needsStateRestore() {
+ return restoreTarget !== null || restoreQueue !== null;
+}
+function restoreStateIfNeeded() {
+ if (!restoreTarget) {
+ return;
+ }
+
+ var target = restoreTarget;
+ var queuedTargets = restoreQueue;
+ restoreTarget = null;
+ restoreQueue = null;
+ restoreStateOfTarget(target);
+
+ if (queuedTargets) {
+ for (var i = 0; i < queuedTargets.length; i++) {
+ restoreStateOfTarget(queuedTargets[i]);
+ }
+ }
+}
+
+// the renderer. Such as when we're dispatching events or if third party
+// libraries need to call batchedUpdates. Eventually, this API will go away when
+// everything is batched by default. We'll then have a similar API to opt-out of
+// scheduled work and instead do synchronous work.
+// Defaults
+
+var batchedUpdatesImpl = function (fn, bookkeeping) {
+ return fn(bookkeeping);
+};
+
+var discreteUpdatesImpl = function (fn, a, b, c, d) {
+ return fn(a, b, c, d);
+};
+
+var flushDiscreteUpdatesImpl = function () {};
+
+var batchedEventUpdatesImpl = batchedUpdatesImpl;
+var isInsideEventHandler = false;
+var isBatchingEventUpdates = false;
+
+function finishEventHandler() {
+ // Here we wait until all updates have propagated, which is important
+ // when using controlled components within layers:
+ // https://github.com/facebook/react/issues/1698
+ // Then we restore state of any controlled component.
+ var controlledComponentsHavePendingUpdates = needsStateRestore();
+
+ if (controlledComponentsHavePendingUpdates) {
+ // If a controlled event was fired, we may need to restore the state of
+ // the DOM node back to the controlled value. This is necessary when React
+ // bails out of the update without touching the DOM.
+ flushDiscreteUpdatesImpl();
+ restoreStateIfNeeded();
+ }
+}
+
+function batchedUpdates(fn, bookkeeping) {
+ if (isInsideEventHandler) {
+ // If we are currently inside another batch, we need to wait until it
+ // fully completes before restoring state.
+ return fn(bookkeeping);
+ }
+
+ isInsideEventHandler = true;
+
+ try {
+ return batchedUpdatesImpl(fn, bookkeeping);
+ } finally {
+ isInsideEventHandler = false;
+ finishEventHandler();
+ }
+}
+function batchedEventUpdates(fn, a, b) {
+ if (isBatchingEventUpdates) {
+ // If we are currently inside another batch, we need to wait until it
+ // fully completes before restoring state.
+ return fn(a, b);
+ }
+
+ isBatchingEventUpdates = true;
+
+ try {
+ return batchedEventUpdatesImpl(fn, a, b);
+ } finally {
+ isBatchingEventUpdates = false;
+ finishEventHandler();
+ }
+}
+function discreteUpdates(fn, a, b, c, d) {
+ var prevIsInsideEventHandler = isInsideEventHandler;
+ isInsideEventHandler = true;
+
+ try {
+ return discreteUpdatesImpl(fn, a, b, c, d);
+ } finally {
+ isInsideEventHandler = prevIsInsideEventHandler;
+
+ if (!isInsideEventHandler) {
+ finishEventHandler();
+ }
+ }
+}
+function flushDiscreteUpdatesIfNeeded(timeStamp) {
+ {
+ if (!isInsideEventHandler) {
+ flushDiscreteUpdatesImpl();
+ }
+ }
+}
+function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
+ batchedUpdatesImpl = _batchedUpdatesImpl;
+ discreteUpdatesImpl = _discreteUpdatesImpl;
+ flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
+ batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
+}
+
+function isInteractive(tag) {
+ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
+}
+
+function shouldPreventMouseEvent(name, type, props) {
+ switch (name) {
+ case 'onClick':
+ case 'onClickCapture':
+ case 'onDoubleClick':
+ case 'onDoubleClickCapture':
+ case 'onMouseDown':
+ case 'onMouseDownCapture':
+ case 'onMouseMove':
+ case 'onMouseMoveCapture':
+ case 'onMouseUp':
+ case 'onMouseUpCapture':
+ case 'onMouseEnter':
+ return !!(props.disabled && isInteractive(type));
+
+ default:
+ return false;
+ }
+}
+/**
+ * @param {object} inst The instance, which is the source of events.
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
+ * @return {?function} The stored callback.
+ */
+
+
+function getListener(inst, registrationName) {
+ var stateNode = inst.stateNode;
+
+ if (stateNode === null) {
+ // Work in progress (ex: onload events in incremental mode).
+ return null;
+ }
+
+ var props = getFiberCurrentPropsFromNode(stateNode);
+
+ if (props === null) {
+ // Work in progress.
+ return null;
+ }
+
+ var listener = props[registrationName];
+
+ if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
+ return null;
+ }
+
+ if (!(!listener || typeof listener === 'function')) {
+ {
+ throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
+ }
+ }
+
+ return listener;
+}
+
+var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners
+// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
+
+if (canUseDOM) {
+ try {
+ var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value
+
+ Object.defineProperty(options, 'passive', {
+ get: function () {
+ passiveBrowserEventsSupported = true;
+ }
+ });
+ window.addEventListener('test', options, options);
+ window.removeEventListener('test', options, options);
+ } catch (e) {
+ passiveBrowserEventsSupported = false;
+ }
+}
+
+function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
+
+ try {
+ func.apply(context, funcArgs);
+ } catch (error) {
+ this.onError(error);
+ }
+}
+
+var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
+
+{
+ // In DEV mode, we swap out invokeGuardedCallback for a special version
+ // that plays more nicely with the browser's DevTools. The idea is to preserve
+ // "Pause on exceptions" behavior. Because React wraps all user-provided
+ // functions in invokeGuardedCallback, and the production version of
+ // invokeGuardedCallback uses a try-catch, all user exceptions are treated
+ // like caught exceptions, and the DevTools won't pause unless the developer
+ // takes the extra step of enabling pause on caught exceptions. This is
+ // unintuitive, though, because even though React has caught the error, from
+ // the developer's perspective, the error is uncaught.
+ //
+ // To preserve the expected "Pause on exceptions" behavior, we don't use a
+ // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
+ // DOM node, and call the user-provided callback from inside an event handler
+ // for that fake event. If the callback throws, the error is "captured" using
+ // a global event handler. But because the error happens in a different
+ // event loop context, it does not interrupt the normal program flow.
+ // Effectively, this gives us try-catch behavior without actually using
+ // try-catch. Neat!
+ // Check that the browser supports the APIs we need to implement our special
+ // DEV version of invokeGuardedCallback
+ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
+ var fakeNode = document.createElement('react');
+
+ invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
+ // If document doesn't exist we know for sure we will crash in this method
+ // when we call document.createEvent(). However this can cause confusing
+ // errors: https://github.com/facebookincubator/create-react-app/issues/3482
+ // So we preemptively throw with a better message instead.
+ if (!(typeof document !== 'undefined')) {
+ {
+ throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
+ }
+ }
+
+ var evt = document.createEvent('Event');
+ var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
+ // set this to true at the beginning, then set it to false right after
+ // calling the function. If the function errors, `didError` will never be
+ // set to false. This strategy works even if the browser is flaky and
+ // fails to call our global error handler, because it doesn't rely on
+ // the error event at all.
+
+ var didError = true; // Keeps track of the value of window.event so that we can reset it
+ // during the callback to let user code access window.event in the
+ // browsers that support it.
+
+ var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
+ // dispatching: https://github.com/facebook/react/issues/13688
+
+ var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
+
+ function restoreAfterDispatch() {
+ // We immediately remove the callback from event listeners so that
+ // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
+ // nested call would trigger the fake event handlers of any call higher
+ // in the stack.
+ fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
+ // window.event assignment in both IE <= 10 as they throw an error
+ // "Member not found" in strict mode, and in Firefox which does not
+ // support window.event.
+
+ if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
+ window.event = windowEvent;
+ }
+ } // Create an event handler for our fake event. We will synchronously
+ // dispatch our fake event using `dispatchEvent`. Inside the handler, we
+ // call the user-provided callback.
+
+
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
+
+ function callCallback() {
+ didCall = true;
+ restoreAfterDispatch();
+ func.apply(context, funcArgs);
+ didError = false;
+ } // Create a global error event handler. We use this to capture the value
+ // that was thrown. It's possible that this error handler will fire more
+ // than once; for example, if non-React code also calls `dispatchEvent`
+ // and a handler for that event throws. We should be resilient to most of
+ // those cases. Even if our error event handler fires more than once, the
+ // last error event is always used. If the callback actually does error,
+ // we know that the last error event is the correct one, because it's not
+ // possible for anything else to have happened in between our callback
+ // erroring and the code that follows the `dispatchEvent` call below. If
+ // the callback doesn't error, but the error event was fired, we know to
+ // ignore it because `didError` will be false, as described above.
+
+
+ var error; // Use this to track whether the error event is ever called.
+
+ var didSetError = false;
+ var isCrossOriginError = false;
+
+ function handleWindowError(event) {
+ error = event.error;
+ didSetError = true;
+
+ if (error === null && event.colno === 0 && event.lineno === 0) {
+ isCrossOriginError = true;
+ }
+
+ if (event.defaultPrevented) {
+ // Some other error handler has prevented default.
+ // Browsers silence the error report if this happens.
+ // We'll remember this to later decide whether to log it or not.
+ if (error != null && typeof error === 'object') {
+ try {
+ error._suppressLogging = true;
+ } catch (inner) {// Ignore.
+ }
+ }
+ }
+ } // Create a fake event type.
+
+
+ var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
+
+ window.addEventListener('error', handleWindowError);
+ fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
+ // errors, it will trigger our global error handler.
+
+ evt.initEvent(evtType, false, false);
+ fakeNode.dispatchEvent(evt);
+
+ if (windowEventDescriptor) {
+ Object.defineProperty(window, 'event', windowEventDescriptor);
+ }
+
+ if (didCall && didError) {
+ if (!didSetError) {
+ // The callback errored, but the error event never fired.
+ error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
+ } else if (isCrossOriginError) {
+ error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
+ }
+
+ this.onError(error);
+ } // Remove our event listeners
+
+
+ window.removeEventListener('error', handleWindowError);
+
+ if (!didCall) {
+ // Something went really wrong, and our event was not dispatched.
+ // https://github.com/facebook/react/issues/16734
+ // https://github.com/facebook/react/issues/16585
+ // Fall back to the production implementation.
+ restoreAfterDispatch();
+ return invokeGuardedCallbackProd.apply(this, arguments);
+ }
+ };
+ }
+}
+
+var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
+
+var hasError = false;
+var caughtError = null; // Used by event system to capture/rethrow the first error.
+
+var hasRethrowError = false;
+var rethrowError = null;
+var reporter = {
+ onError: function (error) {
+ hasError = true;
+ caughtError = error;
+ }
+};
+/**
+ * Call a function while guarding against errors that happens within it.
+ * Returns an error if it throws, otherwise null.
+ *
+ * In production, this is implemented using a try-catch. The reason we don't
+ * use a try-catch directly is so that we can swap out a different
+ * implementation in DEV mode.
+ *
+ * @param {String} name of the guard to use for logging or debugging
+ * @param {Function} func The function to invoke
+ * @param {*} context The context to use when calling the function
+ * @param {...*} args Arguments for function
+ */
+
+function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
+ hasError = false;
+ caughtError = null;
+ invokeGuardedCallbackImpl$1.apply(reporter, arguments);
+}
+/**
+ * Same as invokeGuardedCallback, but instead of returning an error, it stores
+ * it in a global so it can be rethrown by `rethrowCaughtError` later.
+ * TODO: See if caughtError and rethrowError can be unified.
+ *
+ * @param {String} name of the guard to use for logging or debugging
+ * @param {Function} func The function to invoke
+ * @param {*} context The context to use when calling the function
+ * @param {...*} args Arguments for function
+ */
+
+function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
+ invokeGuardedCallback.apply(this, arguments);
+
+ if (hasError) {
+ var error = clearCaughtError();
+
+ if (!hasRethrowError) {
+ hasRethrowError = true;
+ rethrowError = error;
+ }
+ }
+}
+/**
+ * During execution of guarded functions we will capture the first error which
+ * we will rethrow to be handled by the top level error handler.
+ */
+
+function rethrowCaughtError() {
+ if (hasRethrowError) {
+ var error = rethrowError;
+ hasRethrowError = false;
+ rethrowError = null;
+ throw error;
+ }
+}
+function hasCaughtError() {
+ return hasError;
+}
+function clearCaughtError() {
+ if (hasError) {
+ var error = caughtError;
+ hasError = false;
+ caughtError = null;
+ return error;
+ } else {
+ {
+ {
+ throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+ }
+}
+
+/**
+ * `ReactInstanceMap` maintains a mapping from a public facing stateful
+ * instance (key) and the internal representation (value). This allows public
+ * methods to accept the user facing instance as an argument and map them back
+ * to internal methods.
+ *
+ * Note that this module is currently shared and assumed to be stateless.
+ * If this becomes an actual Map, that will break.
+ */
+function get(key) {
+ return key._reactInternals;
+}
+function has(key) {
+ return key._reactInternals !== undefined;
+}
+function set(key, value) {
+ key._reactInternals = value;
+}
+
+// Don't change these two values. They're used by React Dev Tools.
+var NoFlags =
+/* */
+0;
+var PerformedWork =
+/* */
+1; // You can change the rest (and add more).
+
+var Placement =
+/* */
+2;
+var Update =
+/* */
+4;
+var PlacementAndUpdate =
+/* */
+6;
+var Deletion =
+/* */
+8;
+var ContentReset =
+/* */
+16;
+var Callback =
+/* */
+32;
+var DidCapture =
+/* */
+64;
+var Ref =
+/* */
+128;
+var Snapshot =
+/* */
+256;
+var Passive =
+/* */
+512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.
+
+var PassiveUnmountPendingDev =
+/* */
+8192;
+var Hydrating =
+/* */
+1024;
+var HydratingAndUpdate =
+/* */
+1028; // Passive & Update & Callback & Ref & Snapshot
+
+var LifecycleEffectMask =
+/* */
+932; // Union of all host effects
+
+var HostEffectMask =
+/* */
+2047; // These are not really side effects, but we still reuse this field.
+
+var Incomplete =
+/* */
+2048;
+var ShouldCapture =
+/* */
+4096;
+var ForceUpdateForLegacySuspense =
+/* */
+16384; // Static tags describe aspects of a fiber that are not specific to a render,
+
+var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
+function getNearestMountedFiber(fiber) {
+ var node = fiber;
+ var nearestMounted = fiber;
+
+ if (!fiber.alternate) {
+ // If there is no alternate, this might be a new tree that isn't inserted
+ // yet. If it is, then it will have a pending insertion effect on it.
+ var nextNode = node;
+
+ do {
+ node = nextNode;
+
+ if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
+ // This is an insertion or in-progress hydration. The nearest possible
+ // mounted fiber is the parent but we need to continue to figure out
+ // if that one is still mounted.
+ nearestMounted = node.return;
+ }
+
+ nextNode = node.return;
+ } while (nextNode);
+ } else {
+ while (node.return) {
+ node = node.return;
+ }
+ }
+
+ if (node.tag === HostRoot) {
+ // TODO: Check if this was a nested HostRoot when used with
+ // renderContainerIntoSubtree.
+ return nearestMounted;
+ } // If we didn't hit the root, that means that we're in an disconnected tree
+ // that has been unmounted.
+
+
+ return null;
+}
+function getSuspenseInstanceFromFiber(fiber) {
+ if (fiber.tag === SuspenseComponent) {
+ var suspenseState = fiber.memoizedState;
+
+ if (suspenseState === null) {
+ var current = fiber.alternate;
+
+ if (current !== null) {
+ suspenseState = current.memoizedState;
+ }
+ }
+
+ if (suspenseState !== null) {
+ return suspenseState.dehydrated;
+ }
+ }
+
+ return null;
+}
+function getContainerFromFiber(fiber) {
+ return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
+}
+function isFiberMounted(fiber) {
+ return getNearestMountedFiber(fiber) === fiber;
+}
+function isMounted(component) {
+ {
+ var owner = ReactCurrentOwner.current;
+
+ if (owner !== null && owner.tag === ClassComponent) {
+ var ownerFiber = owner;
+ var instance = ownerFiber.stateNode;
+
+ if (!instance._warnedAboutRefsInRender) {
+ error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
+ }
+
+ instance._warnedAboutRefsInRender = true;
+ }
+ }
+
+ var fiber = get(component);
+
+ if (!fiber) {
+ return false;
+ }
+
+ return getNearestMountedFiber(fiber) === fiber;
+}
+
+function assertIsMounted(fiber) {
+ if (!(getNearestMountedFiber(fiber) === fiber)) {
+ {
+ throw Error( "Unable to find node on an unmounted component." );
+ }
+ }
+}
+
+function findCurrentFiberUsingSlowPath(fiber) {
+ var alternate = fiber.alternate;
+
+ if (!alternate) {
+ // If there is no alternate, then we only need to check if it is mounted.
+ var nearestMounted = getNearestMountedFiber(fiber);
+
+ if (!(nearestMounted !== null)) {
+ {
+ throw Error( "Unable to find node on an unmounted component." );
+ }
+ }
+
+ if (nearestMounted !== fiber) {
+ return null;
+ }
+
+ return fiber;
+ } // If we have two possible branches, we'll walk backwards up to the root
+ // to see what path the root points to. On the way we may hit one of the
+ // special cases and we'll deal with them.
+
+
+ var a = fiber;
+ var b = alternate;
+
+ while (true) {
+ var parentA = a.return;
+
+ if (parentA === null) {
+ // We're at the root.
+ break;
+ }
+
+ var parentB = parentA.alternate;
+
+ if (parentB === null) {
+ // There is no alternate. This is an unusual case. Currently, it only
+ // happens when a Suspense component is hidden. An extra fragment fiber
+ // is inserted in between the Suspense fiber and its children. Skip
+ // over this extra fragment fiber and proceed to the next parent.
+ var nextParent = parentA.return;
+
+ if (nextParent !== null) {
+ a = b = nextParent;
+ continue;
+ } // If there's no parent, we're at the root.
+
+
+ break;
+ } // If both copies of the parent fiber point to the same child, we can
+ // assume that the child is current. This happens when we bailout on low
+ // priority: the bailed out fiber's child reuses the current child.
+
+
+ if (parentA.child === parentB.child) {
+ var child = parentA.child;
+
+ while (child) {
+ if (child === a) {
+ // We've determined that A is the current branch.
+ assertIsMounted(parentA);
+ return fiber;
+ }
+
+ if (child === b) {
+ // We've determined that B is the current branch.
+ assertIsMounted(parentA);
+ return alternate;
+ }
+
+ child = child.sibling;
+ } // We should never have an alternate for any mounting node. So the only
+ // way this could possibly happen is if this was unmounted, if at all.
+
+
+ {
+ {
+ throw Error( "Unable to find node on an unmounted component." );
+ }
+ }
+ }
+
+ if (a.return !== b.return) {
+ // The return pointer of A and the return pointer of B point to different
+ // fibers. We assume that return pointers never criss-cross, so A must
+ // belong to the child set of A.return, and B must belong to the child
+ // set of B.return.
+ a = parentA;
+ b = parentB;
+ } else {
+ // The return pointers point to the same fiber. We'll have to use the
+ // default, slow path: scan the child sets of each parent alternate to see
+ // which child belongs to which set.
+ //
+ // Search parent A's child set
+ var didFindChild = false;
+ var _child = parentA.child;
+
+ while (_child) {
+ if (_child === a) {
+ didFindChild = true;
+ a = parentA;
+ b = parentB;
+ break;
+ }
+
+ if (_child === b) {
+ didFindChild = true;
+ b = parentA;
+ a = parentB;
+ break;
+ }
+
+ _child = _child.sibling;
+ }
+
+ if (!didFindChild) {
+ // Search parent B's child set
+ _child = parentB.child;
+
+ while (_child) {
+ if (_child === a) {
+ didFindChild = true;
+ a = parentB;
+ b = parentA;
+ break;
+ }
+
+ if (_child === b) {
+ didFindChild = true;
+ b = parentB;
+ a = parentA;
+ break;
+ }
+
+ _child = _child.sibling;
+ }
+
+ if (!didFindChild) {
+ {
+ throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
+ }
+ }
+ }
+ }
+
+ if (!(a.alternate === b)) {
+ {
+ throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+ } // If the root is not a host container, we're in a disconnected tree. I.e.
+ // unmounted.
+
+
+ if (!(a.tag === HostRoot)) {
+ {
+ throw Error( "Unable to find node on an unmounted component." );
+ }
+ }
+
+ if (a.stateNode.current === a) {
+ // We've determined that A is the current branch.
+ return fiber;
+ } // Otherwise B has to be current branch.
+
+
+ return alternate;
+}
+function findCurrentHostFiber(parent) {
+ var currentParent = findCurrentFiberUsingSlowPath(parent);
+
+ if (!currentParent) {
+ return null;
+ } // Next we'll drill down this component to find the first HostComponent/Text.
+
+
+ var node = currentParent;
+
+ while (true) {
+ if (node.tag === HostComponent || node.tag === HostText) {
+ return node;
+ } else if (node.child) {
+ node.child.return = node;
+ node = node.child;
+ continue;
+ }
+
+ if (node === currentParent) {
+ return null;
+ }
+
+ while (!node.sibling) {
+ if (!node.return || node.return === currentParent) {
+ return null;
+ }
+
+ node = node.return;
+ }
+
+ node.sibling.return = node.return;
+ node = node.sibling;
+ } // Flow needs the return null here, but ESLint complains about it.
+ // eslint-disable-next-line no-unreachable
+
+
+ return null;
+}
+function findCurrentHostFiberWithNoPortals(parent) {
+ var currentParent = findCurrentFiberUsingSlowPath(parent);
+
+ if (!currentParent) {
+ return null;
+ } // Next we'll drill down this component to find the first HostComponent/Text.
+
+
+ var node = currentParent;
+
+ while (true) {
+ if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
+ return node;
+ } else if (node.child && node.tag !== HostPortal) {
+ node.child.return = node;
+ node = node.child;
+ continue;
+ }
+
+ if (node === currentParent) {
+ return null;
+ }
+
+ while (!node.sibling) {
+ if (!node.return || node.return === currentParent) {
+ return null;
+ }
+
+ node = node.return;
+ }
+
+ node.sibling.return = node.return;
+ node = node.sibling;
+ } // Flow needs the return null here, but ESLint complains about it.
+ // eslint-disable-next-line no-unreachable
+
+
+ return null;
+}
+function doesFiberContain(parentFiber, childFiber) {
+ var node = childFiber;
+ var parentFiberAlternate = parentFiber.alternate;
+
+ while (node !== null) {
+ if (node === parentFiber || node === parentFiberAlternate) {
+ return true;
+ }
+
+ node = node.return;
+ }
+
+ return false;
+}
+
+var attemptUserBlockingHydration;
+function setAttemptUserBlockingHydration(fn) {
+ attemptUserBlockingHydration = fn;
+}
+var attemptContinuousHydration;
+function setAttemptContinuousHydration(fn) {
+ attemptContinuousHydration = fn;
+}
+var attemptHydrationAtCurrentPriority;
+function setAttemptHydrationAtCurrentPriority(fn) {
+ attemptHydrationAtCurrentPriority = fn;
+}
+var attemptHydrationAtPriority;
+function setAttemptHydrationAtPriority(fn) {
+ attemptHydrationAtPriority = fn;
+} // TODO: Upgrade this definition once we're on a newer version of Flow that
+var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
+
+var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
+// if the last target was dehydrated.
+
+var queuedFocus = null;
+var queuedDrag = null;
+var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
+
+var queuedPointers = new Map();
+var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
+
+var queuedExplicitHydrationTargets = [];
+function hasQueuedDiscreteEvents() {
+ return queuedDiscreteEvents.length > 0;
+}
+var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
+'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
+function isReplayableDiscreteEvent(eventType) {
+ return discreteReplayableEvents.indexOf(eventType) > -1;
+}
+
+function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ return {
+ blockedOn: blockedOn,
+ domEventName: domEventName,
+ eventSystemFlags: eventSystemFlags | IS_REPLAYED,
+ nativeEvent: nativeEvent,
+ targetContainers: [targetContainer]
+ };
+}
+
+function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
+ queuedDiscreteEvents.push(queuedEvent);
+} // Resets the replaying for this type of continuous event to no event.
+
+function clearIfContinuousEvent(domEventName, nativeEvent) {
+ switch (domEventName) {
+ case 'focusin':
+ case 'focusout':
+ queuedFocus = null;
+ break;
+
+ case 'dragenter':
+ case 'dragleave':
+ queuedDrag = null;
+ break;
+
+ case 'mouseover':
+ case 'mouseout':
+ queuedMouse = null;
+ break;
+
+ case 'pointerover':
+ case 'pointerout':
+ {
+ var pointerId = nativeEvent.pointerId;
+ queuedPointers.delete(pointerId);
+ break;
+ }
+
+ case 'gotpointercapture':
+ case 'lostpointercapture':
+ {
+ var _pointerId = nativeEvent.pointerId;
+ queuedPointerCaptures.delete(_pointerId);
+ break;
+ }
+ }
+}
+
+function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
+ var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
+
+ if (blockedOn !== null) {
+ var _fiber2 = getInstanceFromNode(blockedOn);
+
+ if (_fiber2 !== null) {
+ // Attempt to increase the priority of this target.
+ attemptContinuousHydration(_fiber2);
+ }
+ }
+
+ return queuedEvent;
+ } // If we have already queued this exact event, then it's because
+ // the different event systems have different DOM event listeners.
+ // We can accumulate the flags, and the targetContainers, and
+ // store a single event to be replayed.
+
+
+ existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
+ var targetContainers = existingQueuedEvent.targetContainers;
+
+ if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
+ targetContainers.push(targetContainer);
+ }
+
+ return existingQueuedEvent;
+}
+
+function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ // These set relatedTarget to null because the replayed event will be treated as if we
+ // moved from outside the window (no target) onto the target once it hydrates.
+ // Instead of mutating we could clone the event.
+ switch (domEventName) {
+ case 'focusin':
+ {
+ var focusEvent = nativeEvent;
+ queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
+ return true;
+ }
+
+ case 'dragenter':
+ {
+ var dragEvent = nativeEvent;
+ queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
+ return true;
+ }
+
+ case 'mouseover':
+ {
+ var mouseEvent = nativeEvent;
+ queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
+ return true;
+ }
+
+ case 'pointerover':
+ {
+ var pointerEvent = nativeEvent;
+ var pointerId = pointerEvent.pointerId;
+ queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
+ return true;
+ }
+
+ case 'gotpointercapture':
+ {
+ var _pointerEvent = nativeEvent;
+ var _pointerId2 = _pointerEvent.pointerId;
+ queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
+ return true;
+ }
+ }
+
+ return false;
+} // Check if this target is unblocked. Returns true if it's unblocked.
+
+function attemptExplicitHydrationTarget(queuedTarget) {
+ // TODO: This function shares a lot of logic with attemptToDispatchEvent.
+ // Try to unify them. It's a bit tricky since it would require two return
+ // values.
+ var targetInst = getClosestInstanceFromNode(queuedTarget.target);
+
+ if (targetInst !== null) {
+ var nearestMounted = getNearestMountedFiber(targetInst);
+
+ if (nearestMounted !== null) {
+ var tag = nearestMounted.tag;
+
+ if (tag === SuspenseComponent) {
+ var instance = getSuspenseInstanceFromFiber(nearestMounted);
+
+ if (instance !== null) {
+ // We're blocked on hydrating this boundary.
+ // Increase its priority.
+ queuedTarget.blockedOn = instance;
+ attemptHydrationAtPriority(queuedTarget.lanePriority, function () {
+ Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
+ attemptHydrationAtCurrentPriority(nearestMounted);
+ });
+ });
+ return;
+ }
+ } else if (tag === HostRoot) {
+ var root = nearestMounted.stateNode;
+
+ if (root.hydrate) {
+ queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
+ // a root other than sync.
+
+ return;
+ }
+ }
+ }
+ }
+
+ queuedTarget.blockedOn = null;
+}
+
+function attemptReplayContinuousQueuedEvent(queuedEvent) {
+ if (queuedEvent.blockedOn !== null) {
+ return false;
+ }
+
+ var targetContainers = queuedEvent.targetContainers;
+
+ while (targetContainers.length > 0) {
+ var targetContainer = targetContainers[0];
+ var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);
+
+ if (nextBlockedOn !== null) {
+ // We're still blocked. Try again later.
+ var _fiber3 = getInstanceFromNode(nextBlockedOn);
+
+ if (_fiber3 !== null) {
+ attemptContinuousHydration(_fiber3);
+ }
+
+ queuedEvent.blockedOn = nextBlockedOn;
+ return false;
+ } // This target container was successfully dispatched. Try the next.
+
+
+ targetContainers.shift();
+ }
+
+ return true;
+}
+
+function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
+ if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
+ map.delete(key);
+ }
+}
+
+function replayUnblockedEvents() {
+ hasScheduledReplayAttempt = false; // First replay discrete events.
+
+ while (queuedDiscreteEvents.length > 0) {
+ var nextDiscreteEvent = queuedDiscreteEvents[0];
+
+ if (nextDiscreteEvent.blockedOn !== null) {
+ // We're still blocked.
+ // Increase the priority of this boundary to unblock
+ // the next discrete event.
+ var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);
+
+ if (_fiber4 !== null) {
+ attemptUserBlockingHydration(_fiber4);
+ }
+
+ break;
+ }
+
+ var targetContainers = nextDiscreteEvent.targetContainers;
+
+ while (targetContainers.length > 0) {
+ var targetContainer = targetContainers[0];
+ var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);
+
+ if (nextBlockedOn !== null) {
+ // We're still blocked. Try again later.
+ nextDiscreteEvent.blockedOn = nextBlockedOn;
+ break;
+ } // This target container was successfully dispatched. Try the next.
+
+
+ targetContainers.shift();
+ }
+
+ if (nextDiscreteEvent.blockedOn === null) {
+ // We've successfully replayed the first event. Let's try the next one.
+ queuedDiscreteEvents.shift();
+ }
+ } // Next replay any continuous events.
+
+
+ if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
+ queuedFocus = null;
+ }
+
+ if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
+ queuedDrag = null;
+ }
+
+ if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
+ queuedMouse = null;
+ }
+
+ queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
+ queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
+}
+
+function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
+ if (queuedEvent.blockedOn === unblocked) {
+ queuedEvent.blockedOn = null;
+
+ if (!hasScheduledReplayAttempt) {
+ hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
+ // now unblocked. This first might not actually be unblocked yet.
+ // We could check it early to avoid scheduling an unnecessary callback.
+
+ Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
+ }
+ }
+}
+
+function retryIfBlockedOn(unblocked) {
+ // Mark anything that was blocked on this as no longer blocked
+ // and eligible for a replay.
+ if (queuedDiscreteEvents.length > 0) {
+ scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
+ // worth it because we expect very few discrete events to queue up and once
+ // we are actually fully unblocked it will be fast to replay them.
+
+ for (var i = 1; i < queuedDiscreteEvents.length; i++) {
+ var queuedEvent = queuedDiscreteEvents[i];
+
+ if (queuedEvent.blockedOn === unblocked) {
+ queuedEvent.blockedOn = null;
+ }
+ }
+ }
+
+ if (queuedFocus !== null) {
+ scheduleCallbackIfUnblocked(queuedFocus, unblocked);
+ }
+
+ if (queuedDrag !== null) {
+ scheduleCallbackIfUnblocked(queuedDrag, unblocked);
+ }
+
+ if (queuedMouse !== null) {
+ scheduleCallbackIfUnblocked(queuedMouse, unblocked);
+ }
+
+ var unblock = function (queuedEvent) {
+ return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
+ };
+
+ queuedPointers.forEach(unblock);
+ queuedPointerCaptures.forEach(unblock);
+
+ for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
+ var queuedTarget = queuedExplicitHydrationTargets[_i];
+
+ if (queuedTarget.blockedOn === unblocked) {
+ queuedTarget.blockedOn = null;
+ }
+ }
+
+ while (queuedExplicitHydrationTargets.length > 0) {
+ var nextExplicitTarget = queuedExplicitHydrationTargets[0];
+
+ if (nextExplicitTarget.blockedOn !== null) {
+ // We're still blocked.
+ break;
+ } else {
+ attemptExplicitHydrationTarget(nextExplicitTarget);
+
+ if (nextExplicitTarget.blockedOn === null) {
+ // We're unblocked.
+ queuedExplicitHydrationTargets.shift();
+ }
+ }
+ }
+}
+
+var DiscreteEvent = 0;
+var UserBlockingEvent = 1;
+var ContinuousEvent = 2;
+
+/**
+ * Generate a mapping of standard vendor prefixes using the defined style property and event name.
+ *
+ * @param {string} styleProp
+ * @param {string} eventName
+ * @returns {object}
+ */
+
+function makePrefixMap(styleProp, eventName) {
+ var prefixes = {};
+ prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
+ prefixes['Webkit' + styleProp] = 'webkit' + eventName;
+ prefixes['Moz' + styleProp] = 'moz' + eventName;
+ return prefixes;
+}
+/**
+ * A list of event names to a configurable list of vendor prefixes.
+ */
+
+
+var vendorPrefixes = {
+ animationend: makePrefixMap('Animation', 'AnimationEnd'),
+ animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
+ animationstart: makePrefixMap('Animation', 'AnimationStart'),
+ transitionend: makePrefixMap('Transition', 'TransitionEnd')
+};
+/**
+ * Event names that have already been detected and prefixed (if applicable).
+ */
+
+var prefixedEventNames = {};
+/**
+ * Element to check for prefixes on.
+ */
+
+var style = {};
+/**
+ * Bootstrap if a DOM exists.
+ */
+
+if (canUseDOM) {
+ style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
+ // the un-prefixed "animation" and "transition" properties are defined on the
+ // style object but the events that fire will still be prefixed, so we need
+ // to check if the un-prefixed events are usable, and if not remove them from the map.
+
+ if (!('AnimationEvent' in window)) {
+ delete vendorPrefixes.animationend.animation;
+ delete vendorPrefixes.animationiteration.animation;
+ delete vendorPrefixes.animationstart.animation;
+ } // Same as above
+
+
+ if (!('TransitionEvent' in window)) {
+ delete vendorPrefixes.transitionend.transition;
+ }
+}
+/**
+ * Attempts to determine the correct vendor prefixed event name.
+ *
+ * @param {string} eventName
+ * @returns {string}
+ */
+
+
+function getVendorPrefixedEventName(eventName) {
+ if (prefixedEventNames[eventName]) {
+ return prefixedEventNames[eventName];
+ } else if (!vendorPrefixes[eventName]) {
+ return eventName;
+ }
+
+ var prefixMap = vendorPrefixes[eventName];
+
+ for (var styleProp in prefixMap) {
+ if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
+ return prefixedEventNames[eventName] = prefixMap[styleProp];
+ }
+ }
+
+ return eventName;
+}
+
+var ANIMATION_END = getVendorPrefixedEventName('animationend');
+var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
+var ANIMATION_START = getVendorPrefixedEventName('animationstart');
+var TRANSITION_END = getVendorPrefixedEventName('transitionend');
+
+var topLevelEventsToReactNames = new Map();
+var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
+// the code required to apply the same logic for event prioritization and that of the
+// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
+// duplication (for which there would be quite a bit). For the events that are not needed
+// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
+// array of top level events.
+// Lastly, we ignore prettier so we can keep the formatting sane.
+// prettier-ignore
+
+var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!
+'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!
+'focusout', 'blur', // Careful!
+'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange'];
+var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];
+
+
+var userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore
+
+var continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting'];
+/**
+ * Turns
+ * ['abort', ...]
+ *
+ * into
+ *
+ * topLevelEventsToReactNames = new Map([
+ * ['abort', 'onAbort'],
+ * ]);
+ *
+ * and registers them.
+ */
+
+function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {
+ // As the event types are in pairs of two, we need to iterate
+ // through in twos. The events are in pairs of two to save code
+ // and improve init perf of processing this array, as it will
+ // result in far fewer object allocations and property accesses
+ // if we only use three arrays to process all the categories of
+ // instead of tuples.
+ for (var i = 0; i < eventTypes.length; i += 2) {
+ var topEvent = eventTypes[i];
+ var event = eventTypes[i + 1];
+ var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
+ var reactName = 'on' + capitalizedEvent;
+ eventPriorities.set(topEvent, priority);
+ topLevelEventsToReactNames.set(topEvent, reactName);
+ registerTwoPhaseEvent(reactName, [topEvent]);
+ }
+}
+
+function setEventPriorities(eventTypes, priority) {
+ for (var i = 0; i < eventTypes.length; i++) {
+ eventPriorities.set(eventTypes[i], priority);
+ }
+}
+
+function getEventPriorityForPluginSystem(domEventName) {
+ var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might
+ // want to warn if we can't detect the priority
+ // for the event.
+
+ return priority === undefined ? ContinuousEvent : priority;
+}
+function registerSimpleEvents() {
+ registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
+ registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
+ registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);
+ setEventPriorities(otherDiscreteEvents, DiscreteEvent);
+}
+
+var Scheduler_now = Scheduler.unstable_now;
+
+{
+ // Provide explicit error message when production+profiling bundle of e.g.
+ // react-dom is used with production (non-profiling) bundle of
+ // scheduler/tracing
+ if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
+ {
+ throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
+ }
+ }
+}
+// ascending numbers so we can compare them like numbers. They start at 90 to
+// avoid clashing with Scheduler's priorities.
+
+var ImmediatePriority = 99;
+var UserBlockingPriority = 98;
+var NormalPriority = 97;
+var LowPriority = 96;
+var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
+
+var NoPriority = 90;
+var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
+
+var SyncLanePriority = 15;
+var SyncBatchedLanePriority = 14;
+var InputDiscreteHydrationLanePriority = 13;
+var InputDiscreteLanePriority = 12;
+var InputContinuousHydrationLanePriority = 11;
+var InputContinuousLanePriority = 10;
+var DefaultHydrationLanePriority = 9;
+var DefaultLanePriority = 8;
+var TransitionHydrationPriority = 7;
+var TransitionPriority = 6;
+var RetryLanePriority = 5;
+var SelectiveHydrationLanePriority = 4;
+var IdleHydrationLanePriority = 3;
+var IdleLanePriority = 2;
+var OffscreenLanePriority = 1;
+var NoLanePriority = 0;
+var TotalLanes = 31;
+var NoLanes =
+/* */
+0;
+var NoLane =
+/* */
+0;
+var SyncLane =
+/* */
+1;
+var SyncBatchedLane =
+/* */
+2;
+var InputDiscreteHydrationLane =
+/* */
+4;
+var InputDiscreteLanes =
+/* */
+24;
+var InputContinuousHydrationLane =
+/* */
+32;
+var InputContinuousLanes =
+/* */
+192;
+var DefaultHydrationLane =
+/* */
+256;
+var DefaultLanes =
+/* */
+3584;
+var TransitionHydrationLane =
+/* */
+4096;
+var TransitionLanes =
+/* */
+4186112;
+var RetryLanes =
+/* */
+62914560;
+var SomeRetryLane =
+/* */
+33554432;
+var SelectiveHydrationLane =
+/* */
+67108864;
+var NonIdleLanes =
+/* */
+134217727;
+var IdleHydrationLane =
+/* */
+134217728;
+var IdleLanes =
+/* */
+805306368;
+var OffscreenLane =
+/* */
+1073741824;
+var NoTimestamp = -1;
+function setCurrentUpdateLanePriority(newLanePriority) {
+} // "Registers" used to "return" multiple values
+// Used by getHighestPriorityLanes and getNextLanes:
+
+var return_highestLanePriority = DefaultLanePriority;
+
+function getHighestPriorityLanes(lanes) {
+ if ((SyncLane & lanes) !== NoLanes) {
+ return_highestLanePriority = SyncLanePriority;
+ return SyncLane;
+ }
+
+ if ((SyncBatchedLane & lanes) !== NoLanes) {
+ return_highestLanePriority = SyncBatchedLanePriority;
+ return SyncBatchedLane;
+ }
+
+ if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {
+ return_highestLanePriority = InputDiscreteHydrationLanePriority;
+ return InputDiscreteHydrationLane;
+ }
+
+ var inputDiscreteLanes = InputDiscreteLanes & lanes;
+
+ if (inputDiscreteLanes !== NoLanes) {
+ return_highestLanePriority = InputDiscreteLanePriority;
+ return inputDiscreteLanes;
+ }
+
+ if ((lanes & InputContinuousHydrationLane) !== NoLanes) {
+ return_highestLanePriority = InputContinuousHydrationLanePriority;
+ return InputContinuousHydrationLane;
+ }
+
+ var inputContinuousLanes = InputContinuousLanes & lanes;
+
+ if (inputContinuousLanes !== NoLanes) {
+ return_highestLanePriority = InputContinuousLanePriority;
+ return inputContinuousLanes;
+ }
+
+ if ((lanes & DefaultHydrationLane) !== NoLanes) {
+ return_highestLanePriority = DefaultHydrationLanePriority;
+ return DefaultHydrationLane;
+ }
+
+ var defaultLanes = DefaultLanes & lanes;
+
+ if (defaultLanes !== NoLanes) {
+ return_highestLanePriority = DefaultLanePriority;
+ return defaultLanes;
+ }
+
+ if ((lanes & TransitionHydrationLane) !== NoLanes) {
+ return_highestLanePriority = TransitionHydrationPriority;
+ return TransitionHydrationLane;
+ }
+
+ var transitionLanes = TransitionLanes & lanes;
+
+ if (transitionLanes !== NoLanes) {
+ return_highestLanePriority = TransitionPriority;
+ return transitionLanes;
+ }
+
+ var retryLanes = RetryLanes & lanes;
+
+ if (retryLanes !== NoLanes) {
+ return_highestLanePriority = RetryLanePriority;
+ return retryLanes;
+ }
+
+ if (lanes & SelectiveHydrationLane) {
+ return_highestLanePriority = SelectiveHydrationLanePriority;
+ return SelectiveHydrationLane;
+ }
+
+ if ((lanes & IdleHydrationLane) !== NoLanes) {
+ return_highestLanePriority = IdleHydrationLanePriority;
+ return IdleHydrationLane;
+ }
+
+ var idleLanes = IdleLanes & lanes;
+
+ if (idleLanes !== NoLanes) {
+ return_highestLanePriority = IdleLanePriority;
+ return idleLanes;
+ }
+
+ if ((OffscreenLane & lanes) !== NoLanes) {
+ return_highestLanePriority = OffscreenLanePriority;
+ return OffscreenLane;
+ }
+
+ {
+ error('Should have found matching lanes. This is a bug in React.');
+ } // This shouldn't be reachable, but as a fallback, return the entire bitmask.
+
+
+ return_highestLanePriority = DefaultLanePriority;
+ return lanes;
+}
+
+function schedulerPriorityToLanePriority(schedulerPriorityLevel) {
+ switch (schedulerPriorityLevel) {
+ case ImmediatePriority:
+ return SyncLanePriority;
+
+ case UserBlockingPriority:
+ return InputContinuousLanePriority;
+
+ case NormalPriority:
+ case LowPriority:
+ // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
+ return DefaultLanePriority;
+
+ case IdlePriority:
+ return IdleLanePriority;
+
+ default:
+ return NoLanePriority;
+ }
+}
+function lanePriorityToSchedulerPriority(lanePriority) {
+ switch (lanePriority) {
+ case SyncLanePriority:
+ case SyncBatchedLanePriority:
+ return ImmediatePriority;
+
+ case InputDiscreteHydrationLanePriority:
+ case InputDiscreteLanePriority:
+ case InputContinuousHydrationLanePriority:
+ case InputContinuousLanePriority:
+ return UserBlockingPriority;
+
+ case DefaultHydrationLanePriority:
+ case DefaultLanePriority:
+ case TransitionHydrationPriority:
+ case TransitionPriority:
+ case SelectiveHydrationLanePriority:
+ case RetryLanePriority:
+ return NormalPriority;
+
+ case IdleHydrationLanePriority:
+ case IdleLanePriority:
+ case OffscreenLanePriority:
+ return IdlePriority;
+
+ case NoLanePriority:
+ return NoPriority;
+
+ default:
+ {
+ {
+ throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
+ }
+ }
+
+ }
+}
+function getNextLanes(root, wipLanes) {
+ // Early bailout if there's no pending work left.
+ var pendingLanes = root.pendingLanes;
+
+ if (pendingLanes === NoLanes) {
+ return_highestLanePriority = NoLanePriority;
+ return NoLanes;
+ }
+
+ var nextLanes = NoLanes;
+ var nextLanePriority = NoLanePriority;
+ var expiredLanes = root.expiredLanes;
+ var suspendedLanes = root.suspendedLanes;
+ var pingedLanes = root.pingedLanes; // Check if any work has expired.
+
+ if (expiredLanes !== NoLanes) {
+ nextLanes = expiredLanes;
+ nextLanePriority = return_highestLanePriority = SyncLanePriority;
+ } else {
+ // Do not work on any idle work until all the non-idle work has finished,
+ // even if the work is suspended.
+ var nonIdlePendingLanes = pendingLanes & NonIdleLanes;
+
+ if (nonIdlePendingLanes !== NoLanes) {
+ var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;
+
+ if (nonIdleUnblockedLanes !== NoLanes) {
+ nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
+ nextLanePriority = return_highestLanePriority;
+ } else {
+ var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;
+
+ if (nonIdlePingedLanes !== NoLanes) {
+ nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
+ nextLanePriority = return_highestLanePriority;
+ }
+ }
+ } else {
+ // The only remaining work is Idle.
+ var unblockedLanes = pendingLanes & ~suspendedLanes;
+
+ if (unblockedLanes !== NoLanes) {
+ nextLanes = getHighestPriorityLanes(unblockedLanes);
+ nextLanePriority = return_highestLanePriority;
+ } else {
+ if (pingedLanes !== NoLanes) {
+ nextLanes = getHighestPriorityLanes(pingedLanes);
+ nextLanePriority = return_highestLanePriority;
+ }
+ }
+ }
+ }
+
+ if (nextLanes === NoLanes) {
+ // This should only be reachable if we're suspended
+ // TODO: Consider warning in this path if a fallback timer is not scheduled.
+ return NoLanes;
+ } // If there are higher priority lanes, we'll include them even if they
+ // are suspended.
+
+
+ nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt
+ // it and we'll lose our progress. We should only do this if the new lanes are
+ // higher priority.
+
+ if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
+ // bother waiting until the root is complete.
+ (wipLanes & suspendedLanes) === NoLanes) {
+ getHighestPriorityLanes(wipLanes);
+ var wipLanePriority = return_highestLanePriority;
+
+ if (nextLanePriority <= wipLanePriority) {
+ return wipLanes;
+ } else {
+ return_highestLanePriority = nextLanePriority;
+ }
+ } // Check for entangled lanes and add them to the batch.
+ //
+ // A lane is said to be entangled with another when it's not allowed to render
+ // in a batch that does not also include the other lane. Typically we do this
+ // when multiple updates have the same source, and we only want to respond to
+ // the most recent event from that source.
+ //
+ // Note that we apply entanglements *after* checking for partial work above.
+ // This means that if a lane is entangled during an interleaved event while
+ // it's already rendering, we won't interrupt it. This is intentional, since
+ // entanglement is usually "best effort": we'll try our best to render the
+ // lanes in the same batch, but it's not worth throwing out partially
+ // completed work in order to do it.
+ //
+ // For those exceptions where entanglement is semantically important, like
+ // useMutableSource, we should ensure that there is no partial work at the
+ // time we apply the entanglement.
+
+
+ var entangledLanes = root.entangledLanes;
+
+ if (entangledLanes !== NoLanes) {
+ var entanglements = root.entanglements;
+ var lanes = nextLanes & entangledLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ nextLanes |= entanglements[index];
+ lanes &= ~lane;
+ }
+ }
+
+ return nextLanes;
+}
+function getMostRecentEventTime(root, lanes) {
+ var eventTimes = root.eventTimes;
+ var mostRecentEventTime = NoTimestamp;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ var eventTime = eventTimes[index];
+
+ if (eventTime > mostRecentEventTime) {
+ mostRecentEventTime = eventTime;
+ }
+
+ lanes &= ~lane;
+ }
+
+ return mostRecentEventTime;
+}
+
+function computeExpirationTime(lane, currentTime) {
+ // TODO: Expiration heuristic is constant per lane, so could use a map.
+ getHighestPriorityLanes(lane);
+ var priority = return_highestLanePriority;
+
+ if (priority >= InputContinuousLanePriority) {
+ // User interactions should expire slightly more quickly.
+ //
+ // NOTE: This is set to the corresponding constant as in Scheduler.js. When
+ // we made it larger, a product metric in www regressed, suggesting there's
+ // a user interaction that's being starved by a series of synchronous
+ // updates. If that theory is correct, the proper solution is to fix the
+ // starvation. However, this scenario supports the idea that expiration
+ // times are an important safeguard when starvation does happen.
+ //
+ // Also note that, in the case of user input specifically, this will soon no
+ // longer be an issue because we plan to make user input synchronous by
+ // default (until you enter `startTransition`, of course.)
+ //
+ // If weren't planning to make these updates synchronous soon anyway, I
+ // would probably make this number a configurable parameter.
+ return currentTime + 250;
+ } else if (priority >= TransitionPriority) {
+ return currentTime + 5000;
+ } else {
+ // Anything idle priority or lower should never expire.
+ return NoTimestamp;
+ }
+}
+
+function markStarvedLanesAsExpired(root, currentTime) {
+ // TODO: This gets called every time we yield. We can optimize by storing
+ // the earliest expiration time on the root. Then use that to quickly bail out
+ // of this function.
+ var pendingLanes = root.pendingLanes;
+ var suspendedLanes = root.suspendedLanes;
+ var pingedLanes = root.pingedLanes;
+ var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
+ // expiration time. If so, we'll assume the update is being starved and mark
+ // it as expired to force it to finish.
+
+ var lanes = pendingLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ var expirationTime = expirationTimes[index];
+
+ if (expirationTime === NoTimestamp) {
+ // Found a pending lane with no expiration time. If it's not suspended, or
+ // if it's pinged, assume it's CPU-bound. Compute a new expiration time
+ // using the current time.
+ if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
+ // Assumes timestamps are monotonically increasing.
+ expirationTimes[index] = computeExpirationTime(lane, currentTime);
+ }
+ } else if (expirationTime <= currentTime) {
+ // This lane expired
+ root.expiredLanes |= lane;
+ }
+
+ lanes &= ~lane;
+ }
+} // This returns the highest priority pending lanes regardless of whether they
+function getLanesToRetrySynchronouslyOnError(root) {
+ var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
+
+ if (everythingButOffscreen !== NoLanes) {
+ return everythingButOffscreen;
+ }
+
+ if (everythingButOffscreen & OffscreenLane) {
+ return OffscreenLane;
+ }
+
+ return NoLanes;
+}
+function returnNextLanesPriority() {
+ return return_highestLanePriority;
+}
+function includesNonIdleWork(lanes) {
+ return (lanes & NonIdleLanes) !== NoLanes;
+}
+function includesOnlyRetries(lanes) {
+ return (lanes & RetryLanes) === lanes;
+}
+function includesOnlyTransitions(lanes) {
+ return (lanes & TransitionLanes) === lanes;
+} // To ensure consistency across multiple updates in the same event, this should
+// be a pure function, so that it always returns the same lane for given inputs.
+
+function findUpdateLane(lanePriority, wipLanes) {
+ switch (lanePriority) {
+ case NoLanePriority:
+ break;
+
+ case SyncLanePriority:
+ return SyncLane;
+
+ case SyncBatchedLanePriority:
+ return SyncBatchedLane;
+
+ case InputDiscreteLanePriority:
+ {
+ var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);
+
+ if (_lane === NoLane) {
+ // Shift to the next priority level
+ return findUpdateLane(InputContinuousLanePriority, wipLanes);
+ }
+
+ return _lane;
+ }
+
+ case InputContinuousLanePriority:
+ {
+ var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);
+
+ if (_lane2 === NoLane) {
+ // Shift to the next priority level
+ return findUpdateLane(DefaultLanePriority, wipLanes);
+ }
+
+ return _lane2;
+ }
+
+ case DefaultLanePriority:
+ {
+ var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);
+
+ if (_lane3 === NoLane) {
+ // If all the default lanes are already being worked on, look for a
+ // lane in the transition range.
+ _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);
+
+ if (_lane3 === NoLane) {
+ // All the transition lanes are taken, too. This should be very
+ // rare, but as a last resort, pick a default lane. This will have
+ // the effect of interrupting the current work-in-progress render.
+ _lane3 = pickArbitraryLane(DefaultLanes);
+ }
+ }
+
+ return _lane3;
+ }
+
+ case TransitionPriority: // Should be handled by findTransitionLane instead
+
+ case RetryLanePriority:
+ // Should be handled by findRetryLane instead
+ break;
+
+ case IdleLanePriority:
+ var lane = pickArbitraryLane(IdleLanes & ~wipLanes);
+
+ if (lane === NoLane) {
+ lane = pickArbitraryLane(IdleLanes);
+ }
+
+ return lane;
+ }
+
+ {
+ {
+ throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
+ }
+ }
+} // To ensure consistency across multiple updates in the same event, this should
+// be pure function, so that it always returns the same lane for given inputs.
+
+function findTransitionLane(wipLanes, pendingLanes) {
+ // First look for lanes that are completely unclaimed, i.e. have no
+ // pending work.
+ var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);
+
+ if (lane === NoLane) {
+ // If all lanes have pending work, look for a lane that isn't currently
+ // being worked on.
+ lane = pickArbitraryLane(TransitionLanes & ~wipLanes);
+
+ if (lane === NoLane) {
+ // If everything is being worked on, pick any lane. This has the
+ // effect of interrupting the current work-in-progress.
+ lane = pickArbitraryLane(TransitionLanes);
+ }
+ }
+
+ return lane;
+} // To ensure consistency across multiple updates in the same event, this should
+// be pure function, so that it always returns the same lane for given inputs.
+
+function findRetryLane(wipLanes) {
+ // This is a fork of `findUpdateLane` designed specifically for Suspense
+ // "retries" — a special update that attempts to flip a Suspense boundary
+ // from its placeholder state to its primary/resolved state.
+ var lane = pickArbitraryLane(RetryLanes & ~wipLanes);
+
+ if (lane === NoLane) {
+ lane = pickArbitraryLane(RetryLanes);
+ }
+
+ return lane;
+}
+
+function getHighestPriorityLane(lanes) {
+ return lanes & -lanes;
+}
+
+function getLowestPriorityLane(lanes) {
+ // This finds the most significant non-zero bit.
+ var index = 31 - clz32(lanes);
+ return index < 0 ? NoLanes : 1 << index;
+}
+
+function getEqualOrHigherPriorityLanes(lanes) {
+ return (getLowestPriorityLane(lanes) << 1) - 1;
+}
+
+function pickArbitraryLane(lanes) {
+ // This wrapper function gets inlined. Only exists so to communicate that it
+ // doesn't matter which bit is selected; you can pick any bit without
+ // affecting the algorithms where its used. Here I'm using
+ // getHighestPriorityLane because it requires the fewest operations.
+ return getHighestPriorityLane(lanes);
+}
+
+function pickArbitraryLaneIndex(lanes) {
+ return 31 - clz32(lanes);
+}
+
+function laneToIndex(lane) {
+ return pickArbitraryLaneIndex(lane);
+}
+
+function includesSomeLane(a, b) {
+ return (a & b) !== NoLanes;
+}
+function isSubsetOfLanes(set, subset) {
+ return (set & subset) === subset;
+}
+function mergeLanes(a, b) {
+ return a | b;
+}
+function removeLanes(set, subset) {
+ return set & ~subset;
+} // Seems redundant, but it changes the type from a single lane (used for
+// updates) to a group of lanes (used for flushing work).
+
+function laneToLanes(lane) {
+ return lane;
+}
+function higherPriorityLane(a, b) {
+ // This works because the bit ranges decrease in priority as you go left.
+ return a !== NoLane && a < b ? a : b;
+}
+function createLaneMap(initial) {
+ // Intentionally pushing one by one.
+ // https://v8.dev/blog/elements-kinds#avoid-creating-holes
+ var laneMap = [];
+
+ for (var i = 0; i < TotalLanes; i++) {
+ laneMap.push(initial);
+ }
+
+ return laneMap;
+}
+function markRootUpdated(root, updateLane, eventTime) {
+ root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But
+ // it's not practical to try every single possible combination. We need a
+ // heuristic to decide which lanes to attempt to render, and in which batches.
+ // For now, we use the same heuristic as in the old ExpirationTimes model:
+ // retry any lane at equal or lower priority, but don't try updates at higher
+ // priority without also including the lower priority updates. This works well
+ // when considering updates across different priority levels, but isn't
+ // sufficient for updates within the same priority, since we want to treat
+ // those updates as parallel.
+ // Unsuspend any update at equal or lower priority.
+
+ var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111
+
+ root.suspendedLanes &= higherPriorityLanes;
+ root.pingedLanes &= higherPriorityLanes;
+ var eventTimes = root.eventTimes;
+ var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
+ // recent event, and we assume time is monotonically increasing.
+
+ eventTimes[index] = eventTime;
+}
+function markRootSuspended(root, suspendedLanes) {
+ root.suspendedLanes |= suspendedLanes;
+ root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.
+
+ var expirationTimes = root.expirationTimes;
+ var lanes = suspendedLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ expirationTimes[index] = NoTimestamp;
+ lanes &= ~lane;
+ }
+}
+function markRootPinged(root, pingedLanes, eventTime) {
+ root.pingedLanes |= root.suspendedLanes & pingedLanes;
+}
+function markDiscreteUpdatesExpired(root) {
+ root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;
+}
+function hasDiscreteLanes(lanes) {
+ return (lanes & InputDiscreteLanes) !== NoLanes;
+}
+function markRootMutableRead(root, updateLane) {
+ root.mutableReadLanes |= updateLane & root.pendingLanes;
+}
+function markRootFinished(root, remainingLanes) {
+ var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
+ root.pendingLanes = remainingLanes; // Let's try everything again
+
+ root.suspendedLanes = 0;
+ root.pingedLanes = 0;
+ root.expiredLanes &= remainingLanes;
+ root.mutableReadLanes &= remainingLanes;
+ root.entangledLanes &= remainingLanes;
+ var entanglements = root.entanglements;
+ var eventTimes = root.eventTimes;
+ var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work
+
+ var lanes = noLongerPendingLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ entanglements[index] = NoLanes;
+ eventTimes[index] = NoTimestamp;
+ expirationTimes[index] = NoTimestamp;
+ lanes &= ~lane;
+ }
+}
+function markRootEntangled(root, entangledLanes) {
+ root.entangledLanes |= entangledLanes;
+ var entanglements = root.entanglements;
+ var lanes = entangledLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ entanglements[index] |= entangledLanes;
+ lanes &= ~lane;
+ }
+}
+var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.
+// Based on:
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
+
+var log = Math.log;
+var LN2 = Math.LN2;
+
+function clz32Fallback(lanes) {
+ if (lanes === 0) {
+ return 32;
+ }
+
+ return 31 - (log(lanes) / LN2 | 0) | 0;
+}
+
+// Intentionally not named imports because Rollup would use dynamic dispatch for
+var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority,
+ runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?
+
+var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
+// We'd like to remove this but it's not clear if this is safe.
+
+function setEnabled(enabled) {
+ _enabled = !!enabled;
+}
+function isEnabled() {
+ return _enabled;
+}
+function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
+ var eventPriority = getEventPriorityForPluginSystem(domEventName);
+ var listenerWrapper;
+
+ switch (eventPriority) {
+ case DiscreteEvent:
+ listenerWrapper = dispatchDiscreteEvent;
+ break;
+
+ case UserBlockingEvent:
+ listenerWrapper = dispatchUserBlockingUpdate;
+ break;
+
+ case ContinuousEvent:
+ default:
+ listenerWrapper = dispatchEvent;
+ break;
+ }
+
+ return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
+}
+
+function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
+ {
+ flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
+ }
+
+ discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);
+}
+
+function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {
+ {
+ runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));
+ }
+}
+
+function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ if (!_enabled) {
+ return;
+ }
+
+ var allowReplay = true;
+
+ {
+ // TODO: replaying capture phase events is currently broken
+ // because we used to do it during top-level native bubble handlers
+ // but now we use different bubble and capture handlers.
+ // In eager mode, we attach capture listeners early, so we need
+ // to filter them out until we fix the logic to handle them correctly.
+ // This could've been outside the flag but I put it inside to reduce risk.
+ allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;
+ }
+
+ if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {
+ // If we already have a queue of discrete events, and this is another discrete
+ // event, then we can't dispatch it regardless of its target, since they
+ // need to dispatch in order.
+ queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
+ domEventName, eventSystemFlags, targetContainer, nativeEvent);
+ return;
+ }
+
+ var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
+
+ if (blockedOn === null) {
+ // We successfully dispatched this event.
+ if (allowReplay) {
+ clearIfContinuousEvent(domEventName, nativeEvent);
+ }
+
+ return;
+ }
+
+ if (allowReplay) {
+ if (isReplayableDiscreteEvent(domEventName)) {
+ // This this to be replayed later once the target is available.
+ queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
+ return;
+ }
+
+ if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
+ return;
+ } // We need to clear only if we didn't queue because
+ // queueing is accummulative.
+
+
+ clearIfContinuousEvent(domEventName, nativeEvent);
+ } // This is not replayable so we'll invoke it but without a target,
+ // in case the event system needs to trace it.
+
+
+ dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
+} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
+
+function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ // TODO: Warn if _enabled is false.
+ var nativeEventTarget = getEventTarget(nativeEvent);
+ var targetInst = getClosestInstanceFromNode(nativeEventTarget);
+
+ if (targetInst !== null) {
+ var nearestMounted = getNearestMountedFiber(targetInst);
+
+ if (nearestMounted === null) {
+ // This tree has been unmounted already. Dispatch without a target.
+ targetInst = null;
+ } else {
+ var tag = nearestMounted.tag;
+
+ if (tag === SuspenseComponent) {
+ var instance = getSuspenseInstanceFromFiber(nearestMounted);
+
+ if (instance !== null) {
+ // Queue the event to be replayed later. Abort dispatching since we
+ // don't want this event dispatched twice through the event system.
+ // TODO: If this is the first discrete event in the queue. Schedule an increased
+ // priority for this boundary.
+ return instance;
+ } // This shouldn't happen, something went wrong but to avoid blocking
+ // the whole system, dispatch the event without a target.
+ // TODO: Warn.
+
+
+ targetInst = null;
+ } else if (tag === HostRoot) {
+ var root = nearestMounted.stateNode;
+
+ if (root.hydrate) {
+ // If this happens during a replay something went wrong and it might block
+ // the whole system.
+ return getContainerFromFiber(nearestMounted);
+ }
+
+ targetInst = null;
+ } else if (nearestMounted !== targetInst) {
+ // If we get an event (ex: img onload) before committing that
+ // component's mount, ignore it for now (that is, treat it as if it was an
+ // event on a non-React tree). We might also consider queueing events and
+ // dispatching them after the mount.
+ targetInst = null;
+ }
+ }
+ }
+
+ dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.
+
+ return null;
+}
+
+function addEventBubbleListener(target, eventType, listener) {
+ target.addEventListener(eventType, listener, false);
+ return listener;
+}
+function addEventCaptureListener(target, eventType, listener) {
+ target.addEventListener(eventType, listener, true);
+ return listener;
+}
+function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
+ target.addEventListener(eventType, listener, {
+ capture: true,
+ passive: passive
+ });
+ return listener;
+}
+function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
+ target.addEventListener(eventType, listener, {
+ passive: passive
+ });
+ return listener;
+}
+
+/**
+ * These variables store information about text content of a target node,
+ * allowing comparison of content before and after a given event.
+ *
+ * Identify the node where selection currently begins, then observe
+ * both its text content and its current position in the DOM. Since the
+ * browser may natively replace the target node during composition, we can
+ * use its position to find its replacement.
+ *
+ *
+ */
+var root = null;
+var startText = null;
+var fallbackText = null;
+function initialize(nativeEventTarget) {
+ root = nativeEventTarget;
+ startText = getText();
+ return true;
+}
+function reset() {
+ root = null;
+ startText = null;
+ fallbackText = null;
+}
+function getData() {
+ if (fallbackText) {
+ return fallbackText;
+ }
+
+ var start;
+ var startValue = startText;
+ var startLength = startValue.length;
+ var end;
+ var endValue = getText();
+ var endLength = endValue.length;
+
+ for (start = 0; start < startLength; start++) {
+ if (startValue[start] !== endValue[start]) {
+ break;
+ }
+ }
+
+ var minEnd = startLength - start;
+
+ for (end = 1; end <= minEnd; end++) {
+ if (startValue[startLength - end] !== endValue[endLength - end]) {
+ break;
+ }
+ }
+
+ var sliceTail = end > 1 ? 1 - end : undefined;
+ fallbackText = endValue.slice(start, sliceTail);
+ return fallbackText;
+}
+function getText() {
+ if ('value' in root) {
+ return root.value;
+ }
+
+ return root.textContent;
+}
+
+/**
+ * `charCode` represents the actual "character code" and is safe to use with
+ * `String.fromCharCode`. As such, only keys that correspond to printable
+ * characters produce a valid `charCode`, the only exception to this is Enter.
+ * The Tab-key is considered non-printable and does not have a `charCode`,
+ * presumably because it does not produce a tab-character in browsers.
+ *
+ * @param {object} nativeEvent Native browser event.
+ * @return {number} Normalized `charCode` property.
+ */
+function getEventCharCode(nativeEvent) {
+ var charCode;
+ var keyCode = nativeEvent.keyCode;
+
+ if ('charCode' in nativeEvent) {
+ charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
+
+ if (charCode === 0 && keyCode === 13) {
+ charCode = 13;
+ }
+ } else {
+ // IE8 does not implement `charCode`, but `keyCode` has the correct value.
+ charCode = keyCode;
+ } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
+ // report Enter as charCode 10 when ctrl is pressed.
+
+
+ if (charCode === 10) {
+ charCode = 13;
+ } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
+ // Must not discard the (non-)printable Enter-key.
+
+
+ if (charCode >= 32 || charCode === 13) {
+ return charCode;
+ }
+
+ return 0;
+}
+
+function functionThatReturnsTrue() {
+ return true;
+}
+
+function functionThatReturnsFalse() {
+ return false;
+} // This is intentionally a factory so that we have different returned constructors.
+// If we had a single constructor, it would be megamorphic and engines would deopt.
+
+
+function createSyntheticEvent(Interface) {
+ /**
+ * Synthetic events are dispatched by event plugins, typically in response to a
+ * top-level event delegation handler.
+ *
+ * These systems should generally use pooling to reduce the frequency of garbage
+ * collection. The system should check `isPersistent` to determine whether the
+ * event should be released into the pool after being dispatched. Users that
+ * need a persisted event should invoke `persist`.
+ *
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
+ * DOM interface; custom application-specific events can also subclass this.
+ */
+ function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
+ this._reactName = reactName;
+ this._targetInst = targetInst;
+ this.type = reactEventType;
+ this.nativeEvent = nativeEvent;
+ this.target = nativeEventTarget;
+ this.currentTarget = null;
+
+ for (var _propName in Interface) {
+ if (!Interface.hasOwnProperty(_propName)) {
+ continue;
+ }
+
+ var normalize = Interface[_propName];
+
+ if (normalize) {
+ this[_propName] = normalize(nativeEvent);
+ } else {
+ this[_propName] = nativeEvent[_propName];
+ }
+ }
+
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
+
+ if (defaultPrevented) {
+ this.isDefaultPrevented = functionThatReturnsTrue;
+ } else {
+ this.isDefaultPrevented = functionThatReturnsFalse;
+ }
+
+ this.isPropagationStopped = functionThatReturnsFalse;
+ return this;
+ }
+
+ _assign(SyntheticBaseEvent.prototype, {
+ preventDefault: function () {
+ this.defaultPrevented = true;
+ var event = this.nativeEvent;
+
+ if (!event) {
+ return;
+ }
+
+ if (event.preventDefault) {
+ event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
+ } else if (typeof event.returnValue !== 'unknown') {
+ event.returnValue = false;
+ }
+
+ this.isDefaultPrevented = functionThatReturnsTrue;
+ },
+ stopPropagation: function () {
+ var event = this.nativeEvent;
+
+ if (!event) {
+ return;
+ }
+
+ if (event.stopPropagation) {
+ event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
+ } else if (typeof event.cancelBubble !== 'unknown') {
+ // The ChangeEventPlugin registers a "propertychange" event for
+ // IE. This event does not support bubbling or cancelling, and
+ // any references to cancelBubble throw "Member not found". A
+ // typeof check of "unknown" circumvents this issue (and is also
+ // IE specific).
+ event.cancelBubble = true;
+ }
+
+ this.isPropagationStopped = functionThatReturnsTrue;
+ },
+
+ /**
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
+ * them back into the pool. This allows a way to hold onto a reference that
+ * won't be added back into the pool.
+ */
+ persist: function () {// Modern event system doesn't use pooling.
+ },
+
+ /**
+ * Checks if this event should be released back into the pool.
+ *
+ * @return {boolean} True if this should not be released, false otherwise.
+ */
+ isPersistent: functionThatReturnsTrue
+ });
+
+ return SyntheticBaseEvent;
+}
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+
+var EventInterface = {
+ eventPhase: 0,
+ bubbles: 0,
+ cancelable: 0,
+ timeStamp: function (event) {
+ return event.timeStamp || Date.now();
+ },
+ defaultPrevented: 0,
+ isTrusted: 0
+};
+var SyntheticEvent = createSyntheticEvent(EventInterface);
+
+var UIEventInterface = _assign({}, EventInterface, {
+ view: 0,
+ detail: 0
+});
+
+var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
+var lastMovementX;
+var lastMovementY;
+var lastMouseEvent;
+
+function updateMouseMovementPolyfillState(event) {
+ if (event !== lastMouseEvent) {
+ if (lastMouseEvent && event.type === 'mousemove') {
+ lastMovementX = event.screenX - lastMouseEvent.screenX;
+ lastMovementY = event.screenY - lastMouseEvent.screenY;
+ } else {
+ lastMovementX = 0;
+ lastMovementY = 0;
+ }
+
+ lastMouseEvent = event;
+ }
+}
+/**
+ * @interface MouseEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+
+var MouseEventInterface = _assign({}, UIEventInterface, {
+ screenX: 0,
+ screenY: 0,
+ clientX: 0,
+ clientY: 0,
+ pageX: 0,
+ pageY: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ getModifierState: getEventModifierState,
+ button: 0,
+ buttons: 0,
+ relatedTarget: function (event) {
+ if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
+ return event.relatedTarget;
+ },
+ movementX: function (event) {
+ if ('movementX' in event) {
+ return event.movementX;
+ }
+
+ updateMouseMovementPolyfillState(event);
+ return lastMovementX;
+ },
+ movementY: function (event) {
+ if ('movementY' in event) {
+ return event.movementY;
+ } // Don't need to call updateMouseMovementPolyfillState() here
+ // because it's guaranteed to have already run when movementX
+ // was copied.
+
+
+ return lastMovementY;
+ }
+});
+
+var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
+/**
+ * @interface DragEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+var DragEventInterface = _assign({}, MouseEventInterface, {
+ dataTransfer: 0
+});
+
+var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
+/**
+ * @interface FocusEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+var FocusEventInterface = _assign({}, UIEventInterface, {
+ relatedTarget: 0
+});
+
+var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
+ */
+
+var AnimationEventInterface = _assign({}, EventInterface, {
+ animationName: 0,
+ elapsedTime: 0,
+ pseudoElement: 0
+});
+
+var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/clipboard-apis/
+ */
+
+var ClipboardEventInterface = _assign({}, EventInterface, {
+ clipboardData: function (event) {
+ return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
+ }
+});
+
+var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
+ */
+
+var CompositionEventInterface = _assign({}, EventInterface, {
+ data: 0
+});
+
+var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
+ * /#events-inputevents
+ */
+// Happens to share the same list for now.
+
+var SyntheticInputEvent = SyntheticCompositionEvent;
+/**
+ * Normalization of deprecated HTML5 `key` values
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
+ */
+
+var normalizeKey = {
+ Esc: 'Escape',
+ Spacebar: ' ',
+ Left: 'ArrowLeft',
+ Up: 'ArrowUp',
+ Right: 'ArrowRight',
+ Down: 'ArrowDown',
+ Del: 'Delete',
+ Win: 'OS',
+ Menu: 'ContextMenu',
+ Apps: 'ContextMenu',
+ Scroll: 'ScrollLock',
+ MozPrintableKey: 'Unidentified'
+};
+/**
+ * Translation from legacy `keyCode` to HTML5 `key`
+ * Only special keys supported, all others depend on keyboard layout or browser
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
+ */
+
+var translateToKey = {
+ '8': 'Backspace',
+ '9': 'Tab',
+ '12': 'Clear',
+ '13': 'Enter',
+ '16': 'Shift',
+ '17': 'Control',
+ '18': 'Alt',
+ '19': 'Pause',
+ '20': 'CapsLock',
+ '27': 'Escape',
+ '32': ' ',
+ '33': 'PageUp',
+ '34': 'PageDown',
+ '35': 'End',
+ '36': 'Home',
+ '37': 'ArrowLeft',
+ '38': 'ArrowUp',
+ '39': 'ArrowRight',
+ '40': 'ArrowDown',
+ '45': 'Insert',
+ '46': 'Delete',
+ '112': 'F1',
+ '113': 'F2',
+ '114': 'F3',
+ '115': 'F4',
+ '116': 'F5',
+ '117': 'F6',
+ '118': 'F7',
+ '119': 'F8',
+ '120': 'F9',
+ '121': 'F10',
+ '122': 'F11',
+ '123': 'F12',
+ '144': 'NumLock',
+ '145': 'ScrollLock',
+ '224': 'Meta'
+};
+/**
+ * @param {object} nativeEvent Native browser event.
+ * @return {string} Normalized `key` property.
+ */
+
+function getEventKey(nativeEvent) {
+ if (nativeEvent.key) {
+ // Normalize inconsistent values reported by browsers due to
+ // implementations of a working draft specification.
+ // FireFox implements `key` but returns `MozPrintableKey` for all
+ // printable characters (normalized to `Unidentified`), ignore it.
+ var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
+
+ if (key !== 'Unidentified') {
+ return key;
+ }
+ } // Browser does not implement `key`, polyfill as much of it as we can.
+
+
+ if (nativeEvent.type === 'keypress') {
+ var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
+ // thus be captured by `keypress`, no other non-printable key should.
+
+ return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
+ }
+
+ if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
+ // While user keyboard layout determines the actual meaning of each
+ // `keyCode` value, almost all function keys have a universal value.
+ return translateToKey[nativeEvent.keyCode] || 'Unidentified';
+ }
+
+ return '';
+}
+/**
+ * Translation from modifier key to the associated property in the event.
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
+ */
+
+
+var modifierKeyToProp = {
+ Alt: 'altKey',
+ Control: 'ctrlKey',
+ Meta: 'metaKey',
+ Shift: 'shiftKey'
+}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
+// getModifierState. If getModifierState is not supported, we map it to a set of
+// modifier keys exposed by the event. In this case, Lock-keys are not supported.
+
+function modifierStateGetter(keyArg) {
+ var syntheticEvent = this;
+ var nativeEvent = syntheticEvent.nativeEvent;
+
+ if (nativeEvent.getModifierState) {
+ return nativeEvent.getModifierState(keyArg);
+ }
+
+ var keyProp = modifierKeyToProp[keyArg];
+ return keyProp ? !!nativeEvent[keyProp] : false;
+}
+
+function getEventModifierState(nativeEvent) {
+ return modifierStateGetter;
+}
+/**
+ * @interface KeyboardEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+
+var KeyboardEventInterface = _assign({}, UIEventInterface, {
+ key: getEventKey,
+ code: 0,
+ location: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ repeat: 0,
+ locale: 0,
+ getModifierState: getEventModifierState,
+ // Legacy Interface
+ charCode: function (event) {
+ // `charCode` is the result of a KeyPress event and represents the value of
+ // the actual printable character.
+ // KeyPress is deprecated, but its replacement is not yet final and not
+ // implemented in any major browser. Only KeyPress has charCode.
+ if (event.type === 'keypress') {
+ return getEventCharCode(event);
+ }
+
+ return 0;
+ },
+ keyCode: function (event) {
+ // `keyCode` is the result of a KeyDown/Up event and represents the value of
+ // physical keyboard key.
+ // The actual meaning of the value depends on the users' keyboard layout
+ // which cannot be detected. Assuming that it is a US keyboard layout
+ // provides a surprisingly accurate mapping for US and European users.
+ // Due to this, it is left to the user to implement at this time.
+ if (event.type === 'keydown' || event.type === 'keyup') {
+ return event.keyCode;
+ }
+
+ return 0;
+ },
+ which: function (event) {
+ // `which` is an alias for either `keyCode` or `charCode` depending on the
+ // type of the event.
+ if (event.type === 'keypress') {
+ return getEventCharCode(event);
+ }
+
+ if (event.type === 'keydown' || event.type === 'keyup') {
+ return event.keyCode;
+ }
+
+ return 0;
+ }
+});
+
+var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
+/**
+ * @interface PointerEvent
+ * @see http://www.w3.org/TR/pointerevents/
+ */
+
+var PointerEventInterface = _assign({}, MouseEventInterface, {
+ pointerId: 0,
+ width: 0,
+ height: 0,
+ pressure: 0,
+ tangentialPressure: 0,
+ tiltX: 0,
+ tiltY: 0,
+ twist: 0,
+ pointerType: 0,
+ isPrimary: 0
+});
+
+var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
+/**
+ * @interface TouchEvent
+ * @see http://www.w3.org/TR/touch-events/
+ */
+
+var TouchEventInterface = _assign({}, UIEventInterface, {
+ touches: 0,
+ targetTouches: 0,
+ changedTouches: 0,
+ altKey: 0,
+ metaKey: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ getModifierState: getEventModifierState
+});
+
+var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
+ */
+
+var TransitionEventInterface = _assign({}, EventInterface, {
+ propertyName: 0,
+ elapsedTime: 0,
+ pseudoElement: 0
+});
+
+var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
+/**
+ * @interface WheelEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+var WheelEventInterface = _assign({}, MouseEventInterface, {
+ deltaX: function (event) {
+ return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
+ 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
+ },
+ deltaY: function (event) {
+ return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
+ 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
+ 'wheelDelta' in event ? -event.wheelDelta : 0;
+ },
+ deltaZ: 0,
+ // Browsers without "deltaMode" is reporting in raw wheel delta where one
+ // notch on the scroll is always +/- 120, roughly equivalent to pixels.
+ // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
+ // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
+ deltaMode: 0
+});
+
+var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
+
+var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
+
+var START_KEYCODE = 229;
+var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
+var documentMode = null;
+
+if (canUseDOM && 'documentMode' in document) {
+ documentMode = document.documentMode;
+} // Webkit offers a very useful `textInput` event that can be used to
+// directly represent `beforeInput`. The IE `textinput` event is not as
+// useful, so we don't use it.
+
+
+var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
+// by the native compositionend event may be incorrect. Japanese ideographic
+// spaces, for instance (\u3000) are not recorded correctly.
+
+var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
+var SPACEBAR_CODE = 32;
+var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
+
+function registerEvents() {
+ registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
+ registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
+ registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
+ registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
+} // Track whether we've ever handled a keypress on the space key.
+
+
+var hasSpaceKeypress = false;
+/**
+ * Return whether a native keypress event is assumed to be a command.
+ * This is required because Firefox fires `keypress` events for key commands
+ * (cut, copy, select-all, etc.) even though no character is inserted.
+ */
+
+function isKeypressCommand(nativeEvent) {
+ return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
+ !(nativeEvent.ctrlKey && nativeEvent.altKey);
+}
+/**
+ * Translate native top level events into event types.
+ */
+
+
+function getCompositionEventType(domEventName) {
+ switch (domEventName) {
+ case 'compositionstart':
+ return 'onCompositionStart';
+
+ case 'compositionend':
+ return 'onCompositionEnd';
+
+ case 'compositionupdate':
+ return 'onCompositionUpdate';
+ }
+}
+/**
+ * Does our fallback best-guess model think this event signifies that
+ * composition has begun?
+ */
+
+
+function isFallbackCompositionStart(domEventName, nativeEvent) {
+ return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
+}
+/**
+ * Does our fallback mode think that this event is the end of composition?
+ */
+
+
+function isFallbackCompositionEnd(domEventName, nativeEvent) {
+ switch (domEventName) {
+ case 'keyup':
+ // Command keys insert or clear IME input.
+ return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
+
+ case 'keydown':
+ // Expect IME keyCode on each keydown. If we get any other
+ // code we must have exited earlier.
+ return nativeEvent.keyCode !== START_KEYCODE;
+
+ case 'keypress':
+ case 'mousedown':
+ case 'focusout':
+ // Events are not possible without cancelling IME.
+ return true;
+
+ default:
+ return false;
+ }
+}
+/**
+ * Google Input Tools provides composition data via a CustomEvent,
+ * with the `data` property populated in the `detail` object. If this
+ * is available on the event object, use it. If not, this is a plain
+ * composition event and we have nothing special to extract.
+ *
+ * @param {object} nativeEvent
+ * @return {?string}
+ */
+
+
+function getDataFromCustomEvent(nativeEvent) {
+ var detail = nativeEvent.detail;
+
+ if (typeof detail === 'object' && 'data' in detail) {
+ return detail.data;
+ }
+
+ return null;
+}
+/**
+ * Check if a composition event was triggered by Korean IME.
+ * Our fallback mode does not work well with IE's Korean IME,
+ * so just use native composition events when Korean IME is used.
+ * Although CompositionEvent.locale property is deprecated,
+ * it is available in IE, where our fallback mode is enabled.
+ *
+ * @param {object} nativeEvent
+ * @return {boolean}
+ */
+
+
+function isUsingKoreanIME(nativeEvent) {
+ return nativeEvent.locale === 'ko';
+} // Track the current IME composition status, if any.
+
+
+var isComposing = false;
+/**
+ * @return {?object} A SyntheticCompositionEvent.
+ */
+
+function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
+ var eventType;
+ var fallbackData;
+
+ if (canUseCompositionEvent) {
+ eventType = getCompositionEventType(domEventName);
+ } else if (!isComposing) {
+ if (isFallbackCompositionStart(domEventName, nativeEvent)) {
+ eventType = 'onCompositionStart';
+ }
+ } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
+ eventType = 'onCompositionEnd';
+ }
+
+ if (!eventType) {
+ return null;
+ }
+
+ if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
+ // The current composition is stored statically and must not be
+ // overwritten while composition continues.
+ if (!isComposing && eventType === 'onCompositionStart') {
+ isComposing = initialize(nativeEventTarget);
+ } else if (eventType === 'onCompositionEnd') {
+ if (isComposing) {
+ fallbackData = getData();
+ }
+ }
+ }
+
+ var listeners = accumulateTwoPhaseListeners(targetInst, eventType);
+
+ if (listeners.length > 0) {
+ var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+
+ if (fallbackData) {
+ // Inject data generated from fallback path into the synthetic event.
+ // This matches the property of native CompositionEventInterface.
+ event.data = fallbackData;
+ } else {
+ var customData = getDataFromCustomEvent(nativeEvent);
+
+ if (customData !== null) {
+ event.data = customData;
+ }
+ }
+ }
+}
+
+function getNativeBeforeInputChars(domEventName, nativeEvent) {
+ switch (domEventName) {
+ case 'compositionend':
+ return getDataFromCustomEvent(nativeEvent);
+
+ case 'keypress':
+ /**
+ * If native `textInput` events are available, our goal is to make
+ * use of them. However, there is a special case: the spacebar key.
+ * In Webkit, preventing default on a spacebar `textInput` event
+ * cancels character insertion, but it *also* causes the browser
+ * to fall back to its default spacebar behavior of scrolling the
+ * page.
+ *
+ * Tracking at:
+ * https://code.google.com/p/chromium/issues/detail?id=355103
+ *
+ * To avoid this issue, use the keypress event as if no `textInput`
+ * event is available.
+ */
+ var which = nativeEvent.which;
+
+ if (which !== SPACEBAR_CODE) {
+ return null;
+ }
+
+ hasSpaceKeypress = true;
+ return SPACEBAR_CHAR;
+
+ case 'textInput':
+ // Record the characters to be added to the DOM.
+ var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
+ // it at the keypress level and bail immediately. Android Chrome
+ // doesn't give us keycodes, so we need to ignore it.
+
+ if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
+ return null;
+ }
+
+ return chars;
+
+ default:
+ // For other native event types, do nothing.
+ return null;
+ }
+}
+/**
+ * For browsers that do not provide the `textInput` event, extract the
+ * appropriate string to use for SyntheticInputEvent.
+ */
+
+
+function getFallbackBeforeInputChars(domEventName, nativeEvent) {
+ // If we are currently composing (IME) and using a fallback to do so,
+ // try to extract the composed characters from the fallback object.
+ // If composition event is available, we extract a string only at
+ // compositionevent, otherwise extract it at fallback events.
+ if (isComposing) {
+ if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
+ var chars = getData();
+ reset();
+ isComposing = false;
+ return chars;
+ }
+
+ return null;
+ }
+
+ switch (domEventName) {
+ case 'paste':
+ // If a paste event occurs after a keypress, throw out the input
+ // chars. Paste events should not lead to BeforeInput events.
+ return null;
+
+ case 'keypress':
+ /**
+ * As of v27, Firefox may fire keypress events even when no character
+ * will be inserted. A few possibilities:
+ *
+ * - `which` is `0`. Arrow keys, Esc key, etc.
+ *
+ * - `which` is the pressed key code, but no char is available.
+ * Ex: 'AltGr + d` in Polish. There is no modified character for
+ * this key combination and no character is inserted into the
+ * document, but FF fires the keypress for char code `100` anyway.
+ * No `input` event will occur.
+ *
+ * - `which` is the pressed key code, but a command combination is
+ * being used. Ex: `Cmd+C`. No character is inserted, and no
+ * `input` event will occur.
+ */
+ if (!isKeypressCommand(nativeEvent)) {
+ // IE fires the `keypress` event when a user types an emoji via
+ // Touch keyboard of Windows. In such a case, the `char` property
+ // holds an emoji character like `\uD83D\uDE0A`. Because its length
+ // is 2, the property `which` does not represent an emoji correctly.
+ // In such a case, we directly return the `char` property instead of
+ // using `which`.
+ if (nativeEvent.char && nativeEvent.char.length > 1) {
+ return nativeEvent.char;
+ } else if (nativeEvent.which) {
+ return String.fromCharCode(nativeEvent.which);
+ }
+ }
+
+ return null;
+
+ case 'compositionend':
+ return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
+
+ default:
+ return null;
+ }
+}
+/**
+ * Extract a SyntheticInputEvent for `beforeInput`, based on either native
+ * `textInput` or fallback behavior.
+ *
+ * @return {?object} A SyntheticInputEvent.
+ */
+
+
+function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
+ var chars;
+
+ if (canUseTextInputEvent) {
+ chars = getNativeBeforeInputChars(domEventName, nativeEvent);
+ } else {
+ chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
+ } // If no characters are being inserted, no BeforeInput event should
+ // be fired.
+
+
+ if (!chars) {
+ return null;
+ }
+
+ var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');
+
+ if (listeners.length > 0) {
+ var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+ event.data = chars;
+ }
+}
+/**
+ * Create an `onBeforeInput` event to match
+ * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
+ *
+ * This event plugin is based on the native `textInput` event
+ * available in Chrome, Safari, Opera, and IE. This event fires after
+ * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
+ *
+ * `beforeInput` is spec'd but not implemented in any browsers, and
+ * the `input` event does not provide any useful information about what has
+ * actually been added, contrary to the spec. Thus, `textInput` is the best
+ * available event to identify the characters that have actually been inserted
+ * into the target node.
+ *
+ * This plugin is also responsible for emitting `composition` events, thus
+ * allowing us to share composition fallback code for both `beforeInput` and
+ * `composition` event types.
+ */
+
+
+function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+}
+
+/**
+ * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
+ */
+var supportedInputTypes = {
+ color: true,
+ date: true,
+ datetime: true,
+ 'datetime-local': true,
+ email: true,
+ month: true,
+ number: true,
+ password: true,
+ range: true,
+ search: true,
+ tel: true,
+ text: true,
+ time: true,
+ url: true,
+ week: true
+};
+
+function isTextInputElement(elem) {
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
+
+ if (nodeName === 'input') {
+ return !!supportedInputTypes[elem.type];
+ }
+
+ if (nodeName === 'textarea') {
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * Checks if an event is supported in the current execution environment.
+ *
+ * NOTE: This will not work correctly for non-generic events such as `change`,
+ * `reset`, `load`, `error`, and `select`.
+ *
+ * Borrows from Modernizr.
+ *
+ * @param {string} eventNameSuffix Event name, e.g. "click".
+ * @return {boolean} True if the event is supported.
+ * @internal
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
+ */
+
+function isEventSupported(eventNameSuffix) {
+ if (!canUseDOM) {
+ return false;
+ }
+
+ var eventName = 'on' + eventNameSuffix;
+ var isSupported = (eventName in document);
+
+ if (!isSupported) {
+ var element = document.createElement('div');
+ element.setAttribute(eventName, 'return;');
+ isSupported = typeof element[eventName] === 'function';
+ }
+
+ return isSupported;
+}
+
+function registerEvents$1() {
+ registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
+}
+
+function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
+ // Flag this event loop as needing state restore.
+ enqueueStateRestore(target);
+ var listeners = accumulateTwoPhaseListeners(inst, 'onChange');
+
+ if (listeners.length > 0) {
+ var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+ }
+}
+/**
+ * For IE shims
+ */
+
+
+var activeElement = null;
+var activeElementInst = null;
+/**
+ * SECTION: handle `change` event
+ */
+
+function shouldUseChangeEvent(elem) {
+ var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
+ return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
+}
+
+function manualDispatchChangeEvent(nativeEvent) {
+ var dispatchQueue = [];
+ createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
+ // other events and have it go through ReactBrowserEventEmitter. Since it
+ // doesn't, we manually listen for the events and so we have to enqueue and
+ // process the abstract event manually.
+ //
+ // Batching is necessary here in order to ensure that all event handlers run
+ // before the next rerender (including event handlers attached to ancestor
+ // elements instead of directly on the input). Without this, controlled
+ // components don't work properly in conjunction with event bubbling because
+ // the component is rerendered and the value reverted before all the event
+ // handlers can run. See https://github.com/facebook/react/issues/708.
+
+ batchedUpdates(runEventInBatch, dispatchQueue);
+}
+
+function runEventInBatch(dispatchQueue) {
+ processDispatchQueue(dispatchQueue, 0);
+}
+
+function getInstIfValueChanged(targetInst) {
+ var targetNode = getNodeFromInstance(targetInst);
+
+ if (updateValueIfChanged(targetNode)) {
+ return targetInst;
+ }
+}
+
+function getTargetInstForChangeEvent(domEventName, targetInst) {
+ if (domEventName === 'change') {
+ return targetInst;
+ }
+}
+/**
+ * SECTION: handle `input` event
+ */
+
+
+var isInputEventSupported = false;
+
+if (canUseDOM) {
+ // IE9 claims to support the input event but fails to trigger it when
+ // deleting text, so we ignore its input events.
+ isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
+}
+/**
+ * (For IE <=9) Starts tracking propertychange events on the passed-in element
+ * and override the value property so that we can distinguish user events from
+ * value changes in JS.
+ */
+
+
+function startWatchingForValueChange(target, targetInst) {
+ activeElement = target;
+ activeElementInst = targetInst;
+ activeElement.attachEvent('onpropertychange', handlePropertyChange);
+}
+/**
+ * (For IE <=9) Removes the event listeners from the currently-tracked element,
+ * if any exists.
+ */
+
+
+function stopWatchingForValueChange() {
+ if (!activeElement) {
+ return;
+ }
+
+ activeElement.detachEvent('onpropertychange', handlePropertyChange);
+ activeElement = null;
+ activeElementInst = null;
+}
+/**
+ * (For IE <=9) Handles a propertychange event, sending a `change` event if
+ * the value of the active element has changed.
+ */
+
+
+function handlePropertyChange(nativeEvent) {
+ if (nativeEvent.propertyName !== 'value') {
+ return;
+ }
+
+ if (getInstIfValueChanged(activeElementInst)) {
+ manualDispatchChangeEvent(nativeEvent);
+ }
+}
+
+function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
+ if (domEventName === 'focusin') {
+ // In IE9, propertychange fires for most input events but is buggy and
+ // doesn't fire when text is deleted, but conveniently, selectionchange
+ // appears to fire in all of the remaining cases so we catch those and
+ // forward the event if the value has changed
+ // In either case, we don't want to call the event handler if the value
+ // is changed from JS so we redefine a setter for `.value` that updates
+ // our activeElementValue variable, allowing us to ignore those changes
+ //
+ // stopWatching() should be a noop here but we call it just in case we
+ // missed a blur event somehow.
+ stopWatchingForValueChange();
+ startWatchingForValueChange(target, targetInst);
+ } else if (domEventName === 'focusout') {
+ stopWatchingForValueChange();
+ }
+} // For IE8 and IE9.
+
+
+function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
+ if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
+ // On the selectionchange event, the target is just document which isn't
+ // helpful for us so just check activeElement instead.
+ //
+ // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
+ // propertychange on the first input event after setting `value` from a
+ // script and fires only keydown, keypress, keyup. Catching keyup usually
+ // gets it and catching keydown lets us fire an event for the first
+ // keystroke if user does a key repeat (it'll be a little delayed: right
+ // before the second keystroke). Other input methods (e.g., paste) seem to
+ // fire selectionchange normally.
+ return getInstIfValueChanged(activeElementInst);
+ }
+}
+/**
+ * SECTION: handle `click` event
+ */
+
+
+function shouldUseClickEvent(elem) {
+ // Use the `click` event to detect changes to checkbox and radio inputs.
+ // This approach works across all browsers, whereas `change` does not fire
+ // until `blur` in IE8.
+ var nodeName = elem.nodeName;
+ return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
+}
+
+function getTargetInstForClickEvent(domEventName, targetInst) {
+ if (domEventName === 'click') {
+ return getInstIfValueChanged(targetInst);
+ }
+}
+
+function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
+ if (domEventName === 'input' || domEventName === 'change') {
+ return getInstIfValueChanged(targetInst);
+ }
+}
+
+function handleControlledInputBlur(node) {
+ var state = node._wrapperState;
+
+ if (!state || !state.controlled || node.type !== 'number') {
+ return;
+ }
+
+ {
+ // If controlled, assign the value attribute to the current value on blur
+ setDefaultValue(node, 'number', node.value);
+ }
+}
+/**
+ * This plugin creates an `onChange` event that normalizes change events
+ * across form elements. This event fires at a time when it's possible to
+ * change the element's value without seeing a flicker.
+ *
+ * Supported elements are:
+ * - input (see `isTextInputElement`)
+ * - textarea
+ * - select
+ */
+
+
+function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
+ var getTargetInstFunc, handleEventFunc;
+
+ if (shouldUseChangeEvent(targetNode)) {
+ getTargetInstFunc = getTargetInstForChangeEvent;
+ } else if (isTextInputElement(targetNode)) {
+ if (isInputEventSupported) {
+ getTargetInstFunc = getTargetInstForInputOrChangeEvent;
+ } else {
+ getTargetInstFunc = getTargetInstForInputEventPolyfill;
+ handleEventFunc = handleEventsForInputEventPolyfill;
+ }
+ } else if (shouldUseClickEvent(targetNode)) {
+ getTargetInstFunc = getTargetInstForClickEvent;
+ }
+
+ if (getTargetInstFunc) {
+ var inst = getTargetInstFunc(domEventName, targetInst);
+
+ if (inst) {
+ createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
+ return;
+ }
+ }
+
+ if (handleEventFunc) {
+ handleEventFunc(domEventName, targetNode, targetInst);
+ } // When blurring, set the value attribute for number inputs
+
+
+ if (domEventName === 'focusout') {
+ handleControlledInputBlur(targetNode);
+ }
+}
+
+function registerEvents$2() {
+ registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
+ registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
+ registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
+ registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
+}
+/**
+ * For almost every interaction we care about, there will be both a top-level
+ * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
+ * we do not extract duplicate events. However, moving the mouse into the
+ * browser from outside will not fire a `mouseout` event. In this case, we use
+ * the `mouseover` top-level event.
+ */
+
+
+function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
+ var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';
+
+ if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {
+ // If this is an over event with a target, we might have already dispatched
+ // the event in the out event of the other target. If this is replayed,
+ // then it's because we couldn't dispatch against this target previously
+ // so we have to do it now instead.
+ var related = nativeEvent.relatedTarget || nativeEvent.fromElement;
+
+ if (related) {
+ // If the related node is managed by React, we can assume that we have
+ // already dispatched the corresponding events during its mouseout.
+ if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
+ return;
+ }
+ }
+ }
+
+ if (!isOutEvent && !isOverEvent) {
+ // Must not be a mouse or pointer in or out - ignoring.
+ return;
+ }
+
+ var win; // TODO: why is this nullable in the types but we read from it?
+
+ if (nativeEventTarget.window === nativeEventTarget) {
+ // `nativeEventTarget` is probably a window object.
+ win = nativeEventTarget;
+ } else {
+ // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
+ var doc = nativeEventTarget.ownerDocument;
+
+ if (doc) {
+ win = doc.defaultView || doc.parentWindow;
+ } else {
+ win = window;
+ }
+ }
+
+ var from;
+ var to;
+
+ if (isOutEvent) {
+ var _related = nativeEvent.relatedTarget || nativeEvent.toElement;
+
+ from = targetInst;
+ to = _related ? getClosestInstanceFromNode(_related) : null;
+
+ if (to !== null) {
+ var nearestMounted = getNearestMountedFiber(to);
+
+ if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
+ to = null;
+ }
+ }
+ } else {
+ // Moving to a node from outside the window.
+ from = null;
+ to = targetInst;
+ }
+
+ if (from === to) {
+ // Nothing pertains to our managed components.
+ return;
+ }
+
+ var SyntheticEventCtor = SyntheticMouseEvent;
+ var leaveEventType = 'onMouseLeave';
+ var enterEventType = 'onMouseEnter';
+ var eventTypePrefix = 'mouse';
+
+ if (domEventName === 'pointerout' || domEventName === 'pointerover') {
+ SyntheticEventCtor = SyntheticPointerEvent;
+ leaveEventType = 'onPointerLeave';
+ enterEventType = 'onPointerEnter';
+ eventTypePrefix = 'pointer';
+ }
+
+ var fromNode = from == null ? win : getNodeFromInstance(from);
+ var toNode = to == null ? win : getNodeFromInstance(to);
+ var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
+ leave.target = fromNode;
+ leave.relatedTarget = toNode;
+ var enter = null; // We should only process this nativeEvent if we are processing
+ // the first ancestor. Next time, we will ignore the event.
+
+ var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);
+
+ if (nativeTargetInst === targetInst) {
+ var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
+ enterEvent.target = toNode;
+ enterEvent.relatedTarget = fromNode;
+ enter = enterEvent;
+ }
+
+ accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
+}
+
+/**
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+ */
+function is(x, y) {
+ return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
+ ;
+}
+
+var objectIs = typeof Object.is === 'function' ? Object.is : is;
+
+var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
+/**
+ * Performs equality by iterating through keys on an object and returning false
+ * when any key has values which are not strictly equal between the arguments.
+ * Returns true when the values of all keys are strictly equal.
+ */
+
+function shallowEqual(objA, objB) {
+ if (objectIs(objA, objB)) {
+ return true;
+ }
+
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
+ return false;
+ }
+
+ var keysA = Object.keys(objA);
+ var keysB = Object.keys(objB);
+
+ if (keysA.length !== keysB.length) {
+ return false;
+ } // Test for A's keys different from B.
+
+
+ for (var i = 0; i < keysA.length; i++) {
+ if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Given any node return the first leaf node without children.
+ *
+ * @param {DOMElement|DOMTextNode} node
+ * @return {DOMElement|DOMTextNode}
+ */
+
+function getLeafNode(node) {
+ while (node && node.firstChild) {
+ node = node.firstChild;
+ }
+
+ return node;
+}
+/**
+ * Get the next sibling within a container. This will walk up the
+ * DOM if a node's siblings have been exhausted.
+ *
+ * @param {DOMElement|DOMTextNode} node
+ * @return {?DOMElement|DOMTextNode}
+ */
+
+
+function getSiblingNode(node) {
+ while (node) {
+ if (node.nextSibling) {
+ return node.nextSibling;
+ }
+
+ node = node.parentNode;
+ }
+}
+/**
+ * Get object describing the nodes which contain characters at offset.
+ *
+ * @param {DOMElement|DOMTextNode} root
+ * @param {number} offset
+ * @return {?object}
+ */
+
+
+function getNodeForCharacterOffset(root, offset) {
+ var node = getLeafNode(root);
+ var nodeStart = 0;
+ var nodeEnd = 0;
+
+ while (node) {
+ if (node.nodeType === TEXT_NODE) {
+ nodeEnd = nodeStart + node.textContent.length;
+
+ if (nodeStart <= offset && nodeEnd >= offset) {
+ return {
+ node: node,
+ offset: offset - nodeStart
+ };
+ }
+
+ nodeStart = nodeEnd;
+ }
+
+ node = getLeafNode(getSiblingNode(node));
+ }
+}
+
+/**
+ * @param {DOMElement} outerNode
+ * @return {?object}
+ */
+
+function getOffsets(outerNode) {
+ var ownerDocument = outerNode.ownerDocument;
+ var win = ownerDocument && ownerDocument.defaultView || window;
+ var selection = win.getSelection && win.getSelection();
+
+ if (!selection || selection.rangeCount === 0) {
+ return null;
+ }
+
+ var anchorNode = selection.anchorNode,
+ anchorOffset = selection.anchorOffset,
+ focusNode = selection.focusNode,
+ focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
+ // up/down buttons on an <input type="number">. Anonymous divs do not seem to
+ // expose properties, triggering a "Permission denied error" if any of its
+ // properties are accessed. The only seemingly possible way to avoid erroring
+ // is to access a property that typically works for non-anonymous divs and
+ // catch any error that may otherwise arise. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
+
+ try {
+ /* eslint-disable no-unused-expressions */
+ anchorNode.nodeType;
+ focusNode.nodeType;
+ /* eslint-enable no-unused-expressions */
+ } catch (e) {
+ return null;
+ }
+
+ return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
+}
+/**
+ * Returns {start, end} where `start` is the character/codepoint index of
+ * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
+ * `end` is the index of (focusNode, focusOffset).
+ *
+ * Returns null if you pass in garbage input but we should probably just crash.
+ *
+ * Exported only for testing.
+ */
+
+function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
+ var length = 0;
+ var start = -1;
+ var end = -1;
+ var indexWithinAnchor = 0;
+ var indexWithinFocus = 0;
+ var node = outerNode;
+ var parentNode = null;
+
+ outer: while (true) {
+ var next = null;
+
+ while (true) {
+ if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
+ start = length + anchorOffset;
+ }
+
+ if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
+ end = length + focusOffset;
+ }
+
+ if (node.nodeType === TEXT_NODE) {
+ length += node.nodeValue.length;
+ }
+
+ if ((next = node.firstChild) === null) {
+ break;
+ } // Moving from `node` to its first child `next`.
+
+
+ parentNode = node;
+ node = next;
+ }
+
+ while (true) {
+ if (node === outerNode) {
+ // If `outerNode` has children, this is always the second time visiting
+ // it. If it has no children, this is still the first loop, and the only
+ // valid selection is anchorNode and focusNode both equal to this node
+ // and both offsets 0, in which case we will have handled above.
+ break outer;
+ }
+
+ if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
+ start = length;
+ }
+
+ if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
+ end = length;
+ }
+
+ if ((next = node.nextSibling) !== null) {
+ break;
+ }
+
+ node = parentNode;
+ parentNode = node.parentNode;
+ } // Moving from `node` to its next sibling `next`.
+
+
+ node = next;
+ }
+
+ if (start === -1 || end === -1) {
+ // This should never happen. (Would happen if the anchor/focus nodes aren't
+ // actually inside the passed-in node.)
+ return null;
+ }
+
+ return {
+ start: start,
+ end: end
+ };
+}
+/**
+ * In modern non-IE browsers, we can support both forward and backward
+ * selections.
+ *
+ * Note: IE10+ supports the Selection object, but it does not support
+ * the `extend` method, which means that even in modern IE, it's not possible
+ * to programmatically create a backward selection. Thus, for all IE
+ * versions, we use the old IE API to create our selections.
+ *
+ * @param {DOMElement|DOMTextNode} node
+ * @param {object} offsets
+ */
+
+function setOffsets(node, offsets) {
+ var doc = node.ownerDocument || document;
+ var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
+ // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
+ // fails when pasting 100+ items)
+
+ if (!win.getSelection) {
+ return;
+ }
+
+ var selection = win.getSelection();
+ var length = node.textContent.length;
+ var start = Math.min(offsets.start, length);
+ var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
+ // Flip backward selections, so we can set with a single range.
+
+ if (!selection.extend && start > end) {
+ var temp = end;
+ end = start;
+ start = temp;
+ }
+
+ var startMarker = getNodeForCharacterOffset(node, start);
+ var endMarker = getNodeForCharacterOffset(node, end);
+
+ if (startMarker && endMarker) {
+ if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
+ return;
+ }
+
+ var range = doc.createRange();
+ range.setStart(startMarker.node, startMarker.offset);
+ selection.removeAllRanges();
+
+ if (start > end) {
+ selection.addRange(range);
+ selection.extend(endMarker.node, endMarker.offset);
+ } else {
+ range.setEnd(endMarker.node, endMarker.offset);
+ selection.addRange(range);
+ }
+ }
+}
+
+function isTextNode(node) {
+ return node && node.nodeType === TEXT_NODE;
+}
+
+function containsNode(outerNode, innerNode) {
+ if (!outerNode || !innerNode) {
+ return false;
+ } else if (outerNode === innerNode) {
+ return true;
+ } else if (isTextNode(outerNode)) {
+ return false;
+ } else if (isTextNode(innerNode)) {
+ return containsNode(outerNode, innerNode.parentNode);
+ } else if ('contains' in outerNode) {
+ return outerNode.contains(innerNode);
+ } else if (outerNode.compareDocumentPosition) {
+ return !!(outerNode.compareDocumentPosition(innerNode) & 16);
+ } else {
+ return false;
+ }
+}
+
+function isInDocument(node) {
+ return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
+}
+
+function isSameOriginFrame(iframe) {
+ try {
+ // Accessing the contentDocument of a HTMLIframeElement can cause the browser
+ // to throw, e.g. if it has a cross-origin src attribute.
+ // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
+ // iframe.contentDocument.defaultView;
+ // A safety way is to access one of the cross origin properties: Window or Location
+ // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
+ // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
+ return typeof iframe.contentWindow.location.href === 'string';
+ } catch (err) {
+ return false;
+ }
+}
+
+function getActiveElementDeep() {
+ var win = window;
+ var element = getActiveElement();
+
+ while (element instanceof win.HTMLIFrameElement) {
+ if (isSameOriginFrame(element)) {
+ win = element.contentWindow;
+ } else {
+ return element;
+ }
+
+ element = getActiveElement(win.document);
+ }
+
+ return element;
+}
+/**
+ * @ReactInputSelection: React input selection module. Based on Selection.js,
+ * but modified to be suitable for react and has a couple of bug fixes (doesn't
+ * assume buttons have range selections allowed).
+ * Input selection module for React.
+ */
+
+/**
+ * @hasSelectionCapabilities: we get the element types that support selection
+ * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
+ * and `selectionEnd` rows.
+ */
+
+
+function hasSelectionCapabilities(elem) {
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
+ return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
+}
+function getSelectionInformation() {
+ var focusedElem = getActiveElementDeep();
+ return {
+ focusedElem: focusedElem,
+ selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
+ };
+}
+/**
+ * @restoreSelection: If any selection information was potentially lost,
+ * restore it. This is useful when performing operations that could remove dom
+ * nodes and place them back in, resulting in focus being lost.
+ */
+
+function restoreSelection(priorSelectionInformation) {
+ var curFocusedElem = getActiveElementDeep();
+ var priorFocusedElem = priorSelectionInformation.focusedElem;
+ var priorSelectionRange = priorSelectionInformation.selectionRange;
+
+ if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
+ if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
+ setSelection(priorFocusedElem, priorSelectionRange);
+ } // Focusing a node can change the scroll position, which is undesirable
+
+
+ var ancestors = [];
+ var ancestor = priorFocusedElem;
+
+ while (ancestor = ancestor.parentNode) {
+ if (ancestor.nodeType === ELEMENT_NODE) {
+ ancestors.push({
+ element: ancestor,
+ left: ancestor.scrollLeft,
+ top: ancestor.scrollTop
+ });
+ }
+ }
+
+ if (typeof priorFocusedElem.focus === 'function') {
+ priorFocusedElem.focus();
+ }
+
+ for (var i = 0; i < ancestors.length; i++) {
+ var info = ancestors[i];
+ info.element.scrollLeft = info.left;
+ info.element.scrollTop = info.top;
+ }
+ }
+}
+/**
+ * @getSelection: Gets the selection bounds of a focused textarea, input or
+ * contentEditable node.
+ * -@input: Look up selection bounds of this input
+ * -@return {start: selectionStart, end: selectionEnd}
+ */
+
+function getSelection(input) {
+ var selection;
+
+ if ('selectionStart' in input) {
+ // Modern browser with input or textarea.
+ selection = {
+ start: input.selectionStart,
+ end: input.selectionEnd
+ };
+ } else {
+ // Content editable or old IE textarea.
+ selection = getOffsets(input);
+ }
+
+ return selection || {
+ start: 0,
+ end: 0
+ };
+}
+/**
+ * @setSelection: Sets the selection bounds of a textarea or input and focuses
+ * the input.
+ * -@input Set selection bounds of this input or textarea
+ * -@offsets Object of same form that is returned from get*
+ */
+
+function setSelection(input, offsets) {
+ var start = offsets.start;
+ var end = offsets.end;
+
+ if (end === undefined) {
+ end = start;
+ }
+
+ if ('selectionStart' in input) {
+ input.selectionStart = start;
+ input.selectionEnd = Math.min(end, input.value.length);
+ } else {
+ setOffsets(input, offsets);
+ }
+}
+
+var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
+
+function registerEvents$3() {
+ registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
+}
+
+var activeElement$1 = null;
+var activeElementInst$1 = null;
+var lastSelection = null;
+var mouseDown = false;
+/**
+ * Get an object which is a unique representation of the current selection.
+ *
+ * The return value will not be consistent across nodes or browsers, but
+ * two identical selections on the same node will return identical objects.
+ */
+
+function getSelection$1(node) {
+ if ('selectionStart' in node && hasSelectionCapabilities(node)) {
+ return {
+ start: node.selectionStart,
+ end: node.selectionEnd
+ };
+ } else {
+ var win = node.ownerDocument && node.ownerDocument.defaultView || window;
+ var selection = win.getSelection();
+ return {
+ anchorNode: selection.anchorNode,
+ anchorOffset: selection.anchorOffset,
+ focusNode: selection.focusNode,
+ focusOffset: selection.focusOffset
+ };
+ }
+}
+/**
+ * Get document associated with the event target.
+ */
+
+
+function getEventTargetDocument(eventTarget) {
+ return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
+}
+/**
+ * Poll selection to see whether it's changed.
+ *
+ * @param {object} nativeEvent
+ * @param {object} nativeEventTarget
+ * @return {?SyntheticEvent}
+ */
+
+
+function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
+ // Ensure we have the right element, and that the user is not dragging a
+ // selection (this matches native `select` event behavior). In HTML5, select
+ // fires only on input and textarea thus if there's no focused element we
+ // won't dispatch.
+ var doc = getEventTargetDocument(nativeEventTarget);
+
+ if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
+ return;
+ } // Only fire when selection has actually changed.
+
+
+ var currentSelection = getSelection$1(activeElement$1);
+
+ if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
+ lastSelection = currentSelection;
+ var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');
+
+ if (listeners.length > 0) {
+ var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+ event.target = activeElement$1;
+ }
+ }
+}
+/**
+ * This plugin creates an `onSelect` event that normalizes select events
+ * across form elements.
+ *
+ * Supported elements are:
+ * - input (see `isTextInputElement`)
+ * - textarea
+ * - contentEditable
+ *
+ * This differs from native browser implementations in the following ways:
+ * - Fires on contentEditable fields as well as inputs.
+ * - Fires for collapsed selection.
+ * - Fires after user input.
+ */
+
+
+function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+
+ var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
+
+ switch (domEventName) {
+ // Track the input node that has focus.
+ case 'focusin':
+ if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
+ activeElement$1 = targetNode;
+ activeElementInst$1 = targetInst;
+ lastSelection = null;
+ }
+
+ break;
+
+ case 'focusout':
+ activeElement$1 = null;
+ activeElementInst$1 = null;
+ lastSelection = null;
+ break;
+ // Don't fire the event while the user is dragging. This matches the
+ // semantics of the native select event.
+
+ case 'mousedown':
+ mouseDown = true;
+ break;
+
+ case 'contextmenu':
+ case 'mouseup':
+ case 'dragend':
+ mouseDown = false;
+ constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
+ break;
+ // Chrome and IE fire non-standard event when selection is changed (and
+ // sometimes when it hasn't). IE's event fires out of order with respect
+ // to key and input events on deletion, so we discard it.
+ //
+ // Firefox doesn't support selectionchange, so check selection status
+ // after each key entry. The selection changes after keydown and before
+ // keyup, but we check on keydown as well in the case of holding down a
+ // key, when multiple keydown events are fired but only one keyup is.
+ // This is also our approach for IE handling, for the reason above.
+
+ case 'selectionchange':
+ if (skipSelectionChangeEvent) {
+ break;
+ }
+
+ // falls through
+
+ case 'keydown':
+ case 'keyup':
+ constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
+ }
+}
+
+function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ var reactName = topLevelEventsToReactNames.get(domEventName);
+
+ if (reactName === undefined) {
+ return;
+ }
+
+ var SyntheticEventCtor = SyntheticEvent;
+ var reactEventType = domEventName;
+
+ switch (domEventName) {
+ case 'keypress':
+ // Firefox creates a keypress event for function keys too. This removes
+ // the unwanted keypress events. Enter is however both printable and
+ // non-printable. One would expect Tab to be as well (but it isn't).
+ if (getEventCharCode(nativeEvent) === 0) {
+ return;
+ }
+
+ /* falls through */
+
+ case 'keydown':
+ case 'keyup':
+ SyntheticEventCtor = SyntheticKeyboardEvent;
+ break;
+
+ case 'focusin':
+ reactEventType = 'focus';
+ SyntheticEventCtor = SyntheticFocusEvent;
+ break;
+
+ case 'focusout':
+ reactEventType = 'blur';
+ SyntheticEventCtor = SyntheticFocusEvent;
+ break;
+
+ case 'beforeblur':
+ case 'afterblur':
+ SyntheticEventCtor = SyntheticFocusEvent;
+ break;
+
+ case 'click':
+ // Firefox creates a click event on right mouse clicks. This removes the
+ // unwanted click events.
+ if (nativeEvent.button === 2) {
+ return;
+ }
+
+ /* falls through */
+
+ case 'auxclick':
+ case 'dblclick':
+ case 'mousedown':
+ case 'mousemove':
+ case 'mouseup': // TODO: Disabled elements should not respond to mouse events
+
+ /* falls through */
+
+ case 'mouseout':
+ case 'mouseover':
+ case 'contextmenu':
+ SyntheticEventCtor = SyntheticMouseEvent;
+ break;
+
+ case 'drag':
+ case 'dragend':
+ case 'dragenter':
+ case 'dragexit':
+ case 'dragleave':
+ case 'dragover':
+ case 'dragstart':
+ case 'drop':
+ SyntheticEventCtor = SyntheticDragEvent;
+ break;
+
+ case 'touchcancel':
+ case 'touchend':
+ case 'touchmove':
+ case 'touchstart':
+ SyntheticEventCtor = SyntheticTouchEvent;
+ break;
+
+ case ANIMATION_END:
+ case ANIMATION_ITERATION:
+ case ANIMATION_START:
+ SyntheticEventCtor = SyntheticAnimationEvent;
+ break;
+
+ case TRANSITION_END:
+ SyntheticEventCtor = SyntheticTransitionEvent;
+ break;
+
+ case 'scroll':
+ SyntheticEventCtor = SyntheticUIEvent;
+ break;
+
+ case 'wheel':
+ SyntheticEventCtor = SyntheticWheelEvent;
+ break;
+
+ case 'copy':
+ case 'cut':
+ case 'paste':
+ SyntheticEventCtor = SyntheticClipboardEvent;
+ break;
+
+ case 'gotpointercapture':
+ case 'lostpointercapture':
+ case 'pointercancel':
+ case 'pointerdown':
+ case 'pointermove':
+ case 'pointerout':
+ case 'pointerover':
+ case 'pointerup':
+ SyntheticEventCtor = SyntheticPointerEvent;
+ break;
+ }
+
+ var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
+
+ {
+ // Some events don't bubble in the browser.
+ // In the past, React has always bubbled them, but this can be surprising.
+ // We're going to try aligning closer to the browser behavior by not bubbling
+ // them in React either. We'll start by not bubbling onScroll, and then expand.
+ var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
+ // nonDelegatedEvents list in DOMPluginEventSystem.
+ // Then we can remove this special list.
+ // This is a breaking change that can wait until React 18.
+ domEventName === 'scroll';
+
+ var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);
+
+ if (_listeners.length > 0) {
+ // Intentionally create event lazily.
+ var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);
+
+ dispatchQueue.push({
+ event: _event,
+ listeners: _listeners
+ });
+ }
+ }
+}
+
+// TODO: remove top-level side effect.
+registerSimpleEvents();
+registerEvents$2();
+registerEvents$1();
+registerEvents$3();
+registerEvents();
+
+function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ // TODO: we should remove the concept of a "SimpleEventPlugin".
+ // This is the basic functionality of the event system. All
+ // the other plugins are essentially polyfills. So the plugin
+ // should probably be inlined somewhere and have its logic
+ // be core the to event system. This would potentially allow
+ // us to ship builds of React without the polyfilled plugins below.
+ extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
+ var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
+ // event's native "bubble" phase, which means that we're
+ // not in the capture phase. That's because we emulate
+ // the capture phase here still. This is a trade-off,
+ // because in an ideal world we would not emulate and use
+ // the phases properly, like we do with the SimpleEvent
+ // plugin. However, the plugins below either expect
+ // emulation (EnterLeave) or use state localized to that
+ // plugin (BeforeInput, Change, Select). The state in
+ // these modules complicates things, as you'll essentially
+ // get the case where the capture phase event might change
+ // state, only for the following bubble event to come in
+ // later and not trigger anything as the state now
+ // invalidates the heuristics of the event plugin. We
+ // could alter all these plugins to work in such ways, but
+ // that might cause other unknown side-effects that we
+ // can't forsee right now.
+
+ if (shouldProcessPolyfillPlugins) {
+ extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
+ extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ }
+} // List of events that need to be individually attached to media elements.
+
+
+var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
+// set them on the actual target element itself. This is primarily
+// because these events do not consistently bubble in the DOM.
+
+var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));
+
+function executeDispatch(event, listener, currentTarget) {
+ var type = event.type || 'unknown-event';
+ event.currentTarget = currentTarget;
+ invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
+ event.currentTarget = null;
+}
+
+function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
+ var previousInstance;
+
+ if (inCapturePhase) {
+ for (var i = dispatchListeners.length - 1; i >= 0; i--) {
+ var _dispatchListeners$i = dispatchListeners[i],
+ instance = _dispatchListeners$i.instance,
+ currentTarget = _dispatchListeners$i.currentTarget,
+ listener = _dispatchListeners$i.listener;
+
+ if (instance !== previousInstance && event.isPropagationStopped()) {
+ return;
+ }
+
+ executeDispatch(event, listener, currentTarget);
+ previousInstance = instance;
+ }
+ } else {
+ for (var _i = 0; _i < dispatchListeners.length; _i++) {
+ var _dispatchListeners$_i = dispatchListeners[_i],
+ _instance = _dispatchListeners$_i.instance,
+ _currentTarget = _dispatchListeners$_i.currentTarget,
+ _listener = _dispatchListeners$_i.listener;
+
+ if (_instance !== previousInstance && event.isPropagationStopped()) {
+ return;
+ }
+
+ executeDispatch(event, _listener, _currentTarget);
+ previousInstance = _instance;
+ }
+ }
+}
+
+function processDispatchQueue(dispatchQueue, eventSystemFlags) {
+ var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
+
+ for (var i = 0; i < dispatchQueue.length; i++) {
+ var _dispatchQueue$i = dispatchQueue[i],
+ event = _dispatchQueue$i.event,
+ listeners = _dispatchQueue$i.listeners;
+ processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.
+ } // This would be a good time to rethrow if any of the event handlers threw.
+
+
+ rethrowCaughtError();
+}
+
+function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
+ var nativeEventTarget = getEventTarget(nativeEvent);
+ var dispatchQueue = [];
+ extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
+ processDispatchQueue(dispatchQueue, eventSystemFlags);
+}
+
+function listenToNonDelegatedEvent(domEventName, targetElement) {
+ var isCapturePhaseListener = false;
+ var listenerSet = getEventListenerSet(targetElement);
+ var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
+
+ if (!listenerSet.has(listenerSetKey)) {
+ addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
+ listenerSet.add(listenerSetKey);
+ }
+}
+var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
+function listenToAllSupportedEvents(rootContainerElement) {
+ {
+ if (rootContainerElement[listeningMarker]) {
+ // Performance optimization: don't iterate through events
+ // for the same portal container or root node more than once.
+ // TODO: once we remove the flag, we may be able to also
+ // remove some of the bookkeeping maps used for laziness.
+ return;
+ }
+
+ rootContainerElement[listeningMarker] = true;
+ allNativeEvents.forEach(function (domEventName) {
+ if (!nonDelegatedEvents.has(domEventName)) {
+ listenToNativeEvent(domEventName, false, rootContainerElement, null);
+ }
+
+ listenToNativeEvent(domEventName, true, rootContainerElement, null);
+ });
+ }
+}
+function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {
+ var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
+ var target = rootContainerElement; // selectionchange needs to be attached to the document
+ // otherwise it won't capture incoming events that are only
+ // triggered on the document directly.
+
+ if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {
+ target = rootContainerElement.ownerDocument;
+ } // If the event can be delegated (or is capture phase), we can
+ // register it to the root container. Otherwise, we should
+ // register the event to the target element and mark it as
+ // a non-delegated event.
+
+
+ if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {
+ // For all non-delegated events, apart from scroll, we attach
+ // their event listeners to the respective elements that their
+ // events fire on. That means we can skip this step, as event
+ // listener has already been added previously. However, we
+ // special case the scroll event because the reality is that any
+ // element can scroll.
+ // TODO: ideally, we'd eventually apply the same logic to all
+ // events from the nonDelegatedEvents list. Then we can remove
+ // this special case and use the same logic for all events.
+ if (domEventName !== 'scroll') {
+ return;
+ }
+
+ eventSystemFlags |= IS_NON_DELEGATED;
+ target = targetElement;
+ }
+
+ var listenerSet = getEventListenerSet(target);
+ var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then
+ // we need to trap an event listener onto the target.
+
+ if (!listenerSet.has(listenerSetKey)) {
+ if (isCapturePhaseListener) {
+ eventSystemFlags |= IS_CAPTURE_PHASE;
+ }
+
+ addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
+ listenerSet.add(listenerSetKey);
+ }
+}
+
+function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
+ var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
+ // active and not passive.
+
+ var isPassiveListener = undefined;
+
+ if (passiveBrowserEventsSupported) {
+ // Browsers introduced an intervention, making these events
+ // passive by default on document. React doesn't bind them
+ // to document anymore, but changing this now would undo
+ // the performance wins from the change. So we emulate
+ // the existing behavior manually on the roots now.
+ // https://github.com/facebook/react/issues/19651
+ if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
+ isPassiveListener = true;
+ }
+ }
+
+ targetContainer = targetContainer;
+ var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we
+
+
+ if (isCapturePhaseListener) {
+ if (isPassiveListener !== undefined) {
+ unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
+ } else {
+ unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
+ }
+ } else {
+ if (isPassiveListener !== undefined) {
+ unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
+ } else {
+ unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
+ }
+ }
+}
+
+function isMatchingRootContainer(grandContainer, targetContainer) {
+ return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
+}
+
+function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
+ var ancestorInst = targetInst;
+
+ if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
+ var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we
+
+ if (targetInst !== null) {
+ // The below logic attempts to work out if we need to change
+ // the target fiber to a different ancestor. We had similar logic
+ // in the legacy event system, except the big difference between
+ // systems is that the modern event system now has an event listener
+ // attached to each React Root and React Portal Root. Together,
+ // the DOM nodes representing these roots are the "rootContainer".
+ // To figure out which ancestor instance we should use, we traverse
+ // up the fiber tree from the target instance and attempt to find
+ // root boundaries that match that of our current "rootContainer".
+ // If we find that "rootContainer", we find the parent fiber
+ // sub-tree for that root and make that our ancestor instance.
+ var node = targetInst;
+
+ mainLoop: while (true) {
+ if (node === null) {
+ return;
+ }
+
+ var nodeTag = node.tag;
+
+ if (nodeTag === HostRoot || nodeTag === HostPortal) {
+ var container = node.stateNode.containerInfo;
+
+ if (isMatchingRootContainer(container, targetContainerNode)) {
+ break;
+ }
+
+ if (nodeTag === HostPortal) {
+ // The target is a portal, but it's not the rootContainer we're looking for.
+ // Normally portals handle their own events all the way down to the root.
+ // So we should be able to stop now. However, we don't know if this portal
+ // was part of *our* root.
+ var grandNode = node.return;
+
+ while (grandNode !== null) {
+ var grandTag = grandNode.tag;
+
+ if (grandTag === HostRoot || grandTag === HostPortal) {
+ var grandContainer = grandNode.stateNode.containerInfo;
+
+ if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
+ // This is the rootContainer we're looking for and we found it as
+ // a parent of the Portal. That means we can ignore it because the
+ // Portal will bubble through to us.
+ return;
+ }
+ }
+
+ grandNode = grandNode.return;
+ }
+ } // Now we need to find it's corresponding host fiber in the other
+ // tree. To do this we can use getClosestInstanceFromNode, but we
+ // need to validate that the fiber is a host instance, otherwise
+ // we need to traverse up through the DOM till we find the correct
+ // node that is from the other tree.
+
+
+ while (container !== null) {
+ var parentNode = getClosestInstanceFromNode(container);
+
+ if (parentNode === null) {
+ return;
+ }
+
+ var parentTag = parentNode.tag;
+
+ if (parentTag === HostComponent || parentTag === HostText) {
+ node = ancestorInst = parentNode;
+ continue mainLoop;
+ }
+
+ container = container.parentNode;
+ }
+ }
+
+ node = node.return;
+ }
+ }
+ }
+
+ batchedEventUpdates(function () {
+ return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
+ });
+}
+
+function createDispatchListener(instance, listener, currentTarget) {
+ return {
+ instance: instance,
+ listener: listener,
+ currentTarget: currentTarget
+ };
+}
+
+function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {
+ var captureName = reactName !== null ? reactName + 'Capture' : null;
+ var reactEventName = inCapturePhase ? captureName : reactName;
+ var listeners = [];
+ var instance = targetFiber;
+ var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.
+
+ while (instance !== null) {
+ var _instance2 = instance,
+ stateNode = _instance2.stateNode,
+ tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)
+
+ if (tag === HostComponent && stateNode !== null) {
+ lastHostComponent = stateNode; // createEventHandle listeners
+
+
+ if (reactEventName !== null) {
+ var listener = getListener(instance, reactEventName);
+
+ if (listener != null) {
+ listeners.push(createDispatchListener(instance, listener, lastHostComponent));
+ }
+ }
+ } // If we are only accumulating events for the target, then we don't
+ // continue to propagate through the React fiber tree to find other
+ // listeners.
+
+
+ if (accumulateTargetOnly) {
+ break;
+ }
+
+ instance = instance.return;
+ }
+
+ return listeners;
+} // We should only use this function for:
+// - BeforeInputEventPlugin
+// - ChangeEventPlugin
+// - SelectEventPlugin
+// This is because we only process these plugins
+// in the bubble phase, so we need to accumulate two
+// phase event listeners (via emulation).
+
+function accumulateTwoPhaseListeners(targetFiber, reactName) {
+ var captureName = reactName + 'Capture';
+ var listeners = [];
+ var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.
+
+ while (instance !== null) {
+ var _instance3 = instance,
+ stateNode = _instance3.stateNode,
+ tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)
+
+ if (tag === HostComponent && stateNode !== null) {
+ var currentTarget = stateNode;
+ var captureListener = getListener(instance, captureName);
+
+ if (captureListener != null) {
+ listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
+ }
+
+ var bubbleListener = getListener(instance, reactName);
+
+ if (bubbleListener != null) {
+ listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
+ }
+ }
+
+ instance = instance.return;
+ }
+
+ return listeners;
+}
+
+function getParent(inst) {
+ if (inst === null) {
+ return null;
+ }
+
+ do {
+ inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
+ // That is depending on if we want nested subtrees (layers) to bubble
+ // events to their parent. We could also go through parentNode on the
+ // host node but that wouldn't work for React Native and doesn't let us
+ // do the portal feature.
+ } while (inst && inst.tag !== HostComponent);
+
+ if (inst) {
+ return inst;
+ }
+
+ return null;
+}
+/**
+ * Return the lowest common ancestor of A and B, or null if they are in
+ * different trees.
+ */
+
+
+function getLowestCommonAncestor(instA, instB) {
+ var nodeA = instA;
+ var nodeB = instB;
+ var depthA = 0;
+
+ for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
+ depthA++;
+ }
+
+ var depthB = 0;
+
+ for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
+ depthB++;
+ } // If A is deeper, crawl up.
+
+
+ while (depthA - depthB > 0) {
+ nodeA = getParent(nodeA);
+ depthA--;
+ } // If B is deeper, crawl up.
+
+
+ while (depthB - depthA > 0) {
+ nodeB = getParent(nodeB);
+ depthB--;
+ } // Walk in lockstep until we find a match.
+
+
+ var depth = depthA;
+
+ while (depth--) {
+ if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
+ return nodeA;
+ }
+
+ nodeA = getParent(nodeA);
+ nodeB = getParent(nodeB);
+ }
+
+ return null;
+}
+
+function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
+ var registrationName = event._reactName;
+ var listeners = [];
+ var instance = target;
+
+ while (instance !== null) {
+ if (instance === common) {
+ break;
+ }
+
+ var _instance4 = instance,
+ alternate = _instance4.alternate,
+ stateNode = _instance4.stateNode,
+ tag = _instance4.tag;
+
+ if (alternate !== null && alternate === common) {
+ break;
+ }
+
+ if (tag === HostComponent && stateNode !== null) {
+ var currentTarget = stateNode;
+
+ if (inCapturePhase) {
+ var captureListener = getListener(instance, registrationName);
+
+ if (captureListener != null) {
+ listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
+ }
+ } else if (!inCapturePhase) {
+ var bubbleListener = getListener(instance, registrationName);
+
+ if (bubbleListener != null) {
+ listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
+ }
+ }
+ }
+
+ instance = instance.return;
+ }
+
+ if (listeners.length !== 0) {
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+ }
+} // We should only use this function for:
+// - EnterLeaveEventPlugin
+// This is because we only process this plugin
+// in the bubble phase, so we need to accumulate two
+// phase event listeners.
+
+
+function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
+ var common = from && to ? getLowestCommonAncestor(from, to) : null;
+
+ if (from !== null) {
+ accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
+ }
+
+ if (to !== null && enterEvent !== null) {
+ accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
+ }
+}
+function getListenerSetKey(domEventName, capture) {
+ return domEventName + "__" + (capture ? 'capture' : 'bubble');
}
var didWarnInvalidHydration = false;
@@ -5641,11 +8749,6 @@ var normalizeHTML;
{
warnedUnknownTags = {
- // Chrome is the only major browser not shipping <time>. But as of July
- // 2017 it intends to ship it due to widespread usage. We intentionally
- // *don't* warn for <time> even if it's unrecognized by Chrome because
- // it soon will be, and many apps have been using it anyway.
- time: true,
// There are working polyfills for <dialog>. Let people use it.
dialog: true,
// Electron ships a custom <webview> tag to display external web content in
@@ -5659,9 +8762,10 @@ var normalizeHTML;
validatePropertiesInDevelopment = function (type, props) {
validateProperties(type, props);
validateProperties$1(type, props);
- validateProperties$2(type, props,
- /* canUseEventSystem */
- true);
+ validateProperties$2(type, props, {
+ registrationNameDependencies: registrationNameDependencies,
+ possibleRegistrationNames: possibleRegistrationNames
+ });
}; // IE 11 parses & normalizes the style attribute as opposed to other
// browsers. It adds spaces and sorts the properties in some
// non-alphabetical order. Handling that would require sorting CSS
@@ -5755,12 +8859,6 @@ var normalizeHTML;
};
}
-function ensureListeningTo(rootContainerElement, registrationName) {
- var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;
- var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;
- legacyListenToEvent(registrationName, doc);
-}
-
function getOwnerDocumentFromRootContainer(rootContainerElement) {
return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
}
@@ -5772,7 +8870,7 @@ function trapClickOnNonInteractiveElement(node) {
// non-interactive elements, which means delegated click listeners do not
// fire. The workaround for this bug involves attaching an empty click
// listener on the target node.
- // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
+ // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
// Just set it using the onclick property so that we don't have to manage any
// bookkeeping for it. Not sure if we need to clear it when the listener is
// removed.
@@ -5819,13 +8917,15 @@ function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProp
} else if (typeof nextProp === 'number') {
setTextContent(domElement, '' + nextProp);
}
- } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
+ } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
- ensureListeningTo(rootContainerElement, propKey);
+ if (propKey === 'onScroll') {
+ listenToNonDelegatedEvent('scroll', domElement);
+ }
}
} else if (nextProp != null) {
setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
@@ -5945,54 +9045,63 @@ function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
var props;
switch (tag) {
+ case 'dialog':
+ listenToNonDelegatedEvent('cancel', domElement);
+ listenToNonDelegatedEvent('close', domElement);
+ props = rawProps;
+ break;
+
case 'iframe':
case 'object':
case 'embed':
- trapBubbledEvent(TOP_LOAD, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the load event.
+ listenToNonDelegatedEvent('load', domElement);
props = rawProps;
break;
case 'video':
case 'audio':
- // Create listener for each media event
+ // We listen to these events in case to ensure emulated bubble
+ // listeners still fire for all the media events.
for (var i = 0; i < mediaEventTypes.length; i++) {
- trapBubbledEvent(mediaEventTypes[i], domElement);
+ listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
}
props = rawProps;
break;
case 'source':
- trapBubbledEvent(TOP_ERROR, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the error event.
+ listenToNonDelegatedEvent('error', domElement);
props = rawProps;
break;
case 'img':
case 'image':
case 'link':
- trapBubbledEvent(TOP_ERROR, domElement);
- trapBubbledEvent(TOP_LOAD, domElement);
- props = rawProps;
- break;
-
- case 'form':
- trapBubbledEvent(TOP_RESET, domElement);
- trapBubbledEvent(TOP_SUBMIT, domElement);
+ // We listen to these events in case to ensure emulated bubble
+ // listeners still fire for error and load events.
+ listenToNonDelegatedEvent('error', domElement);
+ listenToNonDelegatedEvent('load', domElement);
props = rawProps;
break;
case 'details':
- trapBubbledEvent(TOP_TOGGLE, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the toggle event.
+ listenToNonDelegatedEvent('toggle', domElement);
props = rawProps;
break;
case 'input':
initWrapperState(domElement, rawProps);
- props = getHostProps(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
case 'option':
@@ -6002,20 +9111,20 @@ function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
case 'select':
initWrapperState$1(domElement, rawProps);
- props = getHostProps$2(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
case 'textarea':
initWrapperState$2(domElement, rawProps);
- props = getHostProps$3(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
default:
@@ -6126,7 +9235,7 @@ function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContain
styleUpdates[styleName] = '';
}
}
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
+ } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
// This is a special case. If any listener updates we need to ensure
// that the "current" fiber pointer gets updated so we need a commit
// to update this element.
@@ -6135,7 +9244,7 @@ function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContain
}
} else {
// For all other deleted properties we add it to the queue. We use
- // the whitelist in the commit phase instead.
+ // the allowed property list in the commit phase instead.
(updatePayload = updatePayload || []).push(propKey, null);
}
}
@@ -6201,17 +9310,19 @@ function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContain
}
}
} else if (propKey === CHILDREN) {
- if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
+ if (typeof nextProp === 'string' || typeof nextProp === 'number') {
(updatePayload = updatePayload || []).push(propKey, '' + nextProp);
}
- } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
+ } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
// We eagerly listen to this even though we haven't committed yet.
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
- ensureListeningTo(rootContainerElement, propKey);
+ if (propKey === 'onScroll') {
+ listenToNonDelegatedEvent('scroll', domElement);
+ }
}
if (!updatePayload && lastProp !== nextProp) {
@@ -6220,9 +9331,14 @@ function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContain
// to update this element.
updatePayload = [];
}
+ } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {
+ // If we encounter useOpaqueReference's opaque object, this means we are hydrating.
+ // In this case, call the opaque object's toString function which generates a new client
+ // ID so client and server IDs match and throws to rerender.
+ nextProp.toString();
} else {
// For any other property we always add it to the queue and then we
- // filter it out using the whitelist during the commit.
+ // filter it out using the allowed property list during the commit.
(updatePayload = updatePayload || []).push(propKey, nextProp);
}
}
@@ -6296,47 +9412,56 @@ function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, root
switch (tag) {
+ case 'dialog':
+ listenToNonDelegatedEvent('cancel', domElement);
+ listenToNonDelegatedEvent('close', domElement);
+ break;
+
case 'iframe':
case 'object':
case 'embed':
- trapBubbledEvent(TOP_LOAD, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the load event.
+ listenToNonDelegatedEvent('load', domElement);
break;
case 'video':
case 'audio':
- // Create listener for each media event
+ // We listen to these events in case to ensure emulated bubble
+ // listeners still fire for all the media events.
for (var i = 0; i < mediaEventTypes.length; i++) {
- trapBubbledEvent(mediaEventTypes[i], domElement);
+ listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
}
break;
case 'source':
- trapBubbledEvent(TOP_ERROR, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the error event.
+ listenToNonDelegatedEvent('error', domElement);
break;
case 'img':
case 'image':
case 'link':
- trapBubbledEvent(TOP_ERROR, domElement);
- trapBubbledEvent(TOP_LOAD, domElement);
- break;
-
- case 'form':
- trapBubbledEvent(TOP_RESET, domElement);
- trapBubbledEvent(TOP_SUBMIT, domElement);
+ // We listen to these events in case to ensure emulated bubble
+ // listeners still fire for error and load events.
+ listenToNonDelegatedEvent('error', domElement);
+ listenToNonDelegatedEvent('load', domElement);
break;
case 'details':
- trapBubbledEvent(TOP_TOGGLE, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the toggle event.
+ listenToNonDelegatedEvent('toggle', domElement);
break;
case 'input':
- initWrapperState(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
case 'option':
@@ -6344,19 +9469,19 @@ function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, root
break;
case 'select':
- initWrapperState$1(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
case 'textarea':
- initWrapperState$2(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
}
@@ -6370,7 +9495,7 @@ function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, root
var name = attributes[_i].name.toLowerCase();
switch (name) {
- // Built-in SSR attribute is whitelisted
+ // Built-in SSR attribute is allowed
case 'data-reactroot':
break;
// Controlled attributes are not validated
@@ -6429,13 +9554,15 @@ function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, root
updatePayload = [CHILDREN, '' + nextProp];
}
}
- } else if (registrationNameModules.hasOwnProperty(propKey)) {
+ } else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
- ensureListeningTo(rootContainerElement, propKey);
+ if (propKey === 'onScroll') {
+ listenToNonDelegatedEvent('scroll', domElement);
+ }
}
} else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
typeof isCustomComponentTag === 'boolean') {
@@ -6443,15 +9570,18 @@ function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, root
var serverValue = void 0;
var propertyInfo = getPropertyInfo(propKey);
- if (suppressHydrationWarning) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
+ if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
// TODO: Only ignore them on controlled tags.
propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
var serverHTML = domElement.innerHTML;
var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
- var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');
- if (expectedHTML !== serverHTML) {
- warnForPropDifference(propKey, serverHTML, expectedHTML);
+ if (nextHtml != null) {
+ var expectedHTML = normalizeHTML(domElement, nextHtml);
+
+ if (expectedHTML !== serverHTML) {
+ warnForPropDifference(propKey, serverHTML, expectedHTML);
+ }
}
} else if (propKey === STYLE) {
// $FlowFixMe - Should be inferred as not undefined.
@@ -6638,435 +9768,6 @@ function restoreControlledState$3(domElement, tag, props) {
}
}
-function getActiveElement(doc) {
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
-
- if (typeof doc === 'undefined') {
- return null;
- }
-
- try {
- return doc.activeElement || doc.body;
- } catch (e) {
- return doc.body;
- }
-}
-
-/**
- * Given any node return the first leaf node without children.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {DOMElement|DOMTextNode}
- */
-
-function getLeafNode(node) {
- while (node && node.firstChild) {
- node = node.firstChild;
- }
-
- return node;
-}
-/**
- * Get the next sibling within a container. This will walk up the
- * DOM if a node's siblings have been exhausted.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {?DOMElement|DOMTextNode}
- */
-
-
-function getSiblingNode(node) {
- while (node) {
- if (node.nextSibling) {
- return node.nextSibling;
- }
-
- node = node.parentNode;
- }
-}
-/**
- * Get object describing the nodes which contain characters at offset.
- *
- * @param {DOMElement|DOMTextNode} root
- * @param {number} offset
- * @return {?object}
- */
-
-
-function getNodeForCharacterOffset(root, offset) {
- var node = getLeafNode(root);
- var nodeStart = 0;
- var nodeEnd = 0;
-
- while (node) {
- if (node.nodeType === TEXT_NODE) {
- nodeEnd = nodeStart + node.textContent.length;
-
- if (nodeStart <= offset && nodeEnd >= offset) {
- return {
- node: node,
- offset: offset - nodeStart
- };
- }
-
- nodeStart = nodeEnd;
- }
-
- node = getLeafNode(getSiblingNode(node));
- }
-}
-
-/**
- * @param {DOMElement} outerNode
- * @return {?object}
- */
-
-function getOffsets(outerNode) {
- var ownerDocument = outerNode.ownerDocument;
- var win = ownerDocument && ownerDocument.defaultView || window;
- var selection = win.getSelection && win.getSelection();
-
- if (!selection || selection.rangeCount === 0) {
- return null;
- }
-
- var anchorNode = selection.anchorNode,
- anchorOffset = selection.anchorOffset,
- focusNode = selection.focusNode,
- focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
- // up/down buttons on an <input type="number">. Anonymous divs do not seem to
- // expose properties, triggering a "Permission denied error" if any of its
- // properties are accessed. The only seemingly possible way to avoid erroring
- // is to access a property that typically works for non-anonymous divs and
- // catch any error that may otherwise arise. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
-
- try {
- /* eslint-disable no-unused-expressions */
- anchorNode.nodeType;
- focusNode.nodeType;
- /* eslint-enable no-unused-expressions */
- } catch (e) {
- return null;
- }
-
- return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
-}
-/**
- * Returns {start, end} where `start` is the character/codepoint index of
- * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
- * `end` is the index of (focusNode, focusOffset).
- *
- * Returns null if you pass in garbage input but we should probably just crash.
- *
- * Exported only for testing.
- */
-
-function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
- var length = 0;
- var start = -1;
- var end = -1;
- var indexWithinAnchor = 0;
- var indexWithinFocus = 0;
- var node = outerNode;
- var parentNode = null;
-
- outer: while (true) {
- var next = null;
-
- while (true) {
- if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
- start = length + anchorOffset;
- }
-
- if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
- end = length + focusOffset;
- }
-
- if (node.nodeType === TEXT_NODE) {
- length += node.nodeValue.length;
- }
-
- if ((next = node.firstChild) === null) {
- break;
- } // Moving from `node` to its first child `next`.
-
-
- parentNode = node;
- node = next;
- }
-
- while (true) {
- if (node === outerNode) {
- // If `outerNode` has children, this is always the second time visiting
- // it. If it has no children, this is still the first loop, and the only
- // valid selection is anchorNode and focusNode both equal to this node
- // and both offsets 0, in which case we will have handled above.
- break outer;
- }
-
- if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
- start = length;
- }
-
- if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
- end = length;
- }
-
- if ((next = node.nextSibling) !== null) {
- break;
- }
-
- node = parentNode;
- parentNode = node.parentNode;
- } // Moving from `node` to its next sibling `next`.
-
-
- node = next;
- }
-
- if (start === -1 || end === -1) {
- // This should never happen. (Would happen if the anchor/focus nodes aren't
- // actually inside the passed-in node.)
- return null;
- }
-
- return {
- start: start,
- end: end
- };
-}
-/**
- * In modern non-IE browsers, we can support both forward and backward
- * selections.
- *
- * Note: IE10+ supports the Selection object, but it does not support
- * the `extend` method, which means that even in modern IE, it's not possible
- * to programmatically create a backward selection. Thus, for all IE
- * versions, we use the old IE API to create our selections.
- *
- * @param {DOMElement|DOMTextNode} node
- * @param {object} offsets
- */
-
-function setOffsets(node, offsets) {
- var doc = node.ownerDocument || document;
- var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
- // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
- // fails when pasting 100+ items)
-
- if (!win.getSelection) {
- return;
- }
-
- var selection = win.getSelection();
- var length = node.textContent.length;
- var start = Math.min(offsets.start, length);
- var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
- // Flip backward selections, so we can set with a single range.
-
- if (!selection.extend && start > end) {
- var temp = end;
- end = start;
- start = temp;
- }
-
- var startMarker = getNodeForCharacterOffset(node, start);
- var endMarker = getNodeForCharacterOffset(node, end);
-
- if (startMarker && endMarker) {
- if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
- return;
- }
-
- var range = doc.createRange();
- range.setStart(startMarker.node, startMarker.offset);
- selection.removeAllRanges();
-
- if (start > end) {
- selection.addRange(range);
- selection.extend(endMarker.node, endMarker.offset);
- } else {
- range.setEnd(endMarker.node, endMarker.offset);
- selection.addRange(range);
- }
- }
-}
-
-function isTextNode(node) {
- return node && node.nodeType === TEXT_NODE;
-}
-
-function containsNode(outerNode, innerNode) {
- if (!outerNode || !innerNode) {
- return false;
- } else if (outerNode === innerNode) {
- return true;
- } else if (isTextNode(outerNode)) {
- return false;
- } else if (isTextNode(innerNode)) {
- return containsNode(outerNode, innerNode.parentNode);
- } else if ('contains' in outerNode) {
- return outerNode.contains(innerNode);
- } else if (outerNode.compareDocumentPosition) {
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
- } else {
- return false;
- }
-}
-
-function isInDocument(node) {
- return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
-}
-
-function isSameOriginFrame(iframe) {
- try {
- // Accessing the contentDocument of a HTMLIframeElement can cause the browser
- // to throw, e.g. if it has a cross-origin src attribute.
- // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
- // iframe.contentDocument.defaultView;
- // A safety way is to access one of the cross origin properties: Window or Location
- // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
- // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
- return typeof iframe.contentWindow.location.href === 'string';
- } catch (err) {
- return false;
- }
-}
-
-function getActiveElementDeep() {
- var win = window;
- var element = getActiveElement();
-
- while (element instanceof win.HTMLIFrameElement) {
- if (isSameOriginFrame(element)) {
- win = element.contentWindow;
- } else {
- return element;
- }
-
- element = getActiveElement(win.document);
- }
-
- return element;
-}
-/**
- * @ReactInputSelection: React input selection module. Based on Selection.js,
- * but modified to be suitable for react and has a couple of bug fixes (doesn't
- * assume buttons have range selections allowed).
- * Input selection module for React.
- */
-
-/**
- * @hasSelectionCapabilities: we get the element types that support selection
- * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
- * and `selectionEnd` rows.
- */
-
-
-function hasSelectionCapabilities(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
-}
-function getSelectionInformation() {
- var focusedElem = getActiveElementDeep();
- return {
- // Used by Flare
- activeElementDetached: null,
- focusedElem: focusedElem,
- selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
- };
-}
-/**
- * @restoreSelection: If any selection information was potentially lost,
- * restore it. This is useful when performing operations that could remove dom
- * nodes and place them back in, resulting in focus being lost.
- */
-
-function restoreSelection(priorSelectionInformation) {
- var curFocusedElem = getActiveElementDeep();
- var priorFocusedElem = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
-
- if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
- if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
- setSelection(priorFocusedElem, priorSelectionRange);
- } // Focusing a node can change the scroll position, which is undesirable
-
-
- var ancestors = [];
- var ancestor = priorFocusedElem;
-
- while (ancestor = ancestor.parentNode) {
- if (ancestor.nodeType === ELEMENT_NODE) {
- ancestors.push({
- element: ancestor,
- left: ancestor.scrollLeft,
- top: ancestor.scrollTop
- });
- }
- }
-
- if (typeof priorFocusedElem.focus === 'function') {
- priorFocusedElem.focus();
- }
-
- for (var i = 0; i < ancestors.length; i++) {
- var info = ancestors[i];
- info.element.scrollLeft = info.left;
- info.element.scrollTop = info.top;
- }
- }
-}
-/**
- * @getSelection: Gets the selection bounds of a focused textarea, input or
- * contentEditable node.
- * -@input: Look up selection bounds of this input
- * -@return {start: selectionStart, end: selectionEnd}
- */
-
-function getSelection(input) {
- var selection;
-
- if ('selectionStart' in input) {
- // Modern browser with input or textarea.
- selection = {
- start: input.selectionStart,
- end: input.selectionEnd
- };
- } else {
- // Content editable or old IE textarea.
- selection = getOffsets(input);
- }
-
- return selection || {
- start: 0,
- end: 0
- };
-}
-/**
- * @setSelection: Sets the selection bounds of a textarea or input and focuses
- * the input.
- * -@input Set selection bounds of this input or textarea
- * -@offsets Object of same form that is returned from get*
- */
-
-function setSelection(input, offsets) {
- var start = offsets.start,
- end = offsets.end;
-
- if (end === undefined) {
- end = start;
- }
-
- if ('selectionStart' in input) {
- input.selectionStart = start;
- input.selectionEnd = Math.min(end, input.value.length);
- } else {
- setOffsets(input, offsets);
- }
-}
-
var validateDOMNesting = function () {};
var updatedAncestorInfo = function () {};
@@ -7349,8 +10050,7 @@ var updatedAncestorInfo = function () {};
}
var ancestorTag = invalidParentOrAncestor.tag;
- var addendum = getCurrentFiberStackInDev();
- var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;
+ var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;
if (didWarn$1[warnKey]) {
return;
@@ -7461,13 +10161,15 @@ function getPublicInstance(instance) {
function prepareForCommit(containerInfo) {
eventsEnabled = isEnabled();
selectionInformation = getSelectionInformation();
+ var activeInstance = null;
+
setEnabled(false);
+ return activeInstance;
}
function resetAfterCommit(containerInfo) {
restoreSelection(selectionInformation);
setEnabled(eventsEnabled);
eventsEnabled = null;
-
selectionInformation = null;
}
function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
@@ -7510,14 +10212,11 @@ function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstan
}
}
- return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
+ return diffProperties(domElement, type, oldProps, newProps);
}
function shouldSetTextContent(type, props) {
return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
}
-function shouldDeprioritizeSubtree(type, props) {
- return !!props.hidden;
-}
function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
{
var hostContextDev = hostContext;
@@ -7597,6 +10296,7 @@ function insertInContainerBefore(container, child, beforeChild) {
container.insertBefore(child, beforeChild);
}
}
+
function removeChild(parentInstance, child) {
parentInstance.removeChild(child);
}
@@ -7607,11 +10307,9 @@ function removeChildFromContainer(container, child) {
container.removeChild(child);
}
}
-
function hideInstance(instance) {
+ // TODO: Does this work for all element types? What about MathML? Should we
// pass host context to this method?
-
-
instance = instance;
var style = instance.style;
@@ -7632,6 +10330,17 @@ function unhideInstance(instance, props) {
}
function unhideTextInstance(textInstance, text) {
textInstance.nodeValue = text;
+}
+function clearContainer(container) {
+ if (container.nodeType === ELEMENT_NODE) {
+ container.textContent = '';
+ } else if (container.nodeType === DOCUMENT_NODE) {
+ var body = container.body;
+
+ if (body != null) {
+ body.textContent = '';
+ }
+ }
} // -------------------
function canHydrateInstance(instance, type, props) {
if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
@@ -7688,7 +10397,7 @@ function hydrateInstance(instance, type, props, rootContainerInstance, hostConte
parentNamespace = hostContextDev.namespace;
}
- return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
+ return diffHydratedProperties(instance, type, props, parentNamespace);
}
function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
precacheFiberNode(internalInstanceHandle, textInstance);
@@ -7811,11 +10520,41 @@ function didNotFindHydratableTextInstance(parentType, parentProps, parentInstanc
function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
}
+var clientId = 0;
+function makeClientIdInDEV(warnOnAccessInDEV) {
+ var id = 'r:' + (clientId++).toString(36);
+ return {
+ toString: function () {
+ warnOnAccessInDEV();
+ return id;
+ },
+ valueOf: function () {
+ warnOnAccessInDEV();
+ return id;
+ }
+ };
+}
+function isOpaqueHydratingObject(value) {
+ return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;
+}
+function makeOpaqueHydratingObject(attemptToReadValue) {
+ return {
+ $$typeof: REACT_OPAQUE_ID_TYPE,
+ toString: attemptToReadValue,
+ valueOf: attemptToReadValue
+ };
+}
+function preparePortalMount(portalInstance) {
+ {
+ listenToAllSupportedEvents(portalInstance);
+ }
+}
var randomKey = Math.random().toString(36).slice(2);
-var internalInstanceKey = '__reactInternalInstance$' + randomKey;
-var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
-var internalContainerInstanceKey = '__reactContainere$' + randomKey;
+var internalInstanceKey = '__reactFiber$' + randomKey;
+var internalPropsKey = '__reactProps$' + randomKey;
+var internalContainerInstanceKey = '__reactContainer$' + randomKey;
+var internalEventHandlersKey = '__reactEvents$' + randomKey;
function precacheFiberNode(hostInst, node) {
node[internalInstanceKey] = hostInst;
}
@@ -7918,7 +10657,7 @@ function getClosestInstanceFromNode(targetNode) {
* instance, or null if the node was not rendered by this React.
*/
-function getInstanceFromNode$1(node) {
+function getInstanceFromNode(node) {
var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
if (inst) {
@@ -7936,7 +10675,7 @@ function getInstanceFromNode$1(node) {
* DOM node.
*/
-function getNodeFromInstance$1(inst) {
+function getNodeFromInstance(inst) {
if (inst.tag === HostComponent || inst.tag === HostText) {
// In Fiber this, is just the state node right now. We assume it will be
// a host component or host text.
@@ -7951,2670 +10690,82 @@ function getNodeFromInstance$1(inst) {
}
}
}
-function getFiberCurrentPropsFromNode$1(node) {
- return node[internalEventHandlersKey] || null;
+function getFiberCurrentPropsFromNode(node) {
+ return node[internalPropsKey] || null;
}
function updateFiberProps(node, props) {
- node[internalEventHandlersKey] = props;
-}
-
-function getParent(inst) {
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
-
- if (inst) {
- return inst;
- }
-
- return null;
+ node[internalPropsKey] = props;
}
-/**
- * Return the lowest common ancestor of A and B, or null if they are in
- * different trees.
- */
-
-
-function getLowestCommonAncestor(instA, instB) {
- var depthA = 0;
+function getEventListenerSet(node) {
+ var elementListenerSet = node[internalEventHandlersKey];
- for (var tempA = instA; tempA; tempA = getParent(tempA)) {
- depthA++;
+ if (elementListenerSet === undefined) {
+ elementListenerSet = node[internalEventHandlersKey] = new Set();
}
- var depthB = 0;
-
- for (var tempB = instB; tempB; tempB = getParent(tempB)) {
- depthB++;
- } // If A is deeper, crawl up.
-
-
- while (depthA - depthB > 0) {
- instA = getParent(instA);
- depthA--;
- } // If B is deeper, crawl up.
-
-
- while (depthB - depthA > 0) {
- instB = getParent(instB);
- depthB--;
- } // Walk in lockstep until we find a match.
-
-
- var depth = depthA;
-
- while (depth--) {
- if (instA === instB || instA === instB.alternate) {
- return instA;
- }
-
- instA = getParent(instA);
- instB = getParent(instB);
- }
-
- return null;
+ return elementListenerSet;
}
-/**
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
- */
-
-function traverseTwoPhase(inst, fn, arg) {
- var path = [];
-
- while (inst) {
- path.push(inst);
- inst = getParent(inst);
- }
-
- var i;
-
- for (i = path.length; i-- > 0;) {
- fn(path[i], 'captured', arg);
- }
-
- for (i = 0; i < path.length; i++) {
- fn(path[i], 'bubbled', arg);
- }
-}
-/**
- * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
- * should would receive a `mouseEnter` or `mouseLeave` event.
- *
- * Does not invoke the callback on the nearest common ancestor because nothing
- * "entered" or "left" that element.
- */
-
-function traverseEnterLeave(from, to, fn, argFrom, argTo) {
- var common = from && to ? getLowestCommonAncestor(from, to) : null;
- var pathFrom = [];
-
- while (true) {
- if (!from) {
- break;
- }
-
- if (from === common) {
- break;
- }
-
- var alternate = from.alternate;
-
- if (alternate !== null && alternate === common) {
- break;
- }
-
- pathFrom.push(from);
- from = getParent(from);
- }
-
- var pathTo = [];
-
- while (true) {
- if (!to) {
- break;
- }
-
- if (to === common) {
- break;
- }
-
- var _alternate = to.alternate;
-
- if (_alternate !== null && _alternate === common) {
- break;
- }
-
- pathTo.push(to);
- to = getParent(to);
- }
-
- for (var i = 0; i < pathFrom.length; i++) {
- fn(pathFrom[i], 'bubbled', argFrom);
- }
-
- for (var _i = pathTo.length; _i-- > 0;) {
- fn(pathTo[_i], 'captured', argTo);
- }
-}
-
-function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
-}
-
-function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
-
- default:
- return false;
- }
-}
-/**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
-
-
-function getListener(inst, registrationName) {
- var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
- // live here; needs to be moved to a better place soon
-
- var stateNode = inst.stateNode;
-
- if (!stateNode) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
-
- var props = getFiberCurrentPropsFromNode(stateNode);
-
- if (!props) {
- // Work in progress.
- return null;
- }
-
- listener = props[registrationName];
-
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
-
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
-
- return listener;
-}
-
-/**
- * Some event types have a notion of different registration names for different
- * "phases" of propagation. This finds listeners by a given phase.
- */
-function listenerAtPhase(inst, event, propagationPhase) {
- var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
- return getListener(inst, registrationName);
-}
-/**
- * A small set of propagation patterns, each of which will accept a small amount
- * of information, and generate a set of "dispatch ready event objects" - which
- * are sets of events that have already been annotated with a set of dispatched
- * listener functions/ids. The API is designed this way to discourage these
- * propagation strategies from actually executing the dispatches, since we
- * always want to collect the entire set of dispatches before executing even a
- * single one.
- */
-
-/**
- * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
- * here, allows us to not have to bind or create functions for each event.
- * Mutating the event's members allows us to not have to create a wrapping
- * "dispatch" object that pairs the event with the listener.
- */
-
-
-function accumulateDirectionalDispatches(inst, phase, event) {
- {
- if (!inst) {
- error('Dispatching inst must not be null');
- }
- }
-
- var listener = listenerAtPhase(inst, event, phase);
-
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
-}
-/**
- * Collect dispatches (must be entirely collected before dispatching - see unit
- * tests). Lazily allocate the array to conserve memory. We must loop through
- * each event and perform the traversal for each one. We cannot perform a
- * single traversal for the entire collection of events because each event may
- * have a different target.
- */
-
-
-function accumulateTwoPhaseDispatchesSingle(event) {
- if (event && event.dispatchConfig.phasedRegistrationNames) {
- traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
- }
-}
-/**
- * Accumulates without regard to direction, does not look for phased
- * registration names. Same as `accumulateDirectDispatchesSingle` but without
- * requiring that the `dispatchMarker` be the same as the dispatched ID.
- */
-
-
-function accumulateDispatches(inst, ignoredDirection, event) {
- if (inst && event && event.dispatchConfig.registrationName) {
- var registrationName = event.dispatchConfig.registrationName;
- var listener = getListener(inst, registrationName);
-
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
- }
-}
-/**
- * Accumulates dispatches on an `SyntheticEvent`, but only for the
- * `dispatchMarker`.
- * @param {SyntheticEvent} event
- */
-
-
-function accumulateDirectDispatchesSingle(event) {
- if (event && event.dispatchConfig.registrationName) {
- accumulateDispatches(event._targetInst, null, event);
- }
-}
-
-function accumulateTwoPhaseDispatches(events) {
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
-}
-function accumulateEnterLeaveDispatches(leave, enter, from, to) {
- traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
-}
-function accumulateDirectDispatches(events) {
- forEachAccumulated(events, accumulateDirectDispatchesSingle);
-}
-
-/**
- * These variables store information about text content of a target node,
- * allowing comparison of content before and after a given event.
- *
- * Identify the node where selection currently begins, then observe
- * both its text content and its current position in the DOM. Since the
- * browser may natively replace the target node during composition, we can
- * use its position to find its replacement.
- *
- *
- */
-var root = null;
-var startText = null;
-var fallbackText = null;
-function initialize(nativeEventTarget) {
- root = nativeEventTarget;
- startText = getText();
- return true;
-}
-function reset() {
- root = null;
- startText = null;
- fallbackText = null;
-}
-function getData() {
- if (fallbackText) {
- return fallbackText;
- }
-
- var start;
- var startValue = startText;
- var startLength = startValue.length;
- var end;
- var endValue = getText();
- var endLength = endValue.length;
-
- for (start = 0; start < startLength; start++) {
- if (startValue[start] !== endValue[start]) {
- break;
- }
- }
-
- var minEnd = startLength - start;
-
- for (end = 1; end <= minEnd; end++) {
- if (startValue[startLength - end] !== endValue[endLength - end]) {
- break;
- }
- }
-
- var sliceTail = end > 1 ? 1 - end : undefined;
- fallbackText = endValue.slice(start, sliceTail);
- return fallbackText;
-}
-function getText() {
- if ('value' in root) {
- return root.value;
- }
-
- return root.textContent;
-}
-
-var EVENT_POOL_SIZE = 10;
-/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var EventInterface = {
- type: null,
- target: null,
- // currentTarget is set when dispatching; no use in copying it here
- currentTarget: function () {
- return null;
- },
- eventPhase: null,
- bubbles: null,
- cancelable: null,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: null,
- isTrusted: null
-};
-
-function functionThatReturnsTrue() {
- return true;
-}
-
-function functionThatReturnsFalse() {
- return false;
-}
-/**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- *
- * @param {object} dispatchConfig Configuration used to dispatch this event.
- * @param {*} targetInst Marker identifying the event target.
- * @param {object} nativeEvent Native browser event.
- * @param {DOMEventTarget} nativeEventTarget Target node.
- */
+var loggedTypeFailures = {};
+var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
+function setCurrentlyValidatingElement(element) {
{
- // these have a getter/setter for warnings
- delete this.nativeEvent;
- delete this.preventDefault;
- delete this.stopPropagation;
- delete this.isDefaultPrevented;
- delete this.isPropagationStopped;
- }
-
- this.dispatchConfig = dispatchConfig;
- this._targetInst = targetInst;
- this.nativeEvent = nativeEvent;
- var Interface = this.constructor.Interface;
-
- for (var propName in Interface) {
- if (!Interface.hasOwnProperty(propName)) {
- continue;
- }
-
- {
- delete this[propName]; // this has a getter/setter for warnings
- }
-
- var normalize = Interface[propName];
-
- if (normalize) {
- this[propName] = normalize(nativeEvent);
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
- if (propName === 'target') {
- this.target = nativeEventTarget;
- } else {
- this[propName] = nativeEvent[propName];
- }
- }
- }
-
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
-
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
-
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
-}
-
-_assign(SyntheticEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.preventDefault) {
- event.preventDefault();
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
-
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.stopPropagation) {
- event.stopPropagation();
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
-
- this.isPropagationStopped = functionThatReturnsTrue;
- },
-
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {
- this.isPersistent = functionThatReturnsTrue;
- },
-
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsFalse,
-
- /**
- * `PooledClass` looks for `destructor` on each instance it releases.
- */
- destructor: function () {
- var Interface = this.constructor.Interface;
-
- for (var propName in Interface) {
- {
- Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
- }
- }
-
- this.dispatchConfig = null;
- this._targetInst = null;
- this.nativeEvent = null;
- this.isDefaultPrevented = functionThatReturnsFalse;
- this.isPropagationStopped = functionThatReturnsFalse;
- this._dispatchListeners = null;
- this._dispatchInstances = null;
-
- {
- Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
- Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
- Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
- Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
- Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
- }
- }
-});
-
-SyntheticEvent.Interface = EventInterface;
-/**
- * Helper to reduce boilerplate when creating subclasses.
- */
-
-SyntheticEvent.extend = function (Interface) {
- var Super = this;
-
- var E = function () {};
-
- E.prototype = Super.prototype;
- var prototype = new E();
-
- function Class() {
- return Super.apply(this, arguments);
- }
-
- _assign(prototype, Class.prototype);
-
- Class.prototype = prototype;
- Class.prototype.constructor = Class;
- Class.Interface = _assign({}, Super.Interface, Interface);
- Class.extend = Super.extend;
- addEventPoolingTo(Class);
- return Class;
-};
-
-addEventPoolingTo(SyntheticEvent);
-/**
- * Helper to nullify syntheticEvent instance properties when destructing
- *
- * @param {String} propName
- * @param {?object} getVal
- * @return {object} defineProperty object
- */
-
-function getPooledWarningPropertyDefinition(propName, getVal) {
- var isFunction = typeof getVal === 'function';
- return {
- configurable: true,
- set: set,
- get: get
- };
-
- function set(val) {
- var action = isFunction ? 'setting the method' : 'setting the property';
- warn(action, 'This is effectively a no-op');
- return val;
- }
-
- function get() {
- var action = isFunction ? 'accessing the method' : 'accessing the property';
- var result = isFunction ? 'This is a no-op function' : 'This is set to null';
- warn(action, result);
- return getVal;
- }
-
- function warn(action, result) {
- {
- error("This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
- }
- }
-}
-
-function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
- var EventConstructor = this;
-
- if (EventConstructor.eventPool.length) {
- var instance = EventConstructor.eventPool.pop();
- EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
- return instance;
- }
-
- return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
-}
-
-function releasePooledEvent(event) {
- var EventConstructor = this;
-
- if (!(event instanceof EventConstructor)) {
- {
- throw Error( "Trying to release an event instance into a pool of a different type." );
- }
- }
-
- event.destructor();
-
- if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
- EventConstructor.eventPool.push(event);
- }
-}
-
-function addEventPoolingTo(EventConstructor) {
- EventConstructor.eventPool = [];
- EventConstructor.getPooled = getPooledEvent;
- EventConstructor.release = releasePooledEvent;
-}
-
-/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
- */
-
-var SyntheticCompositionEvent = SyntheticEvent.extend({
- data: null
-});
-
-/**
- * @interface Event
- * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
- * /#events-inputevents
- */
-
-var SyntheticInputEvent = SyntheticEvent.extend({
- data: null
-});
-
-var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
-
-var START_KEYCODE = 229;
-var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
-var documentMode = null;
-
-if (canUseDOM && 'documentMode' in document) {
- documentMode = document.documentMode;
-} // Webkit offers a very useful `textInput` event that can be used to
-// directly represent `beforeInput`. The IE `textinput` event is not as
-// useful, so we don't use it.
-
-
-var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
-// by the native compositionend event may be incorrect. Japanese ideographic
-// spaces, for instance (\u3000) are not recorded correctly.
-
-var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
-var SPACEBAR_CODE = 32;
-var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names.
-
-var eventTypes = {
- beforeInput: {
- phasedRegistrationNames: {
- bubbled: 'onBeforeInput',
- captured: 'onBeforeInputCapture'
- },
- dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]
- },
- compositionEnd: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionEnd',
- captured: 'onCompositionEndCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- },
- compositionStart: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionStart',
- captured: 'onCompositionStartCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- },
- compositionUpdate: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionUpdate',
- captured: 'onCompositionUpdateCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- }
-}; // Track whether we've ever handled a keypress on the space key.
-
-var hasSpaceKeypress = false;
-/**
- * Return whether a native keypress event is assumed to be a command.
- * This is required because Firefox fires `keypress` events for key commands
- * (cut, copy, select-all, etc.) even though no character is inserted.
- */
-
-function isKeypressCommand(nativeEvent) {
- return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
- !(nativeEvent.ctrlKey && nativeEvent.altKey);
-}
-/**
- * Translate native top level events into event types.
- *
- * @param {string} topLevelType
- * @return {object}
- */
-
-
-function getCompositionEventType(topLevelType) {
- switch (topLevelType) {
- case TOP_COMPOSITION_START:
- return eventTypes.compositionStart;
-
- case TOP_COMPOSITION_END:
- return eventTypes.compositionEnd;
-
- case TOP_COMPOSITION_UPDATE:
- return eventTypes.compositionUpdate;
- }
-}
-/**
- * Does our fallback best-guess model think this event signifies that
- * composition has begun?
- *
- * @param {string} topLevelType
- * @param {object} nativeEvent
- * @return {boolean}
- */
-
-
-function isFallbackCompositionStart(topLevelType, nativeEvent) {
- return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;
-}
-/**
- * Does our fallback mode think that this event is the end of composition?
- *
- * @param {string} topLevelType
- * @param {object} nativeEvent
- * @return {boolean}
- */
-
-
-function isFallbackCompositionEnd(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_KEY_UP:
- // Command keys insert or clear IME input.
- return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
-
- case TOP_KEY_DOWN:
- // Expect IME keyCode on each keydown. If we get any other
- // code we must have exited earlier.
- return nativeEvent.keyCode !== START_KEYCODE;
-
- case TOP_KEY_PRESS:
- case TOP_MOUSE_DOWN:
- case TOP_BLUR:
- // Events are not possible without cancelling IME.
- return true;
-
- default:
- return false;
- }
-}
-/**
- * Google Input Tools provides composition data via a CustomEvent,
- * with the `data` property populated in the `detail` object. If this
- * is available on the event object, use it. If not, this is a plain
- * composition event and we have nothing special to extract.
- *
- * @param {object} nativeEvent
- * @return {?string}
- */
-
-
-function getDataFromCustomEvent(nativeEvent) {
- var detail = nativeEvent.detail;
-
- if (typeof detail === 'object' && 'data' in detail) {
- return detail.data;
- }
-
- return null;
-}
-/**
- * Check if a composition event was triggered by Korean IME.
- * Our fallback mode does not work well with IE's Korean IME,
- * so just use native composition events when Korean IME is used.
- * Although CompositionEvent.locale property is deprecated,
- * it is available in IE, where our fallback mode is enabled.
- *
- * @param {object} nativeEvent
- * @return {boolean}
- */
-
-
-function isUsingKoreanIME(nativeEvent) {
- return nativeEvent.locale === 'ko';
-} // Track the current IME composition status, if any.
-
-
-var isComposing = false;
-/**
- * @return {?object} A SyntheticCompositionEvent.
- */
-
-function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
- var eventType;
- var fallbackData;
-
- if (canUseCompositionEvent) {
- eventType = getCompositionEventType(topLevelType);
- } else if (!isComposing) {
- if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
- eventType = eventTypes.compositionStart;
- }
- } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
- eventType = eventTypes.compositionEnd;
- }
-
- if (!eventType) {
- return null;
- }
-
- if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
- // The current composition is stored statically and must not be
- // overwritten while composition continues.
- if (!isComposing && eventType === eventTypes.compositionStart) {
- isComposing = initialize(nativeEventTarget);
- } else if (eventType === eventTypes.compositionEnd) {
- if (isComposing) {
- fallbackData = getData();
- }
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
}
-
- var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
-
- if (fallbackData) {
- // Inject data generated from fallback path into the synthetic event.
- // This matches the property of native CompositionEventInterface.
- event.data = fallbackData;
- } else {
- var customData = getDataFromCustomEvent(nativeEvent);
-
- if (customData !== null) {
- event.data = customData;
- }
- }
-
- accumulateTwoPhaseDispatches(event);
- return event;
}
-/**
- * @param {TopLevelType} topLevelType Number from `TopLevelType`.
- * @param {object} nativeEvent Native browser event.
- * @return {?string} The string corresponding to this `beforeInput` event.
- */
-
-
-function getNativeBeforeInputChars(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_COMPOSITION_END:
- return getDataFromCustomEvent(nativeEvent);
-
- case TOP_KEY_PRESS:
- /**
- * If native `textInput` events are available, our goal is to make
- * use of them. However, there is a special case: the spacebar key.
- * In Webkit, preventing default on a spacebar `textInput` event
- * cancels character insertion, but it *also* causes the browser
- * to fall back to its default spacebar behavior of scrolling the
- * page.
- *
- * Tracking at:
- * https://code.google.com/p/chromium/issues/detail?id=355103
- *
- * To avoid this issue, use the keypress event as if no `textInput`
- * event is available.
- */
- var which = nativeEvent.which;
-
- if (which !== SPACEBAR_CODE) {
- return null;
- }
-
- hasSpaceKeypress = true;
- return SPACEBAR_CHAR;
-
- case TOP_TEXT_INPUT:
- // Record the characters to be added to the DOM.
- var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
- // it at the keypress level and bail immediately. Android Chrome
- // doesn't give us keycodes, so we need to ignore it.
-
- if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
- return null;
- }
-
- return chars;
-
- default:
- // For other native event types, do nothing.
- return null;
- }
-}
-/**
- * For browsers that do not provide the `textInput` event, extract the
- * appropriate string to use for SyntheticInputEvent.
- *
- * @param {number} topLevelType Number from `TopLevelEventTypes`.
- * @param {object} nativeEvent Native browser event.
- * @return {?string} The fallback string for this `beforeInput` event.
- */
-
-
-function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
- // If we are currently composing (IME) and using a fallback to do so,
- // try to extract the composed characters from the fallback object.
- // If composition event is available, we extract a string only at
- // compositionevent, otherwise extract it at fallback events.
- if (isComposing) {
- if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
- var chars = getData();
- reset();
- isComposing = false;
- return chars;
- }
-
- return null;
- }
-
- switch (topLevelType) {
- case TOP_PASTE:
- // If a paste event occurs after a keypress, throw out the input
- // chars. Paste events should not lead to BeforeInput events.
- return null;
-
- case TOP_KEY_PRESS:
- /**
- * As of v27, Firefox may fire keypress events even when no character
- * will be inserted. A few possibilities:
- *
- * - `which` is `0`. Arrow keys, Esc key, etc.
- *
- * - `which` is the pressed key code, but no char is available.
- * Ex: 'AltGr + d` in Polish. There is no modified character for
- * this key combination and no character is inserted into the
- * document, but FF fires the keypress for char code `100` anyway.
- * No `input` event will occur.
- *
- * - `which` is the pressed key code, but a command combination is
- * being used. Ex: `Cmd+C`. No character is inserted, and no
- * `input` event will occur.
- */
- if (!isKeypressCommand(nativeEvent)) {
- // IE fires the `keypress` event when a user types an emoji via
- // Touch keyboard of Windows. In such a case, the `char` property
- // holds an emoji character like `\uD83D\uDE0A`. Because its length
- // is 2, the property `which` does not represent an emoji correctly.
- // In such a case, we directly return the `char` property instead of
- // using `which`.
- if (nativeEvent.char && nativeEvent.char.length > 1) {
- return nativeEvent.char;
- } else if (nativeEvent.which) {
- return String.fromCharCode(nativeEvent.which);
- }
- }
-
- return null;
-
- case TOP_COMPOSITION_END:
- return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
-
- default:
- return null;
- }
-}
-/**
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
- * `textInput` or fallback behavior.
- *
- * @return {?object} A SyntheticInputEvent.
- */
-
-
-function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
- var chars;
-
- if (canUseTextInputEvent) {
- chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
- } else {
- chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
- } // If no characters are being inserted, no BeforeInput event should
- // be fired.
-
-
- if (!chars) {
- return null;
- }
-
- var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
- event.data = chars;
- accumulateTwoPhaseDispatches(event);
- return event;
-}
-/**
- * Create an `onBeforeInput` event to match
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
- *
- * This event plugin is based on the native `textInput` event
- * available in Chrome, Safari, Opera, and IE. This event fires after
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
- *
- * `beforeInput` is spec'd but not implemented in any browsers, and
- * the `input` event does not provide any useful information about what has
- * actually been added, contrary to the spec. Thus, `textInput` is the best
- * available event to identify the characters that have actually been inserted
- * into the target node.
- *
- * This plugin is also responsible for emitting `composition` events, thus
- * allowing us to share composition fallback code for both `beforeInput` and
- * `composition` event types.
- */
-
-
-var BeforeInputEventPlugin = {
- eventTypes: eventTypes,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
- var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
-
- if (composition === null) {
- return beforeInput;
- }
-
- if (beforeInput === null) {
- return composition;
- }
-
- return [composition, beforeInput];
- }
-};
-
-/**
- * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
- */
-var supportedInputTypes = {
- color: true,
- date: true,
- datetime: true,
- 'datetime-local': true,
- email: true,
- month: true,
- number: true,
- password: true,
- range: true,
- search: true,
- tel: true,
- text: true,
- time: true,
- url: true,
- week: true
-};
-
-function isTextInputElement(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
-
- if (nodeName === 'input') {
- return !!supportedInputTypes[elem.type];
- }
-
- if (nodeName === 'textarea') {
- return true;
- }
-
- return false;
-}
-
-var eventTypes$1 = {
- change: {
- phasedRegistrationNames: {
- bubbled: 'onChange',
- captured: 'onChangeCapture'
- },
- dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]
- }
-};
-
-function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
- var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
- event.type = 'change'; // Flag this event loop as needing state restore.
-
- enqueueStateRestore(target);
- accumulateTwoPhaseDispatches(event);
- return event;
-}
-/**
- * For IE shims
- */
-
-
-var activeElement = null;
-var activeElementInst = null;
-/**
- * SECTION: handle `change` event
- */
-
-function shouldUseChangeEvent(elem) {
- var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
-}
-
-function manualDispatchChangeEvent(nativeEvent) {
- var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
- // other events and have it go through ReactBrowserEventEmitter. Since it
- // doesn't, we manually listen for the events and so we have to enqueue and
- // process the abstract event manually.
- //
- // Batching is necessary here in order to ensure that all event handlers run
- // before the next rerender (including event handlers attached to ancestor
- // elements instead of directly on the input). Without this, controlled
- // components don't work properly in conjunction with event bubbling because
- // the component is rerendered and the value reverted before all the event
- // handlers can run. See https://github.com/facebook/react/issues/708.
-
- batchedUpdates(runEventInBatch, event);
-}
-
-function runEventInBatch(event) {
- runEventsInBatch(event);
-}
-
-function getInstIfValueChanged(targetInst) {
- var targetNode = getNodeFromInstance$1(targetInst);
-
- if (updateValueIfChanged(targetNode)) {
- return targetInst;
- }
-}
-
-function getTargetInstForChangeEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_CHANGE) {
- return targetInst;
- }
-}
-/**
- * SECTION: handle `input` event
- */
-
-
-var isInputEventSupported = false;
-
-if (canUseDOM) {
- // IE9 claims to support the input event but fails to trigger it when
- // deleting text, so we ignore its input events.
- isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
-}
-/**
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
- * and override the value property so that we can distinguish user events from
- * value changes in JS.
- */
-
-
-function startWatchingForValueChange(target, targetInst) {
- activeElement = target;
- activeElementInst = targetInst;
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
-}
-/**
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
- * if any exists.
- */
-
-
-function stopWatchingForValueChange() {
- if (!activeElement) {
- return;
- }
-
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
- activeElement = null;
- activeElementInst = null;
-}
-/**
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
- * the value of the active element has changed.
- */
-
-
-function handlePropertyChange(nativeEvent) {
- if (nativeEvent.propertyName !== 'value') {
- return;
- }
-
- if (getInstIfValueChanged(activeElementInst)) {
- manualDispatchChangeEvent(nativeEvent);
- }
-}
-
-function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
- if (topLevelType === TOP_FOCUS) {
- // In IE9, propertychange fires for most input events but is buggy and
- // doesn't fire when text is deleted, but conveniently, selectionchange
- // appears to fire in all of the remaining cases so we catch those and
- // forward the event if the value has changed
- // In either case, we don't want to call the event handler if the value
- // is changed from JS so we redefine a setter for `.value` that updates
- // our activeElementValue variable, allowing us to ignore those changes
- //
- // stopWatching() should be a noop here but we call it just in case we
- // missed a blur event somehow.
- stopWatchingForValueChange();
- startWatchingForValueChange(target, targetInst);
- } else if (topLevelType === TOP_BLUR) {
- stopWatchingForValueChange();
- }
-} // For IE8 and IE9.
-
-
-function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
- if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {
- // On the selectionchange event, the target is just document which isn't
- // helpful for us so just check activeElement instead.
- //
- // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
- // propertychange on the first input event after setting `value` from a
- // script and fires only keydown, keypress, keyup. Catching keyup usually
- // gets it and catching keydown lets us fire an event for the first
- // keystroke if user does a key repeat (it'll be a little delayed: right
- // before the second keystroke). Other input methods (e.g., paste) seem to
- // fire selectionchange normally.
- return getInstIfValueChanged(activeElementInst);
- }
-}
-/**
- * SECTION: handle `click` event
- */
-
-
-function shouldUseClickEvent(elem) {
- // Use the `click` event to detect changes to checkbox and radio inputs.
- // This approach works across all browsers, whereas `change` does not fire
- // until `blur` in IE8.
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
-}
-
-function getTargetInstForClickEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_CLICK) {
- return getInstIfValueChanged(targetInst);
- }
-}
-
-function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {
- return getInstIfValueChanged(targetInst);
- }
-}
-
-function handleControlledInputBlur(node) {
- var state = node._wrapperState;
-
- if (!state || !state.controlled || node.type !== 'number') {
- return;
- }
+function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
- // If controlled, assign the value attribute to the current value on blur
- setDefaultValue(node, 'number', node.value);
- }
-}
-/**
- * This plugin creates an `onChange` event that normalizes change events
- * across form elements. This event fires at a time when it's possible to
- * change the element's value without seeing a flicker.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - select
- */
-
-
-var ChangeEventPlugin = {
- eventTypes: eventTypes$1,
- _isInputEventSupported: isInputEventSupported,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
- var getTargetInstFunc, handleEventFunc;
-
- if (shouldUseChangeEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForChangeEvent;
- } else if (isTextInputElement(targetNode)) {
- if (isInputEventSupported) {
- getTargetInstFunc = getTargetInstForInputOrChangeEvent;
- } else {
- getTargetInstFunc = getTargetInstForInputEventPolyfill;
- handleEventFunc = handleEventsForInputEventPolyfill;
- }
- } else if (shouldUseClickEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForClickEvent;
- }
-
- if (getTargetInstFunc) {
- var inst = getTargetInstFunc(topLevelType, targetInst);
-
- if (inst) {
- var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
- return event;
- }
- }
-
- if (handleEventFunc) {
- handleEventFunc(topLevelType, targetNode, targetInst);
- } // When blurring, set the value attribute for number inputs
-
-
- if (topLevelType === TOP_BLUR) {
- handleControlledInputBlur(targetNode);
- }
- }
-};
-
-var SyntheticUIEvent = SyntheticEvent.extend({
- view: null,
- detail: null
-});
+ // $FlowFixMe This is okay but Flow doesn't know it.
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
-/**
- * Translation from modifier key to the associated property in the event.
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
- */
-var modifierKeyToProp = {
- Alt: 'altKey',
- Control: 'ctrlKey',
- Meta: 'metaKey',
- Shift: 'shiftKey'
-}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
-// getModifierState. If getModifierState is not supported, we map it to a set of
-// modifier keys exposed by the event. In this case, Lock-keys are not supported.
-
-function modifierStateGetter(keyArg) {
- var syntheticEvent = this;
- var nativeEvent = syntheticEvent.nativeEvent;
-
- if (nativeEvent.getModifierState) {
- return nativeEvent.getModifierState(keyArg);
- }
-
- var keyProp = modifierKeyToProp[keyArg];
- return keyProp ? !!nativeEvent[keyProp] : false;
-}
-
-function getEventModifierState(nativeEvent) {
- return modifierStateGetter;
-}
-
-var previousScreenX = 0;
-var previousScreenY = 0; // Use flags to signal movementX/Y has already been set
-
-var isMovementXSet = false;
-var isMovementYSet = false;
-/**
- * @interface MouseEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var SyntheticMouseEvent = SyntheticUIEvent.extend({
- screenX: null,
- screenY: null,
- clientX: null,
- clientY: null,
- pageX: null,
- pageY: null,
- ctrlKey: null,
- shiftKey: null,
- altKey: null,
- metaKey: null,
- getModifierState: getEventModifierState,
- button: null,
- buttons: null,
- relatedTarget: function (event) {
- return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
- },
- movementX: function (event) {
- if ('movementX' in event) {
- return event.movementX;
- }
-
- var screenX = previousScreenX;
- previousScreenX = event.screenX;
-
- if (!isMovementXSet) {
- isMovementXSet = true;
- return 0;
- }
+ 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.
- return event.type === 'mousemove' ? event.screenX - screenX : 0;
- },
- movementY: function (event) {
- if ('movementY' in event) {
- return event.movementY;
- }
-
- var screenY = previousScreenY;
- previousScreenY = event.screenY;
-
- if (!isMovementYSet) {
- isMovementYSet = true;
- return 0;
- }
-
- return event.type === 'mousemove' ? event.screenY - screenY : 0;
- }
-});
-
-/**
- * @interface PointerEvent
- * @see http://www.w3.org/TR/pointerevents/
- */
-
-var SyntheticPointerEvent = SyntheticMouseEvent.extend({
- pointerId: null,
- width: null,
- height: null,
- pressure: null,
- tangentialPressure: null,
- tiltX: null,
- tiltY: null,
- twist: null,
- pointerType: null,
- isPrimary: null
-});
-
-var eventTypes$2 = {
- mouseEnter: {
- registrationName: 'onMouseEnter',
- dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
- },
- mouseLeave: {
- registrationName: 'onMouseLeave',
- dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
- },
- pointerEnter: {
- registrationName: 'onPointerEnter',
- dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
- },
- pointerLeave: {
- registrationName: 'onPointerLeave',
- dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
- }
-};
-var EnterLeaveEventPlugin = {
- eventTypes: eventTypes$2,
-
- /**
- * For almost every interaction we care about, there will be both a top-level
- * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
- * we do not extract duplicate events. However, moving the mouse into the
- * browser from outside will not fire a `mouseout` event. In this case, we use
- * the `mouseover` top-level event.
- */
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
- var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;
-
- if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0 && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
- // If this is an over event with a target, then we've already dispatched
- // the event in the out event of the other target. If this is replayed,
- // then it's because we couldn't dispatch against this target previously
- // so we have to do it now instead.
- return null;
- }
-
- if (!isOutEvent && !isOverEvent) {
- // Must not be a mouse or pointer in or out - ignoring.
- return null;
- }
-
- var win;
-
- if (nativeEventTarget.window === nativeEventTarget) {
- // `nativeEventTarget` is probably a window object.
- win = nativeEventTarget;
- } else {
- // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
- var doc = nativeEventTarget.ownerDocument;
-
- if (doc) {
- win = doc.defaultView || doc.parentWindow;
- } else {
- win = window;
- }
- }
-
- var from;
- var to;
-
- if (isOutEvent) {
- from = targetInst;
- var related = nativeEvent.relatedTarget || nativeEvent.toElement;
- to = related ? getClosestInstanceFromNode(related) : null;
-
- if (to !== null) {
- var nearestMounted = getNearestMountedFiber(to);
-
- if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
- to = null;
- }
- }
- } else {
- // Moving to a node from outside the window.
- from = null;
- to = targetInst;
- }
-
- if (from === to) {
- // Nothing pertains to our managed components.
- return null;
- }
-
- var eventInterface, leaveEventType, enterEventType, eventTypePrefix;
-
- if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {
- eventInterface = SyntheticMouseEvent;
- leaveEventType = eventTypes$2.mouseLeave;
- enterEventType = eventTypes$2.mouseEnter;
- eventTypePrefix = 'mouse';
- } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {
- eventInterface = SyntheticPointerEvent;
- leaveEventType = eventTypes$2.pointerLeave;
- enterEventType = eventTypes$2.pointerEnter;
- eventTypePrefix = 'pointer';
- }
-
- var fromNode = from == null ? win : getNodeFromInstance$1(from);
- var toNode = to == null ? win : getNodeFromInstance$1(to);
- var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);
- leave.type = eventTypePrefix + 'leave';
- leave.target = fromNode;
- leave.relatedTarget = toNode;
- var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);
- enter.type = eventTypePrefix + 'enter';
- enter.target = toNode;
- enter.relatedTarget = fromNode;
- accumulateEnterLeaveDispatches(leave, enter, from, to); // If we are not processing the first ancestor, then we
- // should not process the same nativeEvent again, as we
- // will have already processed it in the first ancestor.
-
- if ((eventSystemFlags & IS_FIRST_ANCESTOR) === 0) {
- return [leave];
- }
-
- return [leave, enter];
- }
-};
-
-/**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
-function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
- ;
-}
-
-var objectIs = typeof Object.is === 'function' ? Object.is : is;
-
-var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
-/**
- * Performs equality by iterating through keys on an object and returning false
- * when any key has values which are not strictly equal between the arguments.
- * Returns true when the values of all keys are strictly equal.
- */
-
-function shallowEqual(objA, objB) {
- if (objectIs(objA, objB)) {
- return true;
- }
-
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
-
- var keysA = Object.keys(objA);
- var keysB = Object.keys(objB);
-
- if (keysA.length !== keysB.length) {
- return false;
- } // Test for A's keys different from B.
-
-
- for (var i = 0; i < keysA.length; i++) {
- if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
- return false;
- }
- }
-
- return true;
-}
-
-var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
-var eventTypes$3 = {
- select: {
- phasedRegistrationNames: {
- bubbled: 'onSelect',
- captured: 'onSelectCapture'
- },
- dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
- }
-};
-var activeElement$1 = null;
-var activeElementInst$1 = null;
-var lastSelection = null;
-var mouseDown = false;
-/**
- * Get an object which is a unique representation of the current selection.
- *
- * The return value will not be consistent across nodes or browsers, but
- * two identical selections on the same node will return identical objects.
- *
- * @param {DOMElement} node
- * @return {object}
- */
-
-function getSelection$1(node) {
- if ('selectionStart' in node && hasSelectionCapabilities(node)) {
- return {
- start: node.selectionStart,
- end: node.selectionEnd
- };
- } else {
- var win = node.ownerDocument && node.ownerDocument.defaultView || window;
- var selection = win.getSelection();
- return {
- anchorNode: selection.anchorNode,
- anchorOffset: selection.anchorOffset,
- focusNode: selection.focusNode,
- focusOffset: selection.focusOffset
- };
- }
-}
-/**
- * Get document associated with the event target.
- *
- * @param {object} nativeEventTarget
- * @return {Document}
- */
-
-
-function getEventTargetDocument(eventTarget) {
- return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
-}
-/**
- * Poll selection to see whether it's changed.
- *
- * @param {object} nativeEvent
- * @param {object} nativeEventTarget
- * @return {?SyntheticEvent}
- */
-
-
-function constructSelectEvent(nativeEvent, nativeEventTarget) {
- // Ensure we have the right element, and that the user is not dragging a
- // selection (this matches native `select` event behavior). In HTML5, select
- // fires only on input and textarea thus if there's no focused element we
- // won't dispatch.
- var doc = getEventTargetDocument(nativeEventTarget);
-
- if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
- return null;
- } // Only fire when selection has actually changed.
-
-
- var currentSelection = getSelection$1(activeElement$1);
-
- if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
- lastSelection = currentSelection;
- var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
- syntheticEvent.type = 'select';
- syntheticEvent.target = activeElement$1;
- accumulateTwoPhaseDispatches(syntheticEvent);
- return syntheticEvent;
- }
-
- return null;
-}
-/**
- * This plugin creates an `onSelect` event that normalizes select events
- * across form elements.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - contentEditable
- *
- * This differs from native browser implementations in the following ways:
- * - Fires on contentEditable fields as well as inputs.
- * - Fires for collapsed selection.
- * - Fires after user input.
- */
-
-
-var SelectEventPlugin = {
- eventTypes: eventTypes$3,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, container) {
- var containerOrDoc = container || getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do
- // not extract events. See #3639.
-
- if (!containerOrDoc || !isListeningToAllDependencies('onSelect', containerOrDoc)) {
- return null;
- }
-
- var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
+ 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') {
+ 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;
+ }
- switch (topLevelType) {
- // Track the input node that has focus.
- case TOP_FOCUS:
- if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
- activeElement$1 = targetNode;
- activeElementInst$1 = targetInst;
- lastSelection = null;
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
+ } catch (ex) {
+ error$1 = ex;
}
- break;
-
- case TOP_BLUR:
- activeElement$1 = null;
- activeElementInst$1 = null;
- lastSelection = null;
- break;
- // Don't fire the event while the user is dragging. This matches the
- // semantics of the native select event.
+ if (error$1 && !(error$1 instanceof Error)) {
+ setCurrentlyValidatingElement(element);
- case TOP_MOUSE_DOWN:
- mouseDown = true;
- break;
+ 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);
- case TOP_CONTEXT_MENU:
- case TOP_MOUSE_UP:
- case TOP_DRAG_END:
- mouseDown = false;
- return constructSelectEvent(nativeEvent, nativeEventTarget);
- // Chrome and IE fire non-standard event when selection is changed (and
- // sometimes when it hasn't). IE's event fires out of order with respect
- // to key and input events on deletion, so we discard it.
- //
- // Firefox doesn't support selectionchange, so check selection status
- // after each key entry. The selection changes after keydown and before
- // keyup, but we check on keydown as well in the case of holding down a
- // key, when multiple keydown events are fired but only one keyup is.
- // This is also our approach for IE handling, for the reason above.
-
- case TOP_SELECTION_CHANGE:
- if (skipSelectionChangeEvent) {
- break;
+ setCurrentlyValidatingElement(null);
}
- // falls through
-
- case TOP_KEY_DOWN:
- case TOP_KEY_UP:
- return constructSelectEvent(nativeEvent, nativeEventTarget);
- }
-
- return null;
- }
-};
-
-/**
- * @interface Event
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
- */
-
-var SyntheticAnimationEvent = SyntheticEvent.extend({
- animationName: null,
- elapsedTime: null,
- pseudoElement: null
-});
-
-/**
- * @interface Event
- * @see http://www.w3.org/TR/clipboard-apis/
- */
-
-var SyntheticClipboardEvent = SyntheticEvent.extend({
- clipboardData: function (event) {
- return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
- }
-});
-
-/**
- * @interface FocusEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var SyntheticFocusEvent = SyntheticUIEvent.extend({
- relatedTarget: null
-});
-
-/**
- * `charCode` represents the actual "character code" and is safe to use with
- * `String.fromCharCode`. As such, only keys that correspond to printable
- * characters produce a valid `charCode`, the only exception to this is Enter.
- * The Tab-key is considered non-printable and does not have a `charCode`,
- * presumably because it does not produce a tab-character in browsers.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {number} Normalized `charCode` property.
- */
-function getEventCharCode(nativeEvent) {
- var charCode;
- var keyCode = nativeEvent.keyCode;
-
- if ('charCode' in nativeEvent) {
- charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
-
- if (charCode === 0 && keyCode === 13) {
- charCode = 13;
- }
- } else {
- // IE8 does not implement `charCode`, but `keyCode` has the correct value.
- charCode = keyCode;
- } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
- // report Enter as charCode 10 when ctrl is pressed.
-
-
- if (charCode === 10) {
- charCode = 13;
- } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
- // Must not discard the (non-)printable Enter-key.
-
-
- if (charCode >= 32 || charCode === 13) {
- return charCode;
- }
-
- return 0;
-}
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error$1.message] = true;
+ setCurrentlyValidatingElement(element);
-/**
- * Normalization of deprecated HTML5 `key` values
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
+ error('Failed %s type: %s', location, error$1.message);
-var normalizeKey = {
- Esc: 'Escape',
- Spacebar: ' ',
- Left: 'ArrowLeft',
- Up: 'ArrowUp',
- Right: 'ArrowRight',
- Down: 'ArrowDown',
- Del: 'Delete',
- Win: 'OS',
- Menu: 'ContextMenu',
- Apps: 'ContextMenu',
- Scroll: 'ScrollLock',
- MozPrintableKey: 'Unidentified'
-};
-/**
- * Translation from legacy `keyCode` to HTML5 `key`
- * Only special keys supported, all others depend on keyboard layout or browser
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
-var translateToKey = {
- '8': 'Backspace',
- '9': 'Tab',
- '12': 'Clear',
- '13': 'Enter',
- '16': 'Shift',
- '17': 'Control',
- '18': 'Alt',
- '19': 'Pause',
- '20': 'CapsLock',
- '27': 'Escape',
- '32': ' ',
- '33': 'PageUp',
- '34': 'PageDown',
- '35': 'End',
- '36': 'Home',
- '37': 'ArrowLeft',
- '38': 'ArrowUp',
- '39': 'ArrowRight',
- '40': 'ArrowDown',
- '45': 'Insert',
- '46': 'Delete',
- '112': 'F1',
- '113': 'F2',
- '114': 'F3',
- '115': 'F4',
- '116': 'F5',
- '117': 'F6',
- '118': 'F7',
- '119': 'F8',
- '120': 'F9',
- '121': 'F10',
- '122': 'F11',
- '123': 'F12',
- '144': 'NumLock',
- '145': 'ScrollLock',
- '224': 'Meta'
-};
-/**
- * @param {object} nativeEvent Native browser event.
- * @return {string} Normalized `key` property.
- */
-
-function getEventKey(nativeEvent) {
- if (nativeEvent.key) {
- // Normalize inconsistent values reported by browsers due to
- // implementations of a working draft specification.
- // FireFox implements `key` but returns `MozPrintableKey` for all
- // printable characters (normalized to `Unidentified`), ignore it.
- var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
-
- if (key !== 'Unidentified') {
- return key;
- }
- } // Browser does not implement `key`, polyfill as much of it as we can.
-
-
- if (nativeEvent.type === 'keypress') {
- var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
- // thus be captured by `keypress`, no other non-printable key should.
-
- return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
- }
-
- if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
- // While user keyboard layout determines the actual meaning of each
- // `keyCode` value, almost all function keys have a universal value.
- return translateToKey[nativeEvent.keyCode] || 'Unidentified';
- }
-
- return '';
-}
-
-/**
- * @interface KeyboardEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var SyntheticKeyboardEvent = SyntheticUIEvent.extend({
- key: getEventKey,
- location: null,
- ctrlKey: null,
- shiftKey: null,
- altKey: null,
- metaKey: null,
- repeat: null,
- locale: null,
- getModifierState: getEventModifierState,
- // Legacy Interface
- charCode: function (event) {
- // `charCode` is the result of a KeyPress event and represents the value of
- // the actual printable character.
- // KeyPress is deprecated, but its replacement is not yet final and not
- // implemented in any major browser. Only KeyPress has charCode.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- return 0;
- },
- keyCode: function (event) {
- // `keyCode` is the result of a KeyDown/Up event and represents the value of
- // physical keyboard key.
- // The actual meaning of the value depends on the users' keyboard layout
- // which cannot be detected. Assuming that it is a US keyboard layout
- // provides a surprisingly accurate mapping for US and European users.
- // Due to this, it is left to the user to implement at this time.
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- },
- which: function (event) {
- // `which` is an alias for either `keyCode` or `charCode` depending on the
- // type of the event.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- }
-});
-
-/**
- * @interface DragEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var SyntheticDragEvent = SyntheticMouseEvent.extend({
- dataTransfer: null
-});
-
-/**
- * @interface TouchEvent
- * @see http://www.w3.org/TR/touch-events/
- */
-
-var SyntheticTouchEvent = SyntheticUIEvent.extend({
- touches: null,
- targetTouches: null,
- changedTouches: null,
- altKey: null,
- metaKey: null,
- ctrlKey: null,
- shiftKey: null,
- getModifierState: getEventModifierState
-});
-
-/**
- * @interface Event
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
- */
-
-var SyntheticTransitionEvent = SyntheticEvent.extend({
- propertyName: null,
- elapsedTime: null,
- pseudoElement: null
-});
-
-/**
- * @interface WheelEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var SyntheticWheelEvent = SyntheticMouseEvent.extend({
- deltaX: function (event) {
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
- },
- deltaY: function (event) {
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
- 'wheelDelta' in event ? -event.wheelDelta : 0;
- },
- deltaZ: null,
- // Browsers without "deltaMode" is reporting in raw wheel delta where one
- // notch on the scroll is always +/- 120, roughly equivalent to pixels.
- // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
- // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
- deltaMode: null
-});
-
-var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];
-var SimpleEventPlugin = {
- // simpleEventPluginEventTypes gets populated from
- // the DOMEventProperties module.
- eventTypes: simpleEventPluginEventTypes,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var dispatchConfig = topLevelEventsToDispatchConfig.get(topLevelType);
-
- if (!dispatchConfig) {
- return null;
- }
-
- var EventConstructor;
-
- switch (topLevelType) {
- case TOP_KEY_PRESS:
- // Firefox creates a keypress event for function keys too. This removes
- // the unwanted keypress events. Enter is however both printable and
- // non-printable. One would expect Tab to be as well (but it isn't).
- if (getEventCharCode(nativeEvent) === 0) {
- return null;
+ setCurrentlyValidatingElement(null);
}
-
- /* falls through */
-
- case TOP_KEY_DOWN:
- case TOP_KEY_UP:
- EventConstructor = SyntheticKeyboardEvent;
- break;
-
- case TOP_BLUR:
- case TOP_FOCUS:
- EventConstructor = SyntheticFocusEvent;
- break;
-
- case TOP_CLICK:
- // Firefox creates a click event on right mouse clicks. This removes the
- // unwanted click events.
- if (nativeEvent.button === 2) {
- return null;
- }
-
- /* falls through */
-
- case TOP_AUX_CLICK:
- case TOP_DOUBLE_CLICK:
- case TOP_MOUSE_DOWN:
- case TOP_MOUSE_MOVE:
- case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events
-
- /* falls through */
-
- case TOP_MOUSE_OUT:
- case TOP_MOUSE_OVER:
- case TOP_CONTEXT_MENU:
- EventConstructor = SyntheticMouseEvent;
- break;
-
- case TOP_DRAG:
- case TOP_DRAG_END:
- case TOP_DRAG_ENTER:
- case TOP_DRAG_EXIT:
- case TOP_DRAG_LEAVE:
- case TOP_DRAG_OVER:
- case TOP_DRAG_START:
- case TOP_DROP:
- EventConstructor = SyntheticDragEvent;
- break;
-
- case TOP_TOUCH_CANCEL:
- case TOP_TOUCH_END:
- case TOP_TOUCH_MOVE:
- case TOP_TOUCH_START:
- EventConstructor = SyntheticTouchEvent;
- break;
-
- case TOP_ANIMATION_END:
- case TOP_ANIMATION_ITERATION:
- case TOP_ANIMATION_START:
- EventConstructor = SyntheticAnimationEvent;
- break;
-
- case TOP_TRANSITION_END:
- EventConstructor = SyntheticTransitionEvent;
- break;
-
- case TOP_SCROLL:
- EventConstructor = SyntheticUIEvent;
- break;
-
- case TOP_WHEEL:
- EventConstructor = SyntheticWheelEvent;
- break;
-
- case TOP_COPY:
- case TOP_CUT:
- case TOP_PASTE:
- EventConstructor = SyntheticClipboardEvent;
- break;
-
- case TOP_GOT_POINTER_CAPTURE:
- case TOP_LOST_POINTER_CAPTURE:
- case TOP_POINTER_CANCEL:
- case TOP_POINTER_DOWN:
- case TOP_POINTER_MOVE:
- case TOP_POINTER_OUT:
- case TOP_POINTER_OVER:
- case TOP_POINTER_UP:
- EventConstructor = SyntheticPointerEvent;
- break;
-
- default:
- {
- if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
- error('SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
- }
- } // HTML Events
- // @see http://www.w3.org/TR/html5/index.html#events-0
-
-
- EventConstructor = SyntheticEvent;
- break;
- }
-
- var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
- accumulateTwoPhaseDispatches(event);
- return event;
- }
-};
-
-/**
- * Specifies a deterministic ordering of `EventPlugin`s. A convenient way to
- * reason about plugins, without having to package every one of them. This
- * is better than having plugins be ordered in the same order that they
- * are injected because that ordering would be influenced by the packaging order.
- * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
- * preventing default on events is convenient in `SimpleEventPlugin` handlers.
- */
-
-var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
-/**
- * Inject modules for resolving DOM hierarchy and plugin ordering.
- */
-
-injectEventPluginOrder(DOMEventPluginOrder);
-setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
-/**
- * Some important event plugins included by default (without having to require
- * them).
- */
-
-injectEventPluginsByName({
- SimpleEventPlugin: SimpleEventPlugin,
- EnterLeaveEventPlugin: EnterLeaveEventPlugin,
- ChangeEventPlugin: ChangeEventPlugin,
- SelectEventPlugin: SelectEventPlugin,
- BeforeInputEventPlugin: BeforeInputEventPlugin
-});
-
-// Prefix measurements so that it's possible to filter them.
-// Longer prefixes are hard to read in DevTools.
-var reactEmoji = "\u269B";
-var warningEmoji = "\u26D4";
-var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause.
-// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
-
-var currentFiber = null; // If we're in the middle of user code, which fiber and method is it?
-// Reusing `currentFiber` would be confusing for this because user code fiber
-// can change during commit phase too, but we don't need to unwind it (since
-// lifecycles in the commit phase don't resemble a tree).
-
-var currentPhase = null;
-var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem,
-// so we will keep track of it, and include it in the report.
-// Track commits caused by cascading updates.
-
-var isCommitting = false;
-var hasScheduledUpdateInCurrentCommit = false;
-var hasScheduledUpdateInCurrentPhase = false;
-var commitCountInCurrentWorkLoop = 0;
-var effectCountInCurrentCommit = 0;
-// to avoid stretch the commit phase with measurement overhead.
-
-var labelsInCurrentCommit = new Set();
-
-var formatMarkName = function (markName) {
- return reactEmoji + " " + markName;
-};
-
-var formatLabel = function (label, warning) {
- var prefix = warning ? warningEmoji + " " : reactEmoji + " ";
- var suffix = warning ? " Warning: " + warning : '';
- return "" + prefix + label + suffix;
-};
-
-var beginMark = function (markName) {
- performance.mark(formatMarkName(markName));
-};
-
-var clearMark = function (markName) {
- performance.clearMarks(formatMarkName(markName));
-};
-
-var endMark = function (label, markName, warning) {
- var formattedMarkName = formatMarkName(markName);
- var formattedLabel = formatLabel(label, warning);
-
- try {
- performance.measure(formattedLabel, formattedMarkName);
- } catch (err) {} // If previous mark was missing for some reason, this will throw.
- // This could only happen if React crashed in an unexpected place earlier.
- // Don't pile on with more errors.
- // Clear marks immediately to avoid growing buffer.
-
-
- performance.clearMarks(formattedMarkName);
- performance.clearMeasures(formattedLabel);
-};
-
-var getFiberMarkName = function (label, debugID) {
- return label + " (#" + debugID + ")";
-};
-
-var getFiberLabel = function (componentName, isMounted, phase) {
- if (phase === null) {
- // These are composite component total time measurements.
- return componentName + " [" + (isMounted ? 'update' : 'mount') + "]";
- } else {
- // Composite component methods.
- return componentName + "." + phase;
- }
-};
-
-var beginFiberMark = function (fiber, phase) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
-
- if (isCommitting && labelsInCurrentCommit.has(label)) {
- // During the commit phase, we don't show duplicate labels because
- // there is a fixed overhead for every measurement, and we don't
- // want to stretch the commit phase beyond necessary.
- return false;
- }
-
- labelsInCurrentCommit.add(label);
- var markName = getFiberMarkName(label, debugID);
- beginMark(markName);
- return true;
-};
-
-var clearFiberMark = function (fiber, phase) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
- var markName = getFiberMarkName(label, debugID);
- clearMark(markName);
-};
-
-var endFiberMark = function (fiber, phase, warning) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
- var markName = getFiberMarkName(label, debugID);
- endMark(label, markName, warning);
-};
-
-var shouldIgnoreFiber = function (fiber) {
- // Host components should be skipped in the timeline.
- // We could check typeof fiber.type, but does this work with RN?
- switch (fiber.tag) {
- case HostRoot:
- case HostComponent:
- case HostText:
- case HostPortal:
- case Fragment:
- case ContextProvider:
- case ContextConsumer:
- case Mode:
- return true;
-
- default:
- return false;
- }
-};
-
-var clearPendingPhaseMeasurement = function () {
- if (currentPhase !== null && currentPhaseFiber !== null) {
- clearFiberMark(currentPhaseFiber, currentPhase);
- }
-
- currentPhaseFiber = null;
- currentPhase = null;
- hasScheduledUpdateInCurrentPhase = false;
-};
-
-var pauseTimers = function () {
- // Stops all currently active measurements so that they can be resumed
- // if we continue in a later deferred loop from the same unit of work.
- var fiber = currentFiber;
-
- while (fiber) {
- if (fiber._debugIsCurrentlyTiming) {
- endFiberMark(fiber, null, null);
- }
-
- fiber = fiber.return;
- }
-};
-
-var resumeTimersRecursively = function (fiber) {
- if (fiber.return !== null) {
- resumeTimersRecursively(fiber.return);
- }
-
- if (fiber._debugIsCurrentlyTiming) {
- beginFiberMark(fiber, null);
- }
-};
-
-var resumeTimers = function () {
- // Resumes all measurements that were active during the last deferred loop.
- if (currentFiber !== null) {
- resumeTimersRecursively(currentFiber);
- }
-};
-
-function recordEffect() {
- {
- effectCountInCurrentCommit++;
- }
-}
-function recordScheduleUpdate() {
- {
- if (isCommitting) {
- hasScheduledUpdateInCurrentCommit = true;
- }
-
- if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
- hasScheduledUpdateInCurrentPhase = true;
- }
- }
-}
-function startWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, this is the fiber to unwind from.
-
-
- currentFiber = fiber;
-
- if (!beginFiberMark(fiber, null)) {
- return;
- }
-
- fiber._debugIsCurrentlyTiming = true;
- }
-}
-function cancelWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // Remember we shouldn't complete measurement for this fiber.
- // Otherwise flamechart will be deep even for small updates.
-
-
- fiber._debugIsCurrentlyTiming = false;
- clearFiberMark(fiber, null);
- }
-}
-function stopWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, its parent is the fiber to unwind from.
-
-
- currentFiber = fiber.return;
-
- if (!fiber._debugIsCurrentlyTiming) {
- return;
- }
-
- fiber._debugIsCurrentlyTiming = false;
- endFiberMark(fiber, null, null);
- }
-}
-function stopFailedWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, its parent is the fiber to unwind from.
-
-
- currentFiber = fiber.return;
-
- if (!fiber._debugIsCurrentlyTiming) {
- return;
- }
-
- fiber._debugIsCurrentlyTiming = false;
- var warning = fiber.tag === SuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';
- endFiberMark(fiber, null, warning);
- }
-}
-function startPhaseTimer(fiber, phase) {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- clearPendingPhaseMeasurement();
-
- if (!beginFiberMark(fiber, phase)) {
- return;
- }
-
- currentPhaseFiber = fiber;
- currentPhase = phase;
- }
-}
-function stopPhaseTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- if (currentPhase !== null && currentPhaseFiber !== null) {
- var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
- endFiberMark(currentPhaseFiber, currentPhase, warning);
- }
-
- currentPhase = null;
- currentPhaseFiber = null;
- }
-}
-function startWorkLoopTimer(nextUnitOfWork) {
- {
- currentFiber = nextUnitOfWork;
-
- if (!supportsUserTiming) {
- return;
- }
-
- commitCountInCurrentWorkLoop = 0; // This is top level call.
- // Any other measurements are performed within.
-
- beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop.
-
- resumeTimers();
- }
-}
-function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var warning = null;
-
- if (interruptedBy !== null) {
- if (interruptedBy.tag === HostRoot) {
- warning = 'A top-level update interrupted the previous render';
- } else {
- var componentName = getComponentName(interruptedBy.type) || 'Unknown';
- warning = "An update to " + componentName + " interrupted the previous render";
}
- } else if (commitCountInCurrentWorkLoop > 1) {
- warning = 'There were cascading updates';
- }
-
- commitCountInCurrentWorkLoop = 0;
- var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop.
-
- pauseTimers();
- endMark(label, '(React Tree Reconciliation)', warning);
- }
-}
-function startCommitTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- isCommitting = true;
- hasScheduledUpdateInCurrentCommit = false;
- labelsInCurrentCommit.clear();
- beginMark('(Committing Changes)');
- }
-}
-function stopCommitTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var warning = null;
-
- if (hasScheduledUpdateInCurrentCommit) {
- warning = 'Lifecycle hook scheduled a cascading update';
- } else if (commitCountInCurrentWorkLoop > 0) {
- warning = 'Caused by a cascading update in earlier commit';
}
-
- hasScheduledUpdateInCurrentCommit = false;
- commitCountInCurrentWorkLoop++;
- isCommitting = false;
- labelsInCurrentCommit.clear();
- endMark('(Committing Changes)', '(Committing Changes)', warning);
- }
-}
-function startCommitSnapshotEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- effectCountInCurrentCommit = 0;
- beginMark('(Committing Snapshot Effects)');
- }
-}
-function stopCommitSnapshotEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Committing Snapshot Effects: " + count + " Total)", '(Committing Snapshot Effects)', null);
- }
-}
-function startCommitHostEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- effectCountInCurrentCommit = 0;
- beginMark('(Committing Host Effects)');
- }
-}
-function stopCommitHostEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Committing Host Effects: " + count + " Total)", '(Committing Host Effects)', null);
- }
-}
-function startCommitLifeCyclesTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- effectCountInCurrentCommit = 0;
- beginMark('(Calling Lifecycle Methods)');
- }
-}
-function stopCommitLifeCyclesTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Calling Lifecycle Methods: " + count + " Total)", '(Calling Lifecycle Methods)', null);
}
}
@@ -10738,7 +10889,7 @@ function getMaskedContext(workInProgress, unmaskedContext) {
{
var name = getComponentName(type) || 'Unknown';
- checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
+ checkPropTypes(contextTypes, context, 'context', name);
} // Cache unmasked context so we can avoid recreating masked context unless necessary.
// Context is created before the class component is instantiated so check for instance.
@@ -10811,10 +10962,7 @@ function processChildContext(fiber, type, parentContext) {
return parentContext;
}
- var childContext;
- startPhaseTimer(fiber, 'getChildContext');
- childContext = instance.getChildContext();
- stopPhaseTimer();
+ var childContext = instance.getChildContext();
for (var contextKey in childContext) {
if (!(contextKey in childContextTypes)) {
@@ -10826,15 +10974,10 @@ function processChildContext(fiber, type, parentContext) {
{
var name = getComponentName(type) || 'Unknown';
- checkPropTypes(childContextTypes, childContext, 'child context', name, // In practice, there is one case in which we won't get a stack. It's when
- // somebody calls unstable_renderSubtreeIntoContainer() and we process
- // context from the parent component instance. The stack will be missing
- // because it's outside of the reconciliation, and so the pointer has not
- // been set. This is rare and doesn't matter. We'll also remove that API.
- getCurrentFiberStackInDev);
+ checkPropTypes(childContextTypes, childContext, 'child context', name);
}
- return _assign({}, parentContext, {}, childContext);
+ return _assign({}, parentContext, childContext);
}
}
@@ -10928,12 +11071,106 @@ var LegacyRoot = 0;
var BlockingRoot = 1;
var ConcurrentRoot = 2;
+var rendererID = null;
+var injectedHook = null;
+var hasLoggedError = false;
+var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
+function injectInternals(internals) {
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
+ // No DevTools
+ return false;
+ }
+
+ var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+
+ if (hook.isDisabled) {
+ // This isn't a real property on the hook, but it can be set to opt out
+ // of DevTools integration and associated warnings and logs.
+ // https://github.com/facebook/react/issues/3877
+ return true;
+ }
+
+ if (!hook.supportsFiber) {
+ {
+ error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
+ } // DevTools exists, even though it doesn't support Fiber.
+
+
+ return true;
+ }
+
+ try {
+ rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
+
+ injectedHook = hook;
+ } catch (err) {
+ // Catch all errors because it is unsafe to throw during initialization.
+ {
+ error('React instrumentation encountered an error: %s.', err);
+ }
+ } // DevTools exists
+
+
+ return true;
+}
+function onScheduleRoot(root, children) {
+ {
+ if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
+ try {
+ injectedHook.onScheduleFiberRoot(rendererID, root, children);
+ } catch (err) {
+ if ( !hasLoggedError) {
+ hasLoggedError = true;
+
+ error('React instrumentation encountered an error: %s', err);
+ }
+ }
+ }
+ }
+}
+function onCommitRoot(root, priorityLevel) {
+ if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
+ try {
+ var didError = (root.current.flags & DidCapture) === DidCapture;
+
+ if (enableProfilerTimer) {
+ injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
+ } else {
+ injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
+ }
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error('React instrumentation encountered an error: %s', err);
+ }
+ }
+ }
+ }
+}
+function onCommitUnmount(fiber) {
+ if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
+ try {
+ injectedHook.onCommitFiberUnmount(rendererID, fiber);
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error('React instrumentation encountered an error: %s', err);
+ }
+ }
+ }
+ }
+}
+
var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
Scheduler_shouldYield = Scheduler.unstable_shouldYield,
Scheduler_requestPaint = Scheduler.unstable_requestPaint,
- Scheduler_now = Scheduler.unstable_now,
+ Scheduler_now$1 = Scheduler.unstable_now,
Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
@@ -10947,7 +11184,7 @@ var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
// scheduler/tracing
if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
{
- throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" );
+ throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
}
}
}
@@ -10956,20 +11193,20 @@ var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Schedul
// ascending numbers so we can compare them like numbers. They start at 90 to
// avoid clashing with Scheduler's priorities.
-var ImmediatePriority = 99;
-var UserBlockingPriority$1 = 98;
-var NormalPriority = 97;
-var LowPriority = 96;
-var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
+var ImmediatePriority$1 = 99;
+var UserBlockingPriority$2 = 98;
+var NormalPriority$1 = 97;
+var LowPriority$1 = 96;
+var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.
-var NoPriority = 90;
+var NoPriority$1 = 90;
var shouldYield = Scheduler_shouldYield;
var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
var syncQueue = null;
var immediateQueueCallbackNode = null;
var isFlushingSyncQueue = false;
-var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
+var initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
// This will be the case for modern browsers that support `performance.now`. In
// older browsers, Scheduler falls back to `Date.now`, which returns a Unix
// timestamp. In that case, subtract the module initialization time to simulate
@@ -10977,25 +11214,25 @@ var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably s
// within 32 bits.
// TODO: Consider lifting this into Scheduler.
-var now = initialTimeMs < 10000 ? Scheduler_now : function () {
- return Scheduler_now() - initialTimeMs;
+var now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {
+ return Scheduler_now$1() - initialTimeMs$1;
};
function getCurrentPriorityLevel() {
switch (Scheduler_getCurrentPriorityLevel()) {
case Scheduler_ImmediatePriority:
- return ImmediatePriority;
+ return ImmediatePriority$1;
case Scheduler_UserBlockingPriority:
- return UserBlockingPriority$1;
+ return UserBlockingPriority$2;
case Scheduler_NormalPriority:
- return NormalPriority;
+ return NormalPriority$1;
case Scheduler_LowPriority:
- return LowPriority;
+ return LowPriority$1;
case Scheduler_IdlePriority:
- return IdlePriority;
+ return IdlePriority$1;
default:
{
@@ -11009,19 +11246,19 @@ function getCurrentPriorityLevel() {
function reactPriorityToSchedulerPriority(reactPriorityLevel) {
switch (reactPriorityLevel) {
- case ImmediatePriority:
+ case ImmediatePriority$1:
return Scheduler_ImmediatePriority;
- case UserBlockingPriority$1:
+ case UserBlockingPriority$2:
return Scheduler_UserBlockingPriority;
- case NormalPriority:
+ case NormalPriority$1:
return Scheduler_NormalPriority;
- case LowPriority:
+ case LowPriority$1:
return Scheduler_LowPriority;
- case IdlePriority:
+ case IdlePriority$1:
return Scheduler_IdlePriority;
default:
@@ -11078,34 +11315,39 @@ function flushSyncCallbackQueueImpl() {
isFlushingSyncQueue = true;
var i = 0;
- try {
- var _isSync = true;
- var queue = syncQueue;
- runWithPriority$1(ImmediatePriority, function () {
- for (; i < queue.length; i++) {
- var callback = queue[i];
-
- do {
- callback = callback(_isSync);
- } while (callback !== null);
- }
- });
- syncQueue = null;
- } catch (error) {
- // If something throws, leave the remaining callbacks on the queue.
- if (syncQueue !== null) {
- syncQueue = syncQueue.slice(i + 1);
- } // Resume flushing in the next tick
+ {
+ try {
+ var _isSync2 = true;
+ var _queue = syncQueue;
+ runWithPriority$1(ImmediatePriority$1, function () {
+ for (; i < _queue.length; i++) {
+ var callback = _queue[i];
+
+ do {
+ callback = callback(_isSync2);
+ } while (callback !== null);
+ }
+ });
+ syncQueue = null;
+ } catch (error) {
+ // If something throws, leave the remaining callbacks on the queue.
+ if (syncQueue !== null) {
+ syncQueue = syncQueue.slice(i + 1);
+ } // Resume flushing in the next tick
- Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
- throw error;
- } finally {
- isFlushingSyncQueue = false;
+ Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
+ throw error;
+ } finally {
+ isFlushingSyncQueue = false;
+ }
}
}
}
+// TODO: this is special because it gets imported during build.
+var ReactVersion = '17.0.2';
+
var NoMode = 0;
var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
// tag instead
@@ -11113,101 +11355,12 @@ var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading f
var BlockingMode = 2;
var ConcurrentMode = 4;
var ProfileMode = 8;
+var DebugTracingMode = 16;
-// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
-// Math.pow(2, 30) - 1
-// 0b111111111111111111111111111111
-var MAX_SIGNED_31_BIT_INT = 1073741823;
-
-var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that
-// Never work can be committed in an inconsistent state without tearing the UI.
-// The main example is offscreen content, like a hidden subtree. So one possible
-// name is Offscreen. However, it also includes dehydrated Suspense boundaries,
-// which are inconsistent in the sense that they haven't finished yet, but
-// aren't visibly inconsistent because the server rendered HTML matches what the
-// hydrated tree would look like.
-
-var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in
-// order to be consistent.
-
-var Idle = 2; // Continuous Hydration is slightly higher than Idle and is used to increase
-// priority of hover targets.
-
-var ContinuousHydration = 3;
-var Sync = MAX_SIGNED_31_BIT_INT;
-var Batched = Sync - 1;
-var UNIT_SIZE = 10;
-var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms.
-
-function msToExpirationTime(ms) {
- // Always subtract from the offset so that we don't clash with the magic number for NoWork.
- return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);
-}
-function expirationTimeToMs(expirationTime) {
- return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;
-}
-
-function ceiling(num, precision) {
- return ((num / precision | 0) + 1) * precision;
-}
-
-function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
- return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
-} // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update
-// the names to reflect.
-
-
-var LOW_PRIORITY_EXPIRATION = 5000;
-var LOW_PRIORITY_BATCH_SIZE = 250;
-function computeAsyncExpiration(currentTime) {
- return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
-}
-function computeSuspenseExpiration(currentTime, timeoutMs) {
- // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time?
- return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE);
-} // We intentionally set a higher expiration time for interactive updates in
-// dev than in production.
-//
-// If the main thread is being blocked so long that you hit the expiration,
-// it's a problem that could be solved with better scheduling.
-//
-// People will be more likely to notice this and fix it with the long
-// expiration time in development.
-//
-// In production we opt for better UX at the risk of masking scheduling
-// problems, by expiring fast.
-
-var HIGH_PRIORITY_EXPIRATION = 500 ;
-var HIGH_PRIORITY_BATCH_SIZE = 100;
-function computeInteractiveExpiration(currentTime) {
- return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
-}
-function inferPriorityFromExpirationTime(currentTime, expirationTime) {
- if (expirationTime === Sync) {
- return ImmediatePriority;
- }
-
- if (expirationTime === Never || expirationTime === Idle) {
- return IdlePriority;
- }
-
- var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);
-
- if (msUntil <= 0) {
- return ImmediatePriority;
- }
-
- if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {
- return UserBlockingPriority$1;
- }
-
- if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {
- return NormalPriority;
- } // TODO: Handle LowPriority
- // Assume anything lower has idle priority
-
-
- return IdlePriority;
+var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
+var NoTransition = 0;
+function requestCurrentTransition() {
+ return ReactCurrentBatchConfig.transition;
}
var ReactStrictModeWarnings = {
@@ -11350,37 +11503,37 @@ var ReactStrictModeWarnings = {
if (UNSAFE_componentWillMountUniqueNames.size > 0) {
var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
- error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
+ error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
}
if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
- error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
+ error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
}
if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
- error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
+ error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
}
if (componentWillMountUniqueNames.size > 0) {
var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
- warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
+ warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
}
if (componentWillReceivePropsUniqueNames.size > 0) {
var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
- warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
+ warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
}
if (componentWillUpdateUniqueNames.size > 0) {
var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
- warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
+ warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
}
};
@@ -11427,9 +11580,14 @@ var ReactStrictModeWarnings = {
didWarnAboutLegacyContext.add(fiber.type);
});
var sortedNames = setToSortedString(uniqueNames);
- var firstComponentStack = getStackByFiberInDevAndProd(firstFiber);
- error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + '%s', sortedNames, firstComponentStack);
+ try {
+ setCurrentFiber(firstFiber);
+
+ error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);
+ } finally {
+ resetCurrentFiber();
+ }
});
};
@@ -11444,402 +11602,6 @@ var ReactStrictModeWarnings = {
};
}
-var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
-
-var failedBoundaries = null;
-var setRefreshHandler = function (handler) {
- {
- resolveFamily = handler;
- }
-};
-function resolveFunctionForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
-
- var family = resolveFamily(type);
-
- if (family === undefined) {
- return type;
- } // Use the latest known implementation.
-
-
- return family.current;
- }
-}
-function resolveClassForHotReloading(type) {
- // No implementation differences.
- return resolveFunctionForHotReloading(type);
-}
-function resolveForwardRefForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
-
- var family = resolveFamily(type);
-
- if (family === undefined) {
- // Check if we're dealing with a real forwardRef. Don't want to crash early.
- if (type !== null && type !== undefined && typeof type.render === 'function') {
- // ForwardRef is special because its resolved .type is an object,
- // but it's possible that we only have its inner render function in the map.
- // If that inner render function is different, we'll build a new forwardRef type.
- var currentRender = resolveFunctionForHotReloading(type.render);
-
- if (type.render !== currentRender) {
- var syntheticType = {
- $$typeof: REACT_FORWARD_REF_TYPE,
- render: currentRender
- };
-
- if (type.displayName !== undefined) {
- syntheticType.displayName = type.displayName;
- }
-
- return syntheticType;
- }
- }
-
- return type;
- } // Use the latest known implementation.
-
-
- return family.current;
- }
-}
-function isCompatibleFamilyForHotReloading(fiber, element) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return false;
- }
-
- var prevType = fiber.elementType;
- var nextType = element.type; // If we got here, we know types aren't === equal.
-
- var needsCompareFamilies = false;
- var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
-
- switch (fiber.tag) {
- case ClassComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case FunctionComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- // We don't know the inner type yet.
- // We're going to assume that the lazy inner type is stable,
- // and so it is sufficient to avoid reconciling it away.
- // We're not going to unwrap or actually use the new lazy type.
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case ForwardRef:
- {
- if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case MemoComponent:
- case SimpleMemoComponent:
- {
- if ($$typeofNextType === REACT_MEMO_TYPE) {
- // TODO: if it was but can no longer be simple,
- // we shouldn't set this.
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- default:
- return false;
- } // Check if both types have a family and it's the same one.
-
-
- if (needsCompareFamilies) {
- // Note: memo() and forwardRef() we'll compare outer rather than inner type.
- // This means both of them need to be registered to preserve state.
- // If we unwrapped and compared the inner types for wrappers instead,
- // then we would risk falsely saying two separate memo(Foo)
- // calls are equivalent because they wrap the same Foo function.
- var prevFamily = resolveFamily(prevType);
-
- if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
- return true;
- }
- }
-
- return false;
- }
-}
-function markFailedErrorBoundaryForHotReloading(fiber) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
-
- if (typeof WeakSet !== 'function') {
- return;
- }
-
- if (failedBoundaries === null) {
- failedBoundaries = new WeakSet();
- }
-
- failedBoundaries.add(fiber);
- }
-}
-var scheduleRefresh = function (root, update) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
-
- var staleFamilies = update.staleFamilies,
- updatedFamilies = update.updatedFamilies;
- flushPassiveEffects();
- flushSync(function () {
- scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
- });
- }
-};
-var scheduleRoot = function (root, element) {
- {
- if (root.context !== emptyContextObject) {
- // Super edge case: root has a legacy _renderSubtree context
- // but we don't know the parentComponent so we can't pass it.
- // Just ignore. We'll delete this with _renderSubtree code path later.
- return;
- }
-
- flushPassiveEffects();
- syncUpdates(function () {
- updateContainer(element, root, null, null);
- });
- }
-};
-
-function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
- {
- var alternate = fiber.alternate,
- child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
-
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
-
- case ForwardRef:
- candidateType = type.render;
- break;
- }
-
- if (resolveFamily === null) {
- throw new Error('Expected resolveFamily to be set during hot reload.');
- }
-
- var needsRender = false;
- var needsRemount = false;
-
- if (candidateType !== null) {
- var family = resolveFamily(candidateType);
-
- if (family !== undefined) {
- if (staleFamilies.has(family)) {
- needsRemount = true;
- } else if (updatedFamilies.has(family)) {
- if (tag === ClassComponent) {
- needsRemount = true;
- } else {
- needsRender = true;
- }
- }
- }
- }
-
- if (failedBoundaries !== null) {
- if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
- needsRemount = true;
- }
- }
-
- if (needsRemount) {
- fiber._debugNeedsRemount = true;
- }
-
- if (needsRemount || needsRender) {
- scheduleWork(fiber, Sync);
- }
-
- if (child !== null && !needsRemount) {
- scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
- }
-
- if (sibling !== null) {
- scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
- }
- }
-}
-
-var findHostInstancesForRefresh = function (root, families) {
- {
- var hostInstances = new Set();
- var types = new Set(families.map(function (family) {
- return family.current;
- }));
- findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
- return hostInstances;
- }
-};
-
-function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
- {
- var child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
-
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
-
- case ForwardRef:
- candidateType = type.render;
- break;
- }
-
- var didMatch = false;
-
- if (candidateType !== null) {
- if (types.has(candidateType)) {
- didMatch = true;
- }
- }
-
- if (didMatch) {
- // We have a match. This only drills down to the closest host components.
- // There's no need to search deeper because for the purpose of giving
- // visual feedback, "flashing" outermost parent rectangles is sufficient.
- findHostInstancesForFiberShallowly(fiber, hostInstances);
- } else {
- // If there's no match, maybe there will be one further down in the child tree.
- if (child !== null) {
- findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
- }
- }
-
- if (sibling !== null) {
- findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
- }
- }
-}
-
-function findHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
-
- if (foundHostInstances) {
- return;
- } // If we didn't find any host children, fallback to closest host parent.
-
-
- var node = fiber;
-
- while (true) {
- switch (node.tag) {
- case HostComponent:
- hostInstances.add(node.stateNode);
- return;
-
- case HostPortal:
- hostInstances.add(node.stateNode.containerInfo);
- return;
-
- case HostRoot:
- hostInstances.add(node.stateNode.containerInfo);
- return;
- }
-
- if (node.return === null) {
- throw new Error('Expected to reach root first.');
- }
-
- node = node.return;
- }
- }
-}
-
-function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var node = fiber;
- var foundHostInstances = false;
-
- while (true) {
- if (node.tag === HostComponent) {
- // We got a match.
- foundHostInstances = true;
- hostInstances.add(node.stateNode); // There may still be more, so keep searching.
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === fiber) {
- return foundHostInstances;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === fiber) {
- return foundHostInstances;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-
- return false;
-}
-
function resolveDefaultProps(Component, baseProps) {
if (Component && Component.defaultProps) {
// Resolve default props. Taken from ReactElement
@@ -11858,15 +11620,11 @@ function resolveDefaultProps(Component, baseProps) {
return baseProps;
}
-function readLazyComponentType(lazyComponent) {
- initializeLazyComponentType(lazyComponent);
- if (lazyComponent._status !== Resolved) {
- throw lazyComponent._result;
- }
-
- return lazyComponent._result;
-}
+// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
+// Math.pow(2, 30) - 1
+// 0b111111111111111111111111111111
+var MAX_SIGNED_31_BIT_INT = 1073741823;
var valueCursor = createCursor(null);
var rendererSigil;
@@ -11942,22 +11700,21 @@ function calculateChangedBits(context, newValue, oldValue) {
return changedBits | 0;
}
}
-function scheduleWorkOnParentPath(parent, renderExpirationTime) {
- // Update the child expiration time of all the ancestors, including
- // the alternates.
+function scheduleWorkOnParentPath(parent, renderLanes) {
+ // Update the child lanes of all the ancestors, including the alternates.
var node = parent;
while (node !== null) {
var alternate = node.alternate;
- if (node.childExpirationTime < renderExpirationTime) {
- node.childExpirationTime = renderExpirationTime;
+ if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
+ node.childLanes = mergeLanes(node.childLanes, renderLanes);
- if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
- alternate.childExpirationTime = renderExpirationTime;
+ if (alternate !== null) {
+ alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
}
- } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
- alternate.childExpirationTime = renderExpirationTime;
+ } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
+ alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
} else {
// Neither alternate was updated, which means the rest of the
// ancestor path already has sufficient priority.
@@ -11967,7 +11724,7 @@ function scheduleWorkOnParentPath(parent, renderExpirationTime) {
node = node.return;
}
}
-function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
+function propagateContextChange(workInProgress, context, changedBits, renderLanes) {
var fiber = workInProgress.child;
if (fiber !== null) {
@@ -11990,7 +11747,7 @@ function propagateContextChange(workInProgress, context, changedBits, renderExpi
// Match! Schedule an update on this fiber.
if (fiber.tag === ClassComponent) {
// Schedule a force update on the work-in-progress.
- var update = createUpdate(renderExpirationTime, null);
+ var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));
update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
// update to the current fiber, too, which means it will persist even if
// this render is thrown away. Since it's a race condition, not sure it's
@@ -11999,24 +11756,18 @@ function propagateContextChange(workInProgress, context, changedBits, renderExpi
enqueueUpdate(fiber, update);
}
- if (fiber.expirationTime < renderExpirationTime) {
- fiber.expirationTime = renderExpirationTime;
- }
-
+ fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
var alternate = fiber.alternate;
- if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
- alternate.expirationTime = renderExpirationTime;
+ if (alternate !== null) {
+ alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
}
- scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too.
+ scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.
- if (list.expirationTime < renderExpirationTime) {
- list.expirationTime = renderExpirationTime;
- } // Since we already found a match, we can stop traversing the
+ list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the
// dependency list.
-
break;
}
@@ -12061,7 +11812,7 @@ function propagateContextChange(workInProgress, context, changedBits, renderExpi
fiber = nextFiber;
}
}
-function prepareToReadContext(workInProgress, renderExpirationTime) {
+function prepareToReadContext(workInProgress, renderLanes) {
currentlyRenderingFiber = workInProgress;
lastContextDependency = null;
lastContextWithAllBitsObserved = null;
@@ -12071,7 +11822,7 @@ function prepareToReadContext(workInProgress, renderExpirationTime) {
var firstContext = dependencies.firstContext;
if (firstContext !== null) {
- if (dependencies.expirationTime >= renderExpirationTime) {
+ if (includesSomeLane(dependencies.lanes, renderLanes)) {
// Context list has a pending update. Mark that this fiber performed work.
markWorkInProgressReceivedUpdate();
} // Reset the work-in-progress list
@@ -12117,7 +11868,7 @@ function readContext(context, observedBits) {
lastContextDependency = contextItem;
currentlyRenderingFiber.dependencies = {
- expirationTime: NoWork,
+ lanes: NoLanes,
firstContext: contextItem,
responders: null
};
@@ -12149,7 +11900,8 @@ var currentlyProcessingQueue;
function initializeUpdateQueue(fiber) {
var queue = {
baseState: fiber.memoizedState,
- baseQueue: null,
+ firstBaseUpdate: null,
+ lastBaseUpdate: null,
shared: {
pending: null
},
@@ -12165,28 +11917,23 @@ function cloneUpdateQueue(current, workInProgress) {
if (queue === currentQueue) {
var clone = {
baseState: currentQueue.baseState,
- baseQueue: currentQueue.baseQueue,
+ firstBaseUpdate: currentQueue.firstBaseUpdate,
+ lastBaseUpdate: currentQueue.lastBaseUpdate,
shared: currentQueue.shared,
effects: currentQueue.effects
};
workInProgress.updateQueue = clone;
}
}
-function createUpdate(expirationTime, suspenseConfig) {
+function createUpdate(eventTime, lane) {
var update = {
- expirationTime: expirationTime,
- suspenseConfig: suspenseConfig,
+ eventTime: eventTime,
+ lane: lane,
tag: UpdateState,
payload: null,
callback: null,
next: null
};
- update.next = update;
-
- {
- update.priority = getCurrentPriorityLevel();
- }
-
return update;
}
function enqueueUpdate(fiber, update) {
@@ -12218,26 +11965,86 @@ function enqueueUpdate(fiber, update) {
}
}
}
-function enqueueCapturedUpdate(workInProgress, update) {
+function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
+ // Captured updates are updates that are thrown by a child during the render
+ // phase. They should be discarded if the render is aborted. Therefore,
+ // we should only put them on the work-in-progress queue, not the current one.
+ var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.
+
var current = workInProgress.alternate;
if (current !== null) {
- // Ensure the work-in-progress queue is a clone
- cloneUpdateQueue(current, workInProgress);
- } // Captured updates go only on the work-in-progress queue.
+ var currentQueue = current.updateQueue;
+
+ if (queue === currentQueue) {
+ // The work-in-progress queue is the same as current. This happens when
+ // we bail out on a parent fiber that then captures an error thrown by
+ // a child. Since we want to append the update only to the work-in
+ // -progress queue, we need to clone the updates. We usually clone during
+ // processUpdateQueue, but that didn't happen in this case because we
+ // skipped over the parent when we bailed out.
+ var newFirst = null;
+ var newLast = null;
+ var firstBaseUpdate = queue.firstBaseUpdate;
+
+ if (firstBaseUpdate !== null) {
+ // Loop through the updates and clone them.
+ var update = firstBaseUpdate;
+
+ do {
+ var clone = {
+ eventTime: update.eventTime,
+ lane: update.lane,
+ tag: update.tag,
+ payload: update.payload,
+ callback: update.callback,
+ next: null
+ };
+ if (newLast === null) {
+ newFirst = newLast = clone;
+ } else {
+ newLast.next = clone;
+ newLast = clone;
+ }
- var queue = workInProgress.updateQueue; // Append the update to the end of the list.
+ update = update.next;
+ } while (update !== null); // Append the captured update the end of the cloned list.
- var last = queue.baseQueue;
- if (last === null) {
- queue.baseQueue = update.next = update;
- update.next = update;
+ if (newLast === null) {
+ newFirst = newLast = capturedUpdate;
+ } else {
+ newLast.next = capturedUpdate;
+ newLast = capturedUpdate;
+ }
+ } else {
+ // There are no base updates.
+ newFirst = newLast = capturedUpdate;
+ }
+
+ queue = {
+ baseState: currentQueue.baseState,
+ firstBaseUpdate: newFirst,
+ lastBaseUpdate: newLast,
+ shared: currentQueue.shared,
+ effects: currentQueue.effects
+ };
+ workInProgress.updateQueue = queue;
+ return;
+ }
+ } // Append the update to the end of the list.
+
+
+ var lastBaseUpdate = queue.lastBaseUpdate;
+
+ if (lastBaseUpdate === null) {
+ queue.firstBaseUpdate = capturedUpdate;
} else {
- update.next = last.next;
- last.next = update;
+ lastBaseUpdate.next = capturedUpdate;
}
+
+ queue.lastBaseUpdate = capturedUpdate;
}
function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
@@ -12250,15 +12057,21 @@ function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps,
// Updater function
{
enterDisallowedContextReadInDEV();
-
- if ( workInProgress.mode & StrictMode) {
- payload.call(instance, prevState, nextProps);
- }
}
var nextState = payload.call(instance, prevState, nextProps);
{
+ if ( workInProgress.mode & StrictMode) {
+ disableLogs();
+
+ try {
+ payload.call(instance, prevState, nextProps);
+ } finally {
+ reenableLogs();
+ }
+ }
+
exitDisallowedContextReadInDEV();
}
@@ -12271,7 +12084,7 @@ function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps,
case CaptureUpdate:
{
- workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
+ workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
}
// Intentional fallthrough
@@ -12284,15 +12097,21 @@ function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps,
// Updater function
{
enterDisallowedContextReadInDEV();
-
- if ( workInProgress.mode & StrictMode) {
- _payload.call(instance, prevState, nextProps);
- }
}
partialState = _payload.call(instance, prevState, nextProps);
{
+ if ( workInProgress.mode & StrictMode) {
+ disableLogs();
+
+ try {
+ _payload.call(instance, prevState, nextProps);
+ } finally {
+ reenableLogs();
+ }
+ }
+
exitDisallowedContextReadInDEV();
}
} else {
@@ -12319,150 +12138,159 @@ function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps,
return prevState;
}
-function processUpdateQueue(workInProgress, props, instance, renderExpirationTime) {
+function processUpdateQueue(workInProgress, props, instance, renderLanes) {
// This is always non-null on a ClassComponent or HostRoot
var queue = workInProgress.updateQueue;
hasForceUpdate = false;
{
currentlyProcessingQueue = queue.shared;
- } // The last rebase update that is NOT part of the base state.
-
+ }
- var baseQueue = queue.baseQueue; // The last pending update that hasn't been processed yet.
+ var firstBaseUpdate = queue.firstBaseUpdate;
+ var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.
var pendingQueue = queue.shared.pending;
if (pendingQueue !== null) {
- // We have new updates that haven't been processed yet.
- // We'll add them to the base queue.
- if (baseQueue !== null) {
- // Merge the pending queue and the base queue.
- var baseFirst = baseQueue.next;
- var pendingFirst = pendingQueue.next;
- baseQueue.next = pendingFirst;
- pendingQueue.next = baseFirst;
+ queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
+ // and last so that it's non-circular.
+
+ var lastPendingUpdate = pendingQueue;
+ var firstPendingUpdate = lastPendingUpdate.next;
+ lastPendingUpdate.next = null; // Append pending updates to base queue
+
+ if (lastBaseUpdate === null) {
+ firstBaseUpdate = firstPendingUpdate;
+ } else {
+ lastBaseUpdate.next = firstPendingUpdate;
}
- baseQueue = pendingQueue;
- queue.shared.pending = null; // TODO: Pass `current` as argument
+ lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
+ // we need to transfer the updates to that queue, too. Because the base
+ // queue is a singly-linked list with no cycles, we can append to both
+ // lists and take advantage of structural sharing.
+ // TODO: Pass `current` as argument
var current = workInProgress.alternate;
if (current !== null) {
+ // This is always non-null on a ClassComponent or HostRoot
var currentQueue = current.updateQueue;
+ var currentLastBaseUpdate = currentQueue.lastBaseUpdate;
- if (currentQueue !== null) {
- currentQueue.baseQueue = pendingQueue;
+ if (currentLastBaseUpdate !== lastBaseUpdate) {
+ if (currentLastBaseUpdate === null) {
+ currentQueue.firstBaseUpdate = firstPendingUpdate;
+ } else {
+ currentLastBaseUpdate.next = firstPendingUpdate;
+ }
+
+ currentQueue.lastBaseUpdate = lastPendingUpdate;
}
}
} // These values may change as we process the queue.
- if (baseQueue !== null) {
- var first = baseQueue.next; // Iterate through the list of updates to compute the result.
+ if (firstBaseUpdate !== null) {
+ // Iterate through the list of updates to compute the result.
+ var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
+ // from the original lanes.
- var newState = queue.baseState;
- var newExpirationTime = NoWork;
+ var newLanes = NoLanes;
var newBaseState = null;
- var newBaseQueueFirst = null;
- var newBaseQueueLast = null;
+ var newFirstBaseUpdate = null;
+ var newLastBaseUpdate = null;
+ var update = firstBaseUpdate;
- if (first !== null) {
- var update = first;
+ do {
+ var updateLane = update.lane;
+ var updateEventTime = update.eventTime;
- do {
- var updateExpirationTime = update.expirationTime;
+ if (!isSubsetOfLanes(renderLanes, updateLane)) {
+ // Priority is insufficient. Skip this update. If this is the first
+ // skipped update, the previous update/state is the new base
+ // update/state.
+ var clone = {
+ eventTime: updateEventTime,
+ lane: updateLane,
+ tag: update.tag,
+ payload: update.payload,
+ callback: update.callback,
+ next: null
+ };
- if (updateExpirationTime < renderExpirationTime) {
- // Priority is insufficient. Skip this update. If this is the first
- // skipped update, the previous update/state is the new base
- // update/state.
- var clone = {
- expirationTime: update.expirationTime,
- suspenseConfig: update.suspenseConfig,
+ if (newLastBaseUpdate === null) {
+ newFirstBaseUpdate = newLastBaseUpdate = clone;
+ newBaseState = newState;
+ } else {
+ newLastBaseUpdate = newLastBaseUpdate.next = clone;
+ } // Update the remaining priority in the queue.
+
+
+ newLanes = mergeLanes(newLanes, updateLane);
+ } else {
+ // This update does have sufficient priority.
+ if (newLastBaseUpdate !== null) {
+ var _clone = {
+ eventTime: updateEventTime,
+ // This update is going to be committed so we never want uncommit
+ // it. Using NoLane works because 0 is a subset of all bitmasks, so
+ // this will never be skipped by the check above.
+ lane: NoLane,
tag: update.tag,
payload: update.payload,
callback: update.callback,
next: null
};
+ newLastBaseUpdate = newLastBaseUpdate.next = _clone;
+ } // Process this update.
- if (newBaseQueueLast === null) {
- newBaseQueueFirst = newBaseQueueLast = clone;
- newBaseState = newState;
- } else {
- newBaseQueueLast = newBaseQueueLast.next = clone;
- } // Update the remaining priority in the queue.
+ newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
+ var callback = update.callback;
- if (updateExpirationTime > newExpirationTime) {
- newExpirationTime = updateExpirationTime;
- }
- } else {
- // This update does have sufficient priority.
- if (newBaseQueueLast !== null) {
- var _clone = {
- expirationTime: Sync,
- // This update is going to be committed so we never want uncommit it.
- suspenseConfig: update.suspenseConfig,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
- newBaseQueueLast = newBaseQueueLast.next = _clone;
- } // Mark the event time of this update as relevant to this render pass.
- // TODO: This should ideally use the true event time of this update rather than
- // its priority which is a derived and not reverseable value.
- // TODO: We should skip this update if it was already committed but currently
- // we have no way of detecting the difference between a committed and suspended
- // update here.
-
-
- markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.
-
- newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
- var callback = update.callback;
-
- if (callback !== null) {
- workInProgress.effectTag |= Callback;
- var effects = queue.effects;
-
- if (effects === null) {
- queue.effects = [update];
- } else {
- effects.push(update);
- }
+ if (callback !== null) {
+ workInProgress.flags |= Callback;
+ var effects = queue.effects;
+
+ if (effects === null) {
+ queue.effects = [update];
+ } else {
+ effects.push(update);
}
}
+ }
- update = update.next;
+ update = update.next;
- if (update === null || update === first) {
- pendingQueue = queue.shared.pending;
+ if (update === null) {
+ pendingQueue = queue.shared.pending;
- if (pendingQueue === null) {
- break;
- } else {
- // An update was scheduled from inside a reducer. Add the new
- // pending updates to the end of the list and keep processing.
- update = baseQueue.next = pendingQueue.next;
- pendingQueue.next = first;
- queue.baseQueue = baseQueue = pendingQueue;
- queue.shared.pending = null;
- }
+ if (pendingQueue === null) {
+ break;
+ } else {
+ // An update was scheduled from inside a reducer. Add the new
+ // pending updates to the end of the list and keep processing.
+ var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
+ // unravel them when transferring them to the base queue.
+
+ var _firstPendingUpdate = _lastPendingUpdate.next;
+ _lastPendingUpdate.next = null;
+ update = _firstPendingUpdate;
+ queue.lastBaseUpdate = _lastPendingUpdate;
+ queue.shared.pending = null;
}
- } while (true);
- }
+ }
+ } while (true);
- if (newBaseQueueLast === null) {
+ if (newLastBaseUpdate === null) {
newBaseState = newState;
- } else {
- newBaseQueueLast.next = newBaseQueueFirst;
}
queue.baseState = newBaseState;
- queue.baseQueue = newBaseQueueLast; // Set the remaining expiration time to be whatever is remaining in the queue.
+ queue.firstBaseUpdate = newFirstBaseUpdate;
+ queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.
// This should be fine because the only two other things that contribute to
// expiration time are props and context. We're already in the middle of the
// begin phase by the time we start processing the queue, so we've already
@@ -12470,8 +12298,8 @@ function processUpdateQueue(workInProgress, props, instance, renderExpirationTim
// shouldComponentUpdate is tricky; but we'll have to account for
// that regardless.
- markUnprocessedUpdateTime(newExpirationTime);
- workInProgress.expirationTime = newExpirationTime;
+ markSkippedUpdateLanes(newLanes);
+ workInProgress.lanes = newLanes;
workInProgress.memoizedState = newState;
}
@@ -12514,11 +12342,6 @@ function commitUpdateQueue(finishedWork, finishedQueue, instance) {
}
}
-var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
-function requestCurrentSuspenseConfig() {
- return ReactCurrentBatchConfig.suspense;
-}
-
var fakeInternalInstance = {};
var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
// We'll use it to determine whether we need to initialize legacy refs.
@@ -12551,7 +12374,7 @@ var didWarnAboutInvalidateContextType;
return;
}
- var key = callerName + "_" + callback;
+ var key = callerName + '_' + callback;
if (!didWarnOnInvalidCallback.has(key)) {
didWarnOnInvalidCallback.add(key);
@@ -12595,8 +12418,14 @@ function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromPro
{
if ( workInProgress.mode & StrictMode) {
- // Invoke the function an extra time to help detect side-effects.
- getDerivedStateFromProps(nextProps, prevState);
+ disableLogs();
+
+ try {
+ // Invoke the function an extra time to help detect side-effects.
+ getDerivedStateFromProps(nextProps, prevState);
+ } finally {
+ reenableLogs();
+ }
}
}
@@ -12611,7 +12440,7 @@ function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromPro
workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
// base state.
- if (workInProgress.expirationTime === NoWork) {
+ if (workInProgress.lanes === NoLanes) {
// Queue is always non-null for classes
var updateQueue = workInProgress.updateQueue;
updateQueue.baseState = memoizedState;
@@ -12621,10 +12450,9 @@ var classComponentUpdater = {
isMounted: isMounted,
enqueueSetState: function (inst, payload, callback) {
var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
+ var update = createUpdate(eventTime, lane);
update.payload = payload;
if (callback !== undefined && callback !== null) {
@@ -12636,14 +12464,13 @@ var classComponentUpdater = {
}
enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
},
enqueueReplaceState: function (inst, payload, callback) {
var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
+ var update = createUpdate(eventTime, lane);
update.tag = ReplaceState;
update.payload = payload;
@@ -12656,14 +12483,13 @@ var classComponentUpdater = {
}
enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
},
enqueueForceUpdate: function (inst, callback) {
var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
+ var update = createUpdate(eventTime, lane);
update.tag = ForceUpdate;
if (callback !== undefined && callback !== null) {
@@ -12675,7 +12501,7 @@ var classComponentUpdater = {
}
enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
}
};
@@ -12685,14 +12511,18 @@ function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, ol
if (typeof instance.shouldComponentUpdate === 'function') {
{
if ( workInProgress.mode & StrictMode) {
- // Invoke the function an extra time to help detect side-effects.
- instance.shouldComponentUpdate(newProps, newState, nextContext);
+ disableLogs();
+
+ try {
+ // Invoke the function an extra time to help detect side-effects.
+ instance.shouldComponentUpdate(newProps, newState, nextContext);
+ } finally {
+ reenableLogs();
+ }
}
}
- startPhaseTimer(workInProgress, 'shouldComponentUpdate');
var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
- stopPhaseTimer();
{
if (shouldUpdate === undefined) {
@@ -12873,7 +12703,13 @@ function constructClassInstance(workInProgress, ctor, props) {
{
if ( workInProgress.mode & StrictMode) {
- new ctor(props, context); // eslint-disable-line no-new
+ disableLogs();
+
+ try {
+ new ctor(props, context); // eslint-disable-line no-new
+ } finally {
+ reenableLogs();
+ }
}
}
@@ -12926,7 +12762,7 @@ function constructClassInstance(workInProgress, ctor, props) {
if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
- error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
+ error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
}
}
}
@@ -12942,7 +12778,6 @@ function constructClassInstance(workInProgress, ctor, props) {
}
function callComponentWillMount(workInProgress, instance) {
- startPhaseTimer(workInProgress, 'componentWillMount');
var oldState = instance.state;
if (typeof instance.componentWillMount === 'function') {
@@ -12953,8 +12788,6 @@ function callComponentWillMount(workInProgress, instance) {
instance.UNSAFE_componentWillMount();
}
- stopPhaseTimer();
-
if (oldState !== instance.state) {
{
error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
@@ -12966,7 +12799,6 @@ function callComponentWillMount(workInProgress, instance) {
function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
var oldState = instance.state;
- startPhaseTimer(workInProgress, 'componentWillReceiveProps');
if (typeof instance.componentWillReceiveProps === 'function') {
instance.componentWillReceiveProps(newProps, nextContext);
@@ -12976,8 +12808,6 @@ function callComponentWillReceiveProps(workInProgress, instance, newProps, nextC
instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
}
- stopPhaseTimer();
-
if (instance.state !== oldState) {
{
var componentName = getComponentName(workInProgress.type) || 'Component';
@@ -12994,7 +12824,7 @@ function callComponentWillReceiveProps(workInProgress, instance, newProps, nextC
} // Invokes the mount life-cycles on a previously never rendered instance.
-function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
+function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
{
checkClassInstance(workInProgress, ctor, newProps);
}
@@ -13033,7 +12863,7 @@ function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime
}
}
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
@@ -13048,16 +12878,16 @@ function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime
callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
// process them now.
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
}
if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
}
-function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
+function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
var oldProps = workInProgress.memoizedProps;
instance.props = oldProps;
@@ -13088,14 +12918,14 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirati
resetHasForceUpdateBeforeProcessing();
var oldState = workInProgress.memoizedState;
var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
newState = workInProgress.memoizedState;
if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
return false;
@@ -13112,8 +12942,6 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirati
// In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
- startPhaseTimer(workInProgress, 'componentWillMount');
-
if (typeof instance.componentWillMount === 'function') {
instance.componentWillMount();
}
@@ -13121,18 +12949,16 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirati
if (typeof instance.UNSAFE_componentWillMount === 'function') {
instance.UNSAFE_componentWillMount();
}
-
- stopPhaseTimer();
}
if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
} else {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
} // If shouldComponentUpdate returned false, we should still update the
// memoized state to indicate that this work can be reused.
@@ -13150,11 +12976,13 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirati
} // Invokes the update life-cycles and returns false if it shouldn't rerender.
-function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
+function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
cloneUpdateQueue(current, workInProgress);
- var oldProps = workInProgress.memoizedProps;
- instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);
+ var unresolvedOldProps = workInProgress.memoizedProps;
+ var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
+ instance.props = oldProps;
+ var unresolvedNewProps = workInProgress.pendingProps;
var oldContext = instance.context;
var contextType = ctor.contextType;
var nextContext = emptyContextObject;
@@ -13174,7 +13002,7 @@ function updateClassInstance(current, workInProgress, ctor, newProps, renderExpi
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
- if (oldProps !== newProps || oldContext !== nextContext) {
+ if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
}
}
@@ -13182,21 +13010,21 @@ function updateClassInstance(current, workInProgress, ctor, newProps, renderExpi
resetHasForceUpdateBeforeProcessing();
var oldState = workInProgress.memoizedState;
var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
newState = workInProgress.memoizedState;
- if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
+ if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Update;
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
+ workInProgress.flags |= Update;
}
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Snapshot;
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
+ workInProgress.flags |= Snapshot;
}
}
@@ -13214,8 +13042,6 @@ function updateClassInstance(current, workInProgress, ctor, newProps, renderExpi
// In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
- startPhaseTimer(workInProgress, 'componentWillUpdate');
-
if (typeof instance.componentWillUpdate === 'function') {
instance.componentWillUpdate(newProps, newState, nextContext);
}
@@ -13223,29 +13049,27 @@ function updateClassInstance(current, workInProgress, ctor, newProps, renderExpi
if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
}
-
- stopPhaseTimer();
}
if (typeof instance.componentDidUpdate === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- workInProgress.effectTag |= Snapshot;
+ workInProgress.flags |= Snapshot;
}
} else {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Update;
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
+ workInProgress.flags |= Update;
}
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Snapshot;
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
+ workInProgress.flags |= Snapshot;
}
} // If shouldComponentUpdate returned false, we should still update the
// memoized props/state to indicate that this work can be reused.
@@ -13269,7 +13093,7 @@ var didWarnAboutStringRefs;
var ownerHasKeyUseWarning;
var ownerHasFunctionTypeWarning;
-var warnForMissingKey = function (child) {};
+var warnForMissingKey = function (child, returnFiber) {};
{
didWarnAboutMaps = false;
@@ -13284,7 +13108,7 @@ var warnForMissingKey = function (child) {};
ownerHasKeyUseWarning = {};
ownerHasFunctionTypeWarning = {};
- warnForMissingKey = function (child) {
+ warnForMissingKey = function (child, returnFiber) {
if (child === null || typeof child !== 'object') {
return;
}
@@ -13300,15 +13124,15 @@ var warnForMissingKey = function (child) {};
}
child._store.validated = true;
- var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
+ var componentName = getComponentName(returnFiber.type) || 'Component';
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
+ if (ownerHasKeyUseWarning[componentName]) {
return;
}
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
+ ownerHasKeyUseWarning[componentName] = true;
- error('Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
+ error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
};
}
@@ -13329,7 +13153,7 @@ function coerceRef(returnFiber, current, element) {
if (!didWarnAboutStringRefs[componentName]) {
{
- error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref%s', mixedRef, getStackByFiberInDevAndProd(returnFiber));
+ error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);
}
didWarnAboutStringRefs[componentName] = true;
@@ -13346,7 +13170,7 @@ function coerceRef(returnFiber, current, element) {
if (!(ownerFiber.tag === ClassComponent)) {
{
- throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref" );
+ throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref" );
}
}
@@ -13391,7 +13215,7 @@ function coerceRef(returnFiber, current, element) {
if (!element._owner) {
{
- throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information." );
+ throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." );
}
}
}
@@ -13402,33 +13226,27 @@ function coerceRef(returnFiber, current, element) {
function throwOnInvalidObjectType(returnFiber, newChild) {
if (returnFiber.type !== 'textarea') {
- var addendum = '';
-
- {
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
- }
-
{
{
- throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + ")." + addendum );
+ throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + "). If you meant to render a collection of children, use an array instead." );
}
}
}
}
-function warnOnFunctionType() {
+function warnOnFunctionType(returnFiber) {
{
- var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();
+ var componentName = getComponentName(returnFiber.type) || 'Component';
- if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
+ if (ownerHasFunctionTypeWarning[componentName]) {
return;
}
- ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;
+ ownerHasFunctionTypeWarning[componentName] = true;
error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
}
-} // This wrapper function exists because I expect to clone the code in each path
+} // We avoid inlining this to avoid potential deopts from using try/catch.
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
@@ -13456,7 +13274,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
childToDelete.nextEffect = null;
- childToDelete.effectTag = Deletion;
+ childToDelete.flags = Deletion;
}
function deleteRemainingChildren(returnFiber, currentFirstChild) {
@@ -13521,7 +13339,7 @@ function ChildReconciler(shouldTrackSideEffects) {
if (oldIndex < lastPlacedIndex) {
// This is a move.
- newFiber.effectTag = Placement;
+ newFiber.flags = Placement;
return lastPlacedIndex;
} else {
// This item can stay in place.
@@ -13529,7 +13347,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
} else {
// This is an insertion.
- newFiber.effectTag = Placement;
+ newFiber.flags = Placement;
return lastPlacedIndex;
}
}
@@ -13538,16 +13356,16 @@ function ChildReconciler(shouldTrackSideEffects) {
// This is simpler for the single child case. We only need to do a
// placement for inserting new children.
if (shouldTrackSideEffects && newFiber.alternate === null) {
- newFiber.effectTag = Placement;
+ newFiber.flags = Placement;
}
return newFiber;
}
- function updateTextNode(returnFiber, current, textContent, expirationTime) {
+ function updateTextNode(returnFiber, current, textContent, lanes) {
if (current === null || current.tag !== HostText) {
// Insert
- var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
+ var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
@@ -13558,7 +13376,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- function updateElement(returnFiber, current, element, expirationTime) {
+ function updateElement(returnFiber, current, element, lanes) {
if (current !== null) {
if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
isCompatibleFamilyForHotReloading(current, element) )) {
@@ -13577,16 +13395,16 @@ function ChildReconciler(shouldTrackSideEffects) {
} // Insert
- var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
+ var created = createFiberFromElement(element, returnFiber.mode, lanes);
created.ref = coerceRef(returnFiber, current, element);
created.return = returnFiber;
return created;
}
- function updatePortal(returnFiber, current, portal, expirationTime) {
+ function updatePortal(returnFiber, current, portal, lanes) {
if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
// Insert
- var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
+ var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
@@ -13597,10 +13415,10 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- function updateFragment(returnFiber, current, fragment, expirationTime, key) {
+ function updateFragment(returnFiber, current, fragment, lanes, key) {
if (current === null || current.tag !== Fragment) {
// Insert
- var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
+ var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
created.return = returnFiber;
return created;
} else {
@@ -13611,12 +13429,12 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- function createChild(returnFiber, newChild, expirationTime) {
+ function createChild(returnFiber, newChild, lanes) {
if (typeof newChild === 'string' || typeof newChild === 'number') {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
// node.
- var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
+ var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
@@ -13625,7 +13443,7 @@ function ChildReconciler(shouldTrackSideEffects) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
{
- var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);
+ var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);
_created.ref = coerceRef(returnFiber, null, newChild);
_created.return = returnFiber;
@@ -13634,7 +13452,7 @@ function ChildReconciler(shouldTrackSideEffects) {
case REACT_PORTAL_TYPE:
{
- var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
+ var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);
_created2.return = returnFiber;
return _created2;
@@ -13642,7 +13460,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
if (isArray$1(newChild) || getIteratorFn(newChild)) {
- var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);
+ var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);
_created3.return = returnFiber;
return _created3;
@@ -13653,14 +13471,14 @@ function ChildReconciler(shouldTrackSideEffects) {
{
if (typeof newChild === 'function') {
- warnOnFunctionType();
+ warnOnFunctionType(returnFiber);
}
}
return null;
}
- function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
+ function updateSlot(returnFiber, oldFiber, newChild, lanes) {
// Update the fiber if the keys match, otherwise return null.
var key = oldFiber !== null ? oldFiber.key : null;
@@ -13672,7 +13490,7 @@ function ChildReconciler(shouldTrackSideEffects) {
return null;
}
- return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
+ return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);
}
if (typeof newChild === 'object' && newChild !== null) {
@@ -13681,10 +13499,10 @@ function ChildReconciler(shouldTrackSideEffects) {
{
if (newChild.key === key) {
if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
+ return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);
}
- return updateElement(returnFiber, oldFiber, newChild, expirationTime);
+ return updateElement(returnFiber, oldFiber, newChild, lanes);
} else {
return null;
}
@@ -13693,7 +13511,7 @@ function ChildReconciler(shouldTrackSideEffects) {
case REACT_PORTAL_TYPE:
{
if (newChild.key === key) {
- return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
+ return updatePortal(returnFiber, oldFiber, newChild, lanes);
} else {
return null;
}
@@ -13705,7 +13523,7 @@ function ChildReconciler(shouldTrackSideEffects) {
return null;
}
- return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
+ return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
}
throwOnInvalidObjectType(returnFiber, newChild);
@@ -13713,19 +13531,19 @@ function ChildReconciler(shouldTrackSideEffects) {
{
if (typeof newChild === 'function') {
- warnOnFunctionType();
+ warnOnFunctionType(returnFiber);
}
}
return null;
}
- function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
+ function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
if (typeof newChild === 'string' || typeof newChild === 'number') {
// Text nodes don't have keys, so we neither have to check the old nor
// new node for the key. If both are text nodes, they match.
var matchedFiber = existingChildren.get(newIdx) || null;
- return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
+ return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);
}
if (typeof newChild === 'object' && newChild !== null) {
@@ -13735,24 +13553,25 @@ function ChildReconciler(shouldTrackSideEffects) {
var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
+ return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);
}
- return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
+ return updateElement(returnFiber, _matchedFiber, newChild, lanes);
}
case REACT_PORTAL_TYPE:
{
var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
- return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
+ return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
}
+
}
if (isArray$1(newChild) || getIteratorFn(newChild)) {
var _matchedFiber3 = existingChildren.get(newIdx) || null;
- return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
+ return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
}
throwOnInvalidObjectType(returnFiber, newChild);
@@ -13760,7 +13579,7 @@ function ChildReconciler(shouldTrackSideEffects) {
{
if (typeof newChild === 'function') {
- warnOnFunctionType();
+ warnOnFunctionType(returnFiber);
}
}
@@ -13771,7 +13590,7 @@ function ChildReconciler(shouldTrackSideEffects) {
*/
- function warnOnInvalidKey(child, knownKeys) {
+ function warnOnInvalidKey(child, knownKeys, returnFiber) {
{
if (typeof child !== 'object' || child === null) {
return knownKeys;
@@ -13780,7 +13599,7 @@ function ChildReconciler(shouldTrackSideEffects) {
switch (child.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
- warnForMissingKey(child);
+ warnForMissingKey(child, returnFiber);
var key = child.key;
if (typeof key !== 'string') {
@@ -13807,7 +13626,7 @@ function ChildReconciler(shouldTrackSideEffects) {
return knownKeys;
}
- function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
+ function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
// This algorithm can't optimize by searching from both ends since we
// don't have backpointers on fibers. I'm trying to see how far we can get
// with that model. If it ends up not being worth the tradeoffs, we can
@@ -13829,7 +13648,7 @@ function ChildReconciler(shouldTrackSideEffects) {
for (var i = 0; i < newChildren.length; i++) {
var child = newChildren[i];
- knownKeys = warnOnInvalidKey(child, knownKeys);
+ knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}
@@ -13848,7 +13667,7 @@ function ChildReconciler(shouldTrackSideEffects) {
nextOldFiber = oldFiber.sibling;
}
- var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
+ var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
if (newFiber === null) {
// TODO: This breaks on empty slots like null children. That's
@@ -13897,7 +13716,7 @@ function ChildReconciler(shouldTrackSideEffects) {
// If we don't have any more existing children we can choose a fast path
// since the rest will all be insertions.
for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
+ var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);
if (_newFiber === null) {
continue;
@@ -13922,7 +13741,7 @@ function ChildReconciler(shouldTrackSideEffects) {
var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
+ var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);
if (_newFiber2 !== null) {
if (shouldTrackSideEffects) {
@@ -13958,7 +13777,7 @@ function ChildReconciler(shouldTrackSideEffects) {
return resultingFirstChild;
}
- function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
+ function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
// This is the same implementation as reconcileChildrenArray(),
// but using the iterator instead.
var iteratorFn = getIteratorFn(newChildrenIterable);
@@ -13984,7 +13803,7 @@ function ChildReconciler(shouldTrackSideEffects) {
if (newChildrenIterable.entries === iteratorFn) {
if (!didWarnAboutMaps) {
- error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');
+ error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
}
didWarnAboutMaps = true;
@@ -14001,7 +13820,7 @@ function ChildReconciler(shouldTrackSideEffects) {
for (; !_step.done; _step = _newChildren.next()) {
var child = _step.value;
- knownKeys = warnOnInvalidKey(child, knownKeys);
+ knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}
}
@@ -14030,7 +13849,7 @@ function ChildReconciler(shouldTrackSideEffects) {
nextOldFiber = oldFiber.sibling;
}
- var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
+ var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
if (newFiber === null) {
// TODO: This breaks on empty slots like null children. That's
@@ -14079,7 +13898,7 @@ function ChildReconciler(shouldTrackSideEffects) {
// If we don't have any more existing children we can choose a fast path
// since the rest will all be insertions.
for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
+ var _newFiber3 = createChild(returnFiber, step.value, lanes);
if (_newFiber3 === null) {
continue;
@@ -14104,7 +13923,7 @@ function ChildReconciler(shouldTrackSideEffects) {
var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
+ var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);
if (_newFiber4 !== null) {
if (shouldTrackSideEffects) {
@@ -14140,7 +13959,7 @@ function ChildReconciler(shouldTrackSideEffects) {
return resultingFirstChild;
}
- function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
+ function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
// There's no need to check for keys on text nodes since we don't have a
// way to define them.
if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
@@ -14155,12 +13974,12 @@ function ChildReconciler(shouldTrackSideEffects) {
deleteRemainingChildren(returnFiber, currentFirstChild);
- var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
+ var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
- function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
+ function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
var key = element.key;
var child = currentFirstChild;
@@ -14226,11 +14045,11 @@ function ChildReconciler(shouldTrackSideEffects) {
}
if (element.type === REACT_FRAGMENT_TYPE) {
- var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
+ var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
created.return = returnFiber;
return created;
} else {
- var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);
+ var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);
_created4.ref = coerceRef(returnFiber, currentFirstChild, element);
_created4.return = returnFiber;
@@ -14238,7 +14057,7 @@ function ChildReconciler(shouldTrackSideEffects) {
}
}
- function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
+ function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
var key = portal.key;
var child = currentFirstChild;
@@ -14262,7 +14081,7 @@ function ChildReconciler(shouldTrackSideEffects) {
child = child.sibling;
}
- var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
+ var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} // This API will tag the children with the side-effect of the reconciliation
@@ -14270,7 +14089,7 @@ function ChildReconciler(shouldTrackSideEffects) {
// children and the parent.
- function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
+ function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
// This function is not recursive.
// If the top level item is an array, we treat it as a set of children,
// not as a fragment. Nested arrays on the other hand will be treated as
@@ -14290,23 +14109,24 @@ function ChildReconciler(shouldTrackSideEffects) {
if (isObject) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
- return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
+ return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));
case REACT_PORTAL_TYPE:
- return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
+ return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
+
}
}
if (typeof newChild === 'string' || typeof newChild === 'number') {
- return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
+ return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
}
if (isArray$1(newChild)) {
- return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
+ return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
}
if (getIteratorFn(newChild)) {
- return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
+ return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
}
if (isObject) {
@@ -14315,7 +14135,7 @@ function ChildReconciler(shouldTrackSideEffects) {
{
if (typeof newChild === 'function') {
- warnOnFunctionType();
+ warnOnFunctionType(returnFiber);
}
}
@@ -14339,13 +14159,14 @@ function ChildReconciler(shouldTrackSideEffects) {
// functions and classes
// eslint-disable-next-lined no-fallthrough
+ case Block:
case FunctionComponent:
+ case ForwardRef:
+ case SimpleMemoComponent:
{
- var Component = returnFiber.type;
-
{
{
- throw Error( (Component.displayName || Component.name || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
+ throw Error( (getComponentName(returnFiber.type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
}
}
}
@@ -14386,11 +14207,11 @@ function cloneChildFibers(current, workInProgress) {
newChild.sibling = null;
} // Reset a workInProgress child set to prepare it for a second pass.
-function resetChildFibers(workInProgress, renderExpirationTime) {
+function resetChildFibers(workInProgress, lanes) {
var child = workInProgress.child;
while (child !== null) {
- resetWorkInProgress(child, renderExpirationTime);
+ resetWorkInProgress(child, lanes);
child = child.sibling;
}
}
@@ -14560,7 +14381,7 @@ function findFirstSuspended(row) {
} else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
// keep track of whether it suspended or not.
node.memoizedProps.revealOrder !== undefined) {
- var didSuspend = (node.effectTag & DidCapture) !== NoEffect;
+ var didSuspend = (node.flags & DidCapture) !== NoFlags;
if (didSuspend) {
return node;
@@ -14590,18 +14411,9 @@ function findFirstSuspended(row) {
return null;
}
-function createDeprecatedResponderListener(responder, props) {
- var eventResponderListener = {
- responder: responder,
- props: props
- };
-
- {
- Object.freeze(eventResponderListener);
- }
-
- return eventResponderListener;
-}
+var NoFlags$1 =
+/* */
+0; // Represents whether effect should fire.
var HasEffect =
/* */
@@ -14614,16 +14426,381 @@ var Passive$1 =
/* */
4;
-var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
+// This may have been an insertion or a hydration.
+
+var hydrationParentFiber = null;
+var nextHydratableInstance = null;
+var isHydrating = false;
+
+function enterHydrationState(fiber) {
+
+ var parentInstance = fiber.stateNode.containerInfo;
+ nextHydratableInstance = getFirstHydratableChild(parentInstance);
+ hydrationParentFiber = fiber;
+ isHydrating = true;
+ return true;
+}
+
+function deleteHydratableInstance(returnFiber, instance) {
+ {
+ switch (returnFiber.tag) {
+ case HostRoot:
+ didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
+ break;
+
+ case HostComponent:
+ didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
+ break;
+ }
+ }
+
+ var childToDelete = createFiberFromHostInstanceForDeletion();
+ childToDelete.stateNode = instance;
+ childToDelete.return = returnFiber;
+ childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
+ // these children are not part of the reconciliation list of children.
+ // Even if we abort and rereconcile the children, that will try to hydrate
+ // again and the nodes are still in the host tree so these will be
+ // recreated.
+
+ if (returnFiber.lastEffect !== null) {
+ returnFiber.lastEffect.nextEffect = childToDelete;
+ returnFiber.lastEffect = childToDelete;
+ } else {
+ returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
+ }
+}
+
+function insertNonHydratedInstance(returnFiber, fiber) {
+ fiber.flags = fiber.flags & ~Hydrating | Placement;
+
+ {
+ switch (returnFiber.tag) {
+ case HostRoot:
+ {
+ var parentContainer = returnFiber.stateNode.containerInfo;
+
+ switch (fiber.tag) {
+ case HostComponent:
+ var type = fiber.type;
+ var props = fiber.pendingProps;
+ didNotFindHydratableContainerInstance(parentContainer, type);
+ break;
+
+ case HostText:
+ var text = fiber.pendingProps;
+ didNotFindHydratableContainerTextInstance(parentContainer, text);
+ break;
+ }
+
+ break;
+ }
+
+ case HostComponent:
+ {
+ var parentType = returnFiber.type;
+ var parentProps = returnFiber.memoizedProps;
+ var parentInstance = returnFiber.stateNode;
+
+ switch (fiber.tag) {
+ case HostComponent:
+ var _type = fiber.type;
+ var _props = fiber.pendingProps;
+ didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
+ break;
+
+ case HostText:
+ var _text = fiber.pendingProps;
+ didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
+ break;
+
+ case SuspenseComponent:
+ didNotFindHydratableSuspenseInstance(parentType, parentProps);
+ break;
+ }
+
+ break;
+ }
+
+ default:
+ return;
+ }
+ }
+}
+
+function tryHydrate(fiber, nextInstance) {
+ switch (fiber.tag) {
+ case HostComponent:
+ {
+ var type = fiber.type;
+ var props = fiber.pendingProps;
+ var instance = canHydrateInstance(nextInstance, type);
+
+ if (instance !== null) {
+ fiber.stateNode = instance;
+ return true;
+ }
+
+ return false;
+ }
+
+ case HostText:
+ {
+ var text = fiber.pendingProps;
+ var textInstance = canHydrateTextInstance(nextInstance, text);
+
+ if (textInstance !== null) {
+ fiber.stateNode = textInstance;
+ return true;
+ }
+
+ return false;
+ }
+
+ case SuspenseComponent:
+ {
+
+ return false;
+ }
+
+ default:
+ return false;
+ }
+}
+
+function tryToClaimNextHydratableInstance(fiber) {
+ if (!isHydrating) {
+ return;
+ }
+
+ var nextInstance = nextHydratableInstance;
+
+ if (!nextInstance) {
+ // Nothing to hydrate. Make it an insertion.
+ insertNonHydratedInstance(hydrationParentFiber, fiber);
+ isHydrating = false;
+ hydrationParentFiber = fiber;
+ return;
+ }
+
+ var firstAttemptedInstance = nextInstance;
+
+ if (!tryHydrate(fiber, nextInstance)) {
+ // If we can't hydrate this instance let's try the next one.
+ // We use this as a heuristic. It's based on intuition and not data so it
+ // might be flawed or unnecessary.
+ nextInstance = getNextHydratableSibling(firstAttemptedInstance);
+
+ if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
+ // Nothing to hydrate. Make it an insertion.
+ insertNonHydratedInstance(hydrationParentFiber, fiber);
+ isHydrating = false;
+ hydrationParentFiber = fiber;
+ return;
+ } // We matched the next one, we'll now assume that the first one was
+ // superfluous and we'll delete it. Since we can't eagerly delete it
+ // we'll have to schedule a deletion. To do that, this node needs a dummy
+ // fiber associated with it.
+
+
+ deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
+ }
+
+ hydrationParentFiber = fiber;
+ nextHydratableInstance = getFirstHydratableChild(nextInstance);
+}
+
+function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
+
+ var instance = fiber.stateNode;
+ var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
+
+ fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
+ // is a new ref we mark this as an update.
+
+ if (updatePayload !== null) {
+ return true;
+ }
+
+ return false;
+}
+
+function prepareToHydrateHostTextInstance(fiber) {
+
+ var textInstance = fiber.stateNode;
+ var textContent = fiber.memoizedProps;
+ var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
+
+ {
+ if (shouldUpdate) {
+ // We assume that prepareToHydrateHostTextInstance is called in a context where the
+ // hydration parent is the parent host component of this host text.
+ var returnFiber = hydrationParentFiber;
+
+ if (returnFiber !== null) {
+ switch (returnFiber.tag) {
+ case HostRoot:
+ {
+ var parentContainer = returnFiber.stateNode.containerInfo;
+ didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
+ break;
+ }
+
+ case HostComponent:
+ {
+ var parentType = returnFiber.type;
+ var parentProps = returnFiber.memoizedProps;
+ var parentInstance = returnFiber.stateNode;
+ didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return shouldUpdate;
+}
+
+function skipPastDehydratedSuspenseInstance(fiber) {
+
+ var suspenseState = fiber.memoizedState;
+ var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
+
+ if (!suspenseInstance) {
+ {
+ throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+
+ return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
+}
+
+function popToNextHostParent(fiber) {
+ var parent = fiber.return;
+
+ while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
+ parent = parent.return;
+ }
+
+ hydrationParentFiber = parent;
+}
+
+function popHydrationState(fiber) {
+
+ if (fiber !== hydrationParentFiber) {
+ // We're deeper than the current hydration context, inside an inserted
+ // tree.
+ return false;
+ }
+
+ if (!isHydrating) {
+ // If we're not currently hydrating but we're in a hydration context, then
+ // we were an insertion and now need to pop up reenter hydration of our
+ // siblings.
+ popToNextHostParent(fiber);
+ isHydrating = true;
+ return false;
+ }
+
+ var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
+ // We only do this deeper than head and body since they tend to have random
+ // other nodes in them. We also ignore components with pure text content in
+ // side of them.
+ // TODO: Better heuristic.
+
+ if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
+ var nextInstance = nextHydratableInstance;
+
+ while (nextInstance) {
+ deleteHydratableInstance(fiber, nextInstance);
+ nextInstance = getNextHydratableSibling(nextInstance);
+ }
+ }
+
+ popToNextHostParent(fiber);
+
+ if (fiber.tag === SuspenseComponent) {
+ nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
+ } else {
+ nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
+ }
+
+ return true;
+}
+
+function resetHydrationState() {
+
+ hydrationParentFiber = null;
+ nextHydratableInstance = null;
+ isHydrating = false;
+}
+
+function getIsHydrating() {
+ return isHydrating;
+}
+
+// and should be reset before starting a new render.
+// This tracks which mutable sources need to be reset after a render.
+
+var workInProgressSources = [];
+var rendererSigil$1;
+
+{
+ // Used to detect multiple renderers using the same mutable source.
+ rendererSigil$1 = {};
+}
+
+function markSourceAsDirty(mutableSource) {
+ workInProgressSources.push(mutableSource);
+}
+function resetWorkInProgressVersions() {
+ for (var i = 0; i < workInProgressSources.length; i++) {
+ var mutableSource = workInProgressSources[i];
+
+ {
+ mutableSource._workInProgressVersionPrimary = null;
+ }
+ }
+
+ workInProgressSources.length = 0;
+}
+function getWorkInProgressVersion(mutableSource) {
+ {
+ return mutableSource._workInProgressVersionPrimary;
+ }
+}
+function setWorkInProgressVersion(mutableSource, version) {
+ {
+ mutableSource._workInProgressVersionPrimary = version;
+ }
+
+ workInProgressSources.push(mutableSource);
+}
+function warnAboutMultipleRenderersDEV(mutableSource) {
+ {
+ {
+ if (mutableSource._currentPrimaryRenderer == null) {
+ mutableSource._currentPrimaryRenderer = rendererSigil$1;
+ } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {
+ error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');
+ }
+ }
+ }
+} // Eager reads the version of a mutable source and stores it on the root.
+
+var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
var didWarnAboutMismatchedHooksForComponent;
+var didWarnAboutUseOpaqueIdentifier;
{
+ didWarnAboutUseOpaqueIdentifier = {};
didWarnAboutMismatchedHooksForComponent = new Set();
}
// These are set right before calling the component.
-var renderExpirationTime = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from
+var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
@@ -14637,7 +14814,12 @@ var workInProgressHook = null; // Whether an update was scheduled at any point d
// finished evaluating this component. This is an optimization so we know
// whether we need to clear render phase updates after a throw.
-var didScheduleRenderPhaseUpdate = false;
+var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This
+// gets reset after each attempt.
+// TODO: Maybe there's some way to consolidate this with
+// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.
+
+var didScheduleRenderPhaseUpdateDuringThisPass = false;
var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook
var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
@@ -14712,7 +14894,7 @@ function warnOnHookMismatchInDev(currentHookName) {
table += row;
}
- error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
+ error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
}
}
}
@@ -14721,7 +14903,7 @@ function warnOnHookMismatchInDev(currentHookName) {
function throwInvalidHookError() {
{
{
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
+ throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
}
}
}
@@ -14761,8 +14943,8 @@ function areHookInputsEqual(nextDeps, prevDeps) {
return true;
}
-function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderExpirationTime) {
- renderExpirationTime = nextRenderExpirationTime;
+function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
+ renderLanes = nextRenderLanes;
currentlyRenderingFiber$1 = workInProgress;
{
@@ -14774,7 +14956,7 @@ function renderWithHooks(current, workInProgress, Component, props, secondArg, n
workInProgress.memoizedState = null;
workInProgress.updateQueue = null;
- workInProgress.expirationTime = NoWork; // The following should have already been reset
+ workInProgress.lanes = NoLanes; // The following should have already been reset
// currentHook = null;
// workInProgressHook = null;
// didScheduleRenderPhaseUpdate = false;
@@ -14787,28 +14969,28 @@ function renderWithHooks(current, workInProgress, Component, props, secondArg, n
{
if (current !== null && current.memoizedState !== null) {
- ReactCurrentDispatcher.current = HooksDispatcherOnUpdateInDEV;
+ ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
} else if (hookTypesDev !== null) {
// This dispatcher handles an edge case where a component is updating,
// but no stateful hooks have been used.
// We want to match the production code behavior (which will use HooksDispatcherOnMount),
// but with the extra DEV validation to ensure hooks ordering hasn't changed.
// This dispatcher does that.
- ReactCurrentDispatcher.current = HooksDispatcherOnMountWithHookTypesInDEV;
+ ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
} else {
- ReactCurrentDispatcher.current = HooksDispatcherOnMountInDEV;
+ ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
}
}
var children = Component(props, secondArg); // Check if there was a render phase update
- if (workInProgress.expirationTime === renderExpirationTime) {
+ if (didScheduleRenderPhaseUpdateDuringThisPass) {
// Keep rendering in a loop for as long as render phase updates continue to
// be scheduled. Use a counter to prevent infinite loops.
var numberOfReRenders = 0;
do {
- workInProgress.expirationTime = NoWork;
+ didScheduleRenderPhaseUpdateDuringThisPass = false;
if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
{
@@ -14834,14 +15016,14 @@ function renderWithHooks(current, workInProgress, Component, props, secondArg, n
hookTypesUpdateIndexDev = -1;
}
- ReactCurrentDispatcher.current = HooksDispatcherOnRerenderInDEV ;
+ ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;
children = Component(props, secondArg);
- } while (workInProgress.expirationTime === renderExpirationTime);
+ } while (didScheduleRenderPhaseUpdateDuringThisPass);
} // We can assume the previous dispatcher is always this one, since we set it
// at the beginning of the render phase and there's no re-entrancy.
- ReactCurrentDispatcher.current = ContextOnlyDispatcher;
+ ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
{
workInProgress._debugHookTypes = hookTypesDev;
@@ -14850,7 +15032,7 @@ function renderWithHooks(current, workInProgress, Component, props, secondArg, n
var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
- renderExpirationTime = NoWork;
+ renderLanes = NoLanes;
currentlyRenderingFiber$1 = null;
currentHook = null;
workInProgressHook = null;
@@ -14871,18 +15053,15 @@ function renderWithHooks(current, workInProgress, Component, props, secondArg, n
return children;
}
-function bailoutHooks(current, workInProgress, expirationTime) {
+function bailoutHooks(current, workInProgress, lanes) {
workInProgress.updateQueue = current.updateQueue;
- workInProgress.effectTag &= ~(Passive | Update);
-
- if (current.expirationTime <= expirationTime) {
- current.expirationTime = NoWork;
- }
+ workInProgress.flags &= ~(Passive | Update);
+ current.lanes = removeLanes(current.lanes, lanes);
}
function resetHooksAfterThrow() {
// We can assume the previous dispatcher is always this one, since we set it
// at the beginning of the render phase and there's no re-entrancy.
- ReactCurrentDispatcher.current = ContextOnlyDispatcher;
+ ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
if (didScheduleRenderPhaseUpdate) {
// There were render phase updates. These are only valid for this render
@@ -14904,9 +15083,11 @@ function resetHooksAfterThrow() {
hook = hook.next;
}
+
+ didScheduleRenderPhaseUpdate = false;
}
- renderExpirationTime = NoWork;
+ renderLanes = NoLanes;
currentlyRenderingFiber$1 = null;
currentHook = null;
workInProgressHook = null;
@@ -14915,9 +15096,10 @@ function resetHooksAfterThrow() {
hookTypesDev = null;
hookTypesUpdateIndexDev = -1;
currentHookNameInDev = null;
+ isUpdatingOpaqueValueInRenderPhase = false;
}
- didScheduleRenderPhaseUpdate = false;
+ didScheduleRenderPhaseUpdateDuringThisPass = false;
}
function mountWorkInProgressHook() {
@@ -15062,6 +15244,14 @@ function updateReducer(reducer, initialArg, init) {
pendingQueue.next = baseFirst;
}
+ {
+ if (current.baseQueue !== baseQueue) {
+ // Internal invariant that should never happen, but feasibly could in
+ // the future if we implement resuming, or some form of that.
+ error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');
+ }
+ }
+
current.baseQueue = baseQueue = pendingQueue;
queue.pending = null;
}
@@ -15076,15 +15266,14 @@ function updateReducer(reducer, initialArg, init) {
var update = first;
do {
- var updateExpirationTime = update.expirationTime;
+ var updateLane = update.lane;
- if (updateExpirationTime < renderExpirationTime) {
+ if (!isSubsetOfLanes(renderLanes, updateLane)) {
// Priority is insufficient. Skip this update. If this is the first
// skipped update, the previous update/state is the new base
// update/state.
var clone = {
- expirationTime: update.expirationTime,
- suspenseConfig: update.suspenseConfig,
+ lane: updateLane,
action: update.action,
eagerReducer: update.eagerReducer,
eagerState: update.eagerState,
@@ -15097,34 +15286,28 @@ function updateReducer(reducer, initialArg, init) {
} else {
newBaseQueueLast = newBaseQueueLast.next = clone;
} // Update the remaining priority in the queue.
+ // TODO: Don't need to accumulate this. Instead, we can remove
+ // renderLanes from the original lanes.
- if (updateExpirationTime > currentlyRenderingFiber$1.expirationTime) {
- currentlyRenderingFiber$1.expirationTime = updateExpirationTime;
- markUnprocessedUpdateTime(updateExpirationTime);
- }
+ currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
+ markSkippedUpdateLanes(updateLane);
} else {
// This update does have sufficient priority.
if (newBaseQueueLast !== null) {
var _clone = {
- expirationTime: Sync,
- // This update is going to be committed so we never want uncommit it.
- suspenseConfig: update.suspenseConfig,
+ // This update is going to be committed so we never want uncommit
+ // it. Using NoLane works because 0 is a subset of all bitmasks, so
+ // this will never be skipped by the check above.
+ lane: NoLane,
action: update.action,
eagerReducer: update.eagerReducer,
eagerState: update.eagerState,
next: null
};
newBaseQueueLast = newBaseQueueLast.next = _clone;
- } // Mark the event time of this update as relevant to this render pass.
- // TODO: This should ideally use the true event time of this update rather than
- // its priority which is a derived and not reverseable value.
- // TODO: We should skip this update if it was already committed but currently
- // we have no way of detecting the difference between a committed and suspended
- // update here.
-
+ } // Process this update.
- markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.
if (update.eagerReducer === reducer) {
// If this update was processed eagerly, and its reducer matches the
@@ -15214,6 +15397,227 @@ function rerenderReducer(reducer, initialArg, init) {
return [newState, dispatch];
}
+function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
+ {
+ warnAboutMultipleRenderersDEV(source);
+ }
+
+ var getVersion = source._getVersion;
+ var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?
+
+ var isSafeToReadFromSource = false; // Check the version first.
+ // If this render has already been started with a specific version,
+ // we can use it alone to determine if we can safely read from the source.
+
+ var currentRenderVersion = getWorkInProgressVersion(source);
+
+ if (currentRenderVersion !== null) {
+ // It's safe to read if the store hasn't been mutated since the last time
+ // we read something.
+ isSafeToReadFromSource = currentRenderVersion === version;
+ } else {
+ // If there's no version, then this is the first time we've read from the
+ // source during the current render pass, so we need to do a bit more work.
+ // What we need to determine is if there are any hooks that already
+ // subscribed to the source, and if so, whether there are any pending
+ // mutations that haven't been synchronized yet.
+ //
+ // If there are no pending mutations, then `root.mutableReadLanes` will be
+ // empty, and we know we can safely read.
+ //
+ // If there *are* pending mutations, we may still be able to safely read
+ // if the currently rendering lanes are inclusive of the pending mutation
+ // lanes, since that guarantees that the value we're about to read from
+ // the source is consistent with the values that we read during the most
+ // recent mutation.
+ isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);
+
+ if (isSafeToReadFromSource) {
+ // If it's safe to read from this source during the current render,
+ // store the version in case other components read from it.
+ // A changed version number will let those components know to throw and restart the render.
+ setWorkInProgressVersion(source, version);
+ }
+ }
+
+ if (isSafeToReadFromSource) {
+ var snapshot = getSnapshot(source._source);
+
+ {
+ if (typeof snapshot === 'function') {
+ error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
+ }
+ }
+
+ return snapshot;
+ } else {
+ // This handles the special case of a mutable source being shared between renderers.
+ // In that case, if the source is mutated between the first and second renderer,
+ // The second renderer don't know that it needs to reset the WIP version during unwind,
+ // (because the hook only marks sources as dirty if it's written to their WIP version).
+ // That would cause this tear check to throw again and eventually be visible to the user.
+ // We can avoid this infinite loop by explicitly marking the source as dirty.
+ //
+ // This can lead to tearing in the first renderer when it resumes,
+ // but there's nothing we can do about that (short of throwing here and refusing to continue the render).
+ markSourceAsDirty(source);
+
+ {
+ {
+ throw Error( "Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue." );
+ }
+ }
+ }
+}
+
+function useMutableSource(hook, source, getSnapshot, subscribe) {
+ var root = getWorkInProgressRoot();
+
+ if (!(root !== null)) {
+ {
+ throw Error( "Expected a work-in-progress root. This is a bug in React. Please file an issue." );
+ }
+ }
+
+ var getVersion = source._getVersion;
+ var version = getVersion(source._source);
+ var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
+
+ var _dispatcher$useState = dispatcher.useState(function () {
+ return readFromUnsubcribedMutableSource(root, source, getSnapshot);
+ }),
+ currentSnapshot = _dispatcher$useState[0],
+ setSnapshot = _dispatcher$useState[1];
+
+ var snapshot = currentSnapshot; // Grab a handle to the state hook as well.
+ // We use it to clear the pending update queue if we have a new source.
+
+ var stateHook = workInProgressHook;
+ var memoizedState = hook.memoizedState;
+ var refs = memoizedState.refs;
+ var prevGetSnapshot = refs.getSnapshot;
+ var prevSource = memoizedState.source;
+ var prevSubscribe = memoizedState.subscribe;
+ var fiber = currentlyRenderingFiber$1;
+ hook.memoizedState = {
+ refs: refs,
+ source: source,
+ subscribe: subscribe
+ }; // Sync the values needed by our subscription handler after each commit.
+
+ dispatcher.useEffect(function () {
+ refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,
+ // but this hook recreates the queue in certain cases to avoid updates from stale sources.
+ // handleChange() below needs to reference the dispatch function without re-subscribing,
+ // so we use a ref to ensure that it always has the latest version.
+
+ refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.
+
+ var maybeNewVersion = getVersion(source._source);
+
+ if (!objectIs(version, maybeNewVersion)) {
+ var maybeNewSnapshot = getSnapshot(source._source);
+
+ {
+ if (typeof maybeNewSnapshot === 'function') {
+ error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
+ }
+ }
+
+ if (!objectIs(snapshot, maybeNewSnapshot)) {
+ setSnapshot(maybeNewSnapshot);
+ var lane = requestUpdateLane(fiber);
+ markRootMutableRead(root, lane);
+ } // If the source mutated between render and now,
+ // there may be state updates already scheduled from the old source.
+ // Entangle the updates so that they render in the same batch.
+
+
+ markRootEntangled(root, root.mutableReadLanes);
+ }
+ }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.
+
+ dispatcher.useEffect(function () {
+ var handleChange = function () {
+ var latestGetSnapshot = refs.getSnapshot;
+ var latestSetSnapshot = refs.setSnapshot;
+
+ try {
+ latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.
+
+ var lane = requestUpdateLane(fiber);
+ markRootMutableRead(root, lane);
+ } catch (error) {
+ // A selector might throw after a source mutation.
+ // e.g. it might try to read from a part of the store that no longer exists.
+ // In this case we should still schedule an update with React.
+ // Worst case the selector will throw again and then an error boundary will handle it.
+ latestSetSnapshot(function () {
+ throw error;
+ });
+ }
+ };
+
+ var unsubscribe = subscribe(source._source, handleChange);
+
+ {
+ if (typeof unsubscribe !== 'function') {
+ error('Mutable source subscribe function must return an unsubscribe function.');
+ }
+ }
+
+ return unsubscribe;
+ }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.
+ //
+ // If either the source or the subscription have changed we can't can't trust the update queue.
+ // Maybe the source changed in a way that the old subscription ignored but the new one depends on.
+ //
+ // If the getSnapshot function changed, we also shouldn't rely on the update queue.
+ // It's possible that the underlying source was mutated between the when the last "change" event fired,
+ // and when the current render (with the new getSnapshot function) is processed.
+ //
+ // In both cases, we need to throw away pending updates (since they are no longer relevant)
+ // and treat reading from the source as we do in the mount case.
+
+ if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {
+ // Create a new queue and setState method,
+ // So if there are interleaved updates, they get pushed to the older queue.
+ // When this becomes current, the previous queue and dispatch method will be discarded,
+ // including any interleaving updates that occur.
+ var newQueue = {
+ pending: null,
+ dispatch: null,
+ lastRenderedReducer: basicStateReducer,
+ lastRenderedState: snapshot
+ };
+ newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);
+ stateHook.queue = newQueue;
+ stateHook.baseQueue = null;
+ snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
+ stateHook.memoizedState = stateHook.baseState = snapshot;
+ }
+
+ return snapshot;
+}
+
+function mountMutableSource(source, getSnapshot, subscribe) {
+ var hook = mountWorkInProgressHook();
+ hook.memoizedState = {
+ refs: {
+ getSnapshot: getSnapshot,
+ setSnapshot: null
+ },
+ source: source,
+ subscribe: subscribe
+ };
+ return useMutableSource(hook, source, getSnapshot, subscribe);
+}
+
+function updateMutableSource(source, getSnapshot, subscribe) {
+ var hook = updateWorkInProgressHook();
+ return useMutableSource(hook, source, getSnapshot, subscribe);
+}
+
function mountState(initialState) {
var hook = mountWorkInProgressHook();
@@ -15291,14 +15695,14 @@ function updateRef(initialValue) {
return hook.memoizedState;
}
-function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
+function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
var hook = mountWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
- currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
- hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, undefined, nextDeps);
+ currentlyRenderingFiber$1.flags |= fiberFlags;
+ hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);
}
-function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
+function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
var hook = updateWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
var destroy = undefined;
@@ -15311,14 +15715,14 @@ function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
var prevDeps = prevEffect.deps;
if (areHookInputsEqual(nextDeps, prevDeps)) {
- pushEffect(hookEffectTag, create, destroy, nextDeps);
+ pushEffect(hookFlags, create, destroy, nextDeps);
return;
}
}
}
- currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
- hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, destroy, nextDeps);
+ currentlyRenderingFiber$1.flags |= fiberFlags;
+ hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);
}
function mountEffect(create, deps) {
@@ -15465,105 +15869,189 @@ function updateMemo(nextCreate, deps) {
return nextValue;
}
-function mountDeferredValue(value, config) {
+function mountDeferredValue(value) {
var _mountState = mountState(value),
prevValue = _mountState[0],
setValue = _mountState[1];
mountEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
+ var prevTransition = ReactCurrentBatchConfig$1.transition;
+ ReactCurrentBatchConfig$1.transition = 1;
try {
setValue(value);
} finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
+ ReactCurrentBatchConfig$1.transition = prevTransition;
}
- }, [value, config]);
+ }, [value]);
return prevValue;
}
-function updateDeferredValue(value, config) {
+function updateDeferredValue(value) {
var _updateState = updateState(),
prevValue = _updateState[0],
setValue = _updateState[1];
updateEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
+ var prevTransition = ReactCurrentBatchConfig$1.transition;
+ ReactCurrentBatchConfig$1.transition = 1;
try {
setValue(value);
} finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
+ ReactCurrentBatchConfig$1.transition = prevTransition;
}
- }, [value, config]);
+ }, [value]);
return prevValue;
}
-function rerenderDeferredValue(value, config) {
+function rerenderDeferredValue(value) {
var _rerenderState = rerenderState(),
prevValue = _rerenderState[0],
setValue = _rerenderState[1];
updateEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
+ var prevTransition = ReactCurrentBatchConfig$1.transition;
+ ReactCurrentBatchConfig$1.transition = 1;
try {
setValue(value);
} finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
+ ReactCurrentBatchConfig$1.transition = prevTransition;
}
- }, [value, config]);
+ }, [value]);
return prevValue;
}
-function startTransition(setPending, config, callback) {
+function startTransition(setPending, callback) {
var priorityLevel = getCurrentPriorityLevel();
- runWithPriority$1(priorityLevel < UserBlockingPriority$1 ? UserBlockingPriority$1 : priorityLevel, function () {
- setPending(true);
- });
- runWithPriority$1(priorityLevel > NormalPriority ? NormalPriority : priorityLevel, function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
- try {
- setPending(false);
- callback();
- } finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
- }
- });
+ {
+ runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {
+ setPending(true);
+ });
+ runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {
+ var prevTransition = ReactCurrentBatchConfig$1.transition;
+ ReactCurrentBatchConfig$1.transition = 1;
+
+ try {
+ setPending(false);
+ callback();
+ } finally {
+ ReactCurrentBatchConfig$1.transition = prevTransition;
+ }
+ });
+ }
}
-function mountTransition(config) {
+function mountTransition() {
var _mountState2 = mountState(false),
isPending = _mountState2[0],
- setPending = _mountState2[1];
+ setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`
+ // never changes.
+
- var start = mountCallback(startTransition.bind(null, setPending, config), [setPending, config]);
+ var start = startTransition.bind(null, setPending);
+ mountRef(start);
return [start, isPending];
}
-function updateTransition(config) {
+function updateTransition() {
var _updateState2 = updateState(),
- isPending = _updateState2[0],
- setPending = _updateState2[1];
+ isPending = _updateState2[0];
- var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
+ var startRef = updateRef();
+ var start = startRef.current;
return [start, isPending];
}
-function rerenderTransition(config) {
+function rerenderTransition() {
var _rerenderState2 = rerenderState(),
- isPending = _rerenderState2[0],
- setPending = _rerenderState2[1];
+ isPending = _rerenderState2[0];
- var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
+ var startRef = updateRef();
+ var start = startRef.current;
return [start, isPending];
}
+var isUpdatingOpaqueValueInRenderPhase = false;
+function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
+ {
+ return isUpdatingOpaqueValueInRenderPhase;
+ }
+}
+
+function warnOnOpaqueIdentifierAccessInDEV(fiber) {
+ {
+ // TODO: Should warn in effects and callbacks, too
+ var name = getComponentName(fiber.type) || 'Unknown';
+
+ if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {
+ error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');
+
+ didWarnAboutUseOpaqueIdentifier[name] = true;
+ }
+ }
+}
+
+function mountOpaqueIdentifier() {
+ var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;
+
+ if (getIsHydrating()) {
+ var didUpgrade = false;
+ var fiber = currentlyRenderingFiber$1;
+
+ var readValue = function () {
+ if (!didUpgrade) {
+ // Only upgrade once. This works even inside the render phase because
+ // the update is added to a shared queue, which outlasts the
+ // in-progress render.
+ didUpgrade = true;
+
+ {
+ isUpdatingOpaqueValueInRenderPhase = true;
+ setId(makeId());
+ isUpdatingOpaqueValueInRenderPhase = false;
+ warnOnOpaqueIdentifierAccessInDEV(fiber);
+ }
+ }
+
+ {
+ {
+ throw Error( "The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly." );
+ }
+ }
+ };
+
+ var id = makeOpaqueHydratingObject(readValue);
+ var setId = mountState(id)[1];
+
+ if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {
+ currentlyRenderingFiber$1.flags |= Update | Passive;
+ pushEffect(HasEffect | Passive$1, function () {
+ setId(makeId());
+ }, undefined, null);
+ }
+
+ return id;
+ } else {
+ var _id = makeId();
+
+ mountState(_id);
+ return _id;
+ }
+}
+
+function updateOpaqueIdentifier() {
+ var id = updateState()[0];
+ return id;
+}
+
+function rerenderOpaqueIdentifier() {
+ var id = rerenderState()[0];
+ return id;
+}
+
function dispatchAction(fiber, queue, action) {
{
if (typeof arguments[3] === 'function') {
@@ -15571,22 +16059,15 @@ function dispatchAction(fiber, queue, action) {
}
}
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
var update = {
- expirationTime: expirationTime,
- suspenseConfig: suspenseConfig,
+ lane: lane,
action: action,
eagerReducer: null,
eagerState: null,
next: null
- };
-
- {
- update.priority = getCurrentPriorityLevel();
- } // Append the update to the end of the list.
-
+ }; // Append the update to the end of the list.
var pending = queue.pending;
@@ -15605,11 +16086,9 @@ function dispatchAction(fiber, queue, action) {
// This is a render phase update. Stash it in a lazily-created map of
// queue -> linked list of updates. After this render pass, we'll restart
// and apply the stashed updates on top of the work-in-progress hook.
- didScheduleRenderPhaseUpdate = true;
- update.expirationTime = renderExpirationTime;
- currentlyRenderingFiber$1.expirationTime = renderExpirationTime;
+ didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
} else {
- if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {
+ if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
// The queue is currently empty, which means we can eagerly compute the
// next state before entering the render phase. If the new state is the
// same as the current state, we may be able to bail out entirely.
@@ -15619,8 +16098,8 @@ function dispatchAction(fiber, queue, action) {
var prevDispatcher;
{
- prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
}
try {
@@ -15643,7 +16122,7 @@ function dispatchAction(fiber, queue, action) {
} catch (error) {// Suppress the error. It will throw again in the render phase.
} finally {
{
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
}
}
@@ -15657,7 +16136,7 @@ function dispatchAction(fiber, queue, action) {
}
}
- scheduleWork(fiber, expirationTime);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
}
}
@@ -15673,9 +16152,11 @@ var ContextOnlyDispatcher = {
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
- useResponder: throwInvalidHookError,
useDeferredValue: throwInvalidHookError,
- useTransition: throwInvalidHookError
+ useTransition: throwInvalidHookError,
+ useMutableSource: throwInvalidHookError,
+ useOpaqueIdentifier: throwInvalidHookError,
+ unstable_isNewReconciler: enableNewReconciler
};
var HooksDispatcherOnMountInDEV = null;
var HooksDispatcherOnMountWithHookTypesInDEV = null;
@@ -15691,7 +16172,7 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
};
var warnInvalidHookAccess = function () {
- error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
};
HooksDispatcherOnMountInDEV = {
@@ -15731,25 +16212,25 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
currentHookNameInDev = 'useMemo';
mountHookTypesDev();
checkDepsAreArrayDev(deps);
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -15760,13 +16241,13 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
useState: function (initialState) {
currentHookNameInDev = 'useState';
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -15774,21 +16255,27 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
mountHookTypesDev();
return mountDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- mountHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
+ useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
mountHookTypesDev();
- return mountDeferredValue(value, config);
+ return mountDeferredValue(value);
},
- useTransition: function (config) {
+ useTransition: function () {
currentHookNameInDev = 'useTransition';
mountHookTypesDev();
- return mountTransition(config);
- }
+ return mountTransition();
+ },
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
+ mountHookTypesDev();
+ return mountMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ mountHookTypesDev();
+ return mountOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnMountWithHookTypesInDEV = {
readContext: function (context, observedBits) {
@@ -15822,25 +16309,25 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -15851,13 +16338,13 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -15865,21 +16352,27 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
updateHookTypesDev();
return mountDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
+ useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
- return mountDeferredValue(value, config);
+ return mountDeferredValue(value);
},
- useTransition: function (config) {
+ useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
- return mountTransition(config);
- }
+ return mountTransition();
+ },
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
+ updateHookTypesDev();
+ return mountMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ updateHookTypesDev();
+ return mountOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnUpdateInDEV = {
readContext: function (context, observedBits) {
@@ -15913,25 +16406,25 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -15942,13 +16435,13 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -15956,21 +16449,27 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
updateHookTypesDev();
return updateDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
+ useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
- return updateDeferredValue(value, config);
+ return updateDeferredValue(value);
},
- useTransition: function (config) {
+ useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
- return updateTransition(config);
- }
+ return updateTransition();
+ },
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
+ updateHookTypesDev();
+ return updateMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ updateHookTypesDev();
+ return updateOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnRerenderInDEV = {
readContext: function (context, observedBits) {
@@ -16004,25 +16503,25 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return updateMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return rerenderReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16033,13 +16532,13 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return rerenderState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16047,21 +16546,27 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
updateHookTypesDev();
return updateDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
+ useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
- return rerenderDeferredValue(value, config);
+ return rerenderDeferredValue(value);
},
- useTransition: function (config) {
+ useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
- return rerenderTransition(config);
- }
+ return rerenderTransition();
+ },
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
+ updateHookTypesDev();
+ return updateMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ updateHookTypesDev();
+ return rerenderOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnMountInDEV = {
readContext: function (context, observedBits) {
@@ -16102,26 +16607,26 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16134,13 +16639,13 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16149,24 +16654,31 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
mountHookTypesDev();
return mountDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
+ useDeferredValue: function (value) {
+ currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
mountHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
+ return mountDeferredValue(value);
},
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
+ useTransition: function () {
+ currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
mountHookTypesDev();
- return mountDeferredValue(value, config);
+ return mountTransition();
},
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
mountHookTypesDev();
- return mountTransition(config);
- }
+ return mountMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ warnInvalidHookAccess();
+ mountHookTypesDev();
+ return mountOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnUpdateInDEV = {
readContext: function (context, observedBits) {
@@ -16207,26 +16719,26 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16239,13 +16751,13 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16254,24 +16766,31 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
updateHookTypesDev();
return updateDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
+ useDeferredValue: function (value) {
+ currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
+ return updateDeferredValue(value);
},
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
+ useTransition: function () {
+ currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
updateHookTypesDev();
- return updateDeferredValue(value, config);
+ return updateTransition();
},
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
updateHookTypesDev();
- return updateTransition(config);
- }
+ return updateMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ warnInvalidHookAccess();
+ updateHookTypesDev();
+ return updateOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnRerenderInDEV = {
readContext: function (context, observedBits) {
@@ -16312,26 +16831,26 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return rerenderReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16344,13 +16863,13 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return rerenderState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16359,24 +16878,31 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
updateHookTypesDev();
return updateDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
+ useDeferredValue: function (value) {
+ currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
+ return rerenderDeferredValue(value);
},
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
+ useTransition: function () {
+ currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
updateHookTypesDev();
- return rerenderDeferredValue(value, config);
+ return rerenderTransition();
},
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
updateHookTypesDev();
- return rerenderTransition(config);
- }
+ return updateMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ warnInvalidHookAccess();
+ updateHookTypesDev();
+ return rerenderOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
}
@@ -16421,314 +16947,16 @@ function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
}
}
-// This may have been an insertion or a hydration.
+function transferActualDuration(fiber) {
+ // Transfer time spent rendering these children so we don't lose it
+ // after we rerender. This is used as a helper in special cases
+ // where we should count the work of multiple passes.
+ var child = fiber.child;
-var hydrationParentFiber = null;
-var nextHydratableInstance = null;
-var isHydrating = false;
-
-function enterHydrationState(fiber) {
-
- var parentInstance = fiber.stateNode.containerInfo;
- nextHydratableInstance = getFirstHydratableChild(parentInstance);
- hydrationParentFiber = fiber;
- isHydrating = true;
- return true;
-}
-
-function deleteHydratableInstance(returnFiber, instance) {
- {
- switch (returnFiber.tag) {
- case HostRoot:
- didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
- break;
-
- case HostComponent:
- didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
- break;
- }
- }
-
- var childToDelete = createFiberFromHostInstanceForDeletion();
- childToDelete.stateNode = instance;
- childToDelete.return = returnFiber;
- childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
- // these children are not part of the reconciliation list of children.
- // Even if we abort and rereconcile the children, that will try to hydrate
- // again and the nodes are still in the host tree so these will be
- // recreated.
-
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = childToDelete;
- returnFiber.lastEffect = childToDelete;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
- }
-}
-
-function insertNonHydratedInstance(returnFiber, fiber) {
- fiber.effectTag = fiber.effectTag & ~Hydrating | Placement;
-
- {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
-
- switch (fiber.tag) {
- case HostComponent:
- var type = fiber.type;
- var props = fiber.pendingProps;
- didNotFindHydratableContainerInstance(parentContainer, type);
- break;
-
- case HostText:
- var text = fiber.pendingProps;
- didNotFindHydratableContainerTextInstance(parentContainer, text);
- break;
- }
-
- break;
- }
-
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
-
- switch (fiber.tag) {
- case HostComponent:
- var _type = fiber.type;
- var _props = fiber.pendingProps;
- didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
- break;
-
- case HostText:
- var _text = fiber.pendingProps;
- didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
- break;
-
- case SuspenseComponent:
- didNotFindHydratableSuspenseInstance(parentType, parentProps);
- break;
- }
-
- break;
- }
-
- default:
- return;
- }
- }
-}
-
-function tryHydrate(fiber, nextInstance) {
- switch (fiber.tag) {
- case HostComponent:
- {
- var type = fiber.type;
- var props = fiber.pendingProps;
- var instance = canHydrateInstance(nextInstance, type);
-
- if (instance !== null) {
- fiber.stateNode = instance;
- return true;
- }
-
- return false;
- }
-
- case HostText:
- {
- var text = fiber.pendingProps;
- var textInstance = canHydrateTextInstance(nextInstance, text);
-
- if (textInstance !== null) {
- fiber.stateNode = textInstance;
- return true;
- }
-
- return false;
- }
-
- case SuspenseComponent:
- {
-
- return false;
- }
-
- default:
- return false;
- }
-}
-
-function tryToClaimNextHydratableInstance(fiber) {
- if (!isHydrating) {
- return;
- }
-
- var nextInstance = nextHydratableInstance;
-
- if (!nextInstance) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- }
-
- var firstAttemptedInstance = nextInstance;
-
- if (!tryHydrate(fiber, nextInstance)) {
- // If we can't hydrate this instance let's try the next one.
- // We use this as a heuristic. It's based on intuition and not data so it
- // might be flawed or unnecessary.
- nextInstance = getNextHydratableSibling(firstAttemptedInstance);
-
- if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- } // We matched the next one, we'll now assume that the first one was
- // superfluous and we'll delete it. Since we can't eagerly delete it
- // we'll have to schedule a deletion. To do that, this node needs a dummy
- // fiber associated with it.
-
-
- deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
- }
-
- hydrationParentFiber = fiber;
- nextHydratableInstance = getFirstHydratableChild(nextInstance);
-}
-
-function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
-
- var instance = fiber.stateNode;
- var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
-
- fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
- // is a new ref we mark this as an update.
-
- if (updatePayload !== null) {
- return true;
- }
-
- return false;
-}
-
-function prepareToHydrateHostTextInstance(fiber) {
-
- var textInstance = fiber.stateNode;
- var textContent = fiber.memoizedProps;
- var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
-
- {
- if (shouldUpdate) {
- // We assume that prepareToHydrateHostTextInstance is called in a context where the
- // hydration parent is the parent host component of this host text.
- var returnFiber = hydrationParentFiber;
-
- if (returnFiber !== null) {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
- didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
- break;
- }
-
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
- didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
- break;
- }
- }
- }
- }
- }
-
- return shouldUpdate;
-}
-
-function skipPastDehydratedSuspenseInstance(fiber) {
-
- var suspenseState = fiber.memoizedState;
- var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
-
- if (!suspenseInstance) {
- {
- throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
-}
-
-function popToNextHostParent(fiber) {
- var parent = fiber.return;
-
- while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
- parent = parent.return;
- }
-
- hydrationParentFiber = parent;
-}
-
-function popHydrationState(fiber) {
-
- if (fiber !== hydrationParentFiber) {
- // We're deeper than the current hydration context, inside an inserted
- // tree.
- return false;
- }
-
- if (!isHydrating) {
- // If we're not currently hydrating but we're in a hydration context, then
- // we were an insertion and now need to pop up reenter hydration of our
- // siblings.
- popToNextHostParent(fiber);
- isHydrating = true;
- return false;
- }
-
- var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
- // We only do this deeper than head and body since they tend to have random
- // other nodes in them. We also ignore components with pure text content in
- // side of them.
- // TODO: Better heuristic.
-
- if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
- var nextInstance = nextHydratableInstance;
-
- while (nextInstance) {
- deleteHydratableInstance(fiber, nextInstance);
- nextInstance = getNextHydratableSibling(nextInstance);
- }
- }
-
- popToNextHostParent(fiber);
-
- if (fiber.tag === SuspenseComponent) {
- nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
- } else {
- nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
+ while (child) {
+ fiber.actualDuration += child.actualDuration;
+ child = child.sibling;
}
-
- return true;
-}
-
-function resetHydrationState() {
-
- hydrationParentFiber = null;
- nextHydratableInstance = null;
- isHydrating = false;
}
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
@@ -16753,24 +16981,24 @@ var didWarnAboutTailOptions;
didWarnAboutTailOptions = {};
}
-function reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime) {
+function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
if (current === null) {
// If this is a fresh new component that hasn't been rendered yet, we
// won't update its child set by applying minimal side-effects. Instead,
// we will add them all to the child before it gets rendered. That means
// we can optimize this reconciliation pass by not tracking side-effects.
- workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
+ workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
} else {
// If the current child is the same as the work in progress, it means that
// we haven't yet started any work on these children. Therefore, we use
// the clone algorithm to create a copy of all the current children.
// If we had any progressed work already, that is invalid at this point so
// let's throw it out.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
+ workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);
}
}
-function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime) {
+function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {
// This function is fork of reconcileChildren. It's used in cases where we
// want to reconcile without matching against the existing set. This has the
// effect of all current children being unmounted; even if the type and key
@@ -16779,15 +17007,15 @@ function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren,
// To do this, we're going to go through the reconcile algorithm twice. In
// the first pass, we schedule a deletion for all the current children by
// passing null.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderExpirationTime); // In the second pass, we mount the new children. The trick here is that we
+ workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we
// pass null in place of where we usually pass the current child set. This has
// the effect of remounting all children regardless of whether their
// identities match.
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
+ workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
}
-function updateForwardRef(current, workInProgress, Component, nextProps, renderExpirationTime) {
+function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
// TODO: current can be non-null here even if the component
// hasn't yet mounted. This happens after the first render suspends.
// We'll need to figure out if this is fine or can cause issues.
@@ -16799,7 +17027,7 @@ function updateForwardRef(current, workInProgress, Component, nextProps, renderE
if (innerPropTypes) {
checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
+ 'prop', getComponentName(Component));
}
}
}
@@ -16808,17 +17036,20 @@ function updateForwardRef(current, workInProgress, Component, nextProps, renderE
var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent
var nextChildren;
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
{
ReactCurrentOwner$1.current = workInProgress;
setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
+ nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
+ disableLogs();
+
+ try {
+ nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
+ } finally {
+ reenableLogs();
}
}
@@ -16826,17 +17057,17 @@ function updateForwardRef(current, workInProgress, Component, nextProps, renderE
}
if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderExpirationTime);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ bailoutHooks(current, workInProgress, renderLanes);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ workInProgress.flags |= PerformedWork;
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
-function updateMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
+function updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
if (current === null) {
var type = Component.type;
@@ -16858,7 +17089,7 @@ function updateMemoComponent(current, workInProgress, Component, nextProps, upda
validateFunctionComponentInDev(workInProgress, type);
}
- return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateExpirationTime, renderExpirationTime);
+ return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);
}
{
@@ -16868,11 +17099,11 @@ function updateMemoComponent(current, workInProgress, Component, nextProps, upda
// Inner memo component props aren't currently validated in createElement.
// We could move it there, but we'd still need this for lazy code path.
checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(type), getCurrentFiberStackInDev);
+ 'prop', getComponentName(type));
}
}
- var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
+ var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);
child.ref = workInProgress.ref;
child.return = workInProgress;
workInProgress.child = child;
@@ -16887,13 +17118,13 @@ function updateMemoComponent(current, workInProgress, Component, nextProps, upda
// Inner memo component props aren't currently validated in createElement.
// We could move it there, but we'd still need this for lazy code path.
checkPropTypes(_innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(_type), getCurrentFiberStackInDev);
+ 'prop', getComponentName(_type));
}
}
var currentChild = current.child; // This is always exactly one child
- if (updateExpirationTime < renderExpirationTime) {
+ if (!includesSomeLane(updateLanes, renderLanes)) {
// This will be the props with resolved defaultProps,
// unlike current.memoizedProps which will be the unresolved ones.
var prevProps = currentChild.memoizedProps; // Default to shallow comparison
@@ -16902,12 +17133,12 @@ function updateMemoComponent(current, workInProgress, Component, nextProps, upda
compare = compare !== null ? compare : shallowEqual;
if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
+ workInProgress.flags |= PerformedWork;
var newChild = createWorkInProgress(currentChild, nextProps);
newChild.ref = workInProgress.ref;
newChild.return = workInProgress;
@@ -16915,7 +17146,7 @@ function updateMemoComponent(current, workInProgress, Component, nextProps, upda
return newChild;
}
-function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
+function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
// TODO: current can be non-null here even if the component
// hasn't yet mounted. This happens when the inner render suspends.
// We'll need to figure out if this is fine or can cause issues.
@@ -16929,16 +17160,24 @@ function updateSimpleMemoComponent(current, workInProgress, Component, nextProps
// We warn when you define propTypes on lazy()
// so let's just skip over it to find memo() outer wrapper.
// Inner props for memo are validated later.
- outerMemoType = refineResolvedLazyComponent(outerMemoType);
- }
+ var lazyComponent = outerMemoType;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ outerMemoType = init(payload);
+ } catch (x) {
+ outerMemoType = null;
+ } // Inner propTypes will be validated in the function component path.
- var outerPropTypes = outerMemoType && outerMemoType.propTypes;
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
- 'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);
- } // Inner propTypes will be validated in the function component path.
+ var outerPropTypes = outerMemoType && outerMemoType.propTypes;
+ if (outerPropTypes) {
+ checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
+ 'prop', getComponentName(outerMemoType));
+ }
+ }
}
}
@@ -16949,10 +17188,10 @@ function updateSimpleMemoComponent(current, workInProgress, Component, nextProps
workInProgress.type === current.type )) {
didReceiveUpdate = false;
- if (updateExpirationTime < renderExpirationTime) {
- // The pending update priority was cleared at the beginning of
- // beginWork. We're about to bail out, but there might be additional
- // updates at a lower priority. Usually, the priority level of the
+ if (!includesSomeLane(renderLanes, updateLanes)) {
+ // The pending lanes were cleared at the beginning of beginWork. We're
+ // about to bail out, but there might be other lanes that weren't
+ // included in the current render. Usually, the priority level of the
// remaining updates is accumlated during the evaluation of the
// component (i.e. when processing the update queue). But since since
// we're bailing out early *without* evaluating the component, we need
@@ -16963,35 +17202,118 @@ function updateSimpleMemoComponent(current, workInProgress, Component, nextProps
// contains hooks.
// TODO: Move the reset at in beginWork out of the common path so that
// this is no longer necessary.
- workInProgress.expirationTime = current.expirationTime;
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ workInProgress.lanes = current.lanes;
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
+ } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
+ // This is a special case that only exists for legacy mode.
+ // See https://github.com/facebook/react/pull/19216.
+ didReceiveUpdate = true;
}
}
}
- return updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime);
+ return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
}
-function updateFragment(current, workInProgress, renderExpirationTime) {
+function updateOffscreenComponent(current, workInProgress, renderLanes) {
+ var nextProps = workInProgress.pendingProps;
+ var nextChildren = nextProps.children;
+ var prevState = current !== null ? current.memoizedState : null;
+
+ if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {
+ if ((workInProgress.mode & ConcurrentMode) === NoMode) {
+ // In legacy sync mode, don't defer the subtree. Render it now.
+ // TODO: Figure out what we should do in Blocking mode.
+ var nextState = {
+ baseLanes: NoLanes
+ };
+ workInProgress.memoizedState = nextState;
+ pushRenderLanes(workInProgress, renderLanes);
+ } else if (!includesSomeLane(renderLanes, OffscreenLane)) {
+ var nextBaseLanes;
+
+ if (prevState !== null) {
+ var prevBaseLanes = prevState.baseLanes;
+ nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);
+ } else {
+ nextBaseLanes = renderLanes;
+ } // Schedule this fiber to re-render at offscreen priority. Then bailout.
+
+
+ {
+ markSpawnedWork(OffscreenLane);
+ }
+
+ workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);
+ var _nextState = {
+ baseLanes: nextBaseLanes
+ };
+ workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway
+ // to avoid a push/pop misalignment.
+
+ pushRenderLanes(workInProgress, nextBaseLanes);
+ return null;
+ } else {
+ // Rendering at offscreen, so we can clear the base lanes.
+ var _nextState2 = {
+ baseLanes: NoLanes
+ };
+ workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.
+
+ var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;
+ pushRenderLanes(workInProgress, subtreeRenderLanes);
+ }
+ } else {
+ var _subtreeRenderLanes;
+
+ if (prevState !== null) {
+ _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state
+
+ workInProgress.memoizedState = null;
+ } else {
+ // We weren't previously hidden, and we still aren't, so there's nothing
+ // special to do. Need to push to the stack regardless, though, to avoid
+ // a push/pop misalignment.
+ _subtreeRenderLanes = renderLanes;
+ }
+
+ pushRenderLanes(workInProgress, _subtreeRenderLanes);
+ }
+
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
+ return workInProgress.child;
+} // Note: These happen to have identical begin phases, for now. We shouldn't hold
+// ourselves to this constraint, though. If the behavior diverges, we should
+// fork the function.
+
+
+var updateLegacyHiddenComponent = updateOffscreenComponent;
+
+function updateFragment(current, workInProgress, renderLanes) {
var nextChildren = workInProgress.pendingProps;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
-function updateMode(current, workInProgress, renderExpirationTime) {
+function updateMode(current, workInProgress, renderLanes) {
var nextChildren = workInProgress.pendingProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
-function updateProfiler(current, workInProgress, renderExpirationTime) {
+function updateProfiler(current, workInProgress, renderLanes) {
{
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.
+ // These are reset during render to allow the DevTools commit hook a chance to read them,
+
+ var stateNode = workInProgress.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
}
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -17000,11 +17322,11 @@ function markRef(current, workInProgress) {
if (current === null && ref !== null || current !== null && current.ref !== ref) {
// Schedule a Ref effect
- workInProgress.effectTag |= Ref;
+ workInProgress.flags |= Ref;
}
}
-function updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
+function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
{
if (workInProgress.type !== workInProgress.elementType) {
// Lazy component props can't be validated in createElement
@@ -17013,7 +17335,7 @@ function updateFunctionComponent(current, workInProgress, Component, nextProps,
if (innerPropTypes) {
checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
+ 'prop', getComponentName(Component));
}
}
}
@@ -17026,17 +17348,20 @@ function updateFunctionComponent(current, workInProgress, Component, nextProps,
}
var nextChildren;
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
{
ReactCurrentOwner$1.current = workInProgress;
setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
+ nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
+ disableLogs();
+
+ try {
+ nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
+ } finally {
+ reenableLogs();
}
}
@@ -17044,17 +17369,17 @@ function updateFunctionComponent(current, workInProgress, Component, nextProps,
}
if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderExpirationTime);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ bailoutHooks(current, workInProgress, renderLanes);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ workInProgress.flags |= PerformedWork;
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
-function updateClassComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
+function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
{
if (workInProgress.type !== workInProgress.elementType) {
// Lazy component props can't be validated in createElement
@@ -17063,7 +17388,7 @@ function updateClassComponent(current, workInProgress, Component, nextProps, ren
if (innerPropTypes) {
checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
+ 'prop', getComponentName(Component));
}
}
} // Push context providers early to prevent context stack mismatches.
@@ -17080,7 +17405,7 @@ function updateClassComponent(current, workInProgress, Component, nextProps, ren
hasContext = false;
}
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
var instance = workInProgress.stateNode;
var shouldUpdate;
@@ -17093,26 +17418,26 @@ function updateClassComponent(current, workInProgress, Component, nextProps, ren
current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
+ workInProgress.flags |= Placement;
} // In the initial pass we might need to construct the instance.
constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
+ mountClassInstance(workInProgress, Component, nextProps, renderLanes);
shouldUpdate = true;
} else if (current === null) {
// In a resume, we'll already have an instance we can reuse.
- shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
+ shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);
} else {
- shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderExpirationTime);
+ shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);
}
- var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
+ var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);
{
var inst = workInProgress.stateNode;
- if (inst.props !== nextProps) {
+ if (shouldUpdate && inst.props !== nextProps) {
if (!didWarnAboutReassigningProps) {
error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');
}
@@ -17124,10 +17449,10 @@ function updateClassComponent(current, workInProgress, Component, nextProps, ren
return nextUnitOfWork;
}
-function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
+function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {
// Refs should update even if shouldComponentUpdate returns false
markRef(current, workInProgress);
- var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;
+ var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;
if (!shouldUpdate && !didCaptureError) {
// Context providers should defer to sCU for rendering
@@ -17135,7 +17460,7 @@ function finishClassComponent(current, workInProgress, Component, shouldUpdate,
invalidateContextProvider(workInProgress, Component, false);
}
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
var instance = workInProgress.stateNode; // Rerender
@@ -17160,7 +17485,13 @@ function finishClassComponent(current, workInProgress, Component, shouldUpdate,
nextChildren = instance.render();
if ( workInProgress.mode & StrictMode) {
- instance.render();
+ disableLogs();
+
+ try {
+ instance.render();
+ } finally {
+ reenableLogs();
+ }
}
setIsRendering(false);
@@ -17168,16 +17499,16 @@ function finishClassComponent(current, workInProgress, Component, shouldUpdate,
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
+ workInProgress.flags |= PerformedWork;
if (current !== null && didCaptureError) {
// If we're recovering from an error, reconcile without reusing any of
// the existing children. Conceptually, the normal children and the children
// that are shown on error are two different sets, so we shouldn't reuse
// normal children even if their identities match.
- forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime);
+ forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);
} else {
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
} // Memoize state using the values we just used to render.
// TODO: Restructure so we never read values from the instance.
@@ -17204,7 +17535,7 @@ function pushHostRootContext(workInProgress) {
pushHostContainer(workInProgress, root.containerInfo);
}
-function updateHostRoot(current, workInProgress, renderExpirationTime) {
+function updateHostRoot(current, workInProgress, renderLanes) {
pushHostRootContext(workInProgress);
var updateQueue = workInProgress.updateQueue;
@@ -17218,17 +17549,15 @@ function updateHostRoot(current, workInProgress, renderExpirationTime) {
var prevState = workInProgress.memoizedState;
var prevChildren = prevState !== null ? prevState.element : null;
cloneUpdateQueue(current, workInProgress);
- processUpdateQueue(workInProgress, nextProps, null, renderExpirationTime);
+ processUpdateQueue(workInProgress, nextProps, null, renderLanes);
var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
// being called "element".
var nextChildren = nextState.element;
if (nextChildren === prevChildren) {
- // If the state is the same as before, that's a bailout because we had
- // no work that expires at this time.
resetHydrationState();
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
var root = workInProgress.stateNode;
@@ -17238,7 +17567,19 @@ function updateHostRoot(current, workInProgress, renderExpirationTime) {
// We always try to hydrate. If this isn't a hydration pass there won't
// be any children to hydrate which is effectively the same thing as
// not hydrating.
- var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
+ {
+ var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;
+
+ if (mutableSourceEagerHydrationData != null) {
+ for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {
+ var mutableSource = mutableSourceEagerHydrationData[i];
+ var version = mutableSourceEagerHydrationData[i + 1];
+ setWorkInProgressVersion(mutableSource, version);
+ }
+ }
+ }
+
+ var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
workInProgress.child = child;
var node = child;
@@ -17249,20 +17590,20 @@ function updateHostRoot(current, workInProgress, renderExpirationTime) {
// Conceptually this is similar to Placement in that a new subtree is
// inserted into the React tree here. It just happens to not need DOM
// mutations because it already exists.
- node.effectTag = node.effectTag & ~Placement | Hydrating;
+ node.flags = node.flags & ~Placement | Hydrating;
node = node.sibling;
}
} else {
// Otherwise reset hydration state in case we aborted and resumed another
// root.
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
resetHydrationState();
}
return workInProgress.child;
}
-function updateHostComponent(current, workInProgress, renderExpirationTime) {
+function updateHostComponent(current, workInProgress, renderLanes) {
pushHostContext(workInProgress);
if (current === null) {
@@ -17284,22 +17625,11 @@ function updateHostComponent(current, workInProgress, renderExpirationTime) {
} else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
// If we're switching from a direct text child to a normal child, or to
// empty, we need to schedule the text content to be reset.
- workInProgress.effectTag |= ContentReset;
+ workInProgress.flags |= ContentReset;
}
- markRef(current, workInProgress); // Check the host config to see if the children are offscreen/hidden.
-
- if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(type, nextProps)) {
- {
- markSpawnedWork(Never);
- } // Schedule this fiber to re-render at offscreen priority. Then bailout.
-
-
- workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
- return null;
- }
-
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ markRef(current, workInProgress);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -17313,7 +17643,7 @@ function updateHostText(current, workInProgress) {
return null;
}
-function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {
+function mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) {
if (_current !== null) {
// A lazy component only mounts if it suspended inside a non-
// concurrent tree, in an inconsistent state. We want to treat it like
@@ -17322,18 +17652,17 @@ function mountLazyComponent(_current, workInProgress, elementType, updateExpirat
_current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
+ workInProgress.flags |= Placement;
}
- var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet.
- // Cancel and resume right after we know the tag.
-
- cancelWorkTimer(workInProgress);
- var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type.
+ var props = workInProgress.pendingProps;
+ var lazyComponent = elementType;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ var Component = init(payload); // Store the unwrapped component in the type.
workInProgress.type = Component;
var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
- startWorkTimer(workInProgress);
var resolvedProps = resolveDefaultProps(Component, props);
var child;
@@ -17345,7 +17674,7 @@ function mountLazyComponent(_current, workInProgress, elementType, updateExpirat
workInProgress.type = Component = resolveFunctionForHotReloading(Component);
}
- child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
+ child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
@@ -17355,7 +17684,7 @@ function mountLazyComponent(_current, workInProgress, elementType, updateExpirat
workInProgress.type = Component = resolveClassForHotReloading(Component);
}
- child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
+ child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
@@ -17365,7 +17694,7 @@ function mountLazyComponent(_current, workInProgress, elementType, updateExpirat
workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
}
- child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);
+ child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
@@ -17377,13 +17706,13 @@ function mountLazyComponent(_current, workInProgress, elementType, updateExpirat
if (outerPropTypes) {
checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
+ 'prop', getComponentName(Component));
}
}
}
child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
- updateExpirationTime, renderExpirationTime);
+ updateLanes, renderLanes);
return child;
}
}
@@ -17406,7 +17735,7 @@ function mountLazyComponent(_current, workInProgress, elementType, updateExpirat
}
}
-function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {
+function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
if (_current !== null) {
// An incomplete component only mounts if it suspended inside a non-
// concurrent tree, in an inconsistent state. We want to treat it like
@@ -17415,7 +17744,7 @@ function mountIncompleteClassComponent(_current, workInProgress, Component, next
_current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
+ workInProgress.flags |= Placement;
} // Promote the fiber to a class and try rendering again.
@@ -17433,13 +17762,13 @@ function mountIncompleteClassComponent(_current, workInProgress, Component, next
hasContext = false;
}
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
+ mountClassInstance(workInProgress, Component, nextProps, renderLanes);
+ return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
}
-function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {
+function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
if (_current !== null) {
// An indeterminate component only mounts if it suspended inside a non-
// concurrent tree, in an inconsistent state. We want to treat it like
@@ -17448,7 +17777,7 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
_current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
+ workInProgress.flags |= Placement;
}
var props = workInProgress.pendingProps;
@@ -17459,7 +17788,7 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
context = getMaskedContext(workInProgress, unmaskedContext);
}
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
var value;
{
@@ -17479,15 +17808,17 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
setIsRendering(true);
ReactCurrentOwner$1.current = workInProgress;
- value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
+ value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
setIsRendering(false);
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
+ workInProgress.flags |= PerformedWork;
- if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
- {
+ {
+ // Support for module components is deprecated and is removed behind a flag.
+ // Whether or not it would crash later, we want to show a good message in DEV first.
+ if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
var _componentName = getComponentName(Component) || 'Unknown';
if (!didWarnAboutModulePatternComponent[_componentName]) {
@@ -17495,6 +17826,20 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
didWarnAboutModulePatternComponent[_componentName] = true;
}
+ }
+ }
+
+ if ( // Run these checks in production only if the flag is off.
+ // Eventually we'll delete this branch altogether.
+ typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
+ {
+ var _componentName2 = getComponentName(Component) || 'Unknown';
+
+ if (!didWarnAboutModulePatternComponent[_componentName2]) {
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);
+
+ didWarnAboutModulePatternComponent[_componentName2] = true;
+ }
} // Proceed under the assumption that this is a class instance
@@ -17523,8 +17868,8 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
}
adoptClassInstance(workInProgress, value);
- mountClassInstance(workInProgress, Component, props, renderExpirationTime);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
+ mountClassInstance(workInProgress, Component, props, renderLanes);
+ return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
} else {
// Proceed under the assumption that this is a function component
workInProgress.tag = FunctionComponent;
@@ -17532,14 +17877,17 @@ function mountIndeterminateComponent(_current, workInProgress, Component, render
{
if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
+ disableLogs();
+
+ try {
+ value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
+ } finally {
+ reenableLogs();
}
}
}
- reconcileChildren(null, workInProgress, value, renderExpirationTime);
+ reconcileChildren(null, workInProgress, value, renderLanes);
{
validateFunctionComponentInDev(workInProgress, Component);
@@ -17580,22 +17928,22 @@ function validateFunctionComponentInDev(workInProgress, Component) {
}
if (typeof Component.getDerivedStateFromProps === 'function') {
- var _componentName2 = getComponentName(Component) || 'Unknown';
+ var _componentName3 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) {
- error('%s: Function components do not support getDerivedStateFromProps.', _componentName2);
+ if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
+ error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);
- didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true;
+ didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
}
}
if (typeof Component.contextType === 'object' && Component.contextType !== null) {
- var _componentName3 = getComponentName(Component) || 'Unknown';
+ var _componentName4 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
- error('%s: Function components do not support contextType.', _componentName3);
+ if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
+ error('%s: Function components do not support contextType.', _componentName4);
- didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
+ didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
}
}
}
@@ -17603,34 +17951,65 @@ function validateFunctionComponentInDev(workInProgress, Component) {
var SUSPENDED_MARKER = {
dehydrated: null,
- retryTime: NoWork
+ retryLane: NoLane
};
-function shouldRemainOnFallback(suspenseContext, current, workInProgress) {
- // If the context is telling us that we should show a fallback, and we're not
- // already showing content, then we should show the fallback instead.
- return hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && (current === null || current.memoizedState !== null);
+function mountSuspenseOffscreenState(renderLanes) {
+ return {
+ baseLanes: renderLanes
+ };
}
-function updateSuspenseComponent(current, workInProgress, renderExpirationTime) {
- var mode = workInProgress.mode;
+function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {
+ return {
+ baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)
+ };
+} // TODO: Probably should inline this back
+
+
+function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
+ // If we're already showing a fallback, there are cases where we need to
+ // remain on that fallback regardless of whether the content has resolved.
+ // For example, SuspenseList coordinates when nested content appears.
+ if (current !== null) {
+ var suspenseState = current.memoizedState;
+
+ if (suspenseState === null) {
+ // Currently showing content. Don't hide it, even if ForceSuspenseFallack
+ // is true. More precise name might be "ForceRemainSuspenseFallback".
+ // Note: This is a factoring smell. Can't remain on a fallback if there's
+ // no fallback to remain on.
+ return false;
+ }
+ } // Not currently showing content. Consult the Suspense context.
+
+
+ return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
+}
+
+function getRemainingWorkInPrimaryTree(current, renderLanes) {
+ // TODO: Should not remove render lanes that were pinged during this render
+ return removeLanes(current.childLanes, renderLanes);
+}
+
+function updateSuspenseComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.
{
if (shouldSuspend(workInProgress)) {
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
}
}
var suspenseContext = suspenseStackCursor.current;
- var nextDidTimeout = false;
- var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect;
+ var showFallback = false;
+ var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;
if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
// Something in this boundary's subtree already suspended. Switch to
// rendering the fallback children.
- nextDidTimeout = true;
- workInProgress.effectTag &= ~DidCapture;
+ showFallback = true;
+ workInProgress.flags &= ~DidCapture;
} else {
// Attempting the main content
if (current === null || current.memoizedState !== null) {
@@ -17646,246 +18025,302 @@ function updateSuspenseComponent(current, workInProgress, renderExpirationTime)
}
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- pushSuspenseContext(workInProgress, suspenseContext); // This next part is a bit confusing. If the children timeout, we switch to
- // showing the fallback children in place of the "primary" children.
- // However, we don't want to delete the primary children because then their
- // state will be lost (both the React state and the host state, e.g.
- // uncontrolled form inputs). Instead we keep them mounted and hide them.
- // Both the fallback children AND the primary children are rendered at the
- // same time. Once the primary children are un-suspended, we can delete
- // the fallback children — don't need to preserve their state.
+ pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
+ // boundary's children. This involves some custom reconcilation logic. Two
+ // main reasons this is so complicated.
//
- // The two sets of children are siblings in the host environment, but
- // semantically, for purposes of reconciliation, they are two separate sets.
- // So we store them using two fragment fibers.
+ // First, Legacy Mode has different semantics for backwards compatibility. The
+ // primary tree will commit in an inconsistent state, so when we do the
+ // second pass to render the fallback, we do some exceedingly, uh, clever
+ // hacks to make that not totally break. Like transferring effects and
+ // deletions from hidden tree. In Concurrent Mode, it's much simpler,
+ // because we bailout on the primary tree completely and leave it in its old
+ // state, no effects. Same as what we do for Offscreen (except that
+ // Offscreen doesn't have the first render pass).
//
- // However, we want to avoid allocating extra fibers for every placeholder.
- // They're only necessary when the children time out, because that's the
- // only time when both sets are mounted.
+ // Second is hydration. During hydration, the Suspense fiber has a slightly
+ // different layout, where the child points to a dehydrated fragment, which
+ // contains the DOM rendered by the server.
//
- // So, the extra fragment fibers are only used if the children time out.
- // Otherwise, we render the primary children directly. This requires some
- // custom reconciliation logic to preserve the state of the primary
- // children. It's essentially a very basic form of re-parenting.
+ // Third, even if you set all that aside, Suspense is like error boundaries in
+ // that we first we try to render one tree, and if that fails, we render again
+ // and switch to a different tree. Like a try/catch block. So we have to track
+ // which branch we're currently rendering. Ideally we would model this using
+ // a stack.
if (current === null) {
+ // Initial mount
// If we're currently hydrating, try to hydrate this boundary.
// But only if this has a fallback.
if (nextProps.fallback !== undefined) {
tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
- } // This is the initial mount. This branch is pretty simple because there's
- // no previous state that needs to be preserved.
-
-
- if (nextDidTimeout) {
- // Mount separate fragments for primary and fallback children.
- var nextFallbackChildren = nextProps.fallback;
- var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
- primaryChildFragment.return = workInProgress;
-
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var progressedState = workInProgress.memoizedState;
- var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
- primaryChildFragment.child = progressedPrimaryChild;
- var progressedChild = progressedPrimaryChild;
-
- while (progressedChild !== null) {
- progressedChild.return = primaryChildFragment;
- progressedChild = progressedChild.sibling;
- }
- }
+ }
- var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);
- fallbackChildFragment.return = workInProgress;
- primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the
- // fallback children.
+ var nextPrimaryChildren = nextProps.children;
+ var nextFallbackChildren = nextProps.fallback;
+ if (showFallback) {
+ var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
+ var primaryChildFragment = workInProgress.child;
+ primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = primaryChildFragment;
- return fallbackChildFragment;
+ return fallbackFragment;
+ } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {
+ // This is a CPU-bound tree. Skip this tree and show a placeholder to
+ // unblock the surrounding content. Then immediately retry after the
+ // initial commit.
+ var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
+
+ var _primaryChildFragment = workInProgress.child;
+ _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
+ workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to
+ // get it started back up to attempt the next item. While in terms of
+ // priority this work has the same priority as this current render, it's
+ // not part of the same transition once the transition has committed. If
+ // it's sync, we still want to yield so that it can be painted.
+ // Conceptually, this is really the same as pinging. We can use any
+ // RetryLane even if it's the one currently rendering since we're leaving
+ // it behind on this node.
+
+ workInProgress.lanes = SomeRetryLane;
+
+ {
+ markSpawnedWork(SomeRetryLane);
+ }
+
+ return _fallbackFragment;
} else {
- // Mount the primary children without an intermediate fragment fiber.
- var nextPrimaryChildren = nextProps.children;
- workInProgress.memoizedState = null;
- return workInProgress.child = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);
+ return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);
}
} else {
- // This is an update. This branch is more complicated because we need to
- // ensure the state of the primary children is preserved.
+ // This is an update.
+ // If the current fiber has a SuspenseState, that means it's already showing
+ // a fallback.
var prevState = current.memoizedState;
if (prevState !== null) {
- // wrapped in a fragment fiber.
-
-
- var currentPrimaryChildFragment = current.child;
- var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
- if (nextDidTimeout) {
- // Still timed out. Reuse the current primary children by cloning
- // its fragment. We're going to skip over these entirely.
+ if (showFallback) {
var _nextFallbackChildren2 = nextProps.fallback;
+ var _nextPrimaryChildren2 = nextProps.children;
- var _primaryChildFragment2 = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps);
-
- _primaryChildFragment2.return = workInProgress;
-
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var _progressedState = workInProgress.memoizedState;
-
- var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;
-
- if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {
- _primaryChildFragment2.child = _progressedPrimaryChild;
- var _progressedChild2 = _progressedPrimaryChild;
-
- while (_progressedChild2 !== null) {
- _progressedChild2.return = _primaryChildFragment2;
- _progressedChild2 = _progressedChild2.sibling;
- }
- }
- } // Because primaryChildFragment is a new fiber that we're inserting as the
- // parent of a new tree, we need to set its treeBaseDuration.
-
-
- if ( workInProgress.mode & ProfileMode) {
- // treeBaseDuration is the sum of all the child tree base durations.
- var _treeBaseDuration = 0;
- var _hiddenChild = _primaryChildFragment2.child;
+ var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);
- while (_hiddenChild !== null) {
- _treeBaseDuration += _hiddenChild.treeBaseDuration;
- _hiddenChild = _hiddenChild.sibling;
- }
+ var _primaryChildFragment3 = workInProgress.child;
+ var prevOffscreenState = current.child.memoizedState;
+ _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);
+ _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);
+ workInProgress.memoizedState = SUSPENDED_MARKER;
+ return _fallbackChildFragment;
+ } else {
+ var _nextPrimaryChildren3 = nextProps.children;
- _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;
- } // Clone the fallback child fragment, too. These we'll continue
- // working on.
+ var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);
+ workInProgress.memoizedState = null;
+ return _primaryChildFragment4;
+ }
+ } else {
+ // The current tree is not already showing a fallback.
+ if (showFallback) {
+ // Timed out.
+ var _nextFallbackChildren3 = nextProps.fallback;
+ var _nextPrimaryChildren4 = nextProps.children;
- var _fallbackChildFragment2 = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren2);
+ var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);
- _fallbackChildFragment2.return = workInProgress;
- _primaryChildFragment2.sibling = _fallbackChildFragment2;
- _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
+ var _primaryChildFragment5 = workInProgress.child;
+ var _prevOffscreenState = current.child.memoizedState;
+ _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);
+ _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the
// fallback children.
workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = _primaryChildFragment2;
return _fallbackChildFragment2;
} else {
- // No longer suspended. Switch back to showing the primary children,
- // and remove the intermediate fragment fiber.
- var _nextPrimaryChildren = nextProps.children;
- var currentPrimaryChild = currentPrimaryChildFragment.child;
- var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime); // If this render doesn't suspend, we need to delete the fallback
- // children. Wait until the complete phase, after we've confirmed the
- // fallback is no longer needed.
- // TODO: Would it be better to store the fallback fragment on
- // the stateNode?
- // Continue rendering the children, like we normally do.
+ // Still haven't timed out. Continue rendering the children, like we
+ // normally do.
+ var _nextPrimaryChildren5 = nextProps.children;
+
+ var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);
workInProgress.memoizedState = null;
- return workInProgress.child = primaryChild;
+ return _primaryChildFragment6;
}
- } else {
- // The current tree has not already timed out. That means the primary
- // children are not wrapped in a fragment fiber.
- var _currentPrimaryChild = current.child;
-
- if (nextDidTimeout) {
- // Timed out. Wrap the children in a fragment fiber to keep them
- // separate from the fallback children.
- var _nextFallbackChildren3 = nextProps.fallback;
-
- var _primaryChildFragment3 = createFiberFromFragment( // It shouldn't matter what the pending props are because we aren't
- // going to render this fragment.
- null, mode, NoWork, null);
-
- _primaryChildFragment3.return = workInProgress;
- _primaryChildFragment3.child = _currentPrimaryChild;
-
- if (_currentPrimaryChild !== null) {
- _currentPrimaryChild.return = _primaryChildFragment3;
- } // Even though we're creating a new fiber, there are no new children,
- // because we're reusing an already mounted tree. So we don't need to
- // schedule a placement.
- // primaryChildFragment.effectTag |= Placement;
+ }
+ }
+}
+function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {
+ var mode = workInProgress.mode;
+ var primaryChildProps = {
+ mode: 'visible',
+ children: primaryChildren
+ };
+ var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);
+ primaryChildFragment.return = workInProgress;
+ workInProgress.child = primaryChildFragment;
+ return primaryChildFragment;
+}
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var _progressedState2 = workInProgress.memoizedState;
+function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {
+ var mode = workInProgress.mode;
+ var progressedPrimaryFragment = workInProgress.child;
+ var primaryChildProps = {
+ mode: 'hidden',
+ children: primaryChildren
+ };
+ var primaryChildFragment;
+ var fallbackChildFragment;
+
+ if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {
+ // In legacy mode, we commit the primary tree as if it successfully
+ // completed, even though it's in an inconsistent state.
+ primaryChildFragment = progressedPrimaryFragment;
+ primaryChildFragment.childLanes = NoLanes;
+ primaryChildFragment.pendingProps = primaryChildProps;
+
+ if ( workInProgress.mode & ProfileMode) {
+ // Reset the durations from the first pass so they aren't included in the
+ // final amounts. This seems counterintuitive, since we're intentionally
+ // not measuring part of the render phase, but this makes it match what we
+ // do in Concurrent Mode.
+ primaryChildFragment.actualDuration = 0;
+ primaryChildFragment.actualStartTime = -1;
+ primaryChildFragment.selfBaseDuration = 0;
+ primaryChildFragment.treeBaseDuration = 0;
+ }
+
+ fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
+ } else {
+ primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);
+ fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
+ }
- var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;
+ primaryChildFragment.return = workInProgress;
+ fallbackChildFragment.return = workInProgress;
+ primaryChildFragment.sibling = fallbackChildFragment;
+ workInProgress.child = primaryChildFragment;
+ return fallbackChildFragment;
+}
- _primaryChildFragment3.child = _progressedPrimaryChild2;
- var _progressedChild3 = _progressedPrimaryChild2;
+function createWorkInProgressOffscreenFiber(current, offscreenProps) {
+ // The props argument to `createWorkInProgress` is `any` typed, so we use this
+ // wrapper function to constrain it.
+ return createWorkInProgress(current, offscreenProps);
+}
- while (_progressedChild3 !== null) {
- _progressedChild3.return = _primaryChildFragment3;
- _progressedChild3 = _progressedChild3.sibling;
- }
- } // Because primaryChildFragment is a new fiber that we're inserting as the
- // parent of a new tree, we need to set its treeBaseDuration.
+function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {
+ var currentPrimaryChildFragment = current.child;
+ var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
+ var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
+ mode: 'visible',
+ children: primaryChildren
+ });
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
+ primaryChildFragment.lanes = renderLanes;
+ }
- if ( workInProgress.mode & ProfileMode) {
- // treeBaseDuration is the sum of all the child tree base durations.
- var _treeBaseDuration2 = 0;
- var _hiddenChild2 = _primaryChildFragment3.child;
+ primaryChildFragment.return = workInProgress;
+ primaryChildFragment.sibling = null;
- while (_hiddenChild2 !== null) {
- _treeBaseDuration2 += _hiddenChild2.treeBaseDuration;
- _hiddenChild2 = _hiddenChild2.sibling;
- }
+ if (currentFallbackChildFragment !== null) {
+ // Delete the fallback child fragment
+ currentFallbackChildFragment.nextEffect = null;
+ currentFallbackChildFragment.flags = Deletion;
+ workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
+ }
- _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2;
- } // Create a fragment from the fallback children, too.
+ workInProgress.child = primaryChildFragment;
+ return primaryChildFragment;
+}
+function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
+ var mode = workInProgress.mode;
+ var currentPrimaryChildFragment = current.child;
+ var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
+ var primaryChildProps = {
+ mode: 'hidden',
+ children: primaryChildren
+ };
+ var primaryChildFragment;
+
+ if ( // In legacy mode, we commit the primary tree as if it successfully
+ // completed, even though it's in an inconsistent state.
+ (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
+ // already cloned. In legacy mode, the only case where this isn't true is
+ // when DevTools forces us to display a fallback; we skip the first render
+ // pass entirely and go straight to rendering the fallback. (In Concurrent
+ // Mode, SuspenseList can also trigger this scenario, but this is a legacy-
+ // only codepath.)
+ workInProgress.child !== currentPrimaryChildFragment) {
+ var progressedPrimaryFragment = workInProgress.child;
+ primaryChildFragment = progressedPrimaryFragment;
+ primaryChildFragment.childLanes = NoLanes;
+ primaryChildFragment.pendingProps = primaryChildProps;
+
+ if ( workInProgress.mode & ProfileMode) {
+ // Reset the durations from the first pass so they aren't included in the
+ // final amounts. This seems counterintuitive, since we're intentionally
+ // not measuring part of the render phase, but this makes it match what we
+ // do in Concurrent Mode.
+ primaryChildFragment.actualDuration = 0;
+ primaryChildFragment.actualStartTime = -1;
+ primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
+ primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
+ } // The fallback fiber was added as a deletion effect during the first pass.
+ // However, since we're going to remain on the fallback, we no longer want
+ // to delete it. So we need to remove it from the list. Deletions are stored
+ // on the same list as effects. We want to keep the effects from the primary
+ // tree. So we copy the primary child fragment's effect list, which does not
+ // include the fallback deletion effect.
+
+
+ var progressedLastEffect = primaryChildFragment.lastEffect;
+
+ if (progressedLastEffect !== null) {
+ workInProgress.firstEffect = primaryChildFragment.firstEffect;
+ workInProgress.lastEffect = progressedLastEffect;
+ progressedLastEffect.nextEffect = null;
+ } else {
+ // TODO: Reset this somewhere else? Lol legacy mode is so weird.
+ workInProgress.firstEffect = workInProgress.lastEffect = null;
+ }
+ } else {
+ primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);
+ }
- var _fallbackChildFragment3 = createFiberFromFragment(_nextFallbackChildren3, mode, renderExpirationTime, null);
+ var fallbackChildFragment;
- _fallbackChildFragment3.return = workInProgress;
- _primaryChildFragment3.sibling = _fallbackChildFragment3;
- _fallbackChildFragment3.effectTag |= Placement;
- _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
- // fallback children.
+ if (currentFallbackChildFragment !== null) {
+ fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
+ } else {
+ fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already
+ // mounted but this is a new fiber.
- workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = _primaryChildFragment3;
- return _fallbackChildFragment3;
- } else {
- // Still haven't timed out. Continue rendering the children, like we
- // normally do.
- workInProgress.memoizedState = null;
- var _nextPrimaryChildren2 = nextProps.children;
- return workInProgress.child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);
- }
- }
+ fallbackChildFragment.flags |= Placement;
}
-}
-function scheduleWorkOnFiber(fiber, renderExpirationTime) {
- if (fiber.expirationTime < renderExpirationTime) {
- fiber.expirationTime = renderExpirationTime;
- }
+ fallbackChildFragment.return = workInProgress;
+ primaryChildFragment.return = workInProgress;
+ primaryChildFragment.sibling = fallbackChildFragment;
+ workInProgress.child = primaryChildFragment;
+ return fallbackChildFragment;
+}
+function scheduleWorkOnFiber(fiber, renderLanes) {
+ fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
var alternate = fiber.alternate;
- if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
- alternate.expirationTime = renderExpirationTime;
+ if (alternate !== null) {
+ alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
}
- scheduleWorkOnParentPath(fiber.return, renderExpirationTime);
+ scheduleWorkOnParentPath(fiber.return, renderLanes);
}
-function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) {
+function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
// Mark any Suspense boundaries with fallbacks as having work to do.
// If they were previously forced into fallbacks, they may now be able
// to unblock.
@@ -17896,7 +18331,7 @@ function propagateSuspenseContextChange(workInProgress, firstChild, renderExpira
var state = node.memoizedState;
if (state !== null) {
- scheduleWorkOnFiber(node, renderExpirationTime);
+ scheduleWorkOnFiber(node, renderLanes);
}
} else if (node.tag === SuspenseListComponent) {
// If the tail is hidden there might not be an Suspense boundaries
@@ -17904,7 +18339,7 @@ function propagateSuspenseContextChange(workInProgress, firstChild, renderExpira
// list itself.
// We don't have to traverse to the children of the list since
// the list will propagate the change when it rerenders.
- scheduleWorkOnFiber(node, renderExpirationTime);
+ scheduleWorkOnFiber(node, renderLanes);
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
@@ -18066,7 +18501,6 @@ function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastCont
renderingStartTime: 0,
last: lastContentRow,
tail: tail,
- tailExpiration: 0,
tailMode: tailMode,
lastEffect: lastEffectBeforeRendering
};
@@ -18077,7 +18511,6 @@ function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastCont
renderState.renderingStartTime = 0;
renderState.last = lastContentRow;
renderState.tail = tail;
- renderState.tailExpiration = 0;
renderState.tailMode = tailMode;
renderState.lastEffect = lastEffectBeforeRendering;
}
@@ -18090,7 +18523,7 @@ function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastCont
// That happens in the completeWork phase without going back to beginWork.
-function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {
+function updateSuspenseListComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var revealOrder = nextProps.revealOrder;
var tailMode = nextProps.tail;
@@ -18098,21 +18531,21 @@ function updateSuspenseListComponent(current, workInProgress, renderExpirationTi
validateRevealOrder(revealOrder);
validateTailOptions(tailMode, revealOrder);
validateSuspenseListChildren(newChildren, revealOrder);
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, newChildren, renderLanes);
var suspenseContext = suspenseStackCursor.current;
var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
if (shouldForceFallback) {
suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
} else {
- var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;
+ var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;
if (didSuspendBefore) {
// If we previously forced a fallback, we need to schedule work
// on any nested boundaries to let them know to try to render
// again. This is the same as context updating.
- propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);
+ propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);
}
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
@@ -18121,7 +18554,7 @@ function updateSuspenseListComponent(current, workInProgress, renderExpirationTi
pushSuspenseContext(workInProgress, suspenseContext);
if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, SuspenseList doesn't work so we just
+ // In legacy mode, SuspenseList doesn't work so we just
// use make it a noop by treating it as the default revealOrder.
workInProgress.memoizedState = null;
} else {
@@ -18201,7 +18634,7 @@ function updateSuspenseListComponent(current, workInProgress, renderExpirationTi
return workInProgress.child;
}
-function updatePortalComponent(current, workInProgress, renderExpirationTime) {
+function updatePortalComponent(current, workInProgress, renderLanes) {
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
var nextChildren = workInProgress.pendingProps;
@@ -18211,15 +18644,17 @@ function updatePortalComponent(current, workInProgress, renderExpirationTime) {
// flow doesn't do during mount. This doesn't happen at the root because
// the root always starts with a "current" with a null child.
// TODO: Consider unifying this with how the root works.
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
+ workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
} else {
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
}
return workInProgress.child;
}
-function updateContextProvider(current, workInProgress, renderExpirationTime) {
+var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
+
+function updateContextProvider(current, workInProgress, renderLanes) {
var providerType = workInProgress.type;
var context = providerType._context;
var newProps = workInProgress.pendingProps;
@@ -18227,10 +18662,18 @@ function updateContextProvider(current, workInProgress, renderExpirationTime) {
var newValue = newProps.value;
{
+ if (!('value' in newProps)) {
+ if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
+ hasWarnedAboutUsingNoValuePropOnContextProvider = true;
+
+ error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');
+ }
+ }
+
var providerPropTypes = workInProgress.type.propTypes;
if (providerPropTypes) {
- checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
+ checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');
}
}
@@ -18243,23 +18686,23 @@ function updateContextProvider(current, workInProgress, renderExpirationTime) {
if (changedBits === 0) {
// No change. Bailout early if children are the same.
if (oldProps.children === newProps.children && !hasContextChanged()) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
} else {
// The context value changed. Search for matching consumers and schedule
// them to update.
- propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
+ propagateContextChange(workInProgress, context, changedBits, renderLanes);
}
}
var newChildren = newProps.children;
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, newChildren, renderLanes);
return workInProgress.child;
}
var hasWarnedAboutUsingContextAsConsumer = false;
-function updateContextConsumer(current, workInProgress, renderExpirationTime) {
+function updateContextConsumer(current, workInProgress, renderLanes) {
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
// DEV mode, we create a separate object for Context.Consumer that acts
// like a proxy to Context. This proxy object adds unnecessary code in PROD
@@ -18294,7 +18737,7 @@ function updateContextConsumer(current, workInProgress, renderExpirationTime) {
}
}
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
var newValue = readContext(context, newProps.unstable_observedBits);
var newChildren;
@@ -18306,8 +18749,8 @@ function updateContextConsumer(current, workInProgress, renderExpirationTime) {
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
+ workInProgress.flags |= PerformedWork;
+ reconcileChildren(current, workInProgress, newChildren, renderLanes);
return workInProgress.child;
}
@@ -18315,9 +18758,7 @@ function markWorkInProgressReceivedUpdate() {
didReceiveUpdate = true;
}
-function bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime) {
- cancelWorkTimer(workInProgress);
-
+function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
if (current !== null) {
// Reuse previous dependencies
workInProgress.dependencies = current.dependencies;
@@ -18328,16 +18769,9 @@ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationT
stopProfilerTimerIfRunning();
}
- var updateExpirationTime = workInProgress.expirationTime;
-
- if (updateExpirationTime !== NoWork) {
- markUnprocessedUpdateTime(updateExpirationTime);
- } // Check if the children have any pending work.
+ markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.
-
- var childExpirationTime = workInProgress.childExpirationTime;
-
- if (childExpirationTime < renderExpirationTime) {
+ if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
// The children don't have any work either. We can skip them.
// TODO: Once we add back resuming, we should check if the children are
// a work-in-progress set. If so, we need to transfer their effects.
@@ -18400,20 +18834,20 @@ function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
}
current.nextEffect = null;
- current.effectTag = Deletion;
- newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber.
+ current.flags = Deletion;
+ newWorkInProgress.flags |= Placement; // Restart work from the new fiber.
return newWorkInProgress;
}
}
-function beginWork(current, workInProgress, renderExpirationTime) {
- var updateExpirationTime = workInProgress.expirationTime;
+function beginWork(current, workInProgress, renderLanes) {
+ var updateLanes = workInProgress.lanes;
{
if (workInProgress._debugNeedsRemount && current !== null) {
// This will restart the begin phase with a new fiber.
- return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.expirationTime));
+ return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
}
}
@@ -18426,7 +18860,7 @@ function beginWork(current, workInProgress, renderExpirationTime) {
// If props or context changed, mark the fiber as having performed work.
// This may be unset if the props are determined to be equal later (memo).
didReceiveUpdate = true;
- } else if (updateExpirationTime < renderExpirationTime) {
+ } else if (!includesSomeLane(renderLanes, updateLanes)) {
didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering
// the begin phase. There's still some bookkeeping we that needs to be done
// in this optimized path, mostly pushing stuff onto the stack.
@@ -18439,17 +18873,6 @@ function beginWork(current, workInProgress, renderExpirationTime) {
case HostComponent:
pushHostContext(workInProgress);
-
- if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(workInProgress.type, newProps)) {
- {
- markSpawnedWork(Never);
- } // Schedule this fiber to re-render at offscreen priority. Then bailout.
-
-
- workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
- return null;
- }
-
break;
case ClassComponent:
@@ -18477,11 +18900,17 @@ function beginWork(current, workInProgress, renderExpirationTime) {
case Profiler:
{
// Profiler should only call onRender when one of its descendants actually rendered.
- var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
+ var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
if (hasChildWork) {
- workInProgress.effectTag |= Update;
- }
+ workInProgress.flags |= Update;
+ } // Reset effect durations for the next eventual effect phase.
+ // These are reset during render to allow the DevTools commit hook a chance to read them,
+
+
+ var stateNode = workInProgress.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
}
break;
@@ -18497,17 +18926,19 @@ function beginWork(current, workInProgress, renderExpirationTime) {
var primaryChildFragment = workInProgress.child;
- var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;
+ var primaryChildLanes = primaryChildFragment.childLanes;
- if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {
+ if (includesSomeLane(renderLanes, primaryChildLanes)) {
// The primary children have pending work. Use the normal path
// to attempt to render the primary children again.
- return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
+ return updateSuspenseComponent(current, workInProgress, renderLanes);
} else {
+ // The primary child fragment does not have pending work marked
+ // on it
pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
// priority. Bailout.
- var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
if (child !== null) {
// The fallback children have pending work. Skip over the
@@ -18526,9 +18957,9 @@ function beginWork(current, workInProgress, renderExpirationTime) {
case SuspenseListComponent:
{
- var didSuspendBefore = (current.effectTag & DidCapture) !== NoEffect;
+ var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;
- var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
+ var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
if (didSuspendBefore) {
if (_hasChildWork) {
@@ -18537,13 +18968,13 @@ function beginWork(current, workInProgress, renderExpirationTime) {
// Something might get unblocked by state updates or retries in the
// tree which will affect the tail. So we need to use the normal
// path to compute the correct tail.
- return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
+ return updateSuspenseListComponent(current, workInProgress, renderLanes);
} // If none of the children had any work, that means that none of
// them got retried so they'll still be blocked in the same way
// as before. We can fast bail out.
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
} // If nothing suspended before and we're rendering the same children,
// then the tail doesn't matter. Anything new that suspends will work
// in the "together" mode, so we can continue from the state we had.
@@ -18556,6 +18987,7 @@ function beginWork(current, workInProgress, renderExpirationTime) {
// update in the past but didn't complete it.
renderState.rendering = null;
renderState.tail = null;
+ renderState.lastEffect = null;
}
pushSuspenseContext(workInProgress, suspenseStackCursor.current);
@@ -18569,15 +19001,36 @@ function beginWork(current, workInProgress, renderExpirationTime) {
return null;
}
}
+
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ {
+ // Need to check if the tree still needs to be deferred. This is
+ // almost identical to the logic used in the normal update path,
+ // so we'll just enter that. The only difference is we'll bail out
+ // at the next level instead of this one, because the child props
+ // have not changed. Which is fine.
+ // TODO: Probably should refactor `beginWork` to split the bailout
+ // path from the normal path. I'm tempted to do a labeled break here
+ // but I won't :)
+ workInProgress.lanes = NoLanes;
+ return updateOffscreenComponent(current, workInProgress, renderLanes);
+ }
}
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
} else {
- // An update was scheduled on this fiber, but there are no new props
- // nor legacy context. Set this to false. If an update queue or context
- // consumer produces a changed value, it will set this to true. Otherwise,
- // the component will assume the children have not changed and bail out.
- didReceiveUpdate = false;
+ if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
+ // This is a special case that only exists for legacy mode.
+ // See https://github.com/facebook/react/pull/19216.
+ didReceiveUpdate = true;
+ } else {
+ // An update was scheduled on this fiber, but there are no new props
+ // nor legacy context. Set this to false. If an update queue or context
+ // consumer produces a changed value, it will set this to true. Otherwise,
+ // the component will assume the children have not changed and bail out.
+ didReceiveUpdate = false;
+ }
}
} else {
didReceiveUpdate = false;
@@ -18588,18 +19041,18 @@ function beginWork(current, workInProgress, renderExpirationTime) {
// move this assignment out of the common path and into each branch.
- workInProgress.expirationTime = NoWork;
+ workInProgress.lanes = NoLanes;
switch (workInProgress.tag) {
case IndeterminateComponent:
{
- return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderExpirationTime);
+ return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
}
case LazyComponent:
{
var elementType = workInProgress.elementType;
- return mountLazyComponent(current, workInProgress, elementType, updateExpirationTime, renderExpirationTime);
+ return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);
}
case FunctionComponent:
@@ -18607,7 +19060,7 @@ function beginWork(current, workInProgress, renderExpirationTime) {
var _Component = workInProgress.type;
var unresolvedProps = workInProgress.pendingProps;
var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
- return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderExpirationTime);
+ return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);
}
case ClassComponent:
@@ -18617,23 +19070,23 @@ function beginWork(current, workInProgress, renderExpirationTime) {
var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
- return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
+ return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);
}
case HostRoot:
- return updateHostRoot(current, workInProgress, renderExpirationTime);
+ return updateHostRoot(current, workInProgress, renderLanes);
case HostComponent:
- return updateHostComponent(current, workInProgress, renderExpirationTime);
+ return updateHostComponent(current, workInProgress, renderLanes);
case HostText:
return updateHostText(current, workInProgress);
case SuspenseComponent:
- return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
+ return updateSuspenseComponent(current, workInProgress, renderLanes);
case HostPortal:
- return updatePortalComponent(current, workInProgress, renderExpirationTime);
+ return updatePortalComponent(current, workInProgress, renderLanes);
case ForwardRef:
{
@@ -18642,23 +19095,23 @@ function beginWork(current, workInProgress, renderExpirationTime) {
var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
- return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderExpirationTime);
+ return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);
}
case Fragment:
- return updateFragment(current, workInProgress, renderExpirationTime);
+ return updateFragment(current, workInProgress, renderLanes);
case Mode:
- return updateMode(current, workInProgress, renderExpirationTime);
+ return updateMode(current, workInProgress, renderLanes);
case Profiler:
- return updateProfiler(current, workInProgress, renderExpirationTime);
+ return updateProfiler(current, workInProgress, renderLanes);
case ContextProvider:
- return updateContextProvider(current, workInProgress, renderExpirationTime);
+ return updateContextProvider(current, workInProgress, renderLanes);
case ContextConsumer:
- return updateContextConsumer(current, workInProgress, renderExpirationTime);
+ return updateContextConsumer(current, workInProgress, renderLanes);
case MemoComponent:
{
@@ -18673,18 +19126,18 @@ function beginWork(current, workInProgress, renderExpirationTime) {
if (outerPropTypes) {
checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
- 'prop', getComponentName(_type2), getCurrentFiberStackInDev);
+ 'prop', getComponentName(_type2));
}
}
}
_resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
- return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);
+ return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);
}
case SimpleMemoComponent:
{
- return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
+ return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);
}
case IncompleteClassComponent:
@@ -18694,12 +19147,40 @@ function beginWork(current, workInProgress, renderExpirationTime) {
var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
- return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);
+ return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);
}
case SuspenseListComponent:
{
- return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
+ return updateSuspenseListComponent(current, workInProgress, renderLanes);
+ }
+
+ case FundamentalComponent:
+ {
+
+ break;
+ }
+
+ case ScopeComponent:
+ {
+
+ break;
+ }
+
+ case Block:
+ {
+
+ break;
+ }
+
+ case OffscreenComponent:
+ {
+ return updateOffscreenComponent(current, workInProgress, renderLanes);
+ }
+
+ case LegacyHiddenComponent:
+ {
+ return updateLegacyHiddenComponent(current, workInProgress, renderLanes);
}
}
@@ -18713,11 +19194,11 @@ function beginWork(current, workInProgress, renderExpirationTime) {
function markUpdate(workInProgress) {
// Tag the fiber with an update effect. This turns a Placement into
// a PlacementAndUpdate.
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
function markRef$1(workInProgress) {
- workInProgress.effectTag |= Ref;
+ workInProgress.flags |= Ref;
}
var appendAllChildren;
@@ -18800,6 +19281,12 @@ var updateHostText$1;
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
+ if (getIsHydrating()) {
+ // If we're hydrating, we should consume as many items as we can
+ // so we don't leave any behind.
+ return;
+ }
+
switch (renderState.tailMode) {
case 'hidden':
{
@@ -18873,7 +19360,7 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
}
}
-function completeWork(current, workInProgress, renderExpirationTime) {
+function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps;
switch (workInProgress.tag) {
@@ -18904,6 +19391,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
{
popHostContainer(workInProgress);
popTopLevelContextObject(workInProgress);
+ resetWorkInProgressVersions();
var fiberRoot = workInProgress.stateNode;
if (fiberRoot.pendingContext) {
@@ -18920,6 +19408,12 @@ function completeWork(current, workInProgress, renderExpirationTime) {
// If we hydrated, then we'll need to schedule an update for
// the commit side-effects on the root.
markUpdate(workInProgress);
+ } else if (!fiberRoot.hydrate) {
+ // Schedule an effect to clear this container at the start of the next commit.
+ // This handles the case of React rendering into a container with previous children.
+ // It's also safe to do for updates too, because current.child would only be null
+ // if the previous render was null (so the the container would already be empty).
+ workInProgress.flags |= Snapshot;
}
}
@@ -18968,13 +19462,11 @@ function completeWork(current, workInProgress, renderExpirationTime) {
}
} else {
var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
- appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners
-
- workInProgress.stateNode = instance;
+ appendAllChildren(instance, workInProgress, false, false);
+ workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
// (eg DOM renderer supports auto-focus for certain elements).
// Make sure such renderers get scheduled for later work.
-
if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
markUpdate(workInProgress);
}
@@ -19031,9 +19523,13 @@ function completeWork(current, workInProgress, renderExpirationTime) {
popSuspenseContext(workInProgress);
var nextState = workInProgress.memoizedState;
- if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
+ if ((workInProgress.flags & DidCapture) !== NoFlags) {
// Something suspended. Re-render with the fallback children.
- workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list.
+ workInProgress.lanes = renderLanes; // Do not reset the effect list.
+
+ if ( (workInProgress.mode & ProfileMode) !== NoMode) {
+ transferActualDuration(workInProgress);
+ }
return workInProgress;
}
@@ -19048,29 +19544,6 @@ function completeWork(current, workInProgress, renderExpirationTime) {
} else {
var prevState = current.memoizedState;
prevDidTimeout = prevState !== null;
-
- if (!nextDidTimeout && prevState !== null) {
- // We just switched from the fallback to the normal children.
- // Delete the fallback.
- // TODO: Would it be better to store the fallback fragment on
- // the stateNode during the begin phase?
- var currentFallbackChild = current.child.sibling;
-
- if (currentFallbackChild !== null) {
- // Deletions go at the beginning of the return fiber's effect list
- var first = workInProgress.firstEffect;
-
- if (first !== null) {
- workInProgress.firstEffect = currentFallbackChild;
- currentFallbackChild.nextEffect = first;
- } else {
- workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
- currentFallbackChild.nextEffect = null;
- }
-
- currentFallbackChild.effectTag = Deletion;
- }
- }
}
if (nextDidTimeout && !prevDidTimeout) {
@@ -19109,7 +19582,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
// primary children. In mutation mode, we also need the flag to
// *unhide* children that were previously hidden, so check if this
// is currently timed out, too.
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
}
@@ -19119,6 +19592,11 @@ function completeWork(current, workInProgress, renderExpirationTime) {
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(workInProgress);
+
+ if (current === null) {
+ preparePortalMount(workInProgress.stateNode.containerInfo);
+ }
+
return null;
case ContextProvider:
@@ -19150,7 +19628,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
return null;
}
- var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;
+ var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;
var renderedTail = renderState.rendering;
if (renderedTail === null) {
@@ -19165,7 +19643,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
// something in the previous committed pass suspended. Otherwise,
// there's no chance so we can skip the expensive call to
// findFirstSuspended.
- var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);
+ var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);
if (!cannotBeSuspended) {
var row = workInProgress.child;
@@ -19175,7 +19653,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
if (suspended !== null) {
didSuspendAlready = true;
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
// part of the second pass. In that case nothing will subscribe to
// its thennables. Instead, we'll transfer its thennables to the
@@ -19193,7 +19671,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
if (newThennables !== null) {
workInProgress.updateQueue = newThennables;
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
} // Rerender the whole list, but this time, we'll force fallbacks
// to stay in place.
// Reset the effect list before doing the second pass since that's now invalid.
@@ -19205,7 +19683,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.
- resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately
+ resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately
// rerender the children.
pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
@@ -19215,6 +19693,28 @@ function completeWork(current, workInProgress, renderExpirationTime) {
row = row.sibling;
}
}
+
+ if (renderState.tail !== null && now() > getRenderTargetTime()) {
+ // We have already passed our CPU deadline but we still have rows
+ // left in the tail. We'll just give up further attempts to render
+ // the main content and only render fallbacks.
+ workInProgress.flags |= DidCapture;
+ didSuspendAlready = true;
+ cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
+ // to get it started back up to attempt the next item. While in terms
+ // of priority this work has the same priority as this current render,
+ // it's not part of the same transition once the transition has
+ // committed. If it's sync, we still want to yield so that it can be
+ // painted. Conceptually, this is really the same as pinging.
+ // We can use any RetryLane even if it's the one currently rendering
+ // since we're leaving it behind on this node.
+
+ workInProgress.lanes = SomeRetryLane;
+
+ {
+ markSpawnedWork(SomeRetryLane);
+ }
+ }
} else {
cutOffTailIfNeeded(renderState, false);
} // Next we're going to render the tail.
@@ -19225,7 +19725,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
var _suspended = findFirstSuspended(renderedTail);
if (_suspended !== null) {
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
// get lost if this row ends up dropped during a second pass.
@@ -19233,43 +19733,47 @@ function completeWork(current, workInProgress, renderExpirationTime) {
if (_newThennables !== null) {
workInProgress.updateQueue = _newThennables;
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
cutOffTailIfNeeded(renderState, true); // This might have been modified.
- if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {
- // We need to delete the row we just rendered.
- // Reset the effect list to what it was before we rendered this
- // child. The nested children have already appended themselves.
- var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
+ if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.
+ ) {
+ // We need to delete the row we just rendered.
+ // Reset the effect list to what it was before we rendered this
+ // child. The nested children have already appended themselves.
+ var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
- if (lastEffect !== null) {
- lastEffect.nextEffect = null;
- } // We're done.
+ if (lastEffect !== null) {
+ lastEffect.nextEffect = null;
+ } // We're done.
- return null;
- }
- } else if ( // The time it took to render last row is greater than time until
- // the expiration.
- now() * 2 - renderState.renderingStartTime > renderState.tailExpiration && renderExpirationTime > Never) {
+ return null;
+ }
+ } else if ( // The time it took to render last row is greater than the remaining
+ // time we have to render. So rendering one more row would likely
+ // exceed it.
+ now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {
// We have now passed our CPU deadline and we'll just give up further
// attempts to render the main content and only render fallbacks.
// The assumption is that this is usually faster.
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
didSuspendAlready = true;
cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
- // to get it started back up to attempt the next item. If we can show
- // them, then they really have the same priority as this render.
- // So we'll pick it back up the very next render pass once we've had
- // an opportunity to yield for paint.
+ // to get it started back up to attempt the next item. While in terms
+ // of priority this work has the same priority as this current render,
+ // it's not part of the same transition once the transition has
+ // committed. If it's sync, we still want to yield so that it can be
+ // painted. Conceptually, this is really the same as pinging.
+ // We can use any RetryLane even if it's the one currently rendering
+ // since we're leaving it behind on this node.
- var nextPriority = renderExpirationTime - 1;
- workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;
+ workInProgress.lanes = SomeRetryLane;
{
- markSpawnedWork(nextPriority);
+ markSpawnedWork(SomeRetryLane);
}
}
}
@@ -19297,19 +19801,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
if (renderState.tail !== null) {
// We still have tail rows to render.
- if (renderState.tailExpiration === 0) {
- // Heuristic for how long we're willing to spend rendering rows
- // until we just give up and show what we have so far.
- var TAIL_EXPIRATION_TIMEOUT_MS = 500;
- renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; // TODO: This is meant to mimic the train model or JND but this
- // is a per component value. It should really be since the start
- // of the total render or last commit. Consider using something like
- // globalMostRecentFallbackTime. That doesn't account for being
- // suspended for part of the time or when it's a new render.
- // It should probably use a global start time value instead.
- } // Pop a row.
-
-
+ // Pop a row.
var next = renderState.tail;
renderState.rendering = next;
renderState.tail = next.sibling;
@@ -19334,6 +19826,41 @@ function completeWork(current, workInProgress, renderExpirationTime) {
return null;
}
+
+ case FundamentalComponent:
+ {
+
+ break;
+ }
+
+ case ScopeComponent:
+ {
+
+ break;
+ }
+
+ case Block:
+
+ break;
+
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ {
+ popRenderLanes(workInProgress);
+
+ if (current !== null) {
+ var _nextState = workInProgress.memoizedState;
+ var _prevState = current.memoizedState;
+ var prevIsHidden = _prevState !== null;
+ var nextIsHidden = _nextState !== null;
+
+ if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {
+ workInProgress.flags |= Update;
+ }
+ }
+
+ return null;
+ }
}
{
@@ -19343,7 +19870,7 @@ function completeWork(current, workInProgress, renderExpirationTime) {
}
}
-function unwindWork(workInProgress, renderExpirationTime) {
+function unwindWork(workInProgress, renderLanes) {
switch (workInProgress.tag) {
case ClassComponent:
{
@@ -19353,10 +19880,15 @@ function unwindWork(workInProgress, renderExpirationTime) {
popContext(workInProgress);
}
- var effectTag = workInProgress.effectTag;
+ var flags = workInProgress.flags;
+
+ if (flags & ShouldCapture) {
+ workInProgress.flags = flags & ~ShouldCapture | DidCapture;
+
+ if ( (workInProgress.mode & ProfileMode) !== NoMode) {
+ transferActualDuration(workInProgress);
+ }
- if (effectTag & ShouldCapture) {
- workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
return workInProgress;
}
@@ -19367,15 +19899,16 @@ function unwindWork(workInProgress, renderExpirationTime) {
{
popHostContainer(workInProgress);
popTopLevelContextObject(workInProgress);
- var _effectTag = workInProgress.effectTag;
+ resetWorkInProgressVersions();
+ var _flags = workInProgress.flags;
- if (!((_effectTag & DidCapture) === NoEffect)) {
+ if (!((_flags & DidCapture) === NoFlags)) {
{
throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
}
}
- workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
+ workInProgress.flags = _flags & ~ShouldCapture | DidCapture;
return workInProgress;
}
@@ -19390,10 +19923,14 @@ function unwindWork(workInProgress, renderExpirationTime) {
{
popSuspenseContext(workInProgress);
- var _effectTag2 = workInProgress.effectTag;
+ var _flags2 = workInProgress.flags;
+
+ if (_flags2 & ShouldCapture) {
+ workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
- if (_effectTag2 & ShouldCapture) {
- workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
+ if ( (workInProgress.mode & ProfileMode) !== NoMode) {
+ transferActualDuration(workInProgress);
+ }
return workInProgress;
}
@@ -19417,6 +19954,11 @@ function unwindWork(workInProgress, renderExpirationTime) {
popProvider(workInProgress);
return null;
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ popRenderLanes(workInProgress);
+ return null;
+
default:
return null;
}
@@ -19439,6 +19981,7 @@ function unwindInterruptedWork(interruptedWork) {
{
popHostContainer(interruptedWork);
popTopLevelContextObject(interruptedWork);
+ resetWorkInProgressVersions();
break;
}
@@ -19463,6 +20006,11 @@ function unwindInterruptedWork(interruptedWork) {
case ContextProvider:
popProvider(interruptedWork);
break;
+
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ popRenderLanes(interruptedWork);
+ break;
}
}
@@ -19476,109 +20024,394 @@ function createCapturedValue(value, source) {
};
}
-function logCapturedError(capturedError) {
+// This module is forked in different environments.
+// By default, return `true` to log errors to the console.
+// Forks can return `false` if this isn't desirable.
+function showErrorDialog(boundary, errorInfo) {
+ return true;
+}
- var error = capturedError.error;
+function logCapturedError(boundary, errorInfo) {
+ try {
+ var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.
+ // This enables renderers like ReactNative to better manage redbox behavior.
- {
- var componentName = capturedError.componentName,
- componentStack = capturedError.componentStack,
- errorBoundaryName = capturedError.errorBoundaryName,
- errorBoundaryFound = capturedError.errorBoundaryFound,
- willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling
- // `preventDefault()` in window `error` handler.
- // We record this information as an expando on the error.
-
- if (error != null && error._suppressLogging) {
- if (errorBoundaryFound && willRetry) {
- // The error is recoverable and was silenced.
- // Ignore it and don't print the stack addendum.
- // This is handy for testing error boundaries without noise.
- return;
- } // The error is fatal. Since the silencing might have
- // been accidental, we'll surface it anyway.
- // However, the browser would have silenced the original error
- // so we'll print it first, and then print the stack addendum.
+ if (logError === false) {
+ return;
+ }
+ var error = errorInfo.value;
- console['error'](error); // Don't transform to our wrapper
- // For a more detailed description of this block, see:
- // https://github.com/facebook/react/pull/13384
- }
+ if (true) {
+ var source = errorInfo.source;
+ var stack = errorInfo.stack;
+ var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling
+ // `preventDefault()` in window `error` handler.
+ // We record this information as an expando on the error.
+
+ if (error != null && error._suppressLogging) {
+ if (boundary.tag === ClassComponent) {
+ // The error is recoverable and was silenced.
+ // Ignore it and don't print the stack addendum.
+ // This is handy for testing error boundaries without noise.
+ return;
+ } // The error is fatal. Since the silencing might have
+ // been accidental, we'll surface it anyway.
+ // However, the browser would have silenced the original error
+ // so we'll print it first, and then print the stack addendum.
- var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
- var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
- if (errorBoundaryFound && errorBoundaryName) {
- if (willRetry) {
+ console['error'](error); // Don't transform to our wrapper
+ // For a more detailed description of this block, see:
+ // https://github.com/facebook/react/pull/13384
+ }
+
+ var componentName = source ? getComponentName(source.type) : null;
+ var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
+ var errorBoundaryMessage;
+ var errorBoundaryName = getComponentName(boundary.type);
+
+ if (errorBoundaryName) {
errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
} else {
- errorBoundaryMessage = "This error was initially handled by the error boundary " + errorBoundaryName + ".\n" + "Recreating the tree from scratch failed so React will unmount the tree.";
+ errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
}
+
+ var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
+ // We don't include the original error message and JS stack because the browser
+ // has already printed it. Even if the application swallows the error, it is still
+ // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
+
+ console['error'](combinedMessage); // Don't transform to our wrapper
} else {
- errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
+ // In production, we print the error directly.
+ // This will include the message, the JS stack, and anything the browser wants to show.
+ // We pass the error object instead of custom message so that the browser displays the error natively.
+ console['error'](error); // Don't transform to our wrapper
}
+ } catch (e) {
+ // This method must not throw, or React internal state will get messed up.
+ // If console.error is overridden, or logCapturedError() shows a dialog that throws,
+ // we want to report this error outside of the normal stack as a last resort.
+ // https://github.com/facebook/react/issues/13188
+ setTimeout(function () {
+ throw e;
+ });
+ }
+}
- var combinedMessage = "" + componentNameMessage + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
- // We don't include the original error message and JS stack because the browser
- // has already printed it. Even if the application swallows the error, it is still
- // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
+var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
- console['error'](combinedMessage); // Don't transform to our wrapper
- }
+function createRootErrorUpdate(fiber, errorInfo, lane) {
+ var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.
+
+ update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
+ // being called "element".
+
+ update.payload = {
+ element: null
+ };
+ var error = errorInfo.value;
+
+ update.callback = function () {
+ onUncaughtError(error);
+ logCapturedError(fiber, errorInfo);
+ };
+
+ return update;
}
-var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
+function createClassErrorUpdate(fiber, errorInfo, lane) {
+ var update = createUpdate(NoTimestamp, lane);
+ update.tag = CaptureUpdate;
+ var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
-{
- didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
+ if (typeof getDerivedStateFromError === 'function') {
+ var error$1 = errorInfo.value;
+
+ update.payload = function () {
+ logCapturedError(fiber, errorInfo);
+ return getDerivedStateFromError(error$1);
+ };
+ }
+
+ var inst = fiber.stateNode;
+
+ if (inst !== null && typeof inst.componentDidCatch === 'function') {
+ update.callback = function callback() {
+ {
+ markFailedErrorBoundaryForHotReloading(fiber);
+ }
+
+ if (typeof getDerivedStateFromError !== 'function') {
+ // To preserve the preexisting retry behavior of error boundaries,
+ // we keep track of which ones already failed during this batch.
+ // This gets reset before we yield back to the browser.
+ // TODO: Warn in strict mode if getDerivedStateFromError is
+ // not defined.
+ markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
+
+ logCapturedError(fiber, errorInfo);
+ }
+
+ var error$1 = errorInfo.value;
+ var stack = errorInfo.stack;
+ this.componentDidCatch(error$1, {
+ componentStack: stack !== null ? stack : ''
+ });
+
+ {
+ if (typeof getDerivedStateFromError !== 'function') {
+ // If componentDidCatch is the only error boundary method defined,
+ // then it needs to call setState to recover from errors.
+ // If no state update is scheduled then the boundary will swallow the error.
+ if (!includesSomeLane(fiber.lanes, SyncLane)) {
+ error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
+ }
+ }
+ }
+ };
+ } else {
+ update.callback = function () {
+ markFailedErrorBoundaryForHotReloading(fiber);
+ };
+ }
+
+ return update;
}
-var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
-function logError(boundary, errorInfo) {
- var source = errorInfo.source;
- var stack = errorInfo.stack;
-
- if (stack === null && source !== null) {
- stack = getStackByFiberInDevAndProd(source);
- }
-
- var capturedError = {
- componentName: source !== null ? getComponentName(source.type) : null,
- componentStack: stack !== null ? stack : '',
- error: errorInfo.value,
- errorBoundary: null,
- errorBoundaryName: null,
- errorBoundaryFound: false,
- willRetry: false
- };
+function attachPingListener(root, wakeable, lanes) {
+ // Attach a listener to the promise to "ping" the root and retry. But only if
+ // one does not already exist for the lanes we're currently rendering (which
+ // acts like a "thread ID" here).
+ var pingCache = root.pingCache;
+ var threadIDs;
- if (boundary !== null && boundary.tag === ClassComponent) {
- capturedError.errorBoundary = boundary.stateNode;
- capturedError.errorBoundaryName = getComponentName(boundary.type);
- capturedError.errorBoundaryFound = true;
- capturedError.willRetry = true;
+ if (pingCache === null) {
+ pingCache = root.pingCache = new PossiblyWeakMap$1();
+ threadIDs = new Set();
+ pingCache.set(wakeable, threadIDs);
+ } else {
+ threadIDs = pingCache.get(wakeable);
+
+ if (threadIDs === undefined) {
+ threadIDs = new Set();
+ pingCache.set(wakeable, threadIDs);
+ }
}
- try {
- logCapturedError(capturedError);
- } catch (e) {
- // This method must not throw, or React internal state will get messed up.
- // If console.error is overridden, or logCapturedError() shows a dialog that throws,
- // we want to report this error outside of the normal stack as a last resort.
- // https://github.com/facebook/react/issues/13188
- setTimeout(function () {
- throw e;
- });
+ if (!threadIDs.has(lanes)) {
+ // Memoize using the thread ID to prevent redundant listeners.
+ threadIDs.add(lanes);
+ var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
+ wakeable.then(ping, ping);
}
}
+function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
+ // The source fiber did not complete.
+ sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.
+
+ sourceFiber.firstEffect = sourceFiber.lastEffect = null;
+
+ if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
+ // This is a wakeable.
+ var wakeable = value;
+
+ if ((sourceFiber.mode & BlockingMode) === NoMode) {
+ // Reset the memoizedState to what it was before we attempted
+ // to render it.
+ var currentSource = sourceFiber.alternate;
+
+ if (currentSource) {
+ sourceFiber.updateQueue = currentSource.updateQueue;
+ sourceFiber.memoizedState = currentSource.memoizedState;
+ sourceFiber.lanes = currentSource.lanes;
+ } else {
+ sourceFiber.updateQueue = null;
+ sourceFiber.memoizedState = null;
+ }
+ }
+
+ var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
+
+ var _workInProgress = returnFiber;
+
+ do {
+ if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
+ // Found the nearest boundary.
+ // Stash the promise on the boundary fiber. If the boundary times out, we'll
+ // attach another listener to flip the boundary back to its normal state.
+ var wakeables = _workInProgress.updateQueue;
+
+ if (wakeables === null) {
+ var updateQueue = new Set();
+ updateQueue.add(wakeable);
+ _workInProgress.updateQueue = updateQueue;
+ } else {
+ wakeables.add(wakeable);
+ } // If the boundary is outside of blocking mode, we should *not*
+ // suspend the commit. Pretend as if the suspended component rendered
+ // null and keep rendering. In the commit phase, we'll schedule a
+ // subsequent synchronous update to re-render the Suspense.
+ //
+ // Note: It doesn't matter whether the component that suspended was
+ // inside a blocking mode tree. If the Suspense is outside of it, we
+ // should *not* suspend the commit.
+
+
+ if ((_workInProgress.mode & BlockingMode) === NoMode) {
+ _workInProgress.flags |= DidCapture;
+ sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.
+ // But we shouldn't call any lifecycle methods or callbacks. Remove
+ // all lifecycle effect tags.
+
+ sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);
+
+ if (sourceFiber.tag === ClassComponent) {
+ var currentSourceFiber = sourceFiber.alternate;
+
+ if (currentSourceFiber === null) {
+ // This is a new mount. Change the tag so it's not mistaken for a
+ // completed class component. For example, we should not call
+ // componentWillUnmount if it is deleted.
+ sourceFiber.tag = IncompleteClassComponent;
+ } else {
+ // When we try rendering again, we should not reuse the current fiber,
+ // since it's known to be in an inconsistent state. Use a force update to
+ // prevent a bail out.
+ var update = createUpdate(NoTimestamp, SyncLane);
+ update.tag = ForceUpdate;
+ enqueueUpdate(sourceFiber, update);
+ }
+ } // The source fiber did not complete. Mark it with Sync priority to
+ // indicate that it still has pending work.
+
+
+ sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.
+
+ return;
+ } // Confirmed that the boundary is in a concurrent mode tree. Continue
+ // with the normal suspend path.
+ //
+ // After this we'll use a set of heuristics to determine whether this
+ // render pass will run to completion or restart or "suspend" the commit.
+ // The actual logic for this is spread out in different places.
+ //
+ // This first principle is that if we're going to suspend when we complete
+ // a root, then we should also restart if we get an update or ping that
+ // might unsuspend it, and vice versa. The only reason to suspend is
+ // because you think you might want to restart before committing. However,
+ // it doesn't make sense to restart only while in the period we're suspended.
+ //
+ // Restarting too aggressively is also not good because it starves out any
+ // intermediate loading state. So we use heuristics to determine when.
+ // Suspense Heuristics
+ //
+ // If nothing threw a Promise or all the same fallbacks are already showing,
+ // then don't suspend/restart.
+ //
+ // If this is an initial render of a new tree of Suspense boundaries and
+ // those trigger a fallback, then don't suspend/restart. We want to ensure
+ // that we can show the initial loading state as quickly as possible.
+ //
+ // If we hit a "Delayed" case, such as when we'd switch from content back into
+ // a fallback, then we should always suspend/restart. Transitions apply
+ // to this case. If none is defined, JND is used instead.
+ //
+ // If we're already showing a fallback and it gets "retried", allowing us to show
+ // another level, but there's still an inner boundary that would show a fallback,
+ // then we suspend/restart for 500ms since the last time we showed a fallback
+ // anywhere in the tree. This effectively throttles progressive loading into a
+ // consistent train of commits. This also gives us an opportunity to restart to
+ // get to the completed state slightly earlier.
+ //
+ // If there's ambiguity due to batching it's resolved in preference of:
+ // 1) "delayed", 2) "initial render", 3) "retry".
+ //
+ // We want to ensure that a "busy" state doesn't get force committed. We want to
+ // ensure that new initial loading states can commit as soon as possible.
+
+
+ attachPingListener(root, wakeable, rootRenderLanes);
+ _workInProgress.flags |= ShouldCapture;
+ _workInProgress.lanes = rootRenderLanes;
+ return;
+ } // This boundary already captured during this render. Continue to the next
+ // boundary.
+
+
+ _workInProgress = _workInProgress.return;
+ } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
+ // TODO: Use invariant so the message is stripped in prod?
+
+
+ value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.');
+ } // We didn't find a boundary that could handle this type of exception. Start
+ // over and traverse parent path again, this time treating the exception
+ // as an error.
+
+
+ renderDidError();
+ value = createCapturedValue(value, sourceFiber);
+ var workInProgress = returnFiber;
+
+ do {
+ switch (workInProgress.tag) {
+ case HostRoot:
+ {
+ var _errorInfo = value;
+ workInProgress.flags |= ShouldCapture;
+ var lane = pickArbitraryLane(rootRenderLanes);
+ workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);
+
+ var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);
+
+ enqueueCapturedUpdate(workInProgress, _update);
+ return;
+ }
+
+ case ClassComponent:
+ // Capture and retry
+ var errorInfo = value;
+ var ctor = workInProgress.type;
+ var instance = workInProgress.stateNode;
+
+ if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
+ workInProgress.flags |= ShouldCapture;
+
+ var _lane = pickArbitraryLane(rootRenderLanes);
+
+ workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state
+
+ var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);
+
+ enqueueCapturedUpdate(workInProgress, _update2);
+ return;
+ }
+
+ break;
+ }
+
+ workInProgress = workInProgress.return;
+ } while (workInProgress !== null);
+}
+
+var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
+
+{
+ didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
+}
+
+var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
+
var callComponentWillUnmountWithTimer = function (current, instance) {
- startPhaseTimer(current, 'componentWillUnmount');
instance.props = current.memoizedProps;
instance.state = current.memoizedState;
- instance.componentWillUnmount();
- stopPhaseTimer();
+
+ {
+ instance.componentWillUnmount();
+ }
}; // Capture errors so they don't interrupt unmounting.
@@ -19635,11 +20468,10 @@ function commitBeforeMutationLifeCycles(current, finishedWork) {
case ClassComponent:
{
- if (finishedWork.effectTag & Snapshot) {
+ if (finishedWork.flags & Snapshot) {
if (current !== null) {
var prevProps = current.memoizedProps;
var prevState = current.memoizedState;
- startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
var instance = finishedWork.stateNode; // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
@@ -19651,7 +20483,7 @@ function commitBeforeMutationLifeCycles(current, finishedWork) {
}
if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
+ error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
}
}
}
@@ -19669,7 +20501,6 @@ function commitBeforeMutationLifeCycles(current, finishedWork) {
}
instance.__reactInternalSnapshotBeforeUpdate = snapshot;
- stopPhaseTimer();
}
}
@@ -19677,6 +20508,17 @@ function commitBeforeMutationLifeCycles(current, finishedWork) {
}
case HostRoot:
+ {
+ {
+ if (finishedWork.flags & Snapshot) {
+ var root = finishedWork.stateNode;
+ clearContainer(root.containerInfo);
+ }
+ }
+
+ return;
+ }
+
case HostComponent:
case HostText:
case HostPortal:
@@ -19739,12 +20581,12 @@ function commitHookEffectListMount(tag, finishedWork) {
if (destroy === null) {
addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
} else if (typeof destroy.then === 'function') {
- addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
+ addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
} else {
addendum = ' You returned: ' + destroy;
}
- error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));
+ error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);
}
}
}
@@ -19754,26 +20596,30 @@ function commitHookEffectListMount(tag, finishedWork) {
}
}
-function commitPassiveHookEffects(finishedWork) {
- if ((finishedWork.effectTag & Passive) !== NoEffect) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- // TODO (#17945) We should call all passive destroy functions (for all fibers)
- // before calling any create functions. The current approach only serializes
- // these for a single fiber.
- commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork);
- commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
- break;
- }
- }
+function schedulePassiveEffects(finishedWork) {
+ var updateQueue = finishedWork.updateQueue;
+ var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
+
+ if (lastEffect !== null) {
+ var firstEffect = lastEffect.next;
+ var effect = firstEffect;
+
+ do {
+ var _effect = effect,
+ next = _effect.next,
+ tag = _effect.tag;
+
+ if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {
+ enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);
+ enqueuePendingPassiveHookEffectMount(finishedWork, effect);
+ }
+
+ effect = next;
+ } while (effect !== firstEffect);
}
}
-function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirationTime) {
+function commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
@@ -19784,8 +20630,11 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
// This is done to prevent sibling component effects from interfering with each other,
// e.g. a destroy function in one component should never override a ref set
// by a create function in another component during the same commit.
- commitHookEffectListMount(Layout | HasEffect, finishedWork);
+ {
+ commitHookEffectListMount(Layout | HasEffect, finishedWork);
+ }
+ schedulePassiveEffects(finishedWork);
return;
}
@@ -19793,12 +20642,11 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
{
var instance = finishedWork.stateNode;
- if (finishedWork.effectTag & Update) {
+ if (finishedWork.flags & Update) {
if (current === null) {
- startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here,
+ // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
-
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
@@ -19806,17 +20654,17 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
}
if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
+ error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
}
}
}
- instance.componentDidMount();
- stopPhaseTimer();
+ {
+ instance.componentDidMount();
+ }
} else {
var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
- var prevState = current.memoizedState;
- startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here,
+ var prevState = current.memoizedState; // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
@@ -19827,15 +20675,18 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
}
if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
+ error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
}
}
}
- instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
- stopPhaseTimer();
+ {
+ instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
+ }
}
- }
+ } // TODO: I think this is now always non-null by the time it reaches the
+ // commit phase. Consider removing the type check.
+
var updateQueue = finishedWork.updateQueue;
@@ -19847,7 +20698,7 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
}
if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
+ error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
}
}
} // We could update instance props and state here,
@@ -19863,6 +20714,8 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
case HostRoot:
{
+ // TODO: I think this is now always non-null by the time it reaches the
+ // commit phase. Consider removing the type check.
var _updateQueue = finishedWork.updateQueue;
if (_updateQueue !== null) {
@@ -19893,7 +20746,7 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
// These effects should only be committed when components are first mounted,
// aka when there is no current/alternate.
- if (current === null && finishedWork.effectTag & Update) {
+ if (current === null && finishedWork.flags & Update) {
var type = finishedWork.type;
var props = finishedWork.memoizedProps;
commitMount(_instance2, type, props);
@@ -19917,11 +20770,15 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
case Profiler:
{
{
- var onRender = finishedWork.memoizedProps.onRender;
+ var _finishedWork$memoize2 = finishedWork.memoizedProps,
+ onCommit = _finishedWork$memoize2.onCommit,
+ onRender = _finishedWork$memoize2.onRender;
+ var effectDuration = finishedWork.stateNode.effectDuration;
+ var commitTime = getCommitTime();
if (typeof onRender === 'function') {
{
- onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
+ onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);
}
}
}
@@ -19939,6 +20796,8 @@ function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirati
case IncompleteClassComponent:
case FundamentalComponent:
case ScopeComponent:
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
return;
}
@@ -19972,14 +20831,7 @@ function hideOrUnhideAllChildren(finishedWork, isHidden) {
} else {
unhideTextInstance(_instance3, node.memoizedProps);
}
- } else if (node.tag === SuspenseComponent && node.memoizedState !== null && node.memoizedState.dehydrated === null) {
- // Found a nested Suspense component that timed out. Skip over the
- // primary child fragment, which should remain hidden.
- var fallbackChildFragment = node.child.sibling;
- fallbackChildFragment.return = node;
- node = fallbackChildFragment;
- continue;
- } else if (node.child !== null) {
+ } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
@@ -20024,7 +20876,7 @@ function commitAttachRef(finishedWork) {
} else {
{
if (!ref.hasOwnProperty('current')) {
- error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
+ error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));
}
}
@@ -20065,35 +20917,25 @@ function commitUnmount(finishedRoot, current, renderPriorityLevel) {
if (lastEffect !== null) {
var firstEffect = lastEffect.next;
+ var effect = firstEffect;
- {
- // When the owner fiber is deleted, the destroy function of a passive
- // effect hook is called during the synchronous commit phase. This is
- // a concession to implementation complexity. Calling it in the
- // passive effect phase (like they usually are, when dependencies
- // change during an update) would require either traversing the
- // children of the deleted fiber again, or including unmount effects
- // as part of the fiber effect list.
- //
- // Because this is during the sync commit phase, we need to change
- // the priority.
- //
- // TODO: Reconsider this implementation trade off.
- var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;
- runWithPriority$1(priorityLevel, function () {
- var effect = firstEffect;
-
- do {
- var _destroy = effect.destroy;
-
- if (_destroy !== undefined) {
- safelyCallDestroy(current, _destroy);
+ do {
+ var _effect2 = effect,
+ destroy = _effect2.destroy,
+ tag = _effect2.tag;
+
+ if (destroy !== undefined) {
+ if ((tag & Passive$1) !== NoFlags$1) {
+ enqueuePendingPassiveHookEffectUnmount(current, effect);
+ } else {
+ {
+ safelyCallDestroy(current, destroy);
}
+ }
+ }
- effect = effect.next;
- } while (effect !== firstEffect);
- });
- }
+ effect = effect.next;
+ } while (effect !== firstEffect);
}
}
@@ -20114,7 +20956,6 @@ function commitUnmount(finishedRoot, current, renderPriorityLevel) {
case HostComponent:
{
-
safelyDetachRef(current);
return;
}
@@ -20125,7 +20966,7 @@ function commitUnmount(finishedRoot, current, renderPriorityLevel) {
// We are also not using this parent because
// the portal will get pushed immediately.
{
- unmountHostComponents(finishedRoot, current, renderPriorityLevel);
+ unmountHostComponents(finishedRoot, current);
}
return;
@@ -20160,7 +21001,7 @@ function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
var node = root;
while (true) {
- commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes.
+ commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.
// Skip portals because commitUnmount() currently visits them recursively.
if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
@@ -20188,27 +21029,33 @@ function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
}
}
-function detachFiber(current) {
- var alternate = current.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we
+function detachFiberMutation(fiber) {
+ // Cut off the return pointers to disconnect it from the tree. Ideally, we
// should clear the child pointer of the parent alternate to let this
// get GC:ed but we don't know which for sure which parent is the current
// one so we'll settle for GC:ing the subtree of this child. This child
// itself will be GC:ed when the parent updates the next time.
+ // Note: we cannot null out sibling here, otherwise it can cause issues
+ // with findDOMNode and how it requires the sibling field to carry out
+ // traversal in a later effect. See PR #16820. We now clear the sibling
+ // field after effects, see: detachFiberAfterEffects.
+ //
+ // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.
+ // It may be required if the current component is an error boundary,
+ // and one of its descendants throws while unmounting a passive effect.
+ fiber.alternate = null;
+ fiber.child = null;
+ fiber.dependencies = null;
+ fiber.firstEffect = null;
+ fiber.lastEffect = null;
+ fiber.memoizedProps = null;
+ fiber.memoizedState = null;
+ fiber.pendingProps = null;
+ fiber.return = null;
+ fiber.updateQueue = null;
- current.return = null;
- current.child = null;
- current.memoizedState = null;
- current.updateQueue = null;
- current.dependencies = null;
- current.alternate = null;
- current.firstEffect = null;
- current.lastEffect = null;
- current.pendingProps = null;
- current.memoizedProps = null;
- current.stateNode = null;
-
- if (alternate !== null) {
- detachFiber(alternate);
+ {
+ fiber._debugOwner = null;
}
}
@@ -20259,7 +21106,7 @@ function getHostSibling(fiber) {
while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
// If it is not host node and, we might have a host node inside it.
// Try to search down until we find one.
- if (node.effectTag & Placement) {
+ if (node.flags & Placement) {
// If we don't have a child, try the siblings instead.
continue siblings;
} // If we don't have a child, try the siblings instead.
@@ -20275,7 +21122,7 @@ function getHostSibling(fiber) {
} // Check if this host node is stable or about to be placed.
- if (!(node.effectTag & Placement)) {
+ if (!(node.flags & Placement)) {
// Found it!
return node.stateNode;
}
@@ -20320,11 +21167,11 @@ function commitPlacement(finishedWork) {
}
- if (parentFiber.effectTag & ContentReset) {
+ if (parentFiber.flags & ContentReset) {
// Reset the text content of the parent before doing any insertions
resetTextContent(parent); // Clear ContentReset from the effect tag
- parentFiber.effectTag &= ~ContentReset;
+ parentFiber.flags &= ~ContentReset;
}
var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
@@ -20440,7 +21287,7 @@ function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
}
if (node.tag === HostComponent || node.tag === HostText) {
- commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the
+ commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the
// node from the tree.
if (currentParentIsContainer) {
@@ -20461,7 +21308,7 @@ function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
continue;
}
} else {
- commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below.
+ commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.
if (node.child !== null) {
node.child.return = node;
@@ -20497,10 +21344,15 @@ function commitDeletion(finishedRoot, current, renderPriorityLevel) {
{
// Recursively delete all host nodes from the parent.
// Detach refs and call componentWillUnmount() on the whole subtree.
- unmountHostComponents(finishedRoot, current, renderPriorityLevel);
+ unmountHostComponents(finishedRoot, current);
}
- detachFiber(current);
+ var alternate = current.alternate;
+ detachFiberMutation(current);
+
+ if (alternate !== null) {
+ detachFiberMutation(alternate);
+ }
}
function commitWork(current, finishedWork) {
@@ -20517,7 +21369,10 @@ function commitWork(current, finishedWork) {
// This prevents sibling component effects from interfering with each other,
// e.g. a destroy function in one component should never override a ref set
// by a create function in another component during the same commit.
- commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
+ {
+ commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
+ }
+
return;
}
@@ -20605,6 +21460,27 @@ function commitWork(current, finishedWork) {
{
return;
}
+
+ case FundamentalComponent:
+ {
+
+ break;
+ }
+
+ case ScopeComponent:
+ {
+
+ break;
+ }
+
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ {
+ var newState = finishedWork.memoizedState;
+ var isHidden = newState !== null;
+ hideOrUnhideAllChildren(finishedWork, isHidden);
+ return;
+ }
}
{
@@ -20616,19 +21492,23 @@ function commitWork(current, finishedWork) {
function commitSuspenseComponent(finishedWork) {
var newState = finishedWork.memoizedState;
- var newDidTimeout;
- var primaryChildParent = finishedWork;
- if (newState === null) {
- newDidTimeout = false;
- } else {
- newDidTimeout = true;
- primaryChildParent = finishedWork.child;
+ if (newState !== null) {
markCommitTimeOfFallback();
- }
- if ( primaryChildParent !== null) {
- hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
+ {
+ // Hide the Offscreen component that contains the primary children. TODO:
+ // Ideally, this effect would have been scheduled on the Offscreen fiber
+ // itself. That's how unhiding works: the Offscreen component schedules an
+ // effect on itself. However, in this case, the component didn't complete,
+ // so the fiber was never added to the effect list in the normal path. We
+ // could have appended it to the effect list in the Suspense component's
+ // second pass, but doing it this way is less complicated. This would be
+ // simpler if we got rid of the effect list and traversed the tree, like
+ // we're planning to do.
+ var primaryChildParent = finishedWork.child;
+ hideOrUnhideAllChildren(primaryChildParent, true);
+ }
}
}
@@ -20654,12 +21534,12 @@ function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
}
function attachSuspenseRetryListeners(finishedWork) {
- // If this boundary just timed out, then it will have a set of thenables.
- // For each thenable, attach a listener so that when it resolves, React
+ // If this boundary just timed out, then it will have a set of wakeables.
+ // For each wakeable, attach a listener so that when it resolves, React
// attempts to re-render the boundary in the primary (pre-timeout) state.
- var thenables = finishedWork.updateQueue;
+ var wakeables = finishedWork.updateQueue;
- if (thenables !== null) {
+ if (wakeables !== null) {
finishedWork.updateQueue = null;
var retryCache = finishedWork.stateNode;
@@ -20667,327 +21547,74 @@ function attachSuspenseRetryListeners(finishedWork) {
retryCache = finishedWork.stateNode = new PossiblyWeakSet();
}
- thenables.forEach(function (thenable) {
+ wakeables.forEach(function (wakeable) {
// Memoize using the boundary fiber to prevent redundant listeners.
- var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
+ var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
- if (!retryCache.has(thenable)) {
+ if (!retryCache.has(wakeable)) {
{
- if (thenable.__reactDoNotTraceInteractions !== true) {
+ if (wakeable.__reactDoNotTraceInteractions !== true) {
retry = tracing.unstable_wrap(retry);
}
}
- retryCache.add(thenable);
- thenable.then(retry, retry);
+ retryCache.add(wakeable);
+ wakeable.then(retry, retry);
}
});
}
-}
-
-function commitResetTextContent(current) {
-
- resetTextContent(current.stateNode);
-}
-
-var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
-
-function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
- var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.
-
- update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
- // being called "element".
-
- update.payload = {
- element: null
- };
- var error = errorInfo.value;
-
- update.callback = function () {
- onUncaughtError(error);
- logError(fiber, errorInfo);
- };
-
- return update;
-}
-
-function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
- var update = createUpdate(expirationTime, null);
- update.tag = CaptureUpdate;
- var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
-
- if (typeof getDerivedStateFromError === 'function') {
- var error$1 = errorInfo.value;
-
- update.payload = function () {
- logError(fiber, errorInfo);
- return getDerivedStateFromError(error$1);
- };
- }
-
- var inst = fiber.stateNode;
-
- if (inst !== null && typeof inst.componentDidCatch === 'function') {
- update.callback = function callback() {
- {
- markFailedErrorBoundaryForHotReloading(fiber);
- }
-
- if (typeof getDerivedStateFromError !== 'function') {
- // To preserve the preexisting retry behavior of error boundaries,
- // we keep track of which ones already failed during this batch.
- // This gets reset before we yield back to the browser.
- // TODO: Warn in strict mode if getDerivedStateFromError is
- // not defined.
- markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
-
- logError(fiber, errorInfo);
- }
-
- var error$1 = errorInfo.value;
- var stack = errorInfo.stack;
- this.componentDidCatch(error$1, {
- componentStack: stack !== null ? stack : ''
- });
-
- {
- if (typeof getDerivedStateFromError !== 'function') {
- // If componentDidCatch is the only error boundary method defined,
- // then it needs to call setState to recover from errors.
- // If no state update is scheduled then the boundary will swallow the error.
- if (fiber.expirationTime !== Sync) {
- error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
- }
- }
- }
- };
- } else {
- update.callback = function () {
- markFailedErrorBoundaryForHotReloading(fiber);
- };
- }
-
- return update;
-}
+} // This function detects when a Suspense boundary goes from visible to hidden.
+// It returns false if the boundary is already hidden.
+// TODO: Use an effect tag.
-function attachPingListener(root, renderExpirationTime, thenable) {
- // Attach a listener to the promise to "ping" the root and retry. But
- // only if one does not already exist for the current render expiration
- // time (which acts like a "thread ID" here).
- var pingCache = root.pingCache;
- var threadIDs;
- if (pingCache === null) {
- pingCache = root.pingCache = new PossiblyWeakMap$1();
- threadIDs = new Set();
- pingCache.set(thenable, threadIDs);
- } else {
- threadIDs = pingCache.get(thenable);
+function isSuspenseBoundaryBeingHidden(current, finishedWork) {
+ if (current !== null) {
+ var oldState = current.memoizedState;
- if (threadIDs === undefined) {
- threadIDs = new Set();
- pingCache.set(thenable, threadIDs);
+ if (oldState === null || oldState.dehydrated !== null) {
+ var newState = finishedWork.memoizedState;
+ return newState !== null && newState.dehydrated === null;
}
}
- if (!threadIDs.has(renderExpirationTime)) {
- // Memoize using the thread ID to prevent redundant listeners.
- threadIDs.add(renderExpirationTime);
- var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
- thenable.then(ping, ping);
- }
+ return false;
}
-function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
- // The source fiber did not complete.
- sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid.
-
- sourceFiber.firstEffect = sourceFiber.lastEffect = null;
-
- if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
- // This is a thenable.
- var thenable = value;
-
- if ((sourceFiber.mode & BlockingMode) === NoMode) {
- // Reset the memoizedState to what it was before we attempted
- // to render it.
- var currentSource = sourceFiber.alternate;
-
- if (currentSource) {
- sourceFiber.updateQueue = currentSource.updateQueue;
- sourceFiber.memoizedState = currentSource.memoizedState;
- sourceFiber.expirationTime = currentSource.expirationTime;
- } else {
- sourceFiber.updateQueue = null;
- sourceFiber.memoizedState = null;
- }
- }
-
- var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
-
- var _workInProgress = returnFiber;
-
- do {
- if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
- // Found the nearest boundary.
- // Stash the promise on the boundary fiber. If the boundary times out, we'll
- // attach another listener to flip the boundary back to its normal state.
- var thenables = _workInProgress.updateQueue;
-
- if (thenables === null) {
- var updateQueue = new Set();
- updateQueue.add(thenable);
- _workInProgress.updateQueue = updateQueue;
- } else {
- thenables.add(thenable);
- } // If the boundary is outside of blocking mode, we should *not*
- // suspend the commit. Pretend as if the suspended component rendered
- // null and keep rendering. In the commit phase, we'll schedule a
- // subsequent synchronous update to re-render the Suspense.
- //
- // Note: It doesn't matter whether the component that suspended was
- // inside a blocking mode tree. If the Suspense is outside of it, we
- // should *not* suspend the commit.
-
-
- if ((_workInProgress.mode & BlockingMode) === NoMode) {
- _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.
- // But we shouldn't call any lifecycle methods or callbacks. Remove
- // all lifecycle effect tags.
-
- sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);
-
- if (sourceFiber.tag === ClassComponent) {
- var currentSourceFiber = sourceFiber.alternate;
-
- if (currentSourceFiber === null) {
- // This is a new mount. Change the tag so it's not mistaken for a
- // completed class component. For example, we should not call
- // componentWillUnmount if it is deleted.
- sourceFiber.tag = IncompleteClassComponent;
- } else {
- // When we try rendering again, we should not reuse the current fiber,
- // since it's known to be in an inconsistent state. Use a force update to
- // prevent a bail out.
- var update = createUpdate(Sync, null);
- update.tag = ForceUpdate;
- enqueueUpdate(sourceFiber, update);
- }
- } // The source fiber did not complete. Mark it with Sync priority to
- // indicate that it still has pending work.
-
-
- sourceFiber.expirationTime = Sync; // Exit without suspending.
-
- return;
- } // Confirmed that the boundary is in a concurrent mode tree. Continue
- // with the normal suspend path.
- //
- // After this we'll use a set of heuristics to determine whether this
- // render pass will run to completion or restart or "suspend" the commit.
- // The actual logic for this is spread out in different places.
- //
- // This first principle is that if we're going to suspend when we complete
- // a root, then we should also restart if we get an update or ping that
- // might unsuspend it, and vice versa. The only reason to suspend is
- // because you think you might want to restart before committing. However,
- // it doesn't make sense to restart only while in the period we're suspended.
- //
- // Restarting too aggressively is also not good because it starves out any
- // intermediate loading state. So we use heuristics to determine when.
- // Suspense Heuristics
- //
- // If nothing threw a Promise or all the same fallbacks are already showing,
- // then don't suspend/restart.
- //
- // If this is an initial render of a new tree of Suspense boundaries and
- // those trigger a fallback, then don't suspend/restart. We want to ensure
- // that we can show the initial loading state as quickly as possible.
- //
- // If we hit a "Delayed" case, such as when we'd switch from content back into
- // a fallback, then we should always suspend/restart. SuspenseConfig applies to
- // this case. If none is defined, JND is used instead.
- //
- // If we're already showing a fallback and it gets "retried", allowing us to show
- // another level, but there's still an inner boundary that would show a fallback,
- // then we suspend/restart for 500ms since the last time we showed a fallback
- // anywhere in the tree. This effectively throttles progressive loading into a
- // consistent train of commits. This also gives us an opportunity to restart to
- // get to the completed state slightly earlier.
- //
- // If there's ambiguity due to batching it's resolved in preference of:
- // 1) "delayed", 2) "initial render", 3) "retry".
- //
- // We want to ensure that a "busy" state doesn't get force committed. We want to
- // ensure that new initial loading states can commit as soon as possible.
-
-
- attachPingListener(root, renderExpirationTime, thenable);
- _workInProgress.effectTag |= ShouldCapture;
- _workInProgress.expirationTime = renderExpirationTime;
- return;
- } // This boundary already captured during this render. Continue to the next
- // boundary.
-
-
- _workInProgress = _workInProgress.return;
- } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
- // TODO: Use invariant so the message is stripped in prod?
-
-
- value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
- } // We didn't find a boundary that could handle this type of exception. Start
- // over and traverse parent path again, this time treating the exception
- // as an error.
-
-
- renderDidError();
- value = createCapturedValue(value, sourceFiber);
- var workInProgress = returnFiber;
-
- do {
- switch (workInProgress.tag) {
- case HostRoot:
- {
- var _errorInfo = value;
- workInProgress.effectTag |= ShouldCapture;
- workInProgress.expirationTime = renderExpirationTime;
-
- var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);
-
- enqueueCapturedUpdate(workInProgress, _update);
- return;
- }
-
- case ClassComponent:
- // Capture and retry
- var errorInfo = value;
- var ctor = workInProgress.type;
- var instance = workInProgress.stateNode;
-
- if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
- workInProgress.effectTag |= ShouldCapture;
- workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state
-
- var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);
+function commitResetTextContent(current) {
- enqueueCapturedUpdate(workInProgress, _update2);
- return;
- }
+ resetTextContent(current.stateNode);
+}
- break;
- }
+var COMPONENT_TYPE = 0;
+var HAS_PSEUDO_CLASS_TYPE = 1;
+var ROLE_TYPE = 2;
+var TEST_NAME_TYPE = 3;
+var TEXT_TYPE = 4;
- workInProgress = workInProgress.return;
- } while (workInProgress !== null);
+if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor$1 = Symbol.for;
+ COMPONENT_TYPE = symbolFor$1('selector.component');
+ HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');
+ ROLE_TYPE = symbolFor$1('selector.role');
+ TEST_NAME_TYPE = symbolFor$1('selector.test_id');
+ TEXT_TYPE = symbolFor$1('selector.text');
+}
+var commitHooks = [];
+function onCommitRoot$1() {
+ {
+ commitHooks.forEach(function (commitHook) {
+ return commitHook();
+ });
+ }
}
var ceil = Math.ceil;
-var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
+var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
var NoContext =
-/* */
+/* */
0;
var BatchedContext =
/* */
@@ -21007,188 +21634,254 @@ var RenderContext =
var CommitContext =
/* */
32;
+var RetryAfterError =
+/* */
+64;
var RootIncomplete = 0;
var RootFatalErrored = 1;
var RootErrored = 2;
var RootSuspended = 3;
var RootSuspendedWithDelay = 4;
-var RootCompleted = 5;
-// Describes where we are in the React execution stack
+var RootCompleted = 5; // Describes where we are in the React execution stack
+
var executionContext = NoContext; // The root we're working on
var workInProgressRoot = null; // The fiber we're working on
-var workInProgress = null; // The expiration time we're rendering
+var workInProgress = null; // The lanes we're rendering
+
+var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree
+// This is a superset of the lanes we started working on at the root. The only
+// case where it's different from `workInProgressRootRenderLanes` is when we
+// enter a subtree that is hidden and needs to be unhidden: Suspense and
+// Offscreen component.
+//
+// Most things in the work loop should deal with workInProgressRootRenderLanes.
+// Most things in begin/complete phases should deal with subtreeRenderLanes.
-var renderExpirationTime$1 = NoWork; // Whether to root completed, errored, suspended, etc.
+var subtreeRenderLanes = NoLanes;
+var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.
var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown
-var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render.
-// This is conceptually a time stamp but expressed in terms of an ExpirationTime
-// because we deal mostly with expiration times in the hot path, so this avoids
-// the conversion happening in the hot path.
+var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's
+// slightly different than `renderLanes` because `renderLanes` can change as you
+// enter and exit an Offscreen tree. This value is the combination of all render
+// lanes for the entire render phase.
-var workInProgressRootLatestProcessedExpirationTime = Sync;
-var workInProgressRootLatestSuspenseTimeout = Sync;
-var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only
+var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only
// includes unprocessed updates, not work in bailed out children.
-var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately.
-// This flag determines if it might be worthwhile to restart if an opportunity
-// happens latere.
+var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.
+
+var workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.
-var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train
+var workInProgressRootPingedLanes = NoLanes;
+var mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train
// model where we don't commit new loading states in too quick succession.
var globalMostRecentFallbackTime = 0;
-var FALLBACK_THROTTLE_MS = 500;
+var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering
+// more and prefer CPU suspense heuristics instead.
+
+var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU
+// suspense heuristics and opt out of rendering more content.
+
+var RENDER_TIMEOUT_MS = 500;
+
+function resetRenderTimer() {
+ workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;
+}
+
+function getRenderTargetTime() {
+ return workInProgressRootRenderTargetTime;
+}
var nextEffect = null;
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
-var pendingPassiveEffectsRenderPriority = NoPriority;
-var pendingPassiveEffectsExpirationTime = NoWork;
+var pendingPassiveEffectsRenderPriority = NoPriority$1;
+var pendingPassiveEffectsLanes = NoLanes;
+var pendingPassiveHookEffectsMount = [];
+var pendingPassiveHookEffectsUnmount = [];
var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates
var NESTED_UPDATE_LIMIT = 50;
var nestedUpdateCount = 0;
var rootWithNestedUpdates = null;
var NESTED_PASSIVE_UPDATE_LIMIT = 50;
-var nestedPassiveUpdateCount = 0;
-var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times
+var nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes
// during the commit phase. This enables them to be traced across components
// that spawn new work during render. E.g. hidden boundaries, suspended SSR
// hydration or SuspenseList.
+// TODO: Can use a bitmask instead of an array
+
+var spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their
+// event times as simultaneous, even if the actual clock time has advanced
+// between the first and second call.
-var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start
-// time). However, if two updates are scheduled within the same event, we
-// should treat their start times as simultaneous, even if the actual clock
-// time has advanced between the first and second call.
-// In other words, because expiration times determine how updates are batched,
-// we want all updates of like priority that occur within the same event to
-// receive the same expiration time. Otherwise we get tearing.
+var currentEventTime = NoTimestamp;
+var currentEventWipLanes = NoLanes;
+var currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
+// We warn about state updates for unmounted components differently in this case.
-var currentEventTime = NoWork;
-function requestCurrentTimeForUpdate() {
+var isFlushingPassiveEffects = false;
+var focusedInstanceHandle = null;
+var shouldFireAfterActiveInstanceBlur = false;
+function getWorkInProgressRoot() {
+ return workInProgressRoot;
+}
+function requestEventTime() {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
// We're inside React, so it's fine to read the actual time.
- return msToExpirationTime(now());
+ return now();
} // We're not inside React, so we may be in the middle of a browser event.
- if (currentEventTime !== NoWork) {
+ if (currentEventTime !== NoTimestamp) {
// Use the same start time for all updates until we enter React again.
return currentEventTime;
} // This is the first update since React yielded. Compute a new start time.
- currentEventTime = msToExpirationTime(now());
+ currentEventTime = now();
return currentEventTime;
}
-function getCurrentTime() {
- return msToExpirationTime(now());
-}
-function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
+function requestUpdateLane(fiber) {
+ // Special cases
var mode = fiber.mode;
if ((mode & BlockingMode) === NoMode) {
- return Sync;
- }
+ return SyncLane;
+ } else if ((mode & ConcurrentMode) === NoMode) {
+ return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
+ } // The algorithm for assigning an update to a lane should be stable for all
+ // updates at the same priority within the same event. To do this, the inputs
+ // to the algorithm must be the same. For example, we use the `renderLanes`
+ // to avoid choosing a lane that is already in the middle of rendering.
+ //
+ // However, the "included" lanes could be mutated in between updates in the
+ // same event, like if you perform an update inside `flushSync`. Or any other
+ // code path that might call `prepareFreshStack`.
+ //
+ // The trick we use is to cache the first of each of these inputs within an
+ // event. Then reset the cached values once we can be sure the event is over.
+ // Our heuristic for that is whenever we enter a concurrent work loop.
+ //
+ // We'll do the same for `currentEventPendingLanes` below.
- var priorityLevel = getCurrentPriorityLevel();
- if ((mode & ConcurrentMode) === NoMode) {
- return priorityLevel === ImmediatePriority ? Sync : Batched;
+ if (currentEventWipLanes === NoLanes) {
+ currentEventWipLanes = workInProgressRootIncludedLanes;
}
- if ((executionContext & RenderContext) !== NoContext) {
- // Use whatever time we're already rendering
- // TODO: Should there be a way to opt out, like with `runWithPriority`?
- return renderExpirationTime$1;
- }
+ var isTransition = requestCurrentTransition() !== NoTransition;
- var expirationTime;
+ if (isTransition) {
+ if (currentEventPendingLanes !== NoLanes) {
+ currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;
+ }
- if (suspenseConfig !== null) {
- // Compute an expiration time based on the Suspense timeout.
- expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
- } else {
- // Compute an expiration time based on the Scheduler priority.
- switch (priorityLevel) {
- case ImmediatePriority:
- expirationTime = Sync;
- break;
+ return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);
+ } // TODO: Remove this dependency on the Scheduler priority.
+ // To do that, we're replacing it with an update lane priority.
- case UserBlockingPriority$1:
- // TODO: Rename this to computeUserBlockingExpiration
- expirationTime = computeInteractiveExpiration(currentTime);
- break;
- case NormalPriority:
- case LowPriority:
- // TODO: Handle LowPriority
- // TODO: Rename this to... something better.
- expirationTime = computeAsyncExpiration(currentTime);
- break;
+ var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.
+ // This couples React to the Scheduler internals, so we're replacing it
+ // with the currentUpdateLanePriority above. As an example of how this
+ // could be problematic, if we're not inside `Scheduler.runWithPriority`,
+ // then we'll get the priority of the current running Scheduler task,
+ // which is probably not what we want.
- case IdlePriority:
- expirationTime = Idle;
- break;
+ var lane;
- default:
- {
- {
- throw Error( "Expected a valid priority level" );
- }
- }
+ if ( // TODO: Temporary. We're removing the concept of discrete updates.
+ (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {
+ lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);
+ } else {
+ var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);
- }
- } // If we're in the middle of rendering a tree, do not update at the same
- // expiration time that is already rendering.
- // TODO: We shouldn't have to do this if the update is on a different root.
- // Refactor computeExpirationForFiber + scheduleUpdate so we have access to
- // the root when we check for this condition.
+ lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);
+ }
+ return lane;
+}
+
+function requestRetryLane(fiber) {
+ // This is a fork of `requestUpdateLane` designed specifically for Suspense
+ // "retries" — a special update that attempts to flip a Suspense boundary
+ // from its placeholder state to its primary/resolved state.
+ // Special cases
+ var mode = fiber.mode;
- if (workInProgressRoot !== null && expirationTime === renderExpirationTime$1) {
- // This is a trick to move this update into a separate batch
- expirationTime -= 1;
+ if ((mode & BlockingMode) === NoMode) {
+ return SyncLane;
+ } else if ((mode & ConcurrentMode) === NoMode) {
+ return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
+ } // See `requestUpdateLane` for explanation of `currentEventWipLanes`
+
+
+ if (currentEventWipLanes === NoLanes) {
+ currentEventWipLanes = workInProgressRootIncludedLanes;
}
- return expirationTime;
+ return findRetryLane(currentEventWipLanes);
}
-function scheduleUpdateOnFiber(fiber, expirationTime) {
+
+function scheduleUpdateOnFiber(fiber, lane, eventTime) {
checkForNestedUpdates();
warnAboutRenderPhaseUpdatesInDEV(fiber);
- var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
+ var root = markUpdateLaneFromFiberToRoot(fiber, lane);
if (root === null) {
warnAboutUpdateOnUnmountedFiberInDEV(fiber);
- return;
- }
+ return null;
+ } // Mark that the root has a pending update.
+
+
+ markRootUpdated(root, lane, eventTime);
+
+ if (root === workInProgressRoot) {
+ // Received an update to a tree that's in the middle of rendering. Mark
+ // that there was an interleaved update work on this root. Unless the
+ // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
+ // phase update. In that case, we don't treat render phase updates as if
+ // they were interleaved, for backwards compat reasons.
+ {
+ workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);
+ }
- checkForInterruption(fiber, expirationTime);
- recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the
+ if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
+ // The root already suspended with a delay, which means this render
+ // definitely won't finish. Since we have a new update, let's mark it as
+ // suspended now, right before marking the incoming update. This has the
+ // effect of interrupting the current render and switching to the update.
+ // TODO: Make sure this doesn't override pings that happen while we've
+ // already started rendering.
+ markRootSuspended$1(root, workInProgressRootRenderLanes);
+ }
+ } // TODO: requestUpdateLanePriority also reads the priority. Pass the
// priority as an argument to that function and this one.
+
var priorityLevel = getCurrentPriorityLevel();
- if (expirationTime === Sync) {
+ if (lane === SyncLane) {
if ( // Check if we're inside unbatchedUpdates
(executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
(executionContext & (RenderContext | CommitContext)) === NoContext) {
// Register pending interactions on the root to avoid losing traced interaction data.
- schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
+ schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
// root inside of batchedUpdates should be synchronous, but layout updates
// should be deferred until the end of the batch.
performSyncWorkOnRoot(root);
} else {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, expirationTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, lane);
if (executionContext === NoContext) {
// Flush the synchronous work now, unless we're already working or inside
@@ -21196,314 +21889,242 @@ function scheduleUpdateOnFiber(fiber, expirationTime) {
// scheduleCallbackForFiber to preserve the ability to schedule a callback
// without immediately flushing it. We only do this for user-initiated
// updates, to preserve historical behavior of legacy mode.
+ resetRenderTimer();
flushSyncCallbackQueue();
}
}
} else {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, expirationTime);
- }
+ // Schedule a discrete update but only if it's not Sync.
+ if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
+ // discrete, even inside a discrete event.
+ priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {
+ // This is the result of a discrete event. Track the lowest priority
+ // discrete update per root so we can flush them early, if needed.
+ if (rootsWithPendingDiscreteUpdates === null) {
+ rootsWithPendingDiscreteUpdates = new Set([root]);
+ } else {
+ rootsWithPendingDiscreteUpdates.add(root);
+ }
+ } // Schedule other updates after in case the callback is sync.
- if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
- // discrete, even inside a discrete event.
- priorityLevel === UserBlockingPriority$1 || priorityLevel === ImmediatePriority)) {
- // This is the result of a discrete event. Track the lowest priority
- // discrete update per root so we can flush them early, if needed.
- if (rootsWithPendingDiscreteUpdates === null) {
- rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);
- } else {
- var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);
- if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {
- rootsWithPendingDiscreteUpdates.set(root, expirationTime);
- }
- }
- }
-}
-var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, lane);
+ } // We use this when assigning a lane for a transition inside
+ // `requestUpdateLane`. We assume it's the same as the root being updated,
+ // since in the common case of a single root app it probably is. If it's not
+ // the same root, then it's not a huge deal, we just might batch more stuff
+ // together more than necessary.
+
+
+ mostRecentlyUpdatedRoot = root;
+} // This is split into a separate function so we can mark a fiber with pending
// work without treating it as a typical update that originates from an event;
// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
// on a fiber.
-function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
- // Update the source fiber's expiration time
- if (fiber.expirationTime < expirationTime) {
- fiber.expirationTime = expirationTime;
- }
+function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
+ // Update the source fiber's lanes
+ sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
+ var alternate = sourceFiber.alternate;
- var alternate = fiber.alternate;
+ if (alternate !== null) {
+ alternate.lanes = mergeLanes(alternate.lanes, lane);
+ }
- if (alternate !== null && alternate.expirationTime < expirationTime) {
- alternate.expirationTime = expirationTime;
+ {
+ if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
+ warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
+ }
} // Walk the parent path to the root and update the child expiration time.
- var node = fiber.return;
- var root = null;
-
- if (node === null && fiber.tag === HostRoot) {
- root = fiber.stateNode;
- } else {
- while (node !== null) {
- alternate = node.alternate;
+ var node = sourceFiber;
+ var parent = sourceFiber.return;
- if (node.childExpirationTime < expirationTime) {
- node.childExpirationTime = expirationTime;
+ while (parent !== null) {
+ parent.childLanes = mergeLanes(parent.childLanes, lane);
+ alternate = parent.alternate;
- if (alternate !== null && alternate.childExpirationTime < expirationTime) {
- alternate.childExpirationTime = expirationTime;
+ if (alternate !== null) {
+ alternate.childLanes = mergeLanes(alternate.childLanes, lane);
+ } else {
+ {
+ if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
+ warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
}
- } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
- alternate.childExpirationTime = expirationTime;
}
-
- if (node.return === null && node.tag === HostRoot) {
- root = node.stateNode;
- break;
- }
-
- node = node.return;
}
- }
-
- if (root !== null) {
- if (workInProgressRoot === root) {
- // Received an update to a tree that's in the middle of rendering. Mark
- // that's unprocessed work on this root.
- markUnprocessedUpdateTime(expirationTime);
-
- if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
- // The root already suspended with a delay, which means this render
- // definitely won't finish. Since we have a new update, let's mark it as
- // suspended now, right before marking the incoming update. This has the
- // effect of interrupting the current render and switching to the update.
- // TODO: This happens to work when receiving an update during the render
- // phase, because of the trick inside computeExpirationForFiber to
- // subtract 1 from `renderExpirationTime` to move it into a
- // separate bucket. But we should probably model it with an exception,
- // using the same mechanism we use to force hydration of a subtree.
- // TODO: This does not account for low pri updates that were already
- // scheduled before the root started rendering. Need to track the next
- // pending expiration time (perhaps by backtracking the return path) and
- // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.
- markRootSuspendedAtTime(root, renderExpirationTime$1);
- }
- } // Mark that the root has a pending update.
-
- markRootUpdatedAtTime(root, expirationTime);
+ node = parent;
+ parent = parent.return;
}
- return root;
-}
-
-function getNextRootExpirationTimeToWorkOn(root) {
- // Determines the next expiration time that the root should render, taking
- // into account levels that may be suspended, or levels that may have
- // received a ping.
- var lastExpiredTime = root.lastExpiredTime;
-
- if (lastExpiredTime !== NoWork) {
- return lastExpiredTime;
- } // "Pending" refers to any update that hasn't committed yet, including if it
- // suspended. The "suspended" range is therefore a subset.
-
-
- var firstPendingTime = root.firstPendingTime;
-
- if (!isRootSuspendedAtTime(root, firstPendingTime)) {
- // The highest priority pending time is not suspended. Let's work on that.
- return firstPendingTime;
- } // If the first pending time is suspended, check if there's a lower priority
- // pending level that we know about. Or check if we received a ping. Work
- // on whichever is higher priority.
-
-
- var lastPingedTime = root.lastPingedTime;
- var nextKnownPendingLevel = root.nextKnownPendingLevel;
- var nextLevel = lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel;
-
- if ( nextLevel <= Idle && firstPendingTime !== nextLevel) {
- // Don't work on Idle/Never priority unless everything else is committed.
- return NoWork;
+ if (node.tag === HostRoot) {
+ var root = node.stateNode;
+ return root;
+ } else {
+ return null;
}
-
- return nextLevel;
} // Use this function to schedule a task for a root. There's only one task per
-// root; if a task was already scheduled, we'll check to make sure the
-// expiration time of the existing task is the same as the expiration time of
-// the next level that the root has work on. This function is called on every
-// update, and right before exiting a task.
+// root; if a task was already scheduled, we'll check to make sure the priority
+// of the existing task is the same as the priority of the next level that the
+// root has work on. This function is called on every update, and right before
+// exiting a task.
-function ensureRootIsScheduled(root) {
- var lastExpiredTime = root.lastExpiredTime;
+function ensureRootIsScheduled(root, currentTime) {
+ var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as
+ // expired so we know to work on those next.
- if (lastExpiredTime !== NoWork) {
- // Special case: Expired work should flush synchronously.
- root.callbackExpirationTime = Sync;
- root.callbackPriority = ImmediatePriority;
- root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
- return;
- }
+ markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.
+
+ var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.
- var expirationTime = getNextRootExpirationTimeToWorkOn(root);
- var existingCallbackNode = root.callbackNode;
+ var newCallbackPriority = returnNextLanesPriority();
- if (expirationTime === NoWork) {
- // There's nothing to work on.
+ if (nextLanes === NoLanes) {
+ // Special case: There's nothing to work on.
if (existingCallbackNode !== null) {
+ cancelCallback(existingCallbackNode);
root.callbackNode = null;
- root.callbackExpirationTime = NoWork;
- root.callbackPriority = NoPriority;
+ root.callbackPriority = NoLanePriority;
}
return;
- } // TODO: If this is an update, we already read the current time. Pass the
- // time as an argument.
+ } // Check if there's an existing task. We may be able to reuse it.
- var currentTime = requestCurrentTimeForUpdate();
- var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and
- // expiration time. Otherwise, we'll cancel it and schedule a new one.
-
if (existingCallbackNode !== null) {
var existingCallbackPriority = root.callbackPriority;
- var existingCallbackExpirationTime = root.callbackExpirationTime;
- if ( // Callback must have the exact same expiration time.
- existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.
- existingCallbackPriority >= priorityLevel) {
- // Existing callback is sufficient.
+ if (existingCallbackPriority === newCallbackPriority) {
+ // The priority hasn't changed. We can reuse the existing task. Exit.
return;
- } // Need to schedule a new task.
- // TODO: Instead of scheduling a new task, we should be able to change the
- // priority of the existing one.
+ } // The priority changed. Cancel the existing callback. We'll schedule a new
+ // one below.
cancelCallback(existingCallbackNode);
- }
+ } // Schedule a new callback.
+
- root.callbackExpirationTime = expirationTime;
- root.callbackPriority = priorityLevel;
- var callbackNode;
+ var newCallbackNode;
- if (expirationTime === Sync) {
- // Sync React callbacks are scheduled on a special internal queue
- callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
+ if (newCallbackPriority === SyncLanePriority) {
+ // Special case: Sync React callbacks are scheduled on a special
+ // internal queue
+ newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
+ } else if (newCallbackPriority === SyncBatchedLanePriority) {
+ newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));
} else {
- callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects
- // ordering because tasks are processed in timeout order.
- {
- timeout: expirationTimeToMs(expirationTime) - now()
- });
+ var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);
+ newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));
}
- root.callbackNode = callbackNode;
+ root.callbackPriority = newCallbackPriority;
+ root.callbackNode = newCallbackNode;
} // This is the entry point for every concurrent task, i.e. anything that
// goes through Scheduler.
-function performConcurrentWorkOnRoot(root, didTimeout) {
+function performConcurrentWorkOnRoot(root) {
// Since we know we're in a React event, we can clear the current
// event time. The next update will compute a new event time.
- currentEventTime = NoWork;
+ currentEventTime = NoTimestamp;
+ currentEventWipLanes = NoLanes;
+ currentEventPendingLanes = NoLanes;
+
+ if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
+ {
+ throw Error( "Should not already be working." );
+ }
+ } // Flush any pending passive effects before deciding which lanes to work on,
+ // in case they schedule additional work.
- if (didTimeout) {
- // The render task took too long to complete. Mark the current time as
- // expired to synchronously render all expired work in a single batch.
- var currentTime = requestCurrentTimeForUpdate();
- markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback.
- ensureRootIsScheduled(root);
- return null;
+ var originalCallbackNode = root.callbackNode;
+ var didFlushPassiveEffects = flushPassiveEffects();
+
+ if (didFlushPassiveEffects) {
+ // Something in the passive effect phase may have canceled the current task.
+ // Check if the task node for this root was changed.
+ if (root.callbackNode !== originalCallbackNode) {
+ // The current task was canceled. Exit. We don't need to call
+ // `ensureRootIsScheduled` because the check above implies either that
+ // there's a new task, or that there's no remaining work on this root.
+ return null;
+ }
} // Determine the next expiration time to work on, using the fields stored
// on the root.
- var expirationTime = getNextRootExpirationTimeToWorkOn(root);
+ var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
- if (expirationTime !== NoWork) {
- var originalCallbackNode = root.callbackNode;
+ if (lanes === NoLanes) {
+ // Defensive coding. This is never expected to happen.
+ return null;
+ }
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
+ var exitStatus = renderRootConcurrent(root, lanes);
- flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
+ if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
+ // The render included lanes that were updated during the render phase.
+ // For example, when unhiding a hidden tree, we include all the lanes
+ // that were previously skipped when the tree was hidden. That set of
+ // lanes is a superset of the lanes we started rendering with.
+ //
+ // So we'll throw out the current work and restart.
+ prepareFreshStack(root, NoLanes);
+ } else if (exitStatus !== RootIncomplete) {
+ if (exitStatus === RootErrored) {
+ executionContext |= RetryAfterError; // If an error occurred during hydration,
+ // discard server response and fall back to client side render.
- if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
- prepareFreshStack(root, expirationTime);
- startWorkOnPendingInteractions(root, expirationTime);
- } // If we have a work-in-progress fiber, it means there's still work to do
- // in this root.
+ if (root.hydrate) {
+ root.hydrate = false;
+ clearContainer(root.containerInfo);
+ } // If something threw an error, try rendering one more time. We'll render
+ // synchronously to block concurrent data mutations, and we'll includes
+ // all pending updates are included. If it still fails after the second
+ // attempt, we'll give up and commit the resulting tree.
- if (workInProgress !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher();
- var prevInteractions = pushInteractions(root);
- startWorkLoopTimer(workInProgress);
+ lanes = getLanesToRetrySynchronouslyOnError(root);
- do {
- try {
- workLoopConcurrent();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
-
- resetContextDependencies();
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
-
- {
- popInteractions(prevInteractions);
+ if (lanes !== NoLanes) {
+ exitStatus = renderRootSync(root, lanes);
}
+ }
- if (workInProgressRootExitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- stopInterruptedWorkLoopTimer();
- prepareFreshStack(root, expirationTime);
- markRootSuspendedAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- throw fatalError;
- }
+ if (exitStatus === RootFatalErrored) {
+ var fatalError = workInProgressRootFatalError;
+ prepareFreshStack(root, NoLanes);
+ markRootSuspended$1(root, lanes);
+ ensureRootIsScheduled(root, now());
+ throw fatalError;
+ } // We now have a consistent tree. The next step is either to commit it,
+ // or, if something suspended, wait to commit it after a timeout.
- if (workInProgress !== null) {
- // There's still work left over. Exit without committing.
- stopInterruptedWorkLoopTimer();
- } else {
- // We now have a consistent tree. The next step is either to commit it,
- // or, if something suspended, wait to commit it after a timeout.
- stopFinishedWorkLoopTimer();
- var finishedWork = root.finishedWork = root.current.alternate;
- root.finishedExpirationTime = expirationTime;
- finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime);
- }
- ensureRootIsScheduled(root);
+ var finishedWork = root.current.alternate;
+ root.finishedWork = finishedWork;
+ root.finishedLanes = lanes;
+ finishConcurrentRender(root, exitStatus, lanes);
+ }
- if (root.callbackNode === originalCallbackNode) {
- // The task node scheduled for this root is the same one that's
- // currently executed. Need to return a continuation.
- return performConcurrentWorkOnRoot.bind(null, root);
- }
- }
+ ensureRootIsScheduled(root, now());
+
+ if (root.callbackNode === originalCallbackNode) {
+ // The task node scheduled for this root is the same one that's
+ // currently executed. Need to return a continuation.
+ return performConcurrentWorkOnRoot.bind(null, root);
}
return null;
}
-function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) {
- // Set this to null to indicate there's no in-progress render.
- workInProgressRoot = null;
-
+function finishConcurrentRender(root, exitStatus, lanes) {
switch (exitStatus) {
case RootIncomplete:
case RootFatalErrored:
@@ -21520,70 +22141,40 @@ function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime)
case RootErrored:
{
- // If this was an async render, the error may have happened due to
- // a mutation in a concurrent event. Try rendering one more time,
- // synchronously, to see if the error goes away. If there are
- // lower priority updates, let's include those, too, in case they
- // fix the inconsistency. Render at Idle to include all updates.
- // If it was Idle or Never or some not-yet-invented time, render
- // at that time.
- markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous
- // and therefore not hit this path again.
-
+ // We should have already attempted to retry this tree. If we reached
+ // this point, it errored again. Commit it.
+ commitRoot(root);
break;
}
case RootSuspended:
{
- markRootSuspendedAtTime(root, expirationTime);
- var lastSuspendedTime = root.lastSuspendedTime;
-
- if (expirationTime === lastSuspendedTime) {
- root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
- } // We have an acceptable loading state. We need to figure out if we
+ markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we
// should immediately commit it or wait a bit.
- // If we have processed new updates during this render, we may now
- // have a new loading state ready. We want to ensure that we commit
- // that as soon as possible.
-
-
- var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;
- if (hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current)) {
- // If we have not processed any new updates during this pass, then
- // this is either a retry of an existing fallback state or a
- // hidden tree. Hidden trees shouldn't be batched with other work
- // and after that's fixed it can only be a retry. We're going to
- // throttle committing retries so that we don't show too many
- // loading states too quickly.
+ if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
+ !shouldForceFlushFallbacksInDEV()) {
+ // This render only included retries, no updates. Throttle committing
+ // retries so that we don't show too many loading states too quickly.
var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
if (msUntilTimeout > 10) {
- if (workInProgressRootHasPendingPing) {
- var lastPingedTime = root.lastPingedTime;
-
- if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) {
- // This render was pinged but we didn't get to restart
- // earlier so try restarting now instead.
- root.lastPingedTime = expirationTime;
- prepareFreshStack(root, expirationTime);
- break;
- }
- }
+ var nextLanes = getNextLanes(root, NoLanes);
- var nextTime = getNextRootExpirationTimeToWorkOn(root);
-
- if (nextTime !== NoWork && nextTime !== expirationTime) {
+ if (nextLanes !== NoLanes) {
// There's additional work on this root.
break;
}
- if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) {
+ var suspendedLanes = root.suspendedLanes;
+
+ if (!isSubsetOfLanes(suspendedLanes, lanes)) {
// We should prefer to render the fallback of at the last
// suspended level. Ping the last suspended level to try
// rendering it again.
- root.lastPingedTime = lastSuspendedTime;
+ // FIXME: What if the suspended lanes are Idle? Should not restart.
+ var eventTime = requestEventTime();
+ markRootPinged(root, suspendedLanes);
break;
} // The render is suspended, it hasn't timed out, and there's no
// lower priority work to do. Instead of committing the fallback
@@ -21602,86 +22193,36 @@ function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime)
case RootSuspendedWithDelay:
{
- markRootSuspendedAtTime(root, expirationTime);
- var _lastSuspendedTime = root.lastSuspendedTime;
+ markRootSuspended$1(root, lanes);
- if (expirationTime === _lastSuspendedTime) {
- root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
+ if (includesOnlyTransitions(lanes)) {
+ // This is a transition, so we should exit without committing a
+ // placeholder and without scheduling a timeout. Delay indefinitely
+ // until we receive more data.
+ break;
}
- if ( // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current)) {
- // We're suspended in a state that should be avoided. We'll try to
- // avoid committing it for as long as the timeouts let us.
- if (workInProgressRootHasPendingPing) {
- var _lastPingedTime = root.lastPingedTime;
-
- if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) {
- // This render was pinged but we didn't get to restart earlier
- // so try restarting now instead.
- root.lastPingedTime = expirationTime;
- prepareFreshStack(root, expirationTime);
- break;
- }
- }
+ if (!shouldForceFlushFallbacksInDEV()) {
+ // This is not a transition, but we did trigger an avoided state.
+ // Schedule a placeholder to display after a short delay, using the Just
+ // Noticeable Difference.
+ // TODO: Is the JND optimization worth the added complexity? If this is
+ // the only reason we track the event time, then probably not.
+ // Consider removing.
+ var mostRecentEventTime = getMostRecentEventTime(root, lanes);
+ var eventTimeMs = mostRecentEventTime;
+ var timeElapsedMs = now() - eventTimeMs;
- var _nextTime = getNextRootExpirationTimeToWorkOn(root);
-
- if (_nextTime !== NoWork && _nextTime !== expirationTime) {
- // There's additional work on this root.
- break;
- }
-
- if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) {
- // We should prefer to render the fallback of at the last
- // suspended level. Ping the last suspended level to try
- // rendering it again.
- root.lastPingedTime = _lastSuspendedTime;
- break;
- }
-
- var _msUntilTimeout;
-
- if (workInProgressRootLatestSuspenseTimeout !== Sync) {
- // We have processed a suspense config whose expiration time we
- // can use as the timeout.
- _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();
- } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {
- // This should never normally happen because only new updates
- // cause delayed states, so we should have processed something.
- // However, this could also happen in an offscreen tree.
- _msUntilTimeout = 0;
- } else {
- // If we don't have a suspense config, we're going to use a
- // heuristic to determine how long we can suspend.
- var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);
- var currentTimeMs = now();
- var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;
- var timeElapsed = currentTimeMs - eventTimeMs;
-
- if (timeElapsed < 0) {
- // We get this wrong some time since we estimate the time.
- timeElapsed = 0;
- }
-
- _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the
- // event time is exact instead of inferred from expiration time
- // we don't need this.
-
- if (timeUntilExpirationMs < _msUntilTimeout) {
- _msUntilTimeout = timeUntilExpirationMs;
- }
- } // Don't bother with a very short suspense time.
+ var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.
if (_msUntilTimeout > 10) {
- // The render is suspended, it hasn't timed out, and there's no
- // lower priority work to do. Instead of committing the fallback
- // immediately, wait for more data to arrive.
+ // Instead of committing the fallback immediately, wait for more data
+ // to arrive.
root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
break;
}
- } // The work expired. Commit immediately.
+ } // Commit the placeholder.
commitRoot(root);
@@ -21691,21 +22232,6 @@ function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime)
case RootCompleted:
{
// The work completed. Ready to commit.
- if ( // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {
- // If we have exceeded the minimum loading delay, which probably
- // means we have shown a spinner already, we might have to suspend
- // a bit longer to ensure that the spinner is shown for
- // enough time.
- var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);
-
- if (_msUntilTimeout2 > 10) {
- markRootSuspendedAtTime(root, expirationTime);
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);
- break;
- }
- }
-
commitRoot(root);
break;
}
@@ -21719,93 +22245,93 @@ function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime)
}
}
}
+}
+
+function markRootSuspended$1(root, suspendedLanes) {
+ // When suspending, we should always exclude lanes that were pinged or (more
+ // rarely, since we try to avoid it) updated during the render phase.
+ // TODO: Lol maybe there's a better way to factor this besides this
+ // obnoxiously named function :)
+ suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
+ suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);
+ markRootSuspended(root, suspendedLanes);
} // This is the entry point for synchronous tasks that don't go
// through Scheduler
function performSyncWorkOnRoot(root) {
- // Check if there's expired work on this root. Otherwise, render at Sync.
- var lastExpiredTime = root.lastExpiredTime;
- var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync;
-
if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
{
throw Error( "Should not already be working." );
}
}
- flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
+ flushPassiveEffects();
+ var lanes;
+ var exitStatus;
+
+ if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {
+ // There's a partial tree, and at least one of its lanes has expired. Finish
+ // rendering it before rendering the rest of the expired work.
+ lanes = workInProgressRootRenderLanes;
+ exitStatus = renderRootSync(root, lanes);
+
+ if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
+ // The render included lanes that were updated during the render phase.
+ // For example, when unhiding a hidden tree, we include all the lanes
+ // that were previously skipped when the tree was hidden. That set of
+ // lanes is a superset of the lanes we started rendering with.
+ //
+ // Note that this only happens when part of the tree is rendered
+ // concurrently. If the whole tree is rendered synchronously, then there
+ // are no interleaved events.
+ lanes = getNextLanes(root, lanes);
+ exitStatus = renderRootSync(root, lanes);
+ }
+ } else {
+ lanes = getNextLanes(root, NoLanes);
+ exitStatus = renderRootSync(root, lanes);
+ }
- if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
- prepareFreshStack(root, expirationTime);
- startWorkOnPendingInteractions(root, expirationTime);
- } // If we have a work-in-progress fiber, it means there's still work to do
- // in this root.
+ if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
+ executionContext |= RetryAfterError; // If an error occurred during hydration,
+ // discard server response and fall back to client side render.
+ if (root.hydrate) {
+ root.hydrate = false;
+ clearContainer(root.containerInfo);
+ } // If something threw an error, try rendering one more time. We'll render
+ // synchronously to block concurrent data mutations, and we'll includes
+ // all pending updates are included. If it still fails after the second
+ // attempt, we'll give up and commit the resulting tree.
- if (workInProgress !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher();
- var prevInteractions = pushInteractions(root);
- startWorkLoopTimer(workInProgress);
- do {
- try {
- workLoopSync();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
+ lanes = getLanesToRetrySynchronouslyOnError(root);
- resetContextDependencies();
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
-
- {
- popInteractions(prevInteractions);
+ if (lanes !== NoLanes) {
+ exitStatus = renderRootSync(root, lanes);
}
+ }
- if (workInProgressRootExitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- stopInterruptedWorkLoopTimer();
- prepareFreshStack(root, expirationTime);
- markRootSuspendedAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- throw fatalError;
- }
+ if (exitStatus === RootFatalErrored) {
+ var fatalError = workInProgressRootFatalError;
+ prepareFreshStack(root, NoLanes);
+ markRootSuspended$1(root, lanes);
+ ensureRootIsScheduled(root, now());
+ throw fatalError;
+ } // We now have a consistent tree. Because this is a sync render, we
+ // will commit it even if something suspended.
- if (workInProgress !== null) {
- // This is a sync render, so we should have finished the whole tree.
- {
- {
- throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } else {
- // We now have a consistent tree. Because this is a sync render, we
- // will commit it even if something suspended.
- stopFinishedWorkLoopTimer();
- root.finishedWork = root.current.alternate;
- root.finishedExpirationTime = expirationTime;
- finishSyncRender(root);
- } // Before exiting, make sure there's a callback scheduled for the next
- // pending level.
+ var finishedWork = root.current.alternate;
+ root.finishedWork = finishedWork;
+ root.finishedLanes = lanes;
+ commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next
+ // pending level.
- ensureRootIsScheduled(root);
- }
-
+ ensureRootIsScheduled(root, now());
return null;
}
-
-function finishSyncRender(root) {
- // Set this to null to indicate there's no in-progress render.
- workInProgressRoot = null;
- commitRoot(root);
-}
function flushDiscreteUpdates() {
// TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
// However, `act` uses `batchedUpdates`, so there's no way to distinguish
@@ -21829,9 +22355,6 @@ function flushDiscreteUpdates() {
flushPassiveEffects();
}
-function syncUpdates(fn, a, b, c) {
- return runWithPriority$1(ImmediatePriority, fn.bind(null, a, b, c));
-}
function flushPendingDiscreteUpdates() {
if (rootsWithPendingDiscreteUpdates !== null) {
@@ -21839,13 +22362,14 @@ function flushPendingDiscreteUpdates() {
// immediately flush them.
var roots = rootsWithPendingDiscreteUpdates;
rootsWithPendingDiscreteUpdates = null;
- roots.forEach(function (expirationTime, root) {
- markRootExpiredAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- }); // Now flush the immediate queue.
+ roots.forEach(function (root) {
+ markDiscreteUpdatesExpired(root);
+ ensureRootIsScheduled(root, now());
+ });
+ } // Now flush the immediate queue.
- flushSyncCallbackQueue();
- }
+
+ flushSyncCallbackQueue();
}
function batchedUpdates$1(fn, a) {
@@ -21859,6 +22383,7 @@ function batchedUpdates$1(fn, a) {
if (executionContext === NoContext) {
// Flush the immediate callbacks that were scheduled during this batch
+ resetRenderTimer();
flushSyncCallbackQueue();
}
}
@@ -21874,6 +22399,7 @@ function batchedEventUpdates$1(fn, a) {
if (executionContext === NoContext) {
// Flush the immediate callbacks that were scheduled during this batch
+ resetRenderTimer();
flushSyncCallbackQueue();
}
}
@@ -21882,15 +22408,17 @@ function discreteUpdates$1(fn, a, b, c, d) {
var prevExecutionContext = executionContext;
executionContext |= DiscreteEventContext;
- try {
- // Should this
- return runWithPriority$1(UserBlockingPriority$1, fn.bind(null, a, b, c, d));
- } finally {
- executionContext = prevExecutionContext;
+ {
+ try {
+ return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));
+ } finally {
+ executionContext = prevExecutionContext;
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
+ if (executionContext === NoContext) {
+ // Flush the immediate callbacks that were scheduled during this batch
+ resetRenderTimer();
+ flushSyncCallbackQueue();
+ }
}
}
}
@@ -21906,36 +22434,53 @@ function unbatchedUpdates(fn, a) {
if (executionContext === NoContext) {
// Flush the immediate callbacks that were scheduled during this batch
+ resetRenderTimer();
flushSyncCallbackQueue();
}
}
}
function flushSync(fn, a) {
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
+ var prevExecutionContext = executionContext;
+
+ if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {
{
- {
- throw Error( "flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering." );
- }
+ error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
}
+
+ return fn(a);
}
- var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
- try {
- return runWithPriority$1(ImmediatePriority, fn.bind(null, a));
- } finally {
- executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
- // Note that this will happen even if batchedUpdates is higher up
- // the stack.
+ {
+ try {
+ if (fn) {
+ return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));
+ } else {
+ return undefined;
+ }
+ } finally {
+ executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
+ // Note that this will happen even if batchedUpdates is higher up
+ // the stack.
- flushSyncCallbackQueue();
+ flushSyncCallbackQueue();
+ }
}
}
+function pushRenderLanes(fiber, lanes) {
+ push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
+ subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
+ workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
+}
+function popRenderLanes(fiber) {
+ subtreeRenderLanes = subtreeRenderLanesCursor.current;
+ pop(subtreeRenderLanesCursor, fiber);
+}
-function prepareFreshStack(root, expirationTime) {
+function prepareFreshStack(root, lanes) {
root.finishedWork = null;
- root.finishedExpirationTime = NoWork;
+ root.finishedLanes = NoLanes;
var timeoutHandle = root.timeoutHandle;
if (timeoutHandle !== noTimeout) {
@@ -21957,14 +22502,12 @@ function prepareFreshStack(root, expirationTime) {
workInProgressRoot = root;
workInProgress = createWorkInProgress(root.current, null);
- renderExpirationTime$1 = expirationTime;
+ workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
workInProgressRootExitStatus = RootIncomplete;
workInProgressRootFatalError = null;
- workInProgressRootLatestProcessedExpirationTime = Sync;
- workInProgressRootLatestSuspenseTimeout = Sync;
- workInProgressRootCanSuspendUsingConfig = null;
- workInProgressRootNextUnprocessedUpdateTime = NoWork;
- workInProgressRootHasPendingPing = false;
+ workInProgressRootSkippedLanes = NoLanes;
+ workInProgressRootUpdatedLanes = NoLanes;
+ workInProgressRootPingedLanes = NoLanes;
{
spawnedWorkDuringRender = null;
@@ -21977,13 +22520,18 @@ function prepareFreshStack(root, expirationTime) {
function handleError(root, thrownValue) {
do {
+ var erroredWork = workInProgress;
+
try {
// Reset module-level state that was set during the render phase.
resetContextDependencies();
resetHooksAfterThrow();
- resetCurrentFiber();
+ resetCurrentFiber(); // TODO: I found and added this missing line while investigating a
+ // separate issue. Write a regression test using string refs.
- if (workInProgress === null || workInProgress.return === null) {
+ ReactCurrentOwner$2.current = null;
+
+ if (erroredWork === null || erroredWork.return === null) {
// Expected to be working on a non-root fiber. This is a fatal error
// because there's no ancestor that can handle it; the root is
// supposed to capture all errors that weren't caught by an error
@@ -21993,25 +22541,35 @@ function handleError(root, thrownValue) {
// sibling, or the parent if there are no siblings. But since the root
// has no siblings nor a parent, we set it to null. Usually this is
// handled by `completeUnitOfWork` or `unwindWork`, but since we're
- // interntionally not calling those, we need set it here.
+ // intentionally not calling those, we need set it here.
// TODO: Consider calling `unwindWork` to pop the contexts.
workInProgress = null;
- return null;
+ return;
}
- if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
+ if (enableProfilerTimer && erroredWork.mode & ProfileMode) {
// Record the time spent rendering before an error was thrown. This
// avoids inaccurate Profiler durations in the case of a
// suspended render.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
+ stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);
}
- throwException(root, workInProgress.return, workInProgress, thrownValue, renderExpirationTime$1);
- workInProgress = completeUnitOfWork(workInProgress);
+ throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
+ completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
// Something in the return path also threw.
thrownValue = yetAnotherThrownValue;
+
+ if (workInProgress === erroredWork && erroredWork !== null) {
+ // If this boundary has already errored, then we had trouble processing
+ // the error. Bubble it to the next boundary.
+ erroredWork = erroredWork.return;
+ workInProgress = erroredWork;
+ } else {
+ erroredWork = workInProgress;
+ }
+
continue;
} // Return to the normal work loop.
@@ -22020,9 +22578,9 @@ function handleError(root, thrownValue) {
} while (true);
}
-function pushDispatcher(root) {
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
+function pushDispatcher() {
+ var prevDispatcher = ReactCurrentDispatcher$2.current;
+ ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;
if (prevDispatcher === null) {
// The React isomorphic package does not include a default dispatcher.
@@ -22035,7 +22593,7 @@ function pushDispatcher(root) {
}
function popDispatcher(prevDispatcher) {
- ReactCurrentDispatcher$1.current = prevDispatcher;
+ ReactCurrentDispatcher$2.current = prevDispatcher;
}
function pushInteractions(root) {
@@ -22055,23 +22613,8 @@ function popInteractions(prevInteractions) {
function markCommitTimeOfFallback() {
globalMostRecentFallbackTime = now();
}
-function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
- if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) {
- workInProgressRootLatestProcessedExpirationTime = expirationTime;
- }
-
- if (suspenseConfig !== null) {
- if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) {
- workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad.
-
- workInProgressRootCanSuspendUsingConfig = suspenseConfig;
- }
- }
-}
-function markUnprocessedUpdateTime(expirationTime) {
- if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) {
- workInProgressRootNextUnprocessedUpdateTime = expirationTime;
- }
+function markSkippedUpdateLanes(lane) {
+ workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
}
function renderDidSuspend() {
if (workInProgressRootExitStatus === RootIncomplete) {
@@ -22081,16 +22624,19 @@ function renderDidSuspend() {
function renderDidSuspendDelayIfPossible() {
if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
workInProgressRootExitStatus = RootSuspendedWithDelay;
- } // Check if there's a lower priority update somewhere else in the tree.
+ } // Check if there are updates that we skipped tree that might have unblocked
+ // this render.
- if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) {
- // Mark the current render as suspended, and then mark that there's a
- // pending update.
- // TODO: This should immediately interrupt the current render, instead
- // of waiting until the next time we yield.
- markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime$1);
- markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime);
+ if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {
+ // Mark the current render as suspended so that we switch to working on
+ // the updates that were skipped. Usually we only suspend at the end of
+ // the render phase.
+ // TODO: We should probably always mark the root as suspended immediately
+ // (inside this function), since by suspending at the end of the render
+ // phase introduces a potential mistake where we suspend lanes that were
+ // pinged or updated while we were rendering.
+ markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
}
}
function renderDidError() {
@@ -22106,19 +22652,50 @@ function renderHasNotSuspendedYet() {
return workInProgressRootExitStatus === RootIncomplete;
}
-function inferTimeFromExpirationTime(expirationTime) {
- // We don't know exactly when the update was scheduled, but we can infer an
- // approximate start time from the expiration time.
- var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
- return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
-}
+function renderRootSync(root, lanes) {
+ var prevExecutionContext = executionContext;
+ executionContext |= RenderContext;
+ var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
+ // and prepare a fresh one. Otherwise we'll continue where we left off.
+
+ if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
+ prepareFreshStack(root, lanes);
+ startWorkOnPendingInteractions(root, lanes);
+ }
+
+ var prevInteractions = pushInteractions(root);
+
+ do {
+ try {
+ workLoopSync();
+ break;
+ } catch (thrownValue) {
+ handleError(root, thrownValue);
+ }
+ } while (true);
+
+ resetContextDependencies();
+
+ {
+ popInteractions(prevInteractions);
+ }
-function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {
- // We don't know exactly when the update was scheduled, but we can infer an
- // approximate start time from the expiration time by subtracting the timeout
- // that was added to the event time.
- var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
- return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
+ executionContext = prevExecutionContext;
+ popDispatcher(prevDispatcher);
+
+ if (workInProgress !== null) {
+ // This is a sync render, so we should have finished the whole tree.
+ {
+ {
+ throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+ }
+
+
+ workInProgressRoot = null;
+ workInProgressRootRenderLanes = NoLanes;
+ return workInProgressRootExitStatus;
} // The work loop is an extremely hot path. Tell Closure not to inline it.
/** @noinline */
@@ -22127,7 +22704,53 @@ function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseC
function workLoopSync() {
// Already timed out, so perform work without checking if we need to yield.
while (workInProgress !== null) {
- workInProgress = performUnitOfWork(workInProgress);
+ performUnitOfWork(workInProgress);
+ }
+}
+
+function renderRootConcurrent(root, lanes) {
+ var prevExecutionContext = executionContext;
+ executionContext |= RenderContext;
+ var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
+ // and prepare a fresh one. Otherwise we'll continue where we left off.
+
+ if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
+ resetRenderTimer();
+ prepareFreshStack(root, lanes);
+ startWorkOnPendingInteractions(root, lanes);
+ }
+
+ var prevInteractions = pushInteractions(root);
+
+ do {
+ try {
+ workLoopConcurrent();
+ break;
+ } catch (thrownValue) {
+ handleError(root, thrownValue);
+ }
+ } while (true);
+
+ resetContextDependencies();
+
+ {
+ popInteractions(prevInteractions);
+ }
+
+ popDispatcher(prevDispatcher);
+ executionContext = prevExecutionContext;
+
+
+ if (workInProgress !== null) {
+
+ return RootIncomplete;
+ } else {
+
+
+ workInProgressRoot = null;
+ workInProgressRootRenderLanes = NoLanes; // Return the final exit status.
+
+ return workInProgressRootExitStatus;
}
}
/** @noinline */
@@ -22136,7 +22759,7 @@ function workLoopSync() {
function workLoopConcurrent() {
// Perform work until Scheduler asks us to yield
while (workInProgress !== null && !shouldYield()) {
- workInProgress = performUnitOfWork(workInProgress);
+ performUnitOfWork(workInProgress);
}
}
@@ -22145,16 +22768,15 @@ function performUnitOfWork(unitOfWork) {
// nothing should rely on this, but relying on it here means that we don't
// need an additional field on the work in progress.
var current = unitOfWork.alternate;
- startWorkTimer(unitOfWork);
setCurrentFiber(unitOfWork);
var next;
if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
startProfilerTimer(unitOfWork);
- next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
+ next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
} else {
- next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
+ next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
}
resetCurrentFiber();
@@ -22162,62 +22784,64 @@ function performUnitOfWork(unitOfWork) {
if (next === null) {
// If this doesn't spawn new work, complete the current work.
- next = completeUnitOfWork(unitOfWork);
+ completeUnitOfWork(unitOfWork);
+ } else {
+ workInProgress = next;
}
ReactCurrentOwner$2.current = null;
- return next;
}
function completeUnitOfWork(unitOfWork) {
// Attempt to complete the current unit of work, then move to the next
// sibling. If there are no more siblings, return to the parent fiber.
- workInProgress = unitOfWork;
+ var completedWork = unitOfWork;
do {
// The current, flushed, state of this fiber is the alternate. Ideally
// nothing should rely on this, but relying on it here means that we don't
// need an additional field on the work in progress.
- var current = workInProgress.alternate;
- var returnFiber = workInProgress.return; // Check if the work completed or if something threw.
+ var current = completedWork.alternate;
+ var returnFiber = completedWork.return; // Check if the work completed or if something threw.
- if ((workInProgress.effectTag & Incomplete) === NoEffect) {
- setCurrentFiber(workInProgress);
+ if ((completedWork.flags & Incomplete) === NoFlags) {
+ setCurrentFiber(completedWork);
var next = void 0;
- if ( (workInProgress.mode & ProfileMode) === NoMode) {
- next = completeWork(current, workInProgress, renderExpirationTime$1);
+ if ( (completedWork.mode & ProfileMode) === NoMode) {
+ next = completeWork(current, completedWork, subtreeRenderLanes);
} else {
- startProfilerTimer(workInProgress);
- next = completeWork(current, workInProgress, renderExpirationTime$1); // Update render duration assuming we didn't error.
+ startProfilerTimer(completedWork);
+ next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
+ stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
}
- stopWorkTimer(workInProgress);
resetCurrentFiber();
- resetChildExpirationTime(workInProgress);
if (next !== null) {
// Completing this fiber spawned new work. Work on that next.
- return next;
+ workInProgress = next;
+ return;
}
+ resetChildLanes(completedWork);
+
if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
- (returnFiber.effectTag & Incomplete) === NoEffect) {
+ (returnFiber.flags & Incomplete) === NoFlags) {
// Append all the effects of the subtree and this fiber onto the effect
// list of the parent. The completion order of the children affects the
// side-effect order.
if (returnFiber.firstEffect === null) {
- returnFiber.firstEffect = workInProgress.firstEffect;
+ returnFiber.firstEffect = completedWork.firstEffect;
}
- if (workInProgress.lastEffect !== null) {
+ if (completedWork.lastEffect !== null) {
if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
+ returnFiber.lastEffect.nextEffect = completedWork.firstEffect;
}
- returnFiber.lastEffect = workInProgress.lastEffect;
+ returnFiber.lastEffect = completedWork.lastEffect;
} // If this fiber had side-effects, we append it AFTER the children's
// side-effects. We can perform certain side-effects earlier if needed,
// by doing multiple passes over the effect list. We don't want to
@@ -22226,96 +22850,89 @@ function completeUnitOfWork(unitOfWork) {
// at the end.
- var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect
+ var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect
// list. PerformedWork effect is read by React DevTools but shouldn't be
// committed.
- if (effectTag > PerformedWork) {
+ if (flags > PerformedWork) {
if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = workInProgress;
+ returnFiber.lastEffect.nextEffect = completedWork;
} else {
- returnFiber.firstEffect = workInProgress;
+ returnFiber.firstEffect = completedWork;
}
- returnFiber.lastEffect = workInProgress;
+ returnFiber.lastEffect = completedWork;
}
}
} else {
// This fiber did not complete because something threw. Pop values off
// the stack without entering the complete phase. If this is a boundary,
// capture values if possible.
- var _next = unwindWork(workInProgress); // Because this fiber did not complete, don't reset its expiration time.
+ var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time.
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
+ if (_next !== null) {
+ // If completing this work spawned new work, do that next. We'll come
+ // back here again.
+ // Since we're restarting, remove anything that is not a host effect
+ // from the effect tag.
+ _next.flags &= HostEffectMask;
+ workInProgress = _next;
+ return;
+ }
+
+ if ( (completedWork.mode & ProfileMode) !== NoMode) {
// Record the render duration for the fiber that errored.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing.
+ stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.
- var actualDuration = workInProgress.actualDuration;
- var child = workInProgress.child;
+ var actualDuration = completedWork.actualDuration;
+ var child = completedWork.child;
while (child !== null) {
actualDuration += child.actualDuration;
child = child.sibling;
}
- workInProgress.actualDuration = actualDuration;
- }
-
- if (_next !== null) {
- // If completing this work spawned new work, do that next. We'll come
- // back here again.
- // Since we're restarting, remove anything that is not a host effect
- // from the effect tag.
- // TODO: The name stopFailedWorkTimer is misleading because Suspense
- // also captures and restarts.
- stopFailedWorkTimer(workInProgress);
- _next.effectTag &= HostEffectMask;
- return _next;
+ completedWork.actualDuration = actualDuration;
}
- stopWorkTimer(workInProgress);
-
if (returnFiber !== null) {
// Mark the parent fiber as incomplete and clear its effect list.
returnFiber.firstEffect = returnFiber.lastEffect = null;
- returnFiber.effectTag |= Incomplete;
+ returnFiber.flags |= Incomplete;
}
}
- var siblingFiber = workInProgress.sibling;
+ var siblingFiber = completedWork.sibling;
if (siblingFiber !== null) {
// If there is more work to do in this returnFiber, do that next.
- return siblingFiber;
+ workInProgress = siblingFiber;
+ return;
} // Otherwise, return to the parent
- workInProgress = returnFiber;
- } while (workInProgress !== null); // We've reached the root.
+ completedWork = returnFiber; // Update the next thing we're working on in case something throws.
+
+ workInProgress = completedWork;
+ } while (completedWork !== null); // We've reached the root.
if (workInProgressRootExitStatus === RootIncomplete) {
workInProgressRootExitStatus = RootCompleted;
}
-
- return null;
-}
-
-function getRemainingExpirationTime(fiber) {
- var updateExpirationTime = fiber.expirationTime;
- var childExpirationTime = fiber.childExpirationTime;
- return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime;
}
-function resetChildExpirationTime(completedWork) {
- if (renderExpirationTime$1 !== Never && completedWork.childExpirationTime === Never) {
+function resetChildLanes(completedWork) {
+ if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`
+ // to switch statement in `completeWork`.
+ (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {
// The children of this component are hidden. Don't bubble their
// expiration times.
return;
}
- var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time.
+ var newChildLanes = NoLanes; // Bubble up the earliest expiration time.
if ( (completedWork.mode & ProfileMode) !== NoMode) {
// In profiling mode, resetChildExpirationTime is also used to reset
@@ -22333,16 +22950,7 @@ function resetChildExpirationTime(completedWork) {
var child = completedWork.child;
while (child !== null) {
- var childUpdateExpirationTime = child.expirationTime;
- var childChildExpirationTime = child.childExpirationTime;
-
- if (childUpdateExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = childUpdateExpirationTime;
- }
-
- if (childChildExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = childChildExpirationTime;
- }
+ newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));
if (shouldBubbleActualDurations) {
actualDuration += child.actualDuration;
@@ -22352,33 +22960,34 @@ function resetChildExpirationTime(completedWork) {
child = child.sibling;
}
+ var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;
+
+ if (isTimedOutSuspense) {
+ // Don't count time spent in a timed out Suspense subtree as part of the base duration.
+ var primaryChildFragment = completedWork.child;
+
+ if (primaryChildFragment !== null) {
+ treeBaseDuration -= primaryChildFragment.treeBaseDuration;
+ }
+ }
+
completedWork.actualDuration = actualDuration;
completedWork.treeBaseDuration = treeBaseDuration;
} else {
var _child = completedWork.child;
while (_child !== null) {
- var _childUpdateExpirationTime = _child.expirationTime;
- var _childChildExpirationTime = _child.childExpirationTime;
-
- if (_childUpdateExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = _childUpdateExpirationTime;
- }
-
- if (_childChildExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = _childChildExpirationTime;
- }
-
+ newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
_child = _child.sibling;
}
}
- completedWork.childExpirationTime = newChildExpirationTime;
+ completedWork.childLanes = newChildLanes;
}
function commitRoot(root) {
var renderPriorityLevel = getCurrentPriorityLevel();
- runWithPriority$1(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel));
+ runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));
return null;
}
@@ -22402,14 +23011,15 @@ function commitRootImpl(root, renderPriorityLevel) {
}
var finishedWork = root.finishedWork;
- var expirationTime = root.finishedExpirationTime;
+ var lanes = root.finishedLanes;
if (finishedWork === null) {
+
return null;
}
root.finishedWork = null;
- root.finishedExpirationTime = NoWork;
+ root.finishedLanes = NoLanes;
if (!(finishedWork !== root.current)) {
{
@@ -22419,30 +23029,31 @@ function commitRootImpl(root, renderPriorityLevel) {
// So we can clear these now to allow a new callback to be scheduled.
- root.callbackNode = null;
- root.callbackExpirationTime = NoWork;
- root.callbackPriority = NoPriority;
- root.nextKnownPendingLevel = NoWork;
- startCommitTimer(); // Update the first and last pending times on this root. The new first
+ root.callbackNode = null; // Update the first and last pending times on this root. The new first
// pending time is whatever is left on the root fiber.
- var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork);
- markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit);
+ var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
+ markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of
+ // `flushDiscreteUpdates` starts a useless render pass which may cancels
+ // a scheduled timeout.
+
+ if (rootsWithPendingDiscreteUpdates !== null) {
+ if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {
+ rootsWithPendingDiscreteUpdates.delete(root);
+ }
+ }
if (root === workInProgressRoot) {
// We can reset these now that they are finished.
workInProgressRoot = null;
workInProgress = null;
- renderExpirationTime$1 = NoWork;
- } // This indicates that the last root we worked on is not the same one that
- // we're committing now. This most commonly happens when a suspended root
- // times out.
- // Get the list of effects.
+ workInProgressRootRenderLanes = NoLanes;
+ } // Get the list of effects.
var firstEffect;
- if (finishedWork.effectTag > PerformedWork) {
+ if (finishedWork.flags > PerformedWork) {
// A fiber's effect list consists only of its children, not itself. So if
// the root has an effect, we need to add it to the end of the list. The
// resulting list is the set that would belong to the root's parent, if it
@@ -22459,6 +23070,7 @@ function commitRootImpl(root, renderPriorityLevel) {
}
if (firstEffect !== null) {
+
var prevExecutionContext = executionContext;
executionContext |= CommitContext;
var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles
@@ -22470,8 +23082,8 @@ function commitRootImpl(root, renderPriorityLevel) {
// state of the host tree right before we mutate it. This is where
// getSnapshotBeforeUpdate is called.
- startCommitSnapshotEffectsTimer();
- prepareForCommit(root.containerInfo);
+ focusedInstanceHandle = prepareForCommit(root.containerInfo);
+ shouldFireAfterActiveInstanceBlur = false;
nextEffect = firstEffect;
do {
@@ -22490,9 +23102,10 @@ function commitRootImpl(root, renderPriorityLevel) {
nextEffect = nextEffect.nextEffect;
}
}
- } while (nextEffect !== null);
+ } while (nextEffect !== null); // We no longer need to track the active instance fiber
- stopCommitSnapshotEffectsTimer();
+
+ focusedInstanceHandle = null;
{
// Mark the current commit time to be shared by all Profilers in this
@@ -22501,7 +23114,6 @@ function commitRootImpl(root, renderPriorityLevel) {
} // The next phase is the mutation phase, where we mutate the host tree.
- startCommitHostEffectsTimer();
nextEffect = firstEffect;
do {
@@ -22523,7 +23135,6 @@ function commitRootImpl(root, renderPriorityLevel) {
}
} while (nextEffect !== null);
- stopCommitHostEffectsTimer();
resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
// the mutation phase, so that the previous tree is still current during
// componentWillUnmount, but before the layout phase, so that the finished
@@ -22533,12 +23144,11 @@ function commitRootImpl(root, renderPriorityLevel) {
// the host tree after it's been mutated. The idiomatic use case for this is
// layout, but class component lifecycles also fire here for legacy reasons.
- startCommitLifeCyclesTimer();
nextEffect = firstEffect;
do {
{
- invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime);
+ invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);
if (hasCaughtError()) {
if (!(nextEffect !== null)) {
@@ -22555,7 +23165,6 @@ function commitRootImpl(root, renderPriorityLevel) {
}
} while (nextEffect !== null);
- stopCommitLifeCyclesTimer();
nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
// opportunity to paint.
@@ -22572,20 +23181,11 @@ function commitRootImpl(root, renderPriorityLevel) {
// no effects.
// TODO: Maybe there's a better way to report this.
- startCommitSnapshotEffectsTimer();
- stopCommitSnapshotEffectsTimer();
-
{
recordCommitTime();
}
-
- startCommitHostEffectsTimer();
- stopCommitHostEffectsTimer();
- startCommitLifeCyclesTimer();
- stopCommitLifeCyclesTimer();
}
- stopCommitTimer();
var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
if (rootDoesHavePassiveEffects) {
@@ -22593,7 +23193,7 @@ function commitRootImpl(root, renderPriorityLevel) {
// schedule a callback until after flushing layout work.
rootDoesHavePassiveEffects = false;
rootWithPendingPassiveEffects = root;
- pendingPassiveEffectsExpirationTime = expirationTime;
+ pendingPassiveEffectsLanes = lanes;
pendingPassiveEffectsRenderPriority = renderPriorityLevel;
} else {
// We are done with the effect chain at this point so let's clear the
@@ -22604,14 +23204,19 @@ function commitRootImpl(root, renderPriorityLevel) {
while (nextEffect !== null) {
var nextNextEffect = nextEffect.nextEffect;
nextEffect.nextEffect = null;
+
+ if (nextEffect.flags & Deletion) {
+ detachFiberAfterEffects(nextEffect);
+ }
+
nextEffect = nextNextEffect;
}
- } // Check if there's remaining work on this root
+ } // Read this again, since an effect might have updated it
- var remainingExpirationTime = root.firstPendingTime;
+ remainingLanes = root.pendingLanes; // Check if there's remaining work on this root
- if (remainingExpirationTime !== NoWork) {
+ if (remainingLanes !== NoLanes) {
{
if (spawnedWorkDuringRender !== null) {
var expirationTimes = spawnedWorkDuringRender;
@@ -22622,7 +23227,7 @@ function commitRootImpl(root, renderPriorityLevel) {
}
}
- schedulePendingInteractions(root, remainingExpirationTime);
+ schedulePendingInteractions(root, remainingLanes);
}
} else {
// If there's no remaining work, we can clear the set of already failed
@@ -22636,11 +23241,11 @@ function commitRootImpl(root, renderPriorityLevel) {
// Otherwise, we'll wait until after the passive effects are flushed.
// Wait to do this until after remaining work has been scheduled,
// so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
- finishPendingInteractions(root, expirationTime);
+ finishPendingInteractions(root, lanes);
}
}
- if (remainingExpirationTime === Sync) {
+ if (remainingLanes === SyncLane) {
// Count the number of times the root synchronously re-renders without
// finishing. If there are too many, it indicates an infinite update loop.
if (root === rootWithNestedUpdates) {
@@ -22653,10 +23258,15 @@ function commitRootImpl(root, renderPriorityLevel) {
nestedUpdateCount = 0;
}
- onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any
+ onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
+
+ {
+ onCommitRoot$1();
+ } // Always call this before exiting `commitRoot`, to ensure that any
// additional work on this root is scheduled.
- ensureRootIsScheduled(root);
+
+ ensureRootIsScheduled(root, now());
if (hasUncaughtError) {
hasUncaughtError = false;
@@ -22666,36 +23276,51 @@ function commitRootImpl(root, renderPriorityLevel) {
}
if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
- // This is a legacy edge case. We just committed the initial mount of
// a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
// synchronously, but layout updates should be deferred until the end
// of the batch.
+
+
return null;
} // If layout work was scheduled, flush it now.
flushSyncCallbackQueue();
+
return null;
}
function commitBeforeMutationEffects() {
while (nextEffect !== null) {
- var effectTag = nextEffect.effectTag;
+ var current = nextEffect.alternate;
- if ((effectTag & Snapshot) !== NoEffect) {
+ if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {
+ if ((nextEffect.flags & Deletion) !== NoFlags) {
+ if (doesFiberContain(nextEffect, focusedInstanceHandle)) {
+ shouldFireAfterActiveInstanceBlur = true;
+ }
+ } else {
+ // TODO: Move this out of the hot path using a dedicated effect tag.
+ if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {
+ shouldFireAfterActiveInstanceBlur = true;
+ }
+ }
+ }
+
+ var flags = nextEffect.flags;
+
+ if ((flags & Snapshot) !== NoFlags) {
setCurrentFiber(nextEffect);
- recordEffect();
- var current = nextEffect.alternate;
commitBeforeMutationLifeCycles(current, nextEffect);
resetCurrentFiber();
}
- if ((effectTag & Passive) !== NoEffect) {
+ if ((flags & Passive) !== NoFlags) {
// If there are passive effects, schedule a callback to flush at
// the earliest opportunity.
if (!rootDoesHavePassiveEffects) {
rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority, function () {
+ scheduleCallback(NormalPriority$1, function () {
flushPassiveEffects();
return null;
});
@@ -22710,13 +23335,13 @@ function commitMutationEffects(root, renderPriorityLevel) {
// TODO: Should probably move the bulk of this function to commitWork.
while (nextEffect !== null) {
setCurrentFiber(nextEffect);
- var effectTag = nextEffect.effectTag;
+ var flags = nextEffect.flags;
- if (effectTag & ContentReset) {
+ if (flags & ContentReset) {
commitResetTextContent(nextEffect);
}
- if (effectTag & Ref) {
+ if (flags & Ref) {
var current = nextEffect.alternate;
if (current !== null) {
@@ -22728,9 +23353,9 @@ function commitMutationEffects(root, renderPriorityLevel) {
// switch on that value.
- var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating);
+ var primaryFlags = flags & (Placement | Update | Deletion | Hydrating);
- switch (primaryEffectTag) {
+ switch (primaryFlags) {
case Placement:
{
commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
@@ -22738,7 +23363,7 @@ function commitMutationEffects(root, renderPriorityLevel) {
// TODO: findDOMNode doesn't rely on this any more but isMounted does
// and isMounted is deprecated anyway so we should be able to kill this.
- nextEffect.effectTag &= ~Placement;
+ nextEffect.flags &= ~Placement;
break;
}
@@ -22748,7 +23373,7 @@ function commitMutationEffects(root, renderPriorityLevel) {
commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
// inserted, before any life-cycles like componentDidMount gets called.
- nextEffect.effectTag &= ~Placement; // Update
+ nextEffect.flags &= ~Placement; // Update
var _current = nextEffect.alternate;
commitWork(_current, nextEffect);
@@ -22757,13 +23382,13 @@ function commitMutationEffects(root, renderPriorityLevel) {
case Hydrating:
{
- nextEffect.effectTag &= ~Hydrating;
+ nextEffect.flags &= ~Hydrating;
break;
}
case HydratingAndUpdate:
{
- nextEffect.effectTag &= ~Hydrating; // Update
+ nextEffect.flags &= ~Hydrating; // Update
var _current2 = nextEffect.alternate;
commitWork(_current2, nextEffect);
@@ -22779,33 +23404,32 @@ function commitMutationEffects(root, renderPriorityLevel) {
case Deletion:
{
- commitDeletion(root, nextEffect, renderPriorityLevel);
+ commitDeletion(root, nextEffect);
break;
}
- } // TODO: Only record a mutation effect if primaryEffectTag is non-zero.
-
+ }
- recordEffect();
resetCurrentFiber();
nextEffect = nextEffect.nextEffect;
}
}
-function commitLayoutEffects(root, committedExpirationTime) {
- // TODO: Should probably move the bulk of this function to commitWork.
+function commitLayoutEffects(root, committedLanes) {
+
+
while (nextEffect !== null) {
setCurrentFiber(nextEffect);
- var effectTag = nextEffect.effectTag;
+ var flags = nextEffect.flags;
- if (effectTag & (Update | Callback)) {
- recordEffect();
+ if (flags & (Update | Callback)) {
var current = nextEffect.alternate;
commitLifeCycles(root, current, nextEffect);
}
- if (effectTag & Ref) {
- recordEffect();
- commitAttachRef(nextEffect);
+ {
+ if (flags & Ref) {
+ commitAttachRef(nextEffect);
+ }
}
resetCurrentFiber();
@@ -22814,12 +23438,54 @@ function commitLayoutEffects(root, committedExpirationTime) {
}
function flushPassiveEffects() {
- if (pendingPassiveEffectsRenderPriority !== NoPriority) {
- var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority ? NormalPriority : pendingPassiveEffectsRenderPriority;
- pendingPassiveEffectsRenderPriority = NoPriority;
- return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
+ // Returns whether passive effects were flushed.
+ if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {
+ var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;
+ pendingPassiveEffectsRenderPriority = NoPriority$1;
+
+ {
+ return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
+ }
+ }
+
+ return false;
+}
+function enqueuePendingPassiveHookEffectMount(fiber, effect) {
+ pendingPassiveHookEffectsMount.push(effect, fiber);
+
+ if (!rootDoesHavePassiveEffects) {
+ rootDoesHavePassiveEffects = true;
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects();
+ return null;
+ });
}
}
+function enqueuePendingPassiveHookEffectUnmount(fiber, effect) {
+ pendingPassiveHookEffectsUnmount.push(effect, fiber);
+
+ {
+ fiber.flags |= PassiveUnmountPendingDev;
+ var alternate = fiber.alternate;
+
+ if (alternate !== null) {
+ alternate.flags |= PassiveUnmountPendingDev;
+ }
+ }
+
+ if (!rootDoesHavePassiveEffects) {
+ rootDoesHavePassiveEffects = true;
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects();
+ return null;
+ });
+ }
+}
+
+function invokePassiveEffectCreate(effect) {
+ var create = effect.create;
+ effect.destroy = create();
+}
function flushPassiveEffectsImpl() {
if (rootWithPendingPassiveEffects === null) {
@@ -22827,9 +23493,9 @@ function flushPassiveEffectsImpl() {
}
var root = rootWithPendingPassiveEffects;
- var expirationTime = pendingPassiveEffectsExpirationTime;
+ var lanes = pendingPassiveEffectsLanes;
rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsExpirationTime = NoWork;
+ pendingPassiveEffectsLanes = NoLanes;
if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
{
@@ -22837,46 +23503,117 @@ function flushPassiveEffectsImpl() {
}
}
+ {
+ isFlushingPassiveEffects = true;
+ }
+
var prevExecutionContext = executionContext;
executionContext |= CommitContext;
- var prevInteractions = pushInteractions(root);
+ var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called
+ // before ANY passive effect create functions are called.
+ // Otherwise effects in sibling components might interfere with each other.
+ // e.g. a destroy function in one component may unintentionally override a ref
+ // value set by a create function in another component.
+ // Layout effects have the same constraint.
+ // First pass: Destroy stale passive effects.
+
+ var unmountEffects = pendingPassiveHookEffectsUnmount;
+ pendingPassiveHookEffectsUnmount = [];
+
+ for (var i = 0; i < unmountEffects.length; i += 2) {
+ var _effect = unmountEffects[i];
+ var fiber = unmountEffects[i + 1];
+ var destroy = _effect.destroy;
+ _effect.destroy = undefined;
- {
- // Note: This currently assumes there are no passive effects on the root fiber
- // because the root is not part of its own effect list.
- // This could change in the future.
- var _effect2 = root.current.firstEffect;
+ {
+ fiber.flags &= ~PassiveUnmountPendingDev;
+ var alternate = fiber.alternate;
+
+ if (alternate !== null) {
+ alternate.flags &= ~PassiveUnmountPendingDev;
+ }
+ }
- while (_effect2 !== null) {
+ if (typeof destroy === 'function') {
{
- setCurrentFiber(_effect2);
- invokeGuardedCallback(null, commitPassiveHookEffects, null, _effect2);
+ setCurrentFiber(fiber);
+
+ {
+ invokeGuardedCallback(null, destroy, null);
+ }
if (hasCaughtError()) {
- if (!(_effect2 !== null)) {
+ if (!(fiber !== null)) {
{
throw Error( "Should be working on an effect." );
}
}
- var _error5 = clearCaughtError();
-
- captureCommitPhaseError(_effect2, _error5);
+ var error = clearCaughtError();
+ captureCommitPhaseError(fiber, error);
}
resetCurrentFiber();
}
+ }
+ } // Second pass: Create new passive effects.
+
+
+ var mountEffects = pendingPassiveHookEffectsMount;
+ pendingPassiveHookEffectsMount = [];
+
+ for (var _i = 0; _i < mountEffects.length; _i += 2) {
+ var _effect2 = mountEffects[_i];
+ var _fiber = mountEffects[_i + 1];
+
+ {
+ setCurrentFiber(_fiber);
+
+ {
+ invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);
+ }
+
+ if (hasCaughtError()) {
+ if (!(_fiber !== null)) {
+ {
+ throw Error( "Should be working on an effect." );
+ }
+ }
+
+ var _error4 = clearCaughtError();
+
+ captureCommitPhaseError(_fiber, _error4);
+ }
+
+ resetCurrentFiber();
+ }
+ } // Note: This currently assumes there are no passive effects on the root fiber
+ // because the root is not part of its own effect list.
+ // This could change in the future.
+
- var nextNextEffect = _effect2.nextEffect; // Remove nextEffect pointer to assist GC
+ var effect = root.current.firstEffect;
- _effect2.nextEffect = null;
- _effect2 = nextNextEffect;
+ while (effect !== null) {
+ var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC
+
+ effect.nextEffect = null;
+
+ if (effect.flags & Deletion) {
+ detachFiberAfterEffects(effect);
}
+
+ effect = nextNextEffect;
}
{
popInteractions(prevInteractions);
- finishPendingInteractions(root, expirationTime);
+ finishPendingInteractions(root, lanes);
+ }
+
+ {
+ isFlushingPassiveEffects = false;
}
executionContext = prevExecutionContext;
@@ -22909,13 +23646,15 @@ var onUncaughtError = prepareToThrowUncaughtError;
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createRootErrorUpdate(rootFiber, errorInfo, Sync);
+ var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
enqueueUpdate(rootFiber, update);
- var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync);
+ var eventTime = requestEventTime();
+ var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);
if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, Sync);
+ markRootUpdated(root, SyncLane, eventTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, SyncLane);
}
}
@@ -22939,14 +23678,29 @@ function captureCommitPhaseError(sourceFiber, error) {
if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createClassErrorUpdate(fiber, errorInfo, // TODO: This is always sync
- Sync);
+ var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
enqueueUpdate(fiber, update);
- var root = markUpdateTimeFromFiberToRoot(fiber, Sync);
+ var eventTime = requestEventTime();
+ var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);
if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, Sync);
+ markRootUpdated(root, SyncLane, eventTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, SyncLane);
+ } else {
+ // This component has already been unmounted.
+ // We can't schedule any follow up work for the root because the fiber is already unmounted,
+ // but we can still call the log-only boundary so the error isn't swallowed.
+ //
+ // TODO This is only a temporary bandaid for the old reconciler fork.
+ // We can delete this special case once the new fork is merged.
+ if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
+ try {
+ instance.componentDidCatch(error, errorInfo);
+ } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?
+ // This is kind of an edge case.
+ }
+ }
}
return;
@@ -22956,81 +23710,61 @@ function captureCommitPhaseError(sourceFiber, error) {
fiber = fiber.return;
}
}
-function pingSuspendedRoot(root, thenable, suspendedTime) {
+function pingSuspendedRoot(root, wakeable, pingedLanes) {
var pingCache = root.pingCache;
if (pingCache !== null) {
- // The thenable resolved, so we no longer need to memoize, because it will
+ // The wakeable resolved, so we no longer need to memoize, because it will
// never be thrown again.
- pingCache.delete(thenable);
+ pingCache.delete(wakeable);
}
- if (workInProgressRoot === root && renderExpirationTime$1 === suspendedTime) {
+ var eventTime = requestEventTime();
+ markRootPinged(root, pingedLanes);
+
+ if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
// Received a ping at the same priority level at which we're currently
// rendering. We might want to restart this render. This should mirror
// the logic of whether or not a root suspends once it completes.
// TODO: If we're rendering sync either due to Sync, Batched or expired,
// we should probably never restart.
- // If we're suspended with delay, we'll always suspend so we can always
- // restart. If we're suspended without any updates, it might be a retry.
- // If it's early in the retry we can restart. We can't know for sure
- // whether we'll eventually process an update during this render pass,
- // but it's somewhat unlikely that we get to a ping before that, since
- // getting to the root most update is usually very fast.
- if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && workInProgressRootLatestProcessedExpirationTime === Sync && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
- // Restart from the root. Don't need to schedule a ping because
- // we're already working on this tree.
- prepareFreshStack(root, renderExpirationTime$1);
+ // If we're suspended with delay, or if it's a retry, we'll always suspend
+ // so we can always restart.
+ if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
+ // Restart from the root.
+ prepareFreshStack(root, NoLanes);
} else {
// Even though we can't restart right now, we might get an
// opportunity later. So we mark this render as having a ping.
- workInProgressRootHasPendingPing = true;
+ workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
}
-
- return;
- }
-
- if (!isRootSuspendedAtTime(root, suspendedTime)) {
- // The root is no longer suspended at this time.
- return;
}
- var lastPingedTime = root.lastPingedTime;
-
- if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) {
- // There's already a lower priority ping scheduled.
- return;
- } // Mark the time at which this ping was scheduled.
-
-
- root.lastPingedTime = suspendedTime;
-
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, suspendedTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, pingedLanes);
}
-function retryTimedOutBoundary(boundaryFiber, retryTime) {
+function retryTimedOutBoundary(boundaryFiber, retryLane) {
// The boundary fiber (a Suspense component or SuspenseList component)
// previously was rendered in its fallback state. One of the promises that
// suspended it has resolved, which means at least part of the tree was
// likely unblocked. Try rendering again, at a new expiration time.
- if (retryTime === NoWork) {
- var suspenseConfig = null; // Retries don't carry over the already committed update.
-
- var currentTime = requestCurrentTimeForUpdate();
- retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig);
+ if (retryLane === NoLane) {
+ retryLane = requestRetryLane(boundaryFiber);
} // TODO: Special case idle priority?
- var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime);
+ var eventTime = requestEventTime();
+ var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);
if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, retryTime);
+ markRootUpdated(root, retryLane, eventTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, retryLane);
}
}
-function resolveRetryThenable(boundaryFiber, thenable) {
- var retryTime = NoWork; // Default
+function resolveRetryWakeable(boundaryFiber, wakeable) {
+ var retryLane = NoLane; // Default
var retryCache;
@@ -23039,12 +23773,12 @@ function resolveRetryThenable(boundaryFiber, thenable) {
}
if (retryCache !== null) {
- // The thenable resolved, so we no longer need to memoize, because it will
+ // The wakeable resolved, so we no longer need to memoize, because it will
// never be thrown again.
- retryCache.delete(thenable);
+ retryCache.delete(wakeable);
}
- retryTimedOutBoundary(boundaryFiber, retryTime);
+ retryTimedOutBoundary(boundaryFiber, retryLane);
} // Computes the next Just Noticeable Difference (JND) boundary.
// The theory is that a person can't tell the difference between small differences in time.
// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
@@ -23059,30 +23793,6 @@ function jnd(timeElapsed) {
return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
}
-function computeMsUntilSuspenseLoadingDelay(mostRecentEventTime, committedExpirationTime, suspenseConfig) {
- var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0;
-
- if (busyMinDurationMs <= 0) {
- return 0;
- }
-
- var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire.
-
- var currentTimeMs = now();
- var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig(mostRecentEventTime, suspenseConfig);
- var timeElapsed = currentTimeMs - eventTimeMs;
-
- if (timeElapsed <= busyDelayMs) {
- // If we haven't yet waited longer than the initial delay, we don't
- // have to wait any additional time.
- return 0;
- }
-
- var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`.
-
- return msUntilTimeout;
-}
-
function checkForNestedUpdates() {
if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
nestedUpdateCount = 0;
@@ -23114,22 +23824,53 @@ function flushRenderPhaseStrictModeWarningsInDEV() {
}
}
-function stopFinishedWorkLoopTimer() {
- var didCompleteRoot = true;
- stopWorkLoopTimer(interruptedBy, didCompleteRoot);
- interruptedBy = null;
-}
+var didWarnStateUpdateForNotYetMountedComponent = null;
+
+function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
+ {
+ if ((executionContext & RenderContext) !== NoContext) {
+ // We let the other warning about render phase updates deal with this one.
+ return;
+ }
+
+ if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {
+ return;
+ }
+
+ var tag = fiber.tag;
+
+ if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
+ // Only warn for user-defined components, not internal ones like Suspense.
+ return;
+ } // We show the whole stack but dedupe on the top component's name because
+ // the problematic code almost always lies inside that component.
-function stopInterruptedWorkLoopTimer() {
- // TODO: Track which fiber caused the interruption.
- var didCompleteRoot = false;
- stopWorkLoopTimer(interruptedBy, didCompleteRoot);
- interruptedBy = null;
-}
-function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) {
- if ( workInProgressRoot !== null && updateExpirationTime > renderExpirationTime$1) {
- interruptedBy = fiberThatReceivedUpdate;
+ var componentName = getComponentName(fiber.type) || 'ReactComponent';
+
+ if (didWarnStateUpdateForNotYetMountedComponent !== null) {
+ if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
+ return;
+ }
+
+ didWarnStateUpdateForNotYetMountedComponent.add(componentName);
+ } else {
+ didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);
+ }
+
+ var previousFiber = current;
+
+ try {
+ setCurrentFiber(fiber);
+
+ error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');
+ } finally {
+ if (previousFiber) {
+ setCurrentFiber(fiber);
+ } else {
+ resetCurrentFiber();
+ }
+ }
}
}
@@ -23142,7 +23883,13 @@ function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
// Only warn for user-defined components, not internal ones like Suspense.
return;
- }
+ } // If there are pending passive effects unmounts for this Fiber,
+ // we can assume that they would have prevented this update.
+
+
+ if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {
+ return;
+ } // We show the whole stack but dedupe on the top component's name because
// the problematic code almost always lies inside that component.
@@ -23158,7 +23905,21 @@ function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
}
- error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));
+ if (isFlushingPassiveEffects) ; else {
+ var previousFiber = current;
+
+ try {
+ setCurrentFiber(fiber);
+
+ error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function');
+ } finally {
+ if (previousFiber) {
+ setCurrentFiber(fiber);
+ } else {
+ resetCurrentFiber();
+ }
+ }
+ }
}
}
@@ -23167,7 +23928,7 @@ var beginWork$1;
{
var dummyFiber = null;
- beginWork$1 = function (current, unitOfWork, expirationTime) {
+ beginWork$1 = function (current, unitOfWork, lanes) {
// If a component throws an error, we replay it again in a synchronously
// dispatched event, so that the debugger will treat it as an uncaught
// error See ReactErrorUtils for more information.
@@ -23176,7 +23937,7 @@ var beginWork$1;
var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
try {
- return beginWork(current, unitOfWork, expirationTime);
+ return beginWork(current, unitOfWork, lanes);
} catch (originalError) {
if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
// Don't replay promises. Treat everything else like an error.
@@ -23200,7 +23961,7 @@ var beginWork$1;
} // Run beginWork again.
- invokeGuardedCallback(null, beginWork, null, current, unitOfWork, expirationTime);
+ invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);
if (hasCaughtError()) {
var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
@@ -23224,7 +23985,7 @@ var didWarnAboutUpdateInRenderForAnotherComponent;
function warnAboutRenderPhaseUpdatesInDEV(fiber) {
{
- if (isRendering && (executionContext & RenderContext) !== NoContext) {
+ if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
@@ -23238,7 +23999,7 @@ function warnAboutRenderPhaseUpdatesInDEV(fiber) {
didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
var setStateComponentName = getComponentName(fiber.type) || 'Unknown';
- error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://fb.me/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
+ error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
}
break;
@@ -23266,14 +24027,28 @@ var IsThisRendererActing = {
function warnIfNotScopedWithMatchingAct(fiber) {
{
if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
- error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + "import {act} from 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + "import TestRenderer from 'react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);' + '%s', getStackByFiberInDevAndProd(fiber));
+ var previousFiber = current;
+
+ try {
+ setCurrentFiber(fiber);
+
+ error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
+ 'import {act} fr' + "om 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
+ 'import TestRenderer fr' + "om react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);');
+ } finally {
+ if (previousFiber) {
+ setCurrentFiber(fiber);
+ } else {
+ resetCurrentFiber();
+ }
+ }
}
}
}
function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
{
if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
+ error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
}
}
}
@@ -23281,7 +24056,19 @@ function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
{
if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
+ var previousFiber = current;
+
+ try {
+ setCurrentFiber(fiber);
+
+ error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
+ } finally {
+ if (previousFiber) {
+ setCurrentFiber(fiber);
+ } else {
+ resetCurrentFiber();
+ }
+ }
}
}
}
@@ -23299,31 +24086,35 @@ function warnIfUnmockedScheduler(fiber) {
if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
didWarnAboutUnmockedScheduler = true;
- error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
+ error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + // Break up requires to avoid accidentally parsing them as dependencies.
+ "jest.mock('scheduler', () => require" + "('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://reactjs.org/link/mock-scheduler');
}
}
}
}
-function computeThreadID(root, expirationTime) {
+function computeThreadID(root, lane) {
// Interaction threads are unique per root and expiration time.
- return expirationTime * 1000 + root.interactionThreadID;
+ // NOTE: Intentionally unsound cast. All that matters is that it's a number
+ // and it represents a batch of work. Could make a helper function instead,
+ // but meh this is fine for now.
+ return lane * 1000 + root.interactionThreadID;
}
-function markSpawnedWork(expirationTime) {
+function markSpawnedWork(lane) {
if (spawnedWorkDuringRender === null) {
- spawnedWorkDuringRender = [expirationTime];
+ spawnedWorkDuringRender = [lane];
} else {
- spawnedWorkDuringRender.push(expirationTime);
+ spawnedWorkDuringRender.push(lane);
}
}
-function scheduleInteractions(root, expirationTime, interactions) {
+function scheduleInteractions(root, lane, interactions) {
if (interactions.size > 0) {
var pendingInteractionMap = root.pendingInteractionMap;
- var pendingInteractions = pendingInteractionMap.get(expirationTime);
+ var pendingInteractions = pendingInteractionMap.get(lane);
if (pendingInteractions != null) {
interactions.forEach(function (interaction) {
@@ -23335,7 +24126,7 @@ function scheduleInteractions(root, expirationTime, interactions) {
pendingInteractions.add(interaction);
});
} else {
- pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions.
+ pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.
interactions.forEach(function (interaction) {
interaction.__count++;
@@ -23345,25 +24136,25 @@ function scheduleInteractions(root, expirationTime, interactions) {
var subscriber = tracing.__subscriberRef.current;
if (subscriber !== null) {
- var threadID = computeThreadID(root, expirationTime);
+ var threadID = computeThreadID(root, lane);
subscriber.onWorkScheduled(interactions, threadID);
}
}
}
-function schedulePendingInteractions(root, expirationTime) {
+function schedulePendingInteractions(root, lane) {
- scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
+ scheduleInteractions(root, lane, tracing.__interactionsRef.current);
}
-function startWorkOnPendingInteractions(root, expirationTime) {
+function startWorkOnPendingInteractions(root, lanes) {
// we can accurately attribute time spent working on it, And so that cascading
// work triggered during the render phase will be associated with it.
var interactions = new Set();
- root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
- if (scheduledExpirationTime >= expirationTime) {
+ root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {
+ if (includesSomeLane(lanes, scheduledLane)) {
scheduledInteractions.forEach(function (interaction) {
return interactions.add(interaction);
});
@@ -23380,13 +24171,13 @@ function startWorkOnPendingInteractions(root, expirationTime) {
var subscriber = tracing.__subscriberRef.current;
if (subscriber !== null) {
- var threadID = computeThreadID(root, expirationTime);
+ var threadID = computeThreadID(root, lanes);
try {
subscriber.onWorkStarted(interactions, threadID);
} catch (error) {
// If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
+ scheduleCallback(ImmediatePriority$1, function () {
throw error;
});
}
@@ -23394,21 +24185,22 @@ function startWorkOnPendingInteractions(root, expirationTime) {
}
}
-function finishPendingInteractions(root, committedExpirationTime) {
+function finishPendingInteractions(root, committedLanes) {
- var earliestRemainingTimeAfterCommit = root.firstPendingTime;
+ var remainingLanesAfterCommit = root.pendingLanes;
var subscriber;
try {
subscriber = tracing.__subscriberRef.current;
if (subscriber !== null && root.memoizedInteractions.size > 0) {
- var threadID = computeThreadID(root, committedExpirationTime);
+ // FIXME: More than one lane can finish in a single commit.
+ var threadID = computeThreadID(root, committedLanes);
subscriber.onWorkStopped(root.memoizedInteractions, threadID);
}
} catch (error) {
// If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
+ scheduleCallback(ImmediatePriority$1, function () {
throw error;
});
} finally {
@@ -23416,12 +24208,12 @@ function finishPendingInteractions(root, committedExpirationTime) {
// Unless the render was suspended or cascading work was scheduled,
// In which case– leave pending interactions until the subsequent render.
var pendingInteractionMap = root.pendingInteractionMap;
- pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
+ pendingInteractionMap.forEach(function (scheduledInteractions, lane) {
// Only decrement the pending interaction count if we're done.
// If there's still work at the current priority,
// That indicates that we are waiting for suspense data.
- if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {
- pendingInteractionMap.delete(scheduledExpirationTime);
+ if (!includesSomeLane(remainingLanesAfterCommit, lane)) {
+ pendingInteractionMap.delete(lane);
scheduledInteractions.forEach(function (interaction) {
interaction.__count--;
@@ -23430,7 +24222,7 @@ function finishPendingInteractions(root, committedExpirationTime) {
subscriber.onInteractionScheduledWorkCompleted(interaction);
} catch (error) {
// If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
+ scheduleCallback(ImmediatePriority$1, function () {
throw error;
});
}
@@ -23439,116 +24231,416 @@ function finishPendingInteractions(root, committedExpirationTime) {
}
});
}
+} // `act` testing API
+
+function shouldForceFlushFallbacksInDEV() {
+ // Never force flush in production. This function should get stripped out.
+ return actingUpdatesScopeDepth > 0;
}
+// so we can tell if any async act() calls try to run in parallel.
-var onScheduleFiberRoot = null;
-var onCommitFiberRoot = null;
-var onCommitFiberUnmount = null;
-var hasLoggedError = false;
-var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
-function injectInternals(internals) {
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
- // No DevTools
- return false;
- }
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+var actingUpdatesScopeDepth = 0;
- if (hook.isDisabled) {
- // This isn't a real property on the hook, but it can be set to opt out
- // of DevTools integration and associated warnings and logs.
- // https://github.com/facebook/react/issues/3877
- return true;
+function detachFiberAfterEffects(fiber) {
+ fiber.sibling = null;
+ fiber.stateNode = null;
+}
+
+var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
+
+var failedBoundaries = null;
+var setRefreshHandler = function (handler) {
+ {
+ resolveFamily = handler;
}
+};
+function resolveFunctionForHotReloading(type) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return type;
+ }
- if (!hook.supportsFiber) {
- {
- error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
- } // DevTools exists, even though it doesn't support Fiber.
+ var family = resolveFamily(type);
+ if (family === undefined) {
+ return type;
+ } // Use the latest known implementation.
- return true;
+
+ return family.current;
}
+}
+function resolveClassForHotReloading(type) {
+ // No implementation differences.
+ return resolveFunctionForHotReloading(type);
+}
+function resolveForwardRefForHotReloading(type) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return type;
+ }
- try {
- var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
+ var family = resolveFamily(type);
- if (true) {
- // Only used by Fast Refresh
- if (typeof hook.onScheduleFiberRoot === 'function') {
- onScheduleFiberRoot = function (root, children) {
- try {
- hook.onScheduleFiberRoot(rendererID, root, children);
- } catch (err) {
- if (true && !hasLoggedError) {
- hasLoggedError = true;
+ if (family === undefined) {
+ // Check if we're dealing with a real forwardRef. Don't want to crash early.
+ if (type !== null && type !== undefined && typeof type.render === 'function') {
+ // ForwardRef is special because its resolved .type is an object,
+ // but it's possible that we only have its inner render function in the map.
+ // If that inner render function is different, we'll build a new forwardRef type.
+ var currentRender = resolveFunctionForHotReloading(type.render);
- error('React instrumentation encountered an error: %s', err);
- }
+ if (type.render !== currentRender) {
+ var syntheticType = {
+ $$typeof: REACT_FORWARD_REF_TYPE,
+ render: currentRender
+ };
+
+ if (type.displayName !== undefined) {
+ syntheticType.displayName = type.displayName;
}
- };
+
+ return syntheticType;
+ }
}
+
+ return type;
+ } // Use the latest known implementation.
+
+
+ return family.current;
+ }
+}
+function isCompatibleFamilyForHotReloading(fiber, element) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return false;
}
- onCommitFiberRoot = function (root, expirationTime) {
- try {
- var didError = (root.current.effectTag & DidCapture) === DidCapture;
+ var prevType = fiber.elementType;
+ var nextType = element.type; // If we got here, we know types aren't === equal.
- if (enableProfilerTimer) {
- var currentTime = getCurrentTime();
- var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime);
- hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
- } else {
- hook.onCommitFiberRoot(rendererID, root, undefined, didError);
+ var needsCompareFamilies = false;
+ var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
+
+ switch (fiber.tag) {
+ case ClassComponent:
+ {
+ if (typeof nextType === 'function') {
+ needsCompareFamilies = true;
+ }
+
+ break;
}
- } catch (err) {
- if (true) {
- if (!hasLoggedError) {
- hasLoggedError = true;
- error('React instrumentation encountered an error: %s', err);
+ case FunctionComponent:
+ {
+ if (typeof nextType === 'function') {
+ needsCompareFamilies = true;
+ } else if ($$typeofNextType === REACT_LAZY_TYPE) {
+ // We don't know the inner type yet.
+ // We're going to assume that the lazy inner type is stable,
+ // and so it is sufficient to avoid reconciling it away.
+ // We're not going to unwrap or actually use the new lazy type.
+ needsCompareFamilies = true;
}
+
+ break;
}
+
+ case ForwardRef:
+ {
+ if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
+ needsCompareFamilies = true;
+ } else if ($$typeofNextType === REACT_LAZY_TYPE) {
+ needsCompareFamilies = true;
+ }
+
+ break;
+ }
+
+ case MemoComponent:
+ case SimpleMemoComponent:
+ {
+ if ($$typeofNextType === REACT_MEMO_TYPE) {
+ // TODO: if it was but can no longer be simple,
+ // we shouldn't set this.
+ needsCompareFamilies = true;
+ } else if ($$typeofNextType === REACT_LAZY_TYPE) {
+ needsCompareFamilies = true;
+ }
+
+ break;
+ }
+
+ default:
+ return false;
+ } // Check if both types have a family and it's the same one.
+
+
+ if (needsCompareFamilies) {
+ // Note: memo() and forwardRef() we'll compare outer rather than inner type.
+ // This means both of them need to be registered to preserve state.
+ // If we unwrapped and compared the inner types for wrappers instead,
+ // then we would risk falsely saying two separate memo(Foo)
+ // calls are equivalent because they wrap the same Foo function.
+ var prevFamily = resolveFamily(prevType);
+
+ if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
+ return true;
}
- };
+ }
- onCommitFiberUnmount = function (fiber) {
- try {
- hook.onCommitFiberUnmount(rendererID, fiber);
- } catch (err) {
- if (true) {
- if (!hasLoggedError) {
- hasLoggedError = true;
+ return false;
+ }
+}
+function markFailedErrorBoundaryForHotReloading(fiber) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return;
+ }
+
+ if (typeof WeakSet !== 'function') {
+ return;
+ }
+
+ if (failedBoundaries === null) {
+ failedBoundaries = new WeakSet();
+ }
+
+ failedBoundaries.add(fiber);
+ }
+}
+var scheduleRefresh = function (root, update) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return;
+ }
+
+ var staleFamilies = update.staleFamilies,
+ updatedFamilies = update.updatedFamilies;
+ flushPassiveEffects();
+ flushSync(function () {
+ scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
+ });
+ }
+};
+var scheduleRoot = function (root, element) {
+ {
+ if (root.context !== emptyContextObject) {
+ // Super edge case: root has a legacy _renderSubtree context
+ // but we don't know the parentComponent so we can't pass it.
+ // Just ignore. We'll delete this with _renderSubtree code path later.
+ return;
+ }
- error('React instrumentation encountered an error: %s', err);
+ flushPassiveEffects();
+ flushSync(function () {
+ updateContainer(element, root, null, null);
+ });
+ }
+};
+
+function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
+ {
+ var alternate = fiber.alternate,
+ child = fiber.child,
+ sibling = fiber.sibling,
+ tag = fiber.tag,
+ type = fiber.type;
+ var candidateType = null;
+
+ switch (tag) {
+ case FunctionComponent:
+ case SimpleMemoComponent:
+ case ClassComponent:
+ candidateType = type;
+ break;
+
+ case ForwardRef:
+ candidateType = type.render;
+ break;
+ }
+
+ if (resolveFamily === null) {
+ throw new Error('Expected resolveFamily to be set during hot reload.');
+ }
+
+ var needsRender = false;
+ var needsRemount = false;
+
+ if (candidateType !== null) {
+ var family = resolveFamily(candidateType);
+
+ if (family !== undefined) {
+ if (staleFamilies.has(family)) {
+ needsRemount = true;
+ } else if (updatedFamilies.has(family)) {
+ if (tag === ClassComponent) {
+ needsRemount = true;
+ } else {
+ needsRender = true;
}
}
}
- };
- } catch (err) {
- // Catch all errors because it is unsafe to throw during initialization.
- {
- error('React instrumentation encountered an error: %s.', err);
}
- } // DevTools exists
+ if (failedBoundaries !== null) {
+ if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
+ needsRemount = true;
+ }
+ }
+
+ if (needsRemount) {
+ fiber._debugNeedsRemount = true;
+ }
- return true;
+ if (needsRemount || needsRender) {
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ }
+
+ if (child !== null && !needsRemount) {
+ scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
+ }
+
+ if (sibling !== null) {
+ scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
+ }
+ }
}
-function onScheduleRoot(root, children) {
- if (typeof onScheduleFiberRoot === 'function') {
- onScheduleFiberRoot(root, children);
+
+var findHostInstancesForRefresh = function (root, families) {
+ {
+ var hostInstances = new Set();
+ var types = new Set(families.map(function (family) {
+ return family.current;
+ }));
+ findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
+ return hostInstances;
+ }
+};
+
+function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
+ {
+ var child = fiber.child,
+ sibling = fiber.sibling,
+ tag = fiber.tag,
+ type = fiber.type;
+ var candidateType = null;
+
+ switch (tag) {
+ case FunctionComponent:
+ case SimpleMemoComponent:
+ case ClassComponent:
+ candidateType = type;
+ break;
+
+ case ForwardRef:
+ candidateType = type.render;
+ break;
+ }
+
+ var didMatch = false;
+
+ if (candidateType !== null) {
+ if (types.has(candidateType)) {
+ didMatch = true;
+ }
+ }
+
+ if (didMatch) {
+ // We have a match. This only drills down to the closest host components.
+ // There's no need to search deeper because for the purpose of giving
+ // visual feedback, "flashing" outermost parent rectangles is sufficient.
+ findHostInstancesForFiberShallowly(fiber, hostInstances);
+ } else {
+ // If there's no match, maybe there will be one further down in the child tree.
+ if (child !== null) {
+ findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
+ }
+ }
+
+ if (sibling !== null) {
+ findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
+ }
}
}
-function onCommitRoot(root, expirationTime) {
- if (typeof onCommitFiberRoot === 'function') {
- onCommitFiberRoot(root, expirationTime);
+
+function findHostInstancesForFiberShallowly(fiber, hostInstances) {
+ {
+ var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
+
+ if (foundHostInstances) {
+ return;
+ } // If we didn't find any host children, fallback to closest host parent.
+
+
+ var node = fiber;
+
+ while (true) {
+ switch (node.tag) {
+ case HostComponent:
+ hostInstances.add(node.stateNode);
+ return;
+
+ case HostPortal:
+ hostInstances.add(node.stateNode.containerInfo);
+ return;
+
+ case HostRoot:
+ hostInstances.add(node.stateNode.containerInfo);
+ return;
+ }
+
+ if (node.return === null) {
+ throw new Error('Expected to reach root first.');
+ }
+
+ node = node.return;
+ }
}
}
-function onCommitUnmount(fiber) {
- if (typeof onCommitFiberUnmount === 'function') {
- onCommitFiberUnmount(fiber);
+
+function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
+ {
+ var node = fiber;
+ var foundHostInstances = false;
+
+ while (true) {
+ if (node.tag === HostComponent) {
+ // We got a match.
+ foundHostInstances = true;
+ hostInstances.add(node.stateNode); // There may still be more, so keep searching.
+ } else if (node.child !== null) {
+ node.child.return = node;
+ node = node.child;
+ continue;
+ }
+
+ if (node === fiber) {
+ return foundHostInstances;
+ }
+
+ while (node.sibling === null) {
+ if (node.return === null || node.return === fiber) {
+ return foundHostInstances;
+ }
+
+ node = node.return;
+ }
+
+ node.sibling.return = node.return;
+ node = node.sibling;
+ }
}
+
+ return false;
}
var hasBadMapPolyfill;
@@ -23558,13 +24650,11 @@ var hasBadMapPolyfill;
try {
var nonExtensibleObject = Object.preventExtensions({});
- var testMap = new Map([[nonExtensibleObject, null]]);
- var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused.
- // https://github.com/rollup/rollup/issues/1771
- // TODO: we can remove these if Rollup fixes the bug.
+ /* eslint-disable no-new */
- testMap.set(0, 0);
- testSet.add(0);
+ new Map([[nonExtensibleObject, null]]);
+ new Set([nonExtensibleObject]);
+ /* eslint-enable no-new */
} catch (e) {
// TODO: Consider warning about bad polyfills
hasBadMapPolyfill = true;
@@ -23593,12 +24683,12 @@ function FiberNode(tag, pendingProps, key, mode) {
this.dependencies = null;
this.mode = mode; // Effects
- this.effectTag = NoEffect;
+ this.flags = NoFlags;
this.nextEffect = null;
this.firstEffect = null;
this.lastEffect = null;
- this.expirationTime = NoWork;
- this.childExpirationTime = NoWork;
+ this.lanes = NoLanes;
+ this.childLanes = NoLanes;
this.alternate = null;
{
@@ -23625,16 +24715,11 @@ function FiberNode(tag, pendingProps, key, mode) {
this.actualStartTime = -1;
this.selfBaseDuration = 0;
this.treeBaseDuration = 0;
- } // This is normally DEV-only except www when it adds listeners.
- // TODO: remove the User Timing integration in favor of Root Events.
-
-
- {
- this._debugID = debugCounter++;
- this._debugIsCurrentlyTiming = false;
}
{
+ // This isn't directly used but is handy for debugging internals:
+ this._debugID = debugCounter++;
this._debugSource = null;
this._debugOwner = null;
this._debugNeedsRemount = false;
@@ -23664,17 +24749,17 @@ var createFiber = function (tag, pendingProps, key, mode) {
return new FiberNode(tag, pendingProps, key, mode);
};
-function shouldConstruct(Component) {
+function shouldConstruct$1(Component) {
var prototype = Component.prototype;
return !!(prototype && prototype.isReactComponent);
}
function isSimpleFunctionComponent(type) {
- return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
+ return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;
}
function resolveLazyComponentTag(Component) {
if (typeof Component === 'function') {
- return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
+ return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
@@ -23706,10 +24791,7 @@ function createWorkInProgress(current, pendingProps) {
{
// DEV-only fields
- {
- workInProgress._debugID = current._debugID;
- }
-
+ workInProgress._debugID = current._debugID;
workInProgress._debugSource = current._debugSource;
workInProgress._debugOwner = current._debugOwner;
workInProgress._debugHookTypes = current._debugHookTypes;
@@ -23718,10 +24800,12 @@ function createWorkInProgress(current, pendingProps) {
workInProgress.alternate = current;
current.alternate = workInProgress;
} else {
- workInProgress.pendingProps = pendingProps; // We already have an alternate.
+ workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.
+
+ workInProgress.type = current.type; // We already have an alternate.
// Reset the effect tag.
- workInProgress.effectTag = NoEffect; // The effect list is no longer valid.
+ workInProgress.flags = NoFlags; // The effect list is no longer valid.
workInProgress.nextEffect = null;
workInProgress.firstEffect = null;
@@ -23737,8 +24821,8 @@ function createWorkInProgress(current, pendingProps) {
}
}
- workInProgress.childExpirationTime = current.childExpirationTime;
- workInProgress.expirationTime = current.expirationTime;
+ workInProgress.childLanes = current.childLanes;
+ workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
workInProgress.memoizedProps = current.memoizedProps;
workInProgress.memoizedState = current.memoizedState;
@@ -23747,9 +24831,8 @@ function createWorkInProgress(current, pendingProps) {
var currentDependencies = current.dependencies;
workInProgress.dependencies = currentDependencies === null ? null : {
- expirationTime: currentDependencies.expirationTime,
- firstContext: currentDependencies.firstContext,
- responders: currentDependencies.responders
+ lanes: currentDependencies.lanes,
+ firstContext: currentDependencies.firstContext
}; // These will be overridden during the parent's reconciliation
workInProgress.sibling = current.sibling;
@@ -23784,7 +24867,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
} // Used to reuse a Fiber for a second pass.
-function resetWorkInProgress(workInProgress, renderExpirationTime) {
+function resetWorkInProgress(workInProgress, renderLanes) {
// This resets the Fiber to what createFiber or createWorkInProgress would
// have set the values to before during the first pass. Ideally this wouldn't
// be necessary but unfortunately many code paths reads from the workInProgress
@@ -23793,7 +24876,7 @@ function resetWorkInProgress(workInProgress, renderExpirationTime) {
// avoid doing another reconciliation.
// Reset the effect tag but keep any Placement tags, since that's something
// that child fiber is setting, not the reconciliation.
- workInProgress.effectTag &= Placement; // The effect list is no longer valid.
+ workInProgress.flags &= Placement; // The effect list is no longer valid.
workInProgress.nextEffect = null;
workInProgress.firstEffect = null;
@@ -23802,13 +24885,14 @@ function resetWorkInProgress(workInProgress, renderExpirationTime) {
if (current === null) {
// Reset to createFiber's initial values.
- workInProgress.childExpirationTime = NoWork;
- workInProgress.expirationTime = renderExpirationTime;
+ workInProgress.childLanes = NoLanes;
+ workInProgress.lanes = renderLanes;
workInProgress.child = null;
workInProgress.memoizedProps = null;
workInProgress.memoizedState = null;
workInProgress.updateQueue = null;
workInProgress.dependencies = null;
+ workInProgress.stateNode = null;
{
// Note: We don't reset the actualTime counts. It's useful to accumulate
@@ -23818,19 +24902,20 @@ function resetWorkInProgress(workInProgress, renderExpirationTime) {
}
} else {
// Reset to the cloned values that createWorkInProgress would've.
- workInProgress.childExpirationTime = current.childExpirationTime;
- workInProgress.expirationTime = current.expirationTime;
+ workInProgress.childLanes = current.childLanes;
+ workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
workInProgress.memoizedProps = current.memoizedProps;
workInProgress.memoizedState = current.memoizedState;
- workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
+ workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.
+
+ workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so
// it cannot be shared with the current fiber.
var currentDependencies = current.dependencies;
workInProgress.dependencies = currentDependencies === null ? null : {
- expirationTime: currentDependencies.expirationTime,
- firstContext: currentDependencies.firstContext,
- responders: currentDependencies.responders
+ lanes: currentDependencies.lanes,
+ firstContext: currentDependencies.firstContext
};
{
@@ -23864,14 +24949,13 @@ function createHostRootFiber(tag) {
return createFiber(HostRoot, null, null, mode);
}
function createFiberFromTypeAndProps(type, // React$ElementType
-key, pendingProps, owner, mode, expirationTime) {
- var fiber;
+key, pendingProps, owner, mode, lanes) {
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var resolvedType = type;
if (typeof type === 'function') {
- if (shouldConstruct(type)) {
+ if (shouldConstruct$1(type)) {
fiberTag = ClassComponent;
{
@@ -23887,11 +24971,11 @@ key, pendingProps, owner, mode, expirationTime) {
} else {
getTag: switch (type) {
case REACT_FRAGMENT_TYPE:
- return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
+ return createFiberFromFragment(pendingProps.children, mode, lanes, key);
- case REACT_CONCURRENT_MODE_TYPE:
+ case REACT_DEBUG_TRACING_MODE_TYPE:
fiberTag = Mode;
- mode |= ConcurrentMode | BlockingMode | StrictMode;
+ mode |= DebugTracingMode;
break;
case REACT_STRICT_MODE_TYPE:
@@ -23900,13 +24984,23 @@ key, pendingProps, owner, mode, expirationTime) {
break;
case REACT_PROFILER_TYPE:
- return createFiberFromProfiler(pendingProps, mode, expirationTime, key);
+ return createFiberFromProfiler(pendingProps, mode, lanes, key);
case REACT_SUSPENSE_TYPE:
- return createFiberFromSuspense(pendingProps, mode, expirationTime, key);
+ return createFiberFromSuspense(pendingProps, mode, lanes, key);
case REACT_SUSPENSE_LIST_TYPE:
- return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key);
+ return createFiberFromSuspenseList(pendingProps, mode, lanes, key);
+
+ case REACT_OFFSCREEN_TYPE:
+ return createFiberFromOffscreen(pendingProps, mode, lanes, key);
+
+ case REACT_LEGACY_HIDDEN_TYPE:
+ return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);
+
+ case REACT_SCOPE_TYPE:
+
+ // eslint-disable-next-line no-fallthrough
default:
{
@@ -23942,7 +25036,6 @@ key, pendingProps, owner, mode, expirationTime) {
case REACT_BLOCK_TYPE:
fiberTag = Block;
break getTag;
-
}
}
@@ -23969,13 +25062,18 @@ key, pendingProps, owner, mode, expirationTime) {
}
}
- fiber = createFiber(fiberTag, pendingProps, key, mode);
+ var fiber = createFiber(fiberTag, pendingProps, key, mode);
fiber.elementType = type;
fiber.type = resolvedType;
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
+
+ {
+ fiber._debugOwner = owner;
+ }
+
return fiber;
}
-function createFiberFromElement(element, mode, expirationTime) {
+function createFiberFromElement(element, mode, lanes) {
var owner = null;
{
@@ -23985,7 +25083,7 @@ function createFiberFromElement(element, mode, expirationTime) {
var type = element.type;
var key = element.key;
var pendingProps = element.props;
- var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);
+ var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);
{
fiber._debugSource = element._source;
@@ -23994,16 +25092,16 @@ function createFiberFromElement(element, mode, expirationTime) {
return fiber;
}
-function createFiberFromFragment(elements, mode, expirationTime, key) {
+function createFiberFromFragment(elements, mode, lanes, key) {
var fiber = createFiber(Fragment, elements, key, mode);
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
return fiber;
}
-function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
+function createFiberFromProfiler(pendingProps, mode, lanes, key) {
{
- if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {
- error('Profiler must specify an "id" string and "onRender" function as props');
+ if (typeof pendingProps.id !== 'string') {
+ error('Profiler must specify an "id" as a prop');
}
}
@@ -24011,21 +25109,29 @@ function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
fiber.elementType = REACT_PROFILER_TYPE;
fiber.type = REACT_PROFILER_TYPE;
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
+
+ {
+ fiber.stateNode = {
+ effectDuration: 0,
+ passiveEffectDuration: 0
+ };
+ }
+
return fiber;
}
-function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {
+function createFiberFromSuspense(pendingProps, mode, lanes, key) {
var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
// This needs to be fixed in getComponentName so that it relies on the tag
// instead.
fiber.type = REACT_SUSPENSE_TYPE;
fiber.elementType = REACT_SUSPENSE_TYPE;
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
return fiber;
}
-function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {
+function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
{
@@ -24036,12 +25142,38 @@ function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {
}
fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
+ return fiber;
+}
+function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
+ var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.
+ // This needs to be fixed in getComponentName so that it relies on the tag
+ // instead.
+
+ {
+ fiber.type = REACT_OFFSCREEN_TYPE;
+ }
+
+ fiber.elementType = REACT_OFFSCREEN_TYPE;
+ fiber.lanes = lanes;
+ return fiber;
+}
+function createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {
+ var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.
+ // This needs to be fixed in getComponentName so that it relies on the tag
+ // instead.
+
+ {
+ fiber.type = REACT_LEGACY_HIDDEN_TYPE;
+ }
+
+ fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
+ fiber.lanes = lanes;
return fiber;
}
-function createFiberFromText(content, mode, expirationTime) {
+function createFiberFromText(content, mode, lanes) {
var fiber = createFiber(HostText, content, null, mode);
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
return fiber;
}
function createFiberFromHostInstanceForDeletion() {
@@ -24051,10 +25183,10 @@ function createFiberFromHostInstanceForDeletion() {
fiber.type = 'DELETED';
return fiber;
}
-function createFiberFromPortal(portal, mode, expirationTime) {
+function createFiberFromPortal(portal, mode, lanes) {
var pendingProps = portal.children !== null ? portal.children : [];
var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
fiber.stateNode = {
containerInfo: portal.containerInfo,
pendingChildren: null,
@@ -24092,12 +25224,12 @@ function assignFiberPropertiesInDEV(target, source) {
target.memoizedState = source.memoizedState;
target.dependencies = source.dependencies;
target.mode = source.mode;
- target.effectTag = source.effectTag;
+ target.flags = source.flags;
target.nextEffect = source.nextEffect;
target.firstEffect = source.firstEffect;
target.lastEffect = source.lastEffect;
- target.expirationTime = source.expirationTime;
- target.childExpirationTime = source.childExpirationTime;
+ target.lanes = source.lanes;
+ target.childLanes = source.childLanes;
target.alternate = source.alternate;
{
@@ -24107,13 +25239,9 @@ function assignFiberPropertiesInDEV(target, source) {
target.treeBaseDuration = source.treeBaseDuration;
}
- {
- target._debugID = source._debugID;
- }
-
+ target._debugID = source._debugID;
target._debugSource = source._debugSource;
target._debugOwner = source._debugOwner;
- target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;
target._debugNeedsRemount = source._debugNeedsRemount;
target._debugHookTypes = source._debugHookTypes;
return target;
@@ -24121,30 +25249,53 @@ function assignFiberPropertiesInDEV(target, source) {
function FiberRootNode(containerInfo, tag, hydrate) {
this.tag = tag;
- this.current = null;
this.containerInfo = containerInfo;
this.pendingChildren = null;
+ this.current = null;
this.pingCache = null;
- this.finishedExpirationTime = NoWork;
this.finishedWork = null;
this.timeoutHandle = noTimeout;
this.context = null;
this.pendingContext = null;
this.hydrate = hydrate;
this.callbackNode = null;
- this.callbackPriority = NoPriority;
- this.firstPendingTime = NoWork;
- this.firstSuspendedTime = NoWork;
- this.lastSuspendedTime = NoWork;
- this.nextKnownPendingLevel = NoWork;
- this.lastPingedTime = NoWork;
- this.lastExpiredTime = NoWork;
+ this.callbackPriority = NoLanePriority;
+ this.eventTimes = createLaneMap(NoLanes);
+ this.expirationTimes = createLaneMap(NoTimestamp);
+ this.pendingLanes = NoLanes;
+ this.suspendedLanes = NoLanes;
+ this.pingedLanes = NoLanes;
+ this.expiredLanes = NoLanes;
+ this.mutableReadLanes = NoLanes;
+ this.finishedLanes = NoLanes;
+ this.entangledLanes = NoLanes;
+ this.entanglements = createLaneMap(NoLanes);
+
+ {
+ this.mutableSourceEagerHydrationData = null;
+ }
{
this.interactionThreadID = tracing.unstable_getThreadID();
this.memoizedInteractions = new Set();
this.pendingInteractionMap = new Map();
}
+
+ {
+ switch (tag) {
+ case BlockingRoot:
+ this._debugRootType = 'createBlockingRoot()';
+ break;
+
+ case ConcurrentRoot:
+ this._debugRootType = 'createRoot()';
+ break;
+
+ case LegacyRoot:
+ this._debugRootType = 'createLegacyRoot()';
+ break;
+ }
+ }
}
function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
@@ -24158,89 +25309,34 @@ function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
initializeUpdateQueue(uninitializedFiber);
return root;
}
-function isRootSuspendedAtTime(root, expirationTime) {
- var firstSuspendedTime = root.firstSuspendedTime;
- var lastSuspendedTime = root.lastSuspendedTime;
- return firstSuspendedTime !== NoWork && firstSuspendedTime >= expirationTime && lastSuspendedTime <= expirationTime;
-}
-function markRootSuspendedAtTime(root, expirationTime) {
- var firstSuspendedTime = root.firstSuspendedTime;
- var lastSuspendedTime = root.lastSuspendedTime;
-
- if (firstSuspendedTime < expirationTime) {
- root.firstSuspendedTime = expirationTime;
- }
-
- if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) {
- root.lastSuspendedTime = expirationTime;
- }
-
- if (expirationTime <= root.lastPingedTime) {
- root.lastPingedTime = NoWork;
- }
-
- if (expirationTime <= root.lastExpiredTime) {
- root.lastExpiredTime = NoWork;
- }
-}
-function markRootUpdatedAtTime(root, expirationTime) {
- // Update the range of pending times
- var firstPendingTime = root.firstPendingTime;
-
- if (expirationTime > firstPendingTime) {
- root.firstPendingTime = expirationTime;
- } // Update the range of suspended times. Treat everything lower priority or
- // equal to this update as unsuspended.
-
- var firstSuspendedTime = root.firstSuspendedTime;
+// This ensures that the version used for server rendering matches the one
+// that is eventually read during hydration.
+// If they don't match there's a potential tear and a full deopt render is required.
- if (firstSuspendedTime !== NoWork) {
- if (expirationTime >= firstSuspendedTime) {
- // The entire suspended range is now unsuspended.
- root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
- } else if (expirationTime >= root.lastSuspendedTime) {
- root.lastSuspendedTime = expirationTime + 1;
- } // This is a pending level. Check if it's higher priority than the next
- // known pending level.
+function registerMutableSourceForHydration(root, mutableSource) {
+ var getVersion = mutableSource._getVersion;
+ var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
+ // Retaining it forever may interfere with GC.
-
- if (expirationTime > root.nextKnownPendingLevel) {
- root.nextKnownPendingLevel = expirationTime;
- }
- }
-}
-function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) {
- // Update the range of pending times
- root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or
- // equal to this update as unsuspended.
-
- if (finishedExpirationTime <= root.lastSuspendedTime) {
- // The entire suspended range is now unsuspended.
- root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
- } else if (finishedExpirationTime <= root.firstSuspendedTime) {
- // Part of the suspended range is now unsuspended. Narrow the range to
- // include everything between the unsuspended time (non-inclusive) and the
- // last suspended time.
- root.firstSuspendedTime = finishedExpirationTime - 1;
- }
-
- if (finishedExpirationTime <= root.lastPingedTime) {
- // Clear the pinged time
- root.lastPingedTime = NoWork;
- }
-
- if (finishedExpirationTime <= root.lastExpiredTime) {
- // Clear the expired time
- root.lastExpiredTime = NoWork;
+ if (root.mutableSourceEagerHydrationData == null) {
+ root.mutableSourceEagerHydrationData = [mutableSource, version];
+ } else {
+ root.mutableSourceEagerHydrationData.push(mutableSource, version);
}
}
-function markRootExpiredAtTime(root, expirationTime) {
- var lastExpiredTime = root.lastExpiredTime;
- if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) {
- root.lastExpiredTime = expirationTime;
- }
+function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
+implementation) {
+ var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
+ return {
+ // This tag allow us to uniquely identify this as a React Portal
+ $$typeof: REACT_PORTAL_TYPE,
+ key: key == null ? null : '' + key,
+ children: children,
+ containerInfo: containerInfo,
+ implementation: implementation
+ };
}
var didWarnAboutNestedUpdates;
@@ -24301,11 +25397,24 @@ function findHostInstanceWithWarning(component, methodName) {
if (!didWarnAboutFindNodeInStrictMode[componentName]) {
didWarnAboutFindNodeInStrictMode[componentName] = true;
+ var previousFiber = current;
- if (fiber.mode & StrictMode) {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
- } else {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
+ try {
+ setCurrentFiber(hostFiber);
+
+ if (fiber.mode & StrictMode) {
+ error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
+ } else {
+ error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
+ }
+ } finally {
+ // Ideally this should reset to previous but this shouldn't be called in
+ // render and there's another warning for that anyway.
+ if (previousFiber) {
+ setCurrentFiber(previousFiber);
+ } else {
+ resetCurrentFiber();
+ }
}
}
}
@@ -24323,7 +25432,7 @@ function updateContainer(element, container, parentComponent, callback) {
}
var current$1 = container.current;
- var currentTime = requestCurrentTimeForUpdate();
+ var eventTime = requestEventTime();
{
// $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
@@ -24333,8 +25442,8 @@ function updateContainer(element, container, parentComponent, callback) {
}
}
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, current$1, suspenseConfig);
+ var lane = requestUpdateLane(current$1);
+
var context = getContextForSubtree(parentComponent);
if (container.context === null) {
@@ -24351,7 +25460,7 @@ function updateContainer(element, container, parentComponent, callback) {
}
}
- var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property
+ var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property
// being called "element".
update.payload = {
@@ -24370,8 +25479,8 @@ function updateContainer(element, container, parentComponent, callback) {
}
enqueueUpdate(current$1, update);
- scheduleWork(current$1, expirationTime);
- return expirationTime;
+ scheduleUpdateOnFiber(current$1, lane, eventTime);
+ return lane;
}
function getPublicRootInstance(container) {
var containerFiber = container.current;
@@ -24389,23 +25498,21 @@ function getPublicRootInstance(container) {
}
}
-function markRetryTimeImpl(fiber, retryTime) {
+function markRetryLaneImpl(fiber, retryLane) {
var suspenseState = fiber.memoizedState;
if (suspenseState !== null && suspenseState.dehydrated !== null) {
- if (suspenseState.retryTime < retryTime) {
- suspenseState.retryTime = retryTime;
- }
+ suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
}
} // Increases the priority of thennables when they resolve within this boundary.
-function markRetryTimeIfNotHydrated(fiber, retryTime) {
- markRetryTimeImpl(fiber, retryTime);
+function markRetryLaneIfNotHydrated(fiber, retryLane) {
+ markRetryLaneImpl(fiber, retryLane);
var alternate = fiber.alternate;
if (alternate) {
- markRetryTimeImpl(alternate, retryTime);
+ markRetryLaneImpl(alternate, retryLane);
}
}
@@ -24418,9 +25525,10 @@ function attemptUserBlockingHydration$1(fiber) {
return;
}
- var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate());
- scheduleWork(fiber, expTime);
- markRetryTimeIfNotHydrated(fiber, expTime);
+ var eventTime = requestEventTime();
+ var lane = InputDiscreteHydrationLane;
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
+ markRetryLaneIfNotHydrated(fiber, lane);
}
function attemptContinuousHydration$1(fiber) {
if (fiber.tag !== SuspenseComponent) {
@@ -24431,8 +25539,10 @@ function attemptContinuousHydration$1(fiber) {
return;
}
- scheduleWork(fiber, ContinuousHydration);
- markRetryTimeIfNotHydrated(fiber, ContinuousHydration);
+ var eventTime = requestEventTime();
+ var lane = SelectiveHydrationLane;
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
+ markRetryLaneIfNotHydrated(fiber, lane);
}
function attemptHydrationAtCurrentPriority$1(fiber) {
if (fiber.tag !== SuspenseComponent) {
@@ -24441,10 +25551,18 @@ function attemptHydrationAtCurrentPriority$1(fiber) {
return;
}
- var currentTime = requestCurrentTimeForUpdate();
- var expTime = computeExpirationForFiber(currentTime, fiber, null);
- scheduleWork(fiber, expTime);
- markRetryTimeIfNotHydrated(fiber, expTime);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
+ markRetryLaneIfNotHydrated(fiber, lane);
+}
+function runWithPriority$2(priority, fn) {
+
+ try {
+ setCurrentUpdateLanePriority(priority);
+ return fn();
+ } finally {
+ }
}
function findHostInstanceWithNoPortals(fiber) {
var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
@@ -24468,29 +25586,96 @@ function shouldSuspend(fiber) {
return shouldSuspendImpl(fiber);
}
var overrideHookState = null;
+var overrideHookStateDeletePath = null;
+var overrideHookStateRenamePath = null;
var overrideProps = null;
+var overridePropsDeletePath = null;
+var overridePropsRenamePath = null;
var scheduleUpdate = null;
var setSuspenseHandler = null;
{
- var copyWithSetImpl = function (obj, path, idx, value) {
- if (idx >= path.length) {
+ var copyWithDeleteImpl = function (obj, path, index) {
+ var key = path[index];
+ var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
+
+ if (index + 1 === path.length) {
+ if (Array.isArray(updated)) {
+ updated.splice(key, 1);
+ } else {
+ delete updated[key];
+ }
+
+ return updated;
+ } // $FlowFixMe number or string is fine here
+
+
+ updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
+ return updated;
+ };
+
+ var copyWithDelete = function (obj, path) {
+ return copyWithDeleteImpl(obj, path, 0);
+ };
+
+ var copyWithRenameImpl = function (obj, oldPath, newPath, index) {
+ var oldKey = oldPath[index];
+ var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
+
+ if (index + 1 === oldPath.length) {
+ var newKey = newPath[index]; // $FlowFixMe number or string is fine here
+
+ updated[newKey] = updated[oldKey];
+
+ if (Array.isArray(updated)) {
+ updated.splice(oldKey, 1);
+ } else {
+ delete updated[oldKey];
+ }
+ } else {
+ // $FlowFixMe number or string is fine here
+ updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here
+ obj[oldKey], oldPath, newPath, index + 1);
+ }
+
+ return updated;
+ };
+
+ var copyWithRename = function (obj, oldPath, newPath) {
+ if (oldPath.length !== newPath.length) {
+ warn('copyWithRename() expects paths of the same length');
+
+ return;
+ } else {
+ for (var i = 0; i < newPath.length - 1; i++) {
+ if (oldPath[i] !== newPath[i]) {
+ warn('copyWithRename() expects paths to be the same except for the deepest key');
+
+ return;
+ }
+ }
+ }
+
+ return copyWithRenameImpl(obj, oldPath, newPath, 0);
+ };
+
+ var copyWithSetImpl = function (obj, path, index, value) {
+ if (index >= path.length) {
return value;
}
- var key = path[idx];
+ var key = path[index];
var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here
- updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
+ updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
return updated;
};
var copyWithSet = function (obj, path, value) {
return copyWithSetImpl(obj, path, 0, value);
- }; // Support DevTools editable values for useState and useReducer.
-
+ };
- overrideHookState = function (fiber, id, path, value) {
+ var findHook = function (fiber, id) {
// For now, the "id" of stateful hooks is just the stateful hook index.
// This may change in the future with e.g. nested hooks.
var currentHook = fiber.memoizedState;
@@ -24500,17 +25685,58 @@ var setSuspenseHandler = null;
id--;
}
- if (currentHook !== null) {
- var newState = copyWithSet(currentHook.memoizedState, path, value);
- currentHook.memoizedState = newState;
- currentHook.baseState = newState; // We aren't actually adding an update to the queue,
+ return currentHook;
+ }; // Support DevTools editable values for useState and useReducer.
+
+
+ overrideHookState = function (fiber, id, path, value) {
+ var hook = findHook(fiber, id);
+
+ if (hook !== null) {
+ var newState = copyWithSet(hook.memoizedState, path, value);
+ hook.memoizedState = newState;
+ hook.baseState = newState; // We aren't actually adding an update to the queue,
+ // because there is no update we can add for useReducer hooks that won't trigger an error.
+ // (There's no appropriate action type for DevTools overrides.)
+ // As a result though, React will see the scheduled update as a noop and bailout.
+ // Shallow cloning props works as a workaround for now to bypass the bailout check.
+
+ fiber.memoizedProps = _assign({}, fiber.memoizedProps);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ }
+ };
+
+ overrideHookStateDeletePath = function (fiber, id, path) {
+ var hook = findHook(fiber, id);
+
+ if (hook !== null) {
+ var newState = copyWithDelete(hook.memoizedState, path);
+ hook.memoizedState = newState;
+ hook.baseState = newState; // We aren't actually adding an update to the queue,
// because there is no update we can add for useReducer hooks that won't trigger an error.
// (There's no appropriate action type for DevTools overrides.)
// As a result though, React will see the scheduled update as a noop and bailout.
// Shallow cloning props works as a workaround for now to bypass the bailout check.
fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleWork(fiber, Sync);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ }
+ };
+
+ overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
+ var hook = findHook(fiber, id);
+
+ if (hook !== null) {
+ var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
+ hook.memoizedState = newState;
+ hook.baseState = newState; // We aren't actually adding an update to the queue,
+ // because there is no update we can add for useReducer hooks that won't trigger an error.
+ // (There's no appropriate action type for DevTools overrides.)
+ // As a result though, React will see the scheduled update as a noop and bailout.
+ // Shallow cloning props works as a workaround for now to bypass the bailout check.
+
+ fiber.memoizedProps = _assign({}, fiber.memoizedProps);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
}
}; // Support DevTools props for function components, forwardRef, memo, host components, etc.
@@ -24522,11 +25748,31 @@ var setSuspenseHandler = null;
fiber.alternate.pendingProps = fiber.pendingProps;
}
- scheduleWork(fiber, Sync);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ };
+
+ overridePropsDeletePath = function (fiber, path) {
+ fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);
+
+ if (fiber.alternate) {
+ fiber.alternate.pendingProps = fiber.pendingProps;
+ }
+
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ };
+
+ overridePropsRenamePath = function (fiber, oldPath, newPath) {
+ fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
+
+ if (fiber.alternate) {
+ fiber.alternate.pendingProps = fiber.pendingProps;
+ }
+
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
};
scheduleUpdate = function (fiber) {
- scheduleWork(fiber, Sync);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
};
setSuspenseHandler = function (newShouldSuspendImpl) {
@@ -24534,44 +25780,52 @@ var setSuspenseHandler = null;
};
}
+function findHostInstanceByFiber(fiber) {
+ var hostFiber = findCurrentHostFiber(fiber);
+
+ if (hostFiber === null) {
+ return null;
+ }
+
+ return hostFiber.stateNode;
+}
+
+function emptyFindFiberByHostInstance(instance) {
+ return null;
+}
+
+function getCurrentFiberForDevTools() {
+ return current;
+}
+
function injectIntoDevTools(devToolsConfig) {
var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
- return injectInternals(_assign({}, devToolsConfig, {
+ return injectInternals({
+ bundleType: devToolsConfig.bundleType,
+ version: devToolsConfig.version,
+ rendererPackageName: devToolsConfig.rendererPackageName,
+ rendererConfig: devToolsConfig.rendererConfig,
overrideHookState: overrideHookState,
+ overrideHookStateDeletePath: overrideHookStateDeletePath,
+ overrideHookStateRenamePath: overrideHookStateRenamePath,
overrideProps: overrideProps,
+ overridePropsDeletePath: overridePropsDeletePath,
+ overridePropsRenamePath: overridePropsRenamePath,
setSuspenseHandler: setSuspenseHandler,
scheduleUpdate: scheduleUpdate,
currentDispatcherRef: ReactCurrentDispatcher,
- findHostInstanceByFiber: function (fiber) {
- var hostFiber = findCurrentHostFiber(fiber);
-
- if (hostFiber === null) {
- return null;
- }
-
- return hostFiber.stateNode;
- },
- findFiberByHostInstance: function (instance) {
- if (!findFiberByHostInstance) {
- // Might not be implemented by the renderer.
- return null;
- }
-
- return findFiberByHostInstance(instance);
- },
+ findHostInstanceByFiber: findHostInstanceByFiber,
+ findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
// React Refresh
findHostInstancesForRefresh: findHostInstancesForRefresh ,
scheduleRefresh: scheduleRefresh ,
scheduleRoot: scheduleRoot ,
setRefreshHandler: setRefreshHandler ,
// Enables DevTools to append owner stacks to error messages in DEV mode.
- getCurrentFiber: function () {
- return current;
- }
- }));
+ getCurrentFiber: getCurrentFiberForDevTools
+ });
}
-var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing;
function ReactDOMRoot(container, options) {
this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
@@ -24623,12 +25877,21 @@ function createRootImpl(container, tag, options) {
// Tag is either LegacyRoot or Concurrent Root
var hydrate = options != null && options.hydrate === true;
var hydrationCallbacks = options != null && options.hydrationOptions || null;
+ var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;
var root = createContainer(container, tag, hydrate);
markContainerAsRoot(root.current, container);
+ var containerNodeType = container.nodeType;
- if (hydrate && tag !== LegacyRoot) {
- var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument;
- eagerlyTrapReplayableEvents(container, doc);
+ {
+ var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
+ listenToAllSupportedEvents(rootContainerElement);
+ }
+
+ if (mutableSources) {
+ for (var i = 0; i < mutableSources.length; i++) {
+ var mutableSource = mutableSources[i];
+ registerMutableSourceForHydration(root, mutableSource);
+ }
}
return root;
@@ -24658,7 +25921,7 @@ var warnedAboutHydrateAPI = false;
var isRootRenderedBySomeReact = !!container._reactRootContainer;
var rootEl = getReactRootElementInContainer(container);
- var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));
+ var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));
if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
@@ -24711,7 +25974,7 @@ function legacyCreateRootFromDOMContainer(container, forceHydrate) {
if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
warnedAboutHydrateAPI = true;
- warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
+ warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v18. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
}
}
@@ -24872,7 +26135,7 @@ function unmountComponentAtNode(container) {
if (container._reactRootContainer) {
{
var rootEl = getReactRootElementInContainer(container);
- var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
+ var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);
if (renderedByDifferentReact) {
error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
@@ -24894,7 +26157,7 @@ function unmountComponentAtNode(container) {
{
var _rootEl = getReactRootElementInContainer(container);
- var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node.
+ var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.
var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
@@ -24907,31 +26170,17 @@ function unmountComponentAtNode(container) {
}
}
-function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
-implementation) {
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
- return {
- // This tag allow us to uniquely identify this as a React Portal
- $$typeof: REACT_PORTAL_TYPE,
- key: key == null ? null : '' + key,
- children: children,
- containerInfo: containerInfo,
- implementation: implementation
- };
-}
-
-var ReactVersion = '16.14.0';
-
setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
setAttemptContinuousHydration(attemptContinuousHydration$1);
setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
+setAttemptHydrationAtPriority(runWithPriority$2);
var didWarnAboutUnstableCreatePortal = false;
{
if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
- error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
+ error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
}
}
@@ -24964,7 +26213,7 @@ function unstable_createPortal(children, container) {
if (!didWarnAboutUnstableCreatePortal) {
didWarnAboutUnstableCreatePortal = true;
- warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
+ warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 18+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
}
}
@@ -24972,9 +26221,10 @@ function unstable_createPortal(children, container) {
}
var Internals = {
- // Keep in sync with ReactDOMUnstableNativeDependencies.js
- // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
- Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
+ // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.
+ // This is an array for better minification.
+ Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?
+ IsThisRendererActing]
};
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
@@ -24991,7 +26241,7 @@ var foundDevTools = injectIntoDevTools({
if (/^(https?|file):$/.test(protocol)) {
// eslint-disable-next-line react-internal/no-production-logging
- console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');
+ console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');
}
}
}
diff --git a/node_modules/react-dom/cjs/react-dom.production.min.js b/node_modules/react-dom/cjs/react-dom.production.min.js
index a57da8b..a87fb5d 100644
--- a/node_modules/react-dom/cjs/react-dom.production.min.js
+++ b/node_modules/react-dom/cjs/react-dom.production.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,287 +6,292 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-
/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
-'use strict';var aa=require("react"),n=require("object-assign"),r=require("scheduler");function u(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(u(227));
-function ba(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var da=!1,ea=null,fa=!1,ha=null,ia={onError:function(a){da=!0;ea=a}};function ja(a,b,c,d,e,f,g,h,k){da=!1;ea=null;ba.apply(ia,arguments)}function ka(a,b,c,d,e,f,g,h,k){ja.apply(this,arguments);if(da){if(da){var l=ea;da=!1;ea=null}else throw Error(u(198));fa||(fa=!0,ha=l)}}var la=null,ma=null,na=null;
-function oa(a,b,c){var d=a.type||"unknown-event";a.currentTarget=na(c);ka(d,b,void 0,a);a.currentTarget=null}var pa=null,qa={};
-function ra(){if(pa)for(var a in qa){var b=qa[a],c=pa.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!sa[c]){if(!b.extractEvents)throw Error(u(97,a));sa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(ta.hasOwnProperty(h))throw Error(u(99,h));ta[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ua(k[e],g,h);e=!0}else f.registrationName?(ua(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}
-function ua(a,b,c){if(va[a])throw Error(u(100,a));va[a]=b;wa[a]=b.eventTypes[c].dependencies}var sa=[],ta={},va={},wa={};function xa(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!qa.hasOwnProperty(c)||qa[c]!==d){if(qa[c])throw Error(u(102,c));qa[c]=d;b=!0}}b&&ra()}var ya=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),za=null,Aa=null,Ba=null;
-function Ca(a){if(a=ma(a)){if("function"!==typeof za)throw Error(u(280));var b=a.stateNode;b&&(b=la(b),za(a.stateNode,a.type,b))}}function Da(a){Aa?Ba?Ba.push(a):Ba=[a]:Aa=a}function Ea(){if(Aa){var a=Aa,b=Ba;Ba=Aa=null;Ca(a);if(b)for(a=0;a<b.length;a++)Ca(b[a])}}function Fa(a,b){return a(b)}function Ga(a,b,c,d,e){return a(b,c,d,e)}function Ha(){}var Ia=Fa,Ja=!1,Ka=!1;function La(){if(null!==Aa||null!==Ba)Ha(),Ea()}
-function Ma(a,b,c){if(Ka)return a(b,c);Ka=!0;try{return Ia(a,b,c)}finally{Ka=!1,La()}}var Na=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Oa=Object.prototype.hasOwnProperty,Pa={},Qa={};
-function Ra(a){if(Oa.call(Qa,a))return!0;if(Oa.call(Pa,a))return!1;if(Na.test(a))return Qa[a]=!0;Pa[a]=!0;return!1}function Sa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
-function Ta(a,b,c,d){if(null===b||"undefined"===typeof b||Sa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var C={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C[a]=new v(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];C[b]=new v(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){C[a]=new v(a,2,!1,a.toLowerCase(),null,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C[a]=new v(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){C[a]=new v(a,3,!1,a.toLowerCase(),null,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){C[a]=new v(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){C[a]=new v(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){C[a]=new v(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){C[a]=new v(a,5,!1,a.toLowerCase(),null,!1)});var Ua=/[\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()}
-"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Ua,
-Va);C[b]=new v(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!1)});
-C.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty("ReactCurrentDispatcher")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty("ReactCurrentBatchConfig")||(Wa.ReactCurrentBatchConfig={suspense:null});
-function Xa(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Ta(b,c,e,d)&&(c=null),d||null===e?Ra(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
-var Ya=/^(.*)[\\\/]/,E="function"===typeof Symbol&&Symbol.for,Za=E?Symbol.for("react.element"):60103,$a=E?Symbol.for("react.portal"):60106,ab=E?Symbol.for("react.fragment"):60107,bb=E?Symbol.for("react.strict_mode"):60108,cb=E?Symbol.for("react.profiler"):60114,db=E?Symbol.for("react.provider"):60109,eb=E?Symbol.for("react.context"):60110,fb=E?Symbol.for("react.concurrent_mode"):60111,gb=E?Symbol.for("react.forward_ref"):60112,hb=E?Symbol.for("react.suspense"):60113,ib=E?Symbol.for("react.suspense_list"):
-60120,jb=E?Symbol.for("react.memo"):60115,kb=E?Symbol.for("react.lazy"):60116,lb=E?Symbol.for("react.block"):60121,mb="function"===typeof Symbol&&Symbol.iterator;function nb(a){if(null===a||"object"!==typeof a)return null;a=mb&&a[mb]||a["@@iterator"];return"function"===typeof a?a:null}function ob(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}
-function pb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ab:return"Fragment";case $a:return"Portal";case cb:return"Profiler";case bb:return"StrictMode";case hb:return"Suspense";case ib:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case eb:return"Context.Consumer";case db:return"Context.Provider";case gb:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":
-"ForwardRef");case jb:return pb(a.type);case lb:return pb(a.render);case kb:if(a=1===a._status?a._result:null)return pb(a)}return null}function qb(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=a._debugSource,f=pb(a.type);c=null;d&&(c=pb(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(Ya,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}
-function rb(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function sb(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
-function tb(a){var b=sb(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
-null;delete a[b]}}}}function xb(a){a._valueTracker||(a._valueTracker=tb(a))}function yb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=sb(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function zb(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}
-function Ab(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=rb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Bb(a,b){b=b.checked;null!=b&&Xa(a,"checked",b,!1)}
-function Cb(a,b){Bb(a,b);var c=rb(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Db(a,b.type,c):b.hasOwnProperty("defaultValue")&&Db(a,b.type,rb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
-function Eb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
-function Db(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Fb(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Gb(a,b){a=n({children:void 0},b);if(b=Fb(b.children))a.children=b;return a}
-function Hb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+rb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
-function Ib(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(u(91));return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Jb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(u(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:rb(c)}}
-function Kb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var Mb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
-function Nb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ob(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Nb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
-var Pb,Qb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Mb.svg||"innerHTML"in a)a.innerHTML=b;else{Pb=Pb||document.createElement("div");Pb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
-function Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Tb={animationend:Sb("Animation","AnimationEnd"),animationiteration:Sb("Animation","AnimationIteration"),animationstart:Sb("Animation","AnimationStart"),transitionend:Sb("Transition","TransitionEnd")},Ub={},Vb={};
-ya&&(Vb=document.createElement("div").style,"AnimationEvent"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),"TransitionEvent"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a}
-var Xb=Wb("animationend"),Yb=Wb("animationiteration"),Zb=Wb("animationstart"),$b=Wb("transitionend"),ac="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bc=new ("function"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b}
-function dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));}
-function gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
-c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
-function ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var kc=null;
-function lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)oa(a,b[d],c[d]);else b&&oa(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function mc(a){null!==a&&(kc=ic(kc,a));a=kc;kc=null;if(a){jc(a,lc);if(kc)throw Error(u(95));if(fa)throw a=ha,fa=!1,ha=null,a;}}
-function nc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function oc(a){if(!ya)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}var pc=[];function qc(a){a.topLevelType=null;a.nativeEvent=null;a.targetInst=null;a.ancestors.length=0;10>pc.length&&pc.push(a)}
-function rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}
-function sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=nc(a.nativeEvent);d=a.topLevelType;var f=a.nativeEvent,g=a.eventSystemFlags;0===c&&(g|=64);for(var h=null,k=0;k<sa.length;k++){var l=sa[k];l&&(l=l.extractEvents(d,b,f,e,g))&&(h=
-ic(h,l))}mc(h)}}function uc(a,b,c){if(!c.has(a)){switch(a){case "scroll":vc(b,"scroll",!0);break;case "focus":case "blur":vc(b,"focus",!0);vc(b,"blur",!0);c.set("blur",null);c.set("focus",null);break;case "cancel":case "close":oc(a)&&vc(b,a,!0);break;case "invalid":case "submit":case "reset":break;default:-1===ac.indexOf(a)&&F(a,b)}c.set(a,null)}}
-var wc,xc,yc,zc=!1,Ac=[],Bc=null,Cc=null,Dc=null,Ec=new Map,Fc=new Map,Gc=[],Hc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ic="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");
-function Jc(a,b){var c=cc(b);Hc.forEach(function(a){uc(a,b,c)});Ic.forEach(function(a){uc(a,b,c)})}function Kc(a,b,c,d,e){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:e,container:d}}
-function Lc(a,b){switch(a){case "focus":case "blur":Bc=null;break;case "dragenter":case "dragleave":Cc=null;break;case "mouseover":case "mouseout":Dc=null;break;case "pointerover":case "pointerout":Ec.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Fc.delete(b.pointerId)}}function Mc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=Kc(b,c,d,e,f),null!==b&&(b=Nc(b),null!==b&&xc(b)),a;a.eventSystemFlags|=d;return a}
-function Oc(a,b,c,d,e){switch(b){case "focus":return Bc=Mc(Bc,a,b,c,d,e),!0;case "dragenter":return Cc=Mc(Cc,a,b,c,d,e),!0;case "mouseover":return Dc=Mc(Dc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Ec.set(f,Mc(Ec.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Fc.set(f,Mc(Fc.get(f)||null,a,b,c,d,e)),!0}return!1}
-function Pc(a){var b=tc(a.target);if(null!==b){var c=dc(b);if(null!==c)if(b=c.tag,13===b){if(b=ec(c),null!==b){a.blockedOn=b;r.unstable_runWithPriority(a.priority,function(){yc(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Qc(a){if(null!==a.blockedOn)return!1;var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);if(null!==b){var c=Nc(b);null!==c&&xc(c);a.blockedOn=b;return!1}return!0}
-function Sc(a,b,c){Qc(a)&&c.delete(b)}function Tc(){for(zc=!1;0<Ac.length;){var a=Ac[0];if(null!==a.blockedOn){a=Nc(a.blockedOn);null!==a&&wc(a);break}var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);null!==b?a.blockedOn=b:Ac.shift()}null!==Bc&&Qc(Bc)&&(Bc=null);null!==Cc&&Qc(Cc)&&(Cc=null);null!==Dc&&Qc(Dc)&&(Dc=null);Ec.forEach(Sc);Fc.forEach(Sc)}function Uc(a,b){a.blockedOn===b&&(a.blockedOn=null,zc||(zc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Tc)))}
-function Vc(a){function b(b){return Uc(b,a)}if(0<Ac.length){Uc(Ac[0],a);for(var c=1;c<Ac.length;c++){var d=Ac[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Bc&&Uc(Bc,a);null!==Cc&&Uc(Cc,a);null!==Dc&&Uc(Dc,a);Ec.forEach(b);Fc.forEach(b);for(c=0;c<Gc.length;c++)d=Gc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Gc.length&&(c=Gc[0],null===c.blockedOn);)Pc(c),null===c.blockedOn&&Gc.shift()}
-var Wc={},Yc=new Map,Zc=new Map,$c=["abort","abort",Xb,"animationEnd",Yb,"animationIteration",Zb,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking",
-"seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",$b,"transitionEnd","waiting","waiting"];function ad(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f="on"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+"Capture"},dependencies:[d],eventPriority:b};Zc.set(d,b);Yc.set(d,f);Wc[e]=f}}
-ad("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);
-ad("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ad($c,2);for(var bd="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),cd=0;cd<bd.length;cd++)Zc.set(bd[cd],0);
-var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function F(a,b){vc(b,a,!1)}function vc(a,b,c){var d=Zc.get(b);switch(void 0===d?2:d){case 0:d=gd.bind(null,b,1,a);break;case 1:d=hd.bind(null,b,1,a);break;default:d=id.bind(null,b,1,a)}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1)}function gd(a,b,c,d){Ja||Ha();var e=id,f=Ja;Ja=!0;try{Ga(e,a,b,c,d)}finally{(Ja=f)||La()}}function hd(a,b,c,d){ed(dd,id.bind(null,a,b,c,d))}
-function id(a,b,c,d){if(fd)if(0<Ac.length&&-1<Hc.indexOf(a))a=Kc(null,a,b,c,d),Ac.push(a);else{var e=Rc(a,b,c,d);if(null===e)Lc(a,d);else if(-1<Hc.indexOf(a))a=Kc(e,a,b,c,d),Ac.push(a);else if(!Oc(e,a,b,c,d)){Lc(a,d);a=rc(a,d,null,b);try{Ma(sc,a)}finally{qc(a)}}}}
-function Rc(a,b,c,d){c=nc(d);c=tc(c);if(null!==c){var e=dc(c);if(null===e)c=null;else{var f=e.tag;if(13===f){c=ec(e);if(null!==c)return c;c=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null}else e!==c&&(c=null)}}a=rc(a,d,c,b);try{Ma(sc,a)}finally{qc(a)}return null}
-var jd={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
-floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kd=["Webkit","ms","Moz","O"];Object.keys(jd).forEach(function(a){kd.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);jd[b]=jd[a]})});function ld(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||jd.hasOwnProperty(a)&&jd[a]?(""+b).trim():b+"px"}
-function md(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=ld(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var nd=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
-function od(a,b){if(b){if(nd[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(u(137,a,""));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(u(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(u(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(u(62,""));}}
-function pd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var qd=Mb.html;function rd(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=cc(a);b=wa[b];for(var d=0;d<b.length;d++)uc(b[d],a,c)}function sd(){}
-function td(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function ud(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function vd(a,b){var c=ud(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ud(c)}}
-function wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=td(a.document)}return b}
-function yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var zd="$",Ad="/$",Bd="$?",Cd="$!",Dd=null,Ed=null;function Fd(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
-function Gd(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd="function"===typeof setTimeout?setTimeout:void 0,Id="function"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}
-function Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--}else c===Ad&&b++}a=a.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md="__reactInternalInstance$"+Ld,Nd="__reactEventHandlers$"+Ld,Od="__reactContainere$"+Ld;
-function tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a)}return b}a=c;c=a.parentNode}return null}function Nc(a){a=a[Md]||a[Od];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null}
-function Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}
-function Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(u(231,
-b,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a)}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0<b--;)Td(c[b],"captured",a);for(b=0;b<c.length;b++)Td(c[b],"bubbled",a)}}
-function Vd(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Sd(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a))}function Wd(a){a&&a.dispatchConfig.registrationName&&Vd(a._targetInst,null,a)}function Xd(a){jc(a,Ud)}var Yd=null,Zd=null,$d=null;
-function ae(){if($d)return $d;var a,b=Zd,c=b.length,d,e="value"in Yd?Yd.value:Yd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return $d=e.slice(a,1<d?1-d:void 0)}function be(){return!0}function ce(){return!1}
-function G(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?be:ce;this.isPropagationStopped=ce;return this}
-n(G.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=be)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=be)},persist:function(){this.isPersistent=be},isPersistent:ce,destructor:function(){var a=this.constructor.Interface,
-b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=ce;this._dispatchInstances=this._dispatchListeners=null}});G.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
-G.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;de(c);return c};de(G);function ee(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
-function fe(a){if(!(a instanceof this))throw Error(u(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=ya&&"CompositionEvent"in window,ke=null;ya&&"documentMode"in document&&(ke=document.documentMode);
-var le=ya&&"TextEvent"in window&&!ke,me=ya&&(!je||ke&&8<ke&&11>=ke),ne=String.fromCharCode(32),oe={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
-captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},pe=!1;
-function qe(a,b){switch(a){case "keyup":return-1!==ie.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function re(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var se=!1;function te(a,b){switch(a){case "compositionend":return re(b);case "keypress":if(32!==b.which)return null;pe=!0;return ne;case "textInput":return a=b.data,a===ne&&pe?null:a;default:return null}}
-function ue(a,b){if(se)return"compositionend"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return me&&"ko"!==b.locale?null:b.data;default:return null}}
-var ve={eventTypes:oe,extractEvents:function(a,b,c,d){var e;if(je)b:{switch(a){case "compositionstart":var f=oe.compositionStart;break b;case "compositionend":f=oe.compositionEnd;break b;case "compositionupdate":f=oe.compositionUpdate;break b}f=void 0}else se?qe(a,c)&&(f=oe.compositionEnd):"keydown"===a&&229===c.keyCode&&(f=oe.compositionStart);f?(me&&"ko"!==c.locale&&(se||f!==oe.compositionStart?f===oe.compositionEnd&&se&&(e=ae()):(Yd=d,Zd="value"in Yd?Yd.value:Yd.textContent,se=!0)),f=ge.getPooled(f,
-b,c,d),e?f.data=e:(e=re(c),null!==e&&(f.data=e)),Xd(f),e=f):e=null;(a=le?te(a,c):ue(a,c))?(b=he.getPooled(oe.beforeInput,b,c,d),b.data=a,Xd(b)):b=null;return null===e?b:null===b?e:[e,b]}},we={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!we[a.type]:"textarea"===b?!0:!1}
-var ye={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function ze(a,b,c){a=G.getPooled(ye.change,a,b,c);a.type="change";Da(c);Xd(a);return a}var Ae=null,Be=null;function Ce(a){mc(a)}function De(a){var b=Pd(a);if(yb(b))return a}function Ee(a,b){if("change"===a)return b}var Fe=!1;ya&&(Fe=oc("input")&&(!document.documentMode||9<document.documentMode));
-function Ge(){Ae&&(Ae.detachEvent("onpropertychange",He),Be=Ae=null)}function He(a){if("value"===a.propertyName&&De(Be))if(a=ze(Be,a,nc(a)),Ja)mc(a);else{Ja=!0;try{Fa(Ce,a)}finally{Ja=!1,La()}}}function Ie(a,b,c){"focus"===a?(Ge(),Ae=b,Be=c,Ae.attachEvent("onpropertychange",He)):"blur"===a&&Ge()}function Je(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return De(Be)}function Ke(a,b){if("click"===a)return De(b)}function Le(a,b){if("input"===a||"change"===a)return De(b)}
-var Me={eventTypes:ye,_isInputEventSupported:Fe,extractEvents:function(a,b,c,d){var e=b?Pd(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=Ee;else if(xe(e))if(Fe)g=Le;else{g=Je;var h=Ie}else(f=e.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(g=Ke);if(g&&(g=g(a,b)))return ze(g,c,d);h&&h(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Db(e,"number",e.value)}},Ne=G.extend({view:null,detail:null}),
-Oe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pe(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Oe[a])?!!b[a]:!1}function Qe(){return Pe}
-var Re=0,Se=0,Te=!1,Ue=!1,Ve=Ne.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Qe,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=Re;Re=a.screenX;return Te?"mousemove"===a.type?a.screenX-b:0:(Te=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;
-var b=Se;Se=a.screenY;return Ue?"mousemove"===a.type?a.screenY-b:0:(Ue=!0,0)}}),We=Ve.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Xe={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",
-dependencies:["pointerout","pointerover"]}},Ye={eventTypes:Xe,extractEvents:function(a,b,c,d,e){var f="mouseover"===a||"pointerover"===a,g="mouseout"===a||"pointerout"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?tc(b):null,null!==b){var h=dc(b);if(b!==h||5!==b.tag&&6!==b.tag)b=null}}else g=null;if(g===b)return null;if("mouseout"===a||"mouseover"===
-a){var k=Ve;var l=Xe.mouseLeave;var m=Xe.mouseEnter;var p="mouse"}else if("pointerout"===a||"pointerover"===a)k=We,l=Xe.pointerLeave,m=Xe.pointerEnter,p="pointer";a=null==g?f:Pd(g);f=null==b?f:Pd(b);l=k.getPooled(l,g,c,d);l.type=p+"leave";l.target=a;l.relatedTarget=f;c=k.getPooled(m,b,c,d);c.type=p+"enter";c.target=f;c.relatedTarget=a;d=g;p=b;if(d&&p)a:{k=d;m=p;g=0;for(a=k;a;a=Rd(a))g++;a=0;for(b=m;b;b=Rd(b))a++;for(;0<g-a;)k=Rd(k),g--;for(;0<a-g;)m=Rd(m),a--;for(;g--;){if(k===m||k===m.alternate)break a;
-k=Rd(k);m=Rd(m)}k=null}else k=null;m=k;for(k=[];d&&d!==m;){g=d.alternate;if(null!==g&&g===m)break;k.push(d);d=Rd(d)}for(d=[];p&&p!==m;){g=p.alternate;if(null!==g&&g===m)break;d.push(p);p=Rd(p)}for(p=0;p<k.length;p++)Vd(k[p],"bubbled",l);for(p=d.length;0<p--;)Vd(d[p],"captured",c);return 0===(e&64)?[l]:[l,c]}};function Ze(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var $e="function"===typeof Object.is?Object.is:Ze,af=Object.prototype.hasOwnProperty;
-function bf(a,b){if($e(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!af.call(b,c[d])||!$e(a[c[d]],b[c[d]]))return!1;return!0}
-var cf=ya&&"documentMode"in document&&11>=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ef=null,ff=null,gf=null,hf=!1;
-function jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;"selectionStart"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type="select",a.target=ef,Xd(a),a)}
-var kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?Pd(b):window;switch(a){case "focus":if(xe(e)||"true"===e.contentEditable)ef=e,ff=b,gf=null;break;case "blur":gf=ff=ef=null;break;case "mousedown":hf=!0;break;case "contextmenu":case "mouseup":case "dragend":return hf=!1,jf(c,d);case "selectionchange":if(cf)break;
-case "keydown":case "keyup":return jf(c,d)}return null}},lf=G.extend({animationName:null,elapsedTime:null,pseudoElement:null}),mf=G.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),nf=Ne.extend({relatedTarget:null});function of(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
-var pf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
-116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},rf=Ne.extend({key:function(a){if(a.key){var b=pf[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=of(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?qf[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Qe,charCode:function(a){return"keypress"===
-a.type?of(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?of(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),sf=Ve.extend({dataTransfer:null}),tf=Ne.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Qe}),uf=G.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),vf=Ve.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in
-a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),wf={eventTypes:Wc,extractEvents:function(a,b,c,d){var e=Yc.get(a);if(!e)return null;switch(a){case "keypress":if(0===of(c))return null;case "keydown":case "keyup":a=rf;break;case "blur":case "focus":a=nf;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=
-Ve;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=sf;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=tf;break;case Xb:case Yb:case Zb:a=lf;break;case $b:a=uf;break;case "scroll":a=Ne;break;case "wheel":a=vf;break;case "copy":case "cut":case "paste":a=mf;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=
-We;break;default:a=G}b=a.getPooled(e,b,c,d);Xd(b);return b}};if(pa)throw Error(u(101));pa=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));ra();var xf=Nc;la=Qd;ma=xf;na=Pd;xa({SimpleEventPlugin:wf,EnterLeaveEventPlugin:Ye,ChangeEventPlugin:Me,SelectEventPlugin:kf,BeforeInputEventPlugin:ve});var yf=[],zf=-1;function H(a){0>zf||(a.current=yf[zf],yf[zf]=null,zf--)}
-function I(a,b){zf++;yf[zf]=a.current;a.current=b}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}
-function Df(){H(K);H(J)}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c)}function Ff(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||"Unknown",e));return n({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return!0}
-function Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}
-var If=r.unstable_runWithPriority,Jf=r.unstable_scheduleCallback,Kf=r.unstable_cancelCallback,Lf=r.unstable_requestPaint,Mf=r.unstable_now,Nf=r.unstable_getCurrentPriorityLevel,Of=r.unstable_ImmediatePriority,Pf=r.unstable_UserBlockingPriority,Qf=r.unstable_NormalPriority,Rf=r.unstable_LowPriority,Sf=r.unstable_IdlePriority,Tf={},Uf=r.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf};
-function ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a)}fg()}
-function fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});Wf=null}catch(c){throw null!==Wf&&(Wf=Wf.slice(a+1)),Jf(Of,gg),c;}finally{Yf=!1}}}function hg(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function ig(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}var jg={current:null},kg=null,lg=null,mg=null;function ng(){mg=lg=kg=null}
-function og(a){var b=jg.current;H(jg);a.type._context._currentValue=b}function pg(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function qg(a,b){kg=a;mg=lg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(rg=!0),a.firstContext=null)}
-function sg(a,b){if(mg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null}}else lg=lg.next=b}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}
-function vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}
-function yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}
-function zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(g<d){var ca={expirationTime:z.expirationTime,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null};null===x?(p=x=
-ca,m=k):x=x.next=ca;g>l&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if("function"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g="function"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:tg=!0}}null!==z.callback&&
-(a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z))}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k}}
-function Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=e;e=c;if("function"!==typeof d)throw Error(u(191,d));d.call(e)}}}var Dg=Wa.ReactCurrentBatchConfig,Eg=(new aa.Component).refs;function Fg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;0===a.expirationTime&&(a.updateQueue.baseState=c)}
-var Jg={isMounted:function(a){return(a=a._reactInternalFiber)?dc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=Gg(),d=Dg.suspense;
-c=Hg(c,a,d);d=wg(c,d);d.tag=2;void 0!==b&&null!==b&&(d.callback=b);xg(a,d);Ig(a,c)}};function Kg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!bf(c,d)||!bf(e,f):!0}
-function Lg(a,b,c){var d=!1,e=Af;var f=b.contextType;"object"===typeof f&&null!==f?f=sg(f):(e=L(b)?Bf:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Cf(a,e):Af);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Jg;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
-function Mg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Jg.enqueueReplaceState(b,b.state,null)}
-function Ng(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Eg;ug(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=sg(f):(f=L(b)?Bf:J.current,e.context=Cf(a,f));zg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Fg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||
-(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Jg.enqueueReplaceState(e,e.state,null),zg(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.effectTag|=4)}var Og=Array.isArray;
-function Pg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(u(309));var d=c.stateNode}if(!d)throw Error(u(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Eg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(u(284));if(!c._owner)throw Error(u(290,a));}return a}
-function Qg(a,b){if("textarea"!==a.type)throw Error(u(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,""));}
-function Rg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Sg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=
-2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Tg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Pg(a,b,c),d.return=a,d;d=Ug(c.type,c.key,c.props,null,a.mode,d);d.ref=Pg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==
-c.implementation)return b=Vg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Wg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function p(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Tg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Za:return c=Ug(b.type,b.key,b.props,null,a.mode,c),c.ref=Pg(a,null,b),c.return=a,c;case $a:return b=Vg(b,a.mode,c),b.return=a,b}if(Og(b)||
-nb(b))return b=Wg(b,a.mode,c,null),b.return=a,b;Qg(a,b)}return null}function x(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Za:return c.key===e?c.type===ab?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case $a:return c.key===e?l(a,b,c,d):null}if(Og(c)||nb(c))return null!==e?null:m(a,b,c,d,null);Qg(a,c)}return null}function z(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=
-a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Za:return a=a.get(null===d.key?c:d.key)||null,d.type===ab?m(b,a,d.props.children,e,d.key):k(b,a,d,e);case $a:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Og(d)||nb(d))return a=a.get(c)||null,m(b,a,d,e,null);Qg(b,d)}return null}function ca(e,g,h,k){for(var l=null,t=null,m=g,y=g=0,A=null;null!==m&&y<h.length;y++){m.index>y?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&&
-m&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A}if(y===h.length)return c(e,m),l;if(null===m){for(;y<h.length;y++)m=p(e,h[y],k),null!==m&&(g=f(m,g,y),null===t?l=m:t.sibling=m,t=m);return l}for(m=d(e,m);y<h.length;y++)A=z(m,e,y,h[y],k),null!==A&&(a&&null!==A.alternate&&m.delete(null===A.key?y:A.key),g=f(A,g,y),null===t?l=A:t.sibling=A,t=A);a&&m.forEach(function(a){return b(e,a)});return l}function D(e,g,h,l){var k=nb(h);if("function"!==typeof k)throw Error(u(150));h=k.call(h);
-if(null==h)throw Error(u(151));for(var m=k=null,t=g,y=g=0,A=null,q=h.next();null!==t&&!q.done;y++,q=h.next()){t.index>y?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!==
-q.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,
-k.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ab?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h)}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=
-d.sibling}d=Vg(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(nb(f))return D(a,d,f,h);l&&Qg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||"Component"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};
-function ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a)}H($g);I($g,b)}function eh(){H($g);H(ah);H(bh)}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c))}function gh(a){ah.current===a&&(H($g),H(ah))}var M={current:0};
-function hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ih(a,b){return{responder:a,props:b}}
-var jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!$e(a[c],b[c]))return!1;return!0}
-function oh(a,b,c,d,e,f){lh=f;N=b;b.memoizedState=null;b.updateQueue=null;b.expirationTime=0;jh.current=null===a||null===a.memoizedState?ph:qh;a=c(d,e);if(b.expirationTime===lh){f=0;do{b.expirationTime=0;if(!(25>f))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e)}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a}
-function th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}
-function vh(a,b){return"function"===typeof b?b(a):b}
-function wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(l<lh){var m={expirationTime:k.expirationTime,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=m,f=d):h=h.next=m;l>N.expirationTime&&
-(N.expirationTime=l,Bg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}
-function xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}
-function yh(a){var b=th();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return[b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}
-function Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d)}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)}
-function Hh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}
-function Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0)});cg(97<d?97:d,function(){var d=kh.suspense;kh.suspense=void 0===b?null:b;try{a(!1),c()}finally{kh.suspense=d}})}
-function zh(a,b,c){var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e={expirationTime:d,suspenseConfig:e,action:c,eagerReducer:null,eagerState:null,next:null};var f=b.pending;null===f?e.next=e:(e.next=f.next,f.next=e);b.pending=e;f=a.alternate;if(a===N||null!==f&&f===N)mh=!0,e.expirationTime=lh,N.expirationTime=lh;else{if(0===a.expirationTime&&(null===f||0===f.expirationTime)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.eagerReducer=f;e.eagerState=h;if($e(h,g))return}catch(k){}finally{}Ig(a,
-d)}}
-var sh={readContext:sg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useResponder:Q,useDeferredValue:Q,useTransition:Q},ph={readContext:sg,useCallback:Kh,useContext:sg,useEffect:Eh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ch(4,2,Hh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Ch(4,2,a,b)},useMemo:function(a,b){var c=th();b=void 0===b?null:b;a=a();c.memoizedState=[a,
-b];return a},useReducer:function(a,b,c){var d=th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=zh.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=th();a={current:a};return b.memoizedState=a},useState:yh,useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=yh(a),d=c[0],e=c[1];Eh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=
-c}},[a,b]);return d},useTransition:function(a){var b=yh(!1),c=b[0];b=b[1];return[Kh(Nh.bind(null,b,a),[b,a]),c]}},qh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:wh,useRef:Bh,useState:function(){return wh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=wh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=
-wh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,b,a),[b,a]),c]}},rh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:xh,useRef:Bh,useState:function(){return xh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=xh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=xh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,
-b,a),[b,a]),c]}},Oh=null,Ph=null,Qh=!1;function Rh(a,b){var c=Sh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}
-function Th(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
-function Uh(a){if(Qh){var b=Ph;if(b){var c=b;if(!Th(a,b)){b=Jd(c.nextSibling);if(!b||!Th(a,b)){a.effectTag=a.effectTag&-1025|2;Qh=!1;Oh=a;return}Rh(Oh,c)}Oh=a;Ph=Jd(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,Qh=!1,Oh=a}}function Vh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;Oh=a}
-function Wh(a){if(a!==Oh)return!1;if(!Qh)return Vh(a),Qh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Gd(b,a.memoizedProps))for(b=Ph;b;)Rh(a,b),b=Jd(b.nextSibling);Vh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(u(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===Ad){if(0===b){Ph=Jd(a.nextSibling);break a}b--}else c!==zd&&c!==Cd&&c!==Bd||b++}a=a.nextSibling}Ph=null}}else Ph=Oh?Jd(a.stateNode.nextSibling):null;return!0}
-function Xh(){Ph=Oh=null;Qh=!1}var Yh=Wa.ReactCurrentOwner,rg=!1;function R(a,b,c,d){b.child=null===a?Yg(b,null,c,d):Xg(b,a.child,c,d)}function Zh(a,b,c,d,e){c=c.render;var f=b.ref;qg(b,e);d=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,d,e);return b.child}
-function ai(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!bi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ci(a,b,g,d,e,f);a=Ug(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:bf,c(e,d)&&a.ref===b.ref))return $h(a,b,f);b.effectTag|=1;a=Sg(g,d);a.ref=b.ref;a.return=b;return b.child=a}
-function ci(a,b,c,d,e,f){return null!==a&&bf(a.memoizedProps,d)&&a.ref===b.ref&&(rg=!1,e<f)?(b.expirationTime=a.expirationTime,$h(a,b,f)):di(a,b,c,d,f)}function ei(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function di(a,b,c,d,e){var f=L(c)?Bf:J.current;f=Cf(b,f);qg(b,e);c=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,c,e);return b.child}
-function fi(a,b,c,d,e){if(L(c)){var f=!0;Gf(b)}else f=!1;qg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Lg(b,c,d),Ng(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l));var m=c.getDerivedStateFromProps,p="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;p||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
-"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l);tg=!1;var x=b.memoizedState;g.state=x;zg(b,d,g,e);k=b.memoizedState;h!==d||x!==k||K.current||tg?("function"===typeof m&&(Fg(b,c,m,d),k=b.memoizedState),(h=tg||Kg(b,c,h,d,x,k,l))?(p||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===
-typeof g.componentDidMount&&(b.effectTag|=4)):("function"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,vg(a,b),h=b.memoizedProps,g.props=b.type===b.elementType?h:ig(b.type,h),k=g.context,l=c.contextType,"object"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l)),m=c.getDerivedStateFromProps,(p="function"===typeof m||"function"===
-typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l),tg=!1,k=b.memoizedState,g.state=k,zg(b,d,g,e),x=b.memoizedState,h!==d||k!==x||K.current||tg?("function"===typeof m&&(Fg(b,c,m,d),x=b.memoizedState),(m=tg||Kg(b,c,h,d,k,x,l))?(p||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,
-x,l),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,l)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=l,d=m):
-("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return gi(a,b,c,d,f,e)}
-function gi(a,b,c,d,e,f){ei(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Hf(b,c,!1),$h(a,b,f);d=b.stateNode;Yh.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=Xg(b,a.child,null,f),b.child=Xg(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&Hf(b,c,!0);return b.child}function hi(a){var b=a.stateNode;b.pendingContext?Ef(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Ef(a,b.context,!1);dh(a,b.containerInfo)}
-var ii={dehydrated:null,retryTime:0};
-function ji(a,b,c){var d=b.mode,e=b.pendingProps,f=M.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);I(M,f&1);if(null===a){void 0!==e.fallback&&Uh(b);if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=
-b;e.sibling=c;b.memoizedState=ii;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Yg(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=Sg(a,a.pendingProps);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;d=Sg(d,e);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=ii;b.child=c;return d}c=Xg(b,a.child,e.children,c);b.memoizedState=null;return b.child=
-c}a=a.child;if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=ii;b.child=e;return c}b.memoizedState=null;return b.child=Xg(b,a,e.children,c)}
-function ki(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);pg(a.return,b)}function li(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailExpiration:0,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}
-function mi(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=M.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&ki(a,c);else if(19===a.tag)ki(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(M,d);if(0===(b.mode&2))b.memoizedState=
-null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===hh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);li(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===hh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}li(b,!0,c,null,f,b.lastEffect);break;case "together":li(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
-function $h(a,b,c){null!==a&&(b.dependencies=a.dependencies);var d=b.expirationTime;0!==d&&Bg(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(u(153));if(null!==b.child){a=b.child;c=Sg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Sg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}var ni,oi,pi,qi;
-ni=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};oi=function(){};
-pi=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;ch($g.current);a=null;switch(c){case "input":f=zb(g,f);d=zb(g,d);a=[];break;case "option":f=Gb(g,f);d=Gb(g,d);a=[];break;case "select":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case "textarea":f=Ib(g,f);d=Ib(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=sd)}od(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if("style"===
-h)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]="");else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(va.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if("style"===h)if(g){for(k in g)!g.hasOwnProperty(k)||l&&l.hasOwnProperty(k)||(c||(c={}),c[k]="");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),
-c[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else"dangerouslySetInnerHTML"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,l)):"children"===h?g===l||"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(h,""+l):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(va.hasOwnProperty(h)?(null!=l&&rd(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=a||[]).push("style",c);e=a;if(b.updateQueue=e)b.effectTag|=4}};
-qi=function(a,b,c,d){c!==d&&(b.effectTag|=4)};function ri(a,b){switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
-function si(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return L(b.type)&&Df(),null;case 3:return eh(),H(K),H(J),c=b.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==a&&null!==a.child||!Wh(b)||(b.effectTag|=4),oi(b),null;case 5:gh(b);c=ch(bh.current);var e=b.type;if(null!==a&&null!=b.stateNode)pi(a,b,e,d,c),a.ref!==b.ref&&(b.effectTag|=128);else{if(!d){if(null===b.stateNode)throw Error(u(166));
-return null}a=ch($g.current);if(Wh(b)){d=b.stateNode;e=b.type;var f=b.memoizedProps;d[Md]=b;d[Nd]=f;switch(e){case "iframe":case "object":case "embed":F("load",d);break;case "video":case "audio":for(a=0;a<ac.length;a++)F(ac[a],d);break;case "source":F("error",d);break;case "img":case "image":case "link":F("error",d);F("load",d);break;case "form":F("reset",d);F("submit",d);break;case "details":F("toggle",d);break;case "input":Ab(d,f);F("invalid",d);rd(c,"onChange");break;case "select":d._wrapperState=
-{wasMultiple:!!f.multiple};F("invalid",d);rd(c,"onChange");break;case "textarea":Jb(d,f),F("invalid",d),rd(c,"onChange")}od(e,f);a=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(a=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(a=["children",""+h]):va.hasOwnProperty(g)&&null!=h&&rd(c,g)}switch(e){case "input":xb(d);Eb(d,f,!0);break;case "textarea":xb(d);Lb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&
-(d.onclick=sd)}c=a;b.updateQueue=c;null!==c&&(b.effectTag|=4)}else{g=9===c.nodeType?c:c.ownerDocument;a===qd&&(a=Nb(e));a===qd?"script"===e?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),"select"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case "iframe":case "object":case "embed":F("load",
-a);h=d;break;case "video":case "audio":for(h=0;h<ac.length;h++)F(ac[h],a);h=d;break;case "source":F("error",a);h=d;break;case "img":case "image":case "link":F("error",a);F("load",a);h=d;break;case "form":F("reset",a);F("submit",a);h=d;break;case "details":F("toggle",a);h=d;break;case "input":Ab(a,d);h=zb(a,d);F("invalid",a);rd(c,"onChange");break;case "option":h=Gb(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};h=n({},d,{value:void 0});F("invalid",a);rd(c,"onChange");break;case "textarea":Jb(a,
-d);h=Ib(a,d);F("invalid",a);rd(c,"onChange");break;default:h=d}od(e,h);var k=h;for(f in k)if(k.hasOwnProperty(f)){var l=k[f];"style"===f?md(a,l):"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,null!=l&&Qb(a,l)):"children"===f?"string"===typeof l?("textarea"!==e||""!==l)&&Rb(a,l):"number"===typeof l&&Rb(a,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(va.hasOwnProperty(f)?null!=l&&rd(c,f):null!=l&&Xa(a,f,l,g))}switch(e){case "input":xb(a);Eb(a,d,!1);
-break;case "textarea":xb(a);Lb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+rb(d.value));break;case "select":a.multiple=!!d.multiple;c=d.value;null!=c?Hb(a,!!d.multiple,c,!1):null!=d.defaultValue&&Hb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof h.onClick&&(a.onclick=sd)}Fd(e,d)&&(b.effectTag|=4)}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)qi(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(u(166));
-c=ch(bh.current);ch($g.current);Wh(b)?(c=b.stateNode,d=b.memoizedProps,c[Md]=b,c.nodeValue!==d&&(b.effectTag|=4)):(c=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),c[Md]=b,b.stateNode=c)}return null;case 13:H(M);d=b.memoizedState;if(0!==(b.effectTag&64))return b.expirationTime=c,b;c=null!==d;d=!1;null===a?void 0!==b.memoizedProps.fallback&&Wh(b):(e=a.memoizedState,d=null!==e,c||null===e||(e=a.child.sibling,null!==e&&(f=b.firstEffect,null!==f?(b.firstEffect=e,e.nextEffect=f):(b.firstEffect=b.lastEffect=
-e,e.nextEffect=null),e.effectTag=8)));if(c&&!d&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(M.current&1))S===ti&&(S=ui);else{if(S===ti||S===ui)S=vi;0!==wi&&null!==T&&(xi(T,U),yi(T,wi))}if(c||d)b.effectTag|=4;return null;case 4:return eh(),oi(b),null;case 10:return og(b),null;case 17:return L(b.type)&&Df(),null;case 19:H(M);d=b.memoizedState;if(null===d)return null;e=0!==(b.effectTag&64);f=d.rendering;if(null===f)if(e)ri(d,!1);else{if(S!==ti||null!==a&&0!==(a.effectTag&
-64))for(f=b.child;null!==f;){a=hh(f);if(null!==a){b.effectTag|=64;ri(d,!1);e=a.updateQueue;null!==e&&(b.updateQueue=e,b.effectTag|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;for(d=b.child;null!==d;)e=d,f=c,e.effectTag&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null,a=e.alternate,null===a?(e.childExpirationTime=0,e.expirationTime=f,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null):(e.childExpirationTime=a.childExpirationTime,
-e.expirationTime=a.expirationTime,e.child=a.child,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,f=a.dependencies,e.dependencies=null===f?null:{expirationTime:f.expirationTime,firstContext:f.firstContext,responders:f.responders}),d=d.sibling;I(M,M.current&1|2);return b.child}f=f.sibling}}else{if(!e)if(a=hh(f),null!==a){if(b.effectTag|=64,e=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),ri(d,!0),null===d.tail&&"hidden"===d.tailMode&&!f.alternate)return b=
-b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*$f()-d.renderingStartTime>d.tailExpiration&&1<c&&(b.effectTag|=64,e=!0,ri(d,!1),b.expirationTime=b.childExpirationTime=c-1);d.isBackwards?(f.sibling=b.child,b.child=f):(c=d.last,null!==c?c.sibling=f:b.child=f,d.last=f)}return null!==d.tail?(0===d.tailExpiration&&(d.tailExpiration=$f()+500),c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=$f(),c.sibling=null,b=M.current,I(M,e?b&1|2:b&1),c):null}throw Error(u(156,
-b.tag));}function zi(a){switch(a.tag){case 1:L(a.type)&&Df();var b=a.effectTag;return b&4096?(a.effectTag=b&-4097|64,a):null;case 3:eh();H(K);H(J);b=a.effectTag;if(0!==(b&64))throw Error(u(285));a.effectTag=b&-4097|64;return a;case 5:return gh(a),null;case 13:return H(M),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return H(M),null;case 4:return eh(),null;case 10:return og(a),null;default:return null}}function Ai(a,b){return{value:a,source:b,stack:qb(b)}}
-var Bi="function"===typeof WeakSet?WeakSet:Set;function Ci(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=qb(c));null!==c&&pb(c.type);b=b.value;null!==a&&1===a.tag&&pb(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Di(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Ei(a,c)}}function Fi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Ei(a,c)}else b.current=null}
-function Gi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ig(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(u(163));}
-function Hi(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.destroy;c.destroy=void 0;void 0!==d&&d()}c=c.next}while(c!==b)}}function Ii(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}
-function Ji(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:Ii(3,c);return;case 1:a=c.stateNode;if(c.effectTag&4)if(null===b)a.componentDidMount();else{var d=c.elementType===c.type?b.memoizedProps:ig(c.type,b.memoizedProps);a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}b=c.updateQueue;null!==b&&Cg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Cg(c,b,a)}return;
-case 5:a=c.stateNode;null===b&&c.effectTag&4&&Fd(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Vc(c))));return;case 19:case 17:case 20:case 21:return}throw Error(u(163));}
-function Ki(a,b,c){"function"===typeof Li&&Li(b);switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;cg(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){Ei(g,h)}}a=a.next}while(a!==d)})}break;case 1:Fi(b);c=b.stateNode;"function"===typeof c.componentWillUnmount&&Di(b,c);break;case 5:Fi(b);break;case 4:Mi(a,b,c)}}
-function Ni(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;a.stateNode=null;null!==b&&Ni(b)}function Oi(a){return 5===a.tag||3===a.tag||4===a.tag}
-function Pi(a){a:{for(var b=a.return;null!==b;){if(Oi(b)){var c=b;break a}b=b.return}throw Error(u(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(u(161));}c.effectTag&16&&(Rb(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Oi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;
-if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}d?Qi(a,c,b):Ri(a,c,b)}
-function Qi(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=sd));else if(4!==d&&(a=a.child,null!==a))for(Qi(a,b,c),a=a.sibling;null!==a;)Qi(a,b,c),a=a.sibling}
-function Ri(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Ri(a,b,c),a=a.sibling;null!==a;)Ri(a,b,c),a=a.sibling}
-function Mi(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(u(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,l=c,m=k;;)if(Ki(h,m,l),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break a;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=m.return;m=m.sibling}g?(h=
-f,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Ki(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}
-function Si(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:Hi(3,b);return;case 1:return;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Nd]=d;"input"===a&&"radio"===d.type&&null!=d.name&&Bb(c,d);pd(a,e);b=pd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?md(c,h):"dangerouslySetInnerHTML"===g?Qb(c,h):"children"===g?Rb(c,h):Xa(c,g,h,b)}switch(a){case "input":Cb(c,d);break;
-case "textarea":Kb(c,d);break;case "select":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?Hb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?Hb(c,!!d.multiple,d.defaultValue,!0):Hb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(u(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,Vc(b.containerInfo));return;case 12:return;case 13:c=b;null===b.memoizedState?
-d=!1:(d=!0,c=b.child,Ti=$f());if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null,f.style.display=ld("display",e));else if(6===a.tag)a.stateNode.nodeValue=d?"":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=
-f;continue}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===c)break;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}Ui(b);return;case 19:Ui(b);return;case 17:return}throw Error(u(163));}function Ui(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Bi);b.forEach(function(b){var d=Vi.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}
-var Wi="function"===typeof WeakMap?WeakMap:Map;function Xi(a,b,c){c=wg(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Yi||(Yi=!0,Zi=d);Ci(a,b)};return c}
-function $i(a,b,c){c=wg(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ci(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===aj?aj=new Set([this]):aj.add(this),Ci(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}
-var bj=Math.ceil,cj=Wa.ReactCurrentDispatcher,dj=Wa.ReactCurrentOwner,V=0,ej=8,fj=16,gj=32,ti=0,hj=1,ij=2,ui=3,vi=4,jj=5,W=V,T=null,X=null,U=0,S=ti,kj=null,lj=1073741823,mj=1073741823,nj=null,wi=0,oj=!1,Ti=0,pj=500,Y=null,Yi=!1,Zi=null,aj=null,qj=!1,rj=null,sj=90,tj=null,uj=0,vj=null,wj=0;function Gg(){return(W&(fj|gj))!==V?1073741821-($f()/10|0):0!==wj?wj:wj=1073741821-($f()/10|0)}
-function Hg(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=ag();if(0===(b&4))return 99===d?1073741823:1073741822;if((W&fj)!==V)return U;if(null!==c)a=hg(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=hg(a,150,100);break;case 97:case 96:a=hg(a,5E3,250);break;case 95:a=2;break;default:throw Error(u(326));}null!==T&&a===U&&--a;return a}
-function Ig(a,b){if(50<uj)throw uj=0,vj=null,Error(u(185));a=xj(a,b);if(null!==a){var c=ag();1073741823===b?(W&ej)!==V&&(W&(fj|gj))===V?yj(a):(Z(a),W===V&&gg()):Z(a);(W&4)===V||98!==c&&99!==c||(null===tj?tj=new Map([[a,b]]):(c=tj.get(a),(void 0===c||c>b)&&tj.set(a,b)))}}
-function xj(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(T===e&&(Bg(b),S===vi&&xi(e,U)),yi(e,b));return e}
-function zj(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Aj(a,b))return b;var c=a.lastPingedTime;a=a.nextKnownPendingLevel;a=c>a?c:a;return 2>=a&&b!==a?0:a}
-function Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else{var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c)}a.callbackExpirationTime=
-b;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b}}}
-function Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h)}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2<c?2:c);break;case ui:xi(a,c);d=a.lastSuspendedTime;
-c===d&&(a.nextKnownPendingLevel=Ij(e));if(1073741823===lj&&(e=Ti+pj-$f(),10<e)){if(oj){var f=a.lastPingedTime;if(0===f||f>=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=
-d;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=Hd(Jj.bind(null,a),d);break}Jj(a);break;case jj:if(1073741823!==lj&&null!==nj){f=lj;var g=nj;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10<d){xi(a,c);a.timeoutHandle=
-Hd(Jj.bind(null,a),d);break}}Jj(a);break;default:throw Error(u(329));}Z(a);if(a.callbackNode===b)return Bj.bind(null,a)}}return null}
-function yj(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&b===U||Ej(a,b);if(null!==X){var c=W;W|=fj;var d=Fj();do try{Kj();break}catch(e){Hj(a,e)}while(1);ng();W=c;cj.current=d;if(S===hj)throw c=kj,Ej(a,b),xi(a,b),Z(a),c;if(null!==X)throw Error(u(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;T=null;Jj(a);Z(a)}return null}function Lj(){if(null!==tj){var a=tj;tj=null;a.forEach(function(a,c){Cj(c,a);Z(c)});gg()}}
-function Mj(a,b){var c=W;W|=1;try{return a(b)}finally{W=c,W===V&&gg()}}function Nj(a,b){var c=W;W&=-2;W|=ej;try{return a(b)}finally{W=c,W===V&&gg()}}
-function Ej(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Id(c));if(null!==X)for(c=X.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Df();break;case 3:eh();H(K);H(J);break;case 5:gh(d);break;case 4:eh();break;case 13:H(M);break;case 19:H(M);break;case 10:og(d)}c=c.return}T=a;X=Sg(a.current,null);U=b;S=ti;kj=null;mj=lj=1073741823;nj=null;wi=0;oj=!1}
-function Hj(a,b){do{try{ng();jh.current=sh;if(mh)for(var c=N.memoizedState;null!==c;){var d=c.queue;null!==d&&(d.pending=null);c=c.next}lh=0;P=O=N=null;mh=!1;if(null===X||null===X.return)return S=hj,kj=b,X=null;a:{var e=a,f=X.return,g=X,h=b;b=U;g.effectTag|=2048;g.firstEffect=g.lastEffect=null;if(null!==h&&"object"===typeof h&&"function"===typeof h.then){var k=h;if(0===(g.mode&2)){var l=g.alternate;l?(g.updateQueue=l.updateQueue,g.memoizedState=l.memoizedState,g.expirationTime=l.expirationTime):(g.updateQueue=
-null,g.memoizedState=null)}var m=0!==(M.current&1),p=f;do{var x;if(x=13===p.tag){var z=p.memoizedState;if(null!==z)x=null!==z.dehydrated?!0:!1;else{var ca=p.memoizedProps;x=void 0===ca.fallback?!1:!0!==ca.unstable_avoidThisFallback?!0:m?!1:!0}}if(x){var D=p.updateQueue;if(null===D){var t=new Set;t.add(k);p.updateQueue=t}else D.add(k);if(0===(p.mode&2)){p.effectTag|=64;g.effectTag&=-2981;if(1===g.tag)if(null===g.alternate)g.tag=17;else{var y=wg(1073741823,null);y.tag=2;xg(g,y)}g.expirationTime=1073741823;
-break a}h=void 0;g=b;var A=e.pingCache;null===A?(A=e.pingCache=new Wi,h=new Set,A.set(k,h)):(h=A.get(k),void 0===h&&(h=new Set,A.set(k,h)));if(!h.has(g)){h.add(g);var q=Oj.bind(null,e,k,g);k.then(q,q)}p.effectTag|=4096;p.expirationTime=b;break a}p=p.return}while(null!==p);h=Error((pb(g.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+qb(g))}S!==
-jj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=h;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&("function"===typeof w.getDerivedStateFromError||null!==ub&&"function"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return}while(null!==p)}X=Pj(X)}catch(Xc){b=Xc;continue}break}while(1)}
-function Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}function Ag(a,b){a<lj&&2<a&&(lj=a);null!==b&&a<mj&&2<a&&(mj=a,nj=b)}function Bg(a){a>wi&&(wi=a)}function Kj(){for(;null!==X;)X=Qj(X)}function Gj(){for(;null!==X&&!Uf();)X=Qj(X)}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b}
-function Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}X.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1<X.effectTag&&(null!==
-a.lastEffect?a.lastEffect.nextEffect=X:a.firstEffect=X,a.lastEffect=X))}else{b=zi(X);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=X.sibling;if(null!==b)return b;X=a}while(null!==X);S===ti&&(S=jj);return null}function Ij(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null}
-function Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=
-d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=W;W|=gj;dj.current=null;Dd=fd;var g=xd();if(yd(g)){if("selectionStart"in g)var h={start:g.selectionStart,end:g.selectionEnd};else a:{h=(h=g.ownerDocument)&&h.defaultView||window;var k=h.getSelection&&h.getSelection();if(k&&0!==k.rangeCount){h=k.anchorNode;var l=k.anchorOffset,
-m=k.focusNode;k=k.focusOffset;try{h.nodeType,m.nodeType}catch(wb){h=null;break a}var p=0,x=-1,z=-1,ca=0,D=0,t=g,y=null;b:for(;;){for(var A;;){t!==h||0!==l&&3!==t.nodeType||(x=p+l);t!==m||0!==k&&3!==t.nodeType||(z=p+k);3===t.nodeType&&(p+=t.nodeValue.length);if(null===(A=t.firstChild))break;y=t;t=A}for(;;){if(t===g)break b;y===h&&++ca===l&&(x=p);y===m&&++D===k&&(z=p);if(null!==(A=t.nextSibling))break;t=y;y=t.parentNode}t=A}h=-1===x||-1===z?null:{start:x,end:z}}else h=null}h=h||{start:0,end:0}}else h=
-null;Ed={activeElementDetached:null,focusedElem:g,selectionRange:h};fd=!1;Y=e;do try{Tj()}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(g=a,h=b;null!==Y;){var q=Y.effectTag;q&16&&Rb(Y.stateNode,"");if(q&128){var B=Y.alternate;if(null!==B){var w=B.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(q&1038){case 2:Pi(Y);Y.effectTag&=-3;break;case 6:Pi(Y);Y.effectTag&=-3;Si(Y.alternate,Y);break;case 1024:Y.effectTag&=-1025;break;case 1028:Y.effectTag&=
--1025;Si(Y.alternate,Y);break;case 4:Si(Y.alternate,Y);break;case 8:l=Y,Mi(g,l,h),Ni(l)}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);w=Ed;B=xd();q=w.focusedElem;h=w.selectionRange;if(B!==q&&q&&q.ownerDocument&&wd(q.ownerDocument.documentElement,q)){null!==h&&yd(q)&&(B=h.start,w=h.end,void 0===w&&(w=B),"selectionStart"in q?(q.selectionStart=B,q.selectionEnd=Math.min(w,q.value.length)):(w=(B=q.ownerDocument||document)&&B.defaultView||window,w.getSelection&&
-(w=w.getSelection(),l=q.textContent.length,g=Math.min(h.start,l),h=void 0===h.end?g:Math.min(h.end,l),!w.extend&&g>h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft,
-top:w.scrollTop});"function"===typeof q.focus&&q.focus();for(q=0;q<B.length;q++)w=B[q],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}fd=!!Dd;Ed=Dd=null;a.current=c;Y=e;do try{for(q=a;null!==Y;){var ub=Y.effectTag;ub&36&&Ji(q,Y.alternate,Y);if(ub&128){B=void 0;var vb=Y.ref;if(null!==vb){var Xc=Y.stateNode;switch(Y.tag){case 5:B=Xc;break;default:B=Xc}"function"===typeof vb?vb(B):vb.current=B}}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=
-null;Vf();W=f}else a.current=c;if(qj)qj=!1,rj=a,sj=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&(aj=null);1073741823===b?a===vj?uj++:(uj=0,vj=a):uj=0;"function"===typeof Uj&&Uj(c.stateNode,d);Z(a);if(Yi)throw Yi=!1,a=Zi,Zi=null,a;if((W&ej)!==V)return null;gg();return null}function Tj(){for(;null!==Y;){var a=Y.effectTag;0!==(a&256)&&Gi(Y.alternate,Y);0===(a&512)||qj||(qj=!0,dg(97,function(){Dj();return null}));Y=Y.nextEffect}}
-function Dj(){if(90!==sj){var a=97<sj?97:sj;sj=90;return cg(a,Vj)}}function Vj(){if(null===rj)return!1;var a=rj;rj=null;if((W&(fj|gj))!==V)throw Error(u(331));var b=W;W|=gj;for(a=a.current.firstEffect;null!==a;){try{var c=a;if(0!==(c.effectTag&512))switch(c.tag){case 0:case 11:case 15:case 22:Hi(5,c),Ii(5,c)}}catch(d){if(null===a)throw Error(u(330));Ei(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}W=b;gg();return!0}
-function Wj(a,b,c){b=Ai(c,b);b=Xi(a,b,1073741823);xg(a,b);a=xj(a,1073741823);null!==a&&Z(a)}function Ei(a,b){if(3===a.tag)Wj(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){Wj(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===aj||!aj.has(d))){a=Ai(b,a);a=$i(c,a,1073741823);xg(c,a);c=xj(c,1073741823);null!==c&&Z(c);break}}c=c.return}}
-function Oj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);T===a&&U===c?S===vi||S===ui&&1073741823===lj&&$f()-Ti<pj?Ej(a,U):oj=!0:Aj(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,Z(a)))}function Vi(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=Gg(),b=Hg(b,a,null));a=xj(a,b);null!==a&&Z(a)}var Rj;
-Rj=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||K.current)rg=!0;else{if(d<c){rg=!1;switch(b.tag){case 3:hi(b);Xh();break;case 5:fh(b);if(b.mode&4&&1!==c&&e.hidden)return b.expirationTime=b.childExpirationTime=1,null;break;case 1:L(b.type)&&Gf(b);break;case 4:dh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;e=b.type._context;I(jg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;
-if(0!==d&&d>=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null,
-b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=
-null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c);
-case 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:
-null,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,
-b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==
-k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime<c&&(h.expirationTime=c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);pg(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=
-g}R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,qg(b,c),e=sg(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,R(a,b,d,c),b.child;case 14:return e=b.type,f=ig(e,b.pendingProps),f=ig(e.type,f),ai(a,b,e,f,d,c);case 15:return ci(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,L(d)?(a=!0,Gf(b)):a=!1,qg(b,c),Lg(b,d,e),Ng(b,d,e,c),gi(null,
-b,d,!0,a,c);case 19:return mi(a,b,c)}throw Error(u(156,b.tag));};var Uj=null,Li=null;function Yj(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Uj=function(a){try{b.onCommitFiberRoot(c,a,void 0,64===(a.current.effectTag&64))}catch(e){}};Li=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}
-function Zj(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function Sh(a,b,c,d){return new Zj(a,b,c,d)}
-function bi(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Xj(a){if("function"===typeof a)return bi(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===gb)return 11;if(a===jb)return 14}return 2}
-function Sg(a,b){var c=a.alternate;null===c?(c=Sh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,
-firstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}
-function Ug(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bi(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ab:return Wg(c.children,e,f,b);case fb:g=8;e|=7;break;case bb:g=8;e|=1;break;case cb:return a=Sh(12,c,b,e|8),a.elementType=cb,a.type=cb,a.expirationTime=f,a;case hb:return a=Sh(13,c,b,e),a.type=hb,a.elementType=hb,a.expirationTime=f,a;case ib:return a=Sh(19,c,b,e),a.elementType=ib,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case db:g=
-10;break a;case eb:g=9;break a;case gb:g=11;break a;case jb:g=14;break a;case kb:g=16;d=null;break a;case lb:g=22;break a}throw Error(u(130,null==a?a:typeof a,""));}b=Sh(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Wg(a,b,c,d){a=Sh(7,a,d,b);a.expirationTime=c;return a}function Tg(a,b,c){a=Sh(6,a,null,b);a.expirationTime=c;return a}
-function Vg(a,b,c){b=Sh(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
-function ak(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}
-function Aj(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}
-function yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}
-function bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0===
-d?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=b)}function ek(a,b){dk(a,b);(a=a.alternate)&&dk(a,b)}
-function fk(a,b,c){c=null!=c&&!0===c.hydrate;var d=new ak(a,b,c),e=Sh(3,null,null,2===b?7:1===b?3:0);d.current=e;e.stateNode=d;ug(e);a[Od]=d.current;c&&0!==b&&Jc(a,9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}fk.prototype.render=function(a){bk(a,this._internalRoot,null,null)};fk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;bk(null,a,null,function(){b[Od]=null})};
-function gk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function hk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new fk(a,0,b?{hydrate:!0}:void 0)}
-function ik(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=ck(g);h.call(a)}}bk(b,g,a,e)}else{f=c._reactRootContainer=hk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=ck(g);k.call(a)}}Nj(function(){bk(b,g,a,e)})}return ck(g)}function jk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:$a,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
-wc=function(a){if(13===a.tag){var b=hg(Gg(),150,100);Ig(a,b);ek(a,b)}};xc=function(a){13===a.tag&&(Ig(a,3),ek(a,3))};yc=function(a){if(13===a.tag){var b=Gg();b=Hg(b,a,null);Ig(a,b);ek(a,b)}};
-za=function(a,b,c){switch(b){case "input":Cb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Qd(d);if(!e)throw Error(u(90));yb(d);Cb(d,e)}}}break;case "textarea":Kb(a,c);break;case "select":b=c.value,null!=b&&Hb(a,!!c.multiple,b,!1)}};Fa=Mj;
-Ga=function(a,b,c,d,e){var f=W;W|=4;try{return cg(98,a.bind(null,b,c,d,e))}finally{W=f,W===V&&gg()}};Ha=function(){(W&(1|fj|gj))===V&&(Lj(),Dj())};Ia=function(a,b){var c=W;W|=2;try{return a(b)}finally{W=c,W===V&&gg()}};function kk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gk(b))throw Error(u(200));return jk(a,b,null,c)}var lk={Events:[Nc,Pd,Qd,xa,ta,Xd,function(a){jc(a,Wd)},Da,Ea,id,mc,Dj,{current:!1}]};
-(function(a){var b=a.findFiberByHostInstance;return Yj(n({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=hc(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:tc,bundleType:0,version:"16.14.0",
-rendererPackageName:"react-dom"});exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;exports.createPortal=kk;exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if("function"===typeof a.render)throw Error(u(188));throw Error(u(268,Object.keys(a)));}a=hc(b);a=null===a?null:a.stateNode;return a};
-exports.flushSync=function(a,b){if((W&(fj|gj))!==V)throw Error(u(187));var c=W;W|=1;try{return cg(99,a.bind(null,b))}finally{W=c,gg()}};exports.hydrate=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!0,c)};exports.render=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!1,c)};
-exports.unmountComponentAtNode=function(a){if(!gk(a))throw Error(u(40));return a._reactRootContainer?(Nj(function(){ik(null,null,a,!1,function(){a._reactRootContainer=null;a[Od]=null})}),!0):!1};exports.unstable_batchedUpdates=Mj;exports.unstable_createPortal=function(a,b){return kk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
-exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!gk(c))throw Error(u(200));if(null==a||void 0===a._reactInternalFiber)throw Error(u(38));return ik(a,b,c,!1,d)};exports.version="16.14.0";
+'use strict';var aa=require("react"),m=require("object-assign"),r=require("scheduler");function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(y(227));var ba=new Set,ca={};function da(a,b){ea(a,b);ea(a+"Capture",b)}
+function ea(a,b){ca[a]=b;for(a=0;a<b.length;a++)ba.add(b[a])}
+var fa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ha=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ia=Object.prototype.hasOwnProperty,
+ja={},ka={};function la(a){if(ia.call(ka,a))return!0;if(ia.call(ja,a))return!1;if(ha.test(a))return ka[a]=!0;ja[a]=!0;return!1}function ma(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
+function na(a,b,c,d){if(null===b||"undefined"===typeof b||ma(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};
+"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});
+["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});
+["checked","multiple","muted","selected"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}
+"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(oa,
+pa);D[b]=new B(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});
+D.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});
+function qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(na(b,c,e,d)&&(c=null),d||null===e?la(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
+var ra=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sa=60103,ta=60106,ua=60107,wa=60108,xa=60114,ya=60109,za=60110,Aa=60112,Ba=60113,Ca=60120,Da=60115,Ea=60116,Fa=60121,Ga=60128,Ha=60129,Ia=60130,Ja=60131;
+if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;sa=E("react.element");ta=E("react.portal");ua=E("react.fragment");wa=E("react.strict_mode");xa=E("react.profiler");ya=E("react.provider");za=E("react.context");Aa=E("react.forward_ref");Ba=E("react.suspense");Ca=E("react.suspense_list");Da=E("react.memo");Ea=E("react.lazy");Fa=E("react.block");E("react.scope");Ga=E("react.opaque.id");Ha=E("react.debug_trace_mode");Ia=E("react.offscreen");Ja=E("react.legacy_hidden")}
+var Ka="function"===typeof Symbol&&Symbol.iterator;function La(a){if(null===a||"object"!==typeof a)return null;a=Ka&&a[Ka]||a["@@iterator"];return"function"===typeof a?a:null}var Ma;function Na(a){if(void 0===Ma)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);Ma=b&&b[1]||""}return"\n"+Ma+a}var Oa=!1;
+function Pa(a,b){if(!a||Oa)return"";Oa=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();}catch(k){d=k}a()}}catch(k){if(k&&d&&"string"===typeof k.stack){for(var e=k.stack.split("\n"),
+f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return"\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Na(a):""}
+function Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na("Lazy");case 13:return Na("Suspense");case 19:return Na("SuspenseList");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return""}}
+function Ra(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ua:return"Fragment";case ta:return"Portal";case xa:return"Profiler";case wa:return"StrictMode";case Ba:return"Suspense";case Ca:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case za:return(a.displayName||"Context")+".Consumer";case ya:return(a._context.displayName||"Context")+".Provider";case Aa:var b=a.render;b=b.displayName||b.name||"";
+return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function Ta(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
+function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
+null;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}
+function Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,"checked",b,!1)}
+function ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?bb(a,b.type,c):b.hasOwnProperty("defaultValue")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
+function cb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
+function bb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function db(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}
+function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
+function gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(y(91));return m({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(y(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Sa(c)}}
+function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var kb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
+function lb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function mb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?lb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
+var nb,ob=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||"innerHTML"in a)a.innerHTML=b;else{nb=nb||document.createElement("div");nb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
+function pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}
+var qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
+floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=["Webkit","ms","Moz","O"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(""+b).trim():b+"px"}
+function tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=sb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
+function vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(y(62));}}
+function wb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;
+function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a])}}function Gb(a,b){return a(b)}function Hb(a,b,c,d,e){return a(b,c,d,e)}function Ib(){}var Jb=Gb,Kb=!1,Lb=!1;function Mb(){if(null!==zb||null!==Ab)Ib(),Fb()}
+function Nb(a,b,c){if(Lb)return a(b,c);Lb=!0;try{return Jb(a,b,c)}finally{Lb=!1,Mb()}}
+function Ob(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==
+typeof c)throw Error(y(231,b,typeof c));return c}var Pb=!1;if(fa)try{var Qb={};Object.defineProperty(Qb,"passive",{get:function(){Pb=!0}});window.addEventListener("test",Qb,Qb);window.removeEventListener("test",Qb,Qb)}catch(a){Pb=!1}function Rb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(n){this.onError(n)}}var Sb=!1,Tb=null,Ub=!1,Vb=null,Wb={onError:function(a){Sb=!0;Tb=a}};function Xb(a,b,c,d,e,f,g,h,k){Sb=!1;Tb=null;Rb.apply(Wb,arguments)}
+function Yb(a,b,c,d,e,f,g,h,k){Xb.apply(this,arguments);if(Sb){if(Sb){var l=Tb;Sb=!1;Tb=null}else throw Error(y(198));Ub||(Ub=!0,Vb=l)}}function Zb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function $b(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function ac(a){if(Zb(a)!==a)throw Error(y(188));}
+function bc(a){var b=a.alternate;if(!b){b=Zb(a);if(null===b)throw Error(y(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return ac(e),a;if(f===d)return ac(e),b;f=f.sibling}throw Error(y(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
+c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(y(189));}}if(c.alternate!==d)throw Error(y(190));}if(3!==c.tag)throw Error(y(188));return c.stateNode.current===c?a:b}function cc(a){a=bc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
+function dc(a,b){for(var c=a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}var ec,fc,gc,hc,ic=!1,jc=[],kc=null,lc=null,mc=null,nc=new Map,oc=new Map,pc=[],qc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
+function rc(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function sc(a,b){switch(a){case "focusin":case "focusout":kc=null;break;case "dragenter":case "dragleave":lc=null;break;case "mouseover":case "mouseout":mc=null;break;case "pointerover":case "pointerout":nc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":oc.delete(b.pointerId)}}
+function tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=rc(b,c,d,e,f),null!==b&&(b=Cb(b),null!==b&&fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}
+function uc(a,b,c,d,e){switch(b){case "focusin":return kc=tc(kc,a,b,c,d,e),!0;case "dragenter":return lc=tc(lc,a,b,c,d,e),!0;case "mouseover":return mc=tc(mc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;nc.set(f,tc(nc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,oc.set(f,tc(oc.get(f)||null,a,b,c,d,e)),!0}return!1}
+function vc(a){var b=wc(a.target);if(null!==b){var c=Zb(b);if(null!==c)if(b=c.tag,13===b){if(b=$b(c),null!==b){a.blockedOn=b;hc(a.lanePriority,function(){r.unstable_runWithPriority(a.priority,function(){gc(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}
+function xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c)return b=Cb(c),null!==b&&fc(b),a.blockedOn=c,!1;b.shift()}return!0}function zc(a,b,c){xc(a)&&c.delete(b)}
+function Ac(){for(ic=!1;0<jc.length;){var a=jc[0];if(null!==a.blockedOn){a=Cb(a.blockedOn);null!==a&&ec(a);break}for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&jc.shift()}null!==kc&&xc(kc)&&(kc=null);null!==lc&&xc(lc)&&(lc=null);null!==mc&&xc(mc)&&(mc=null);nc.forEach(zc);oc.forEach(zc)}
+function Bc(a,b){a.blockedOn===b&&(a.blockedOn=null,ic||(ic=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ac)))}
+function Cc(a){function b(b){return Bc(b,a)}if(0<jc.length){Bc(jc[0],a);for(var c=1;c<jc.length;c++){var d=jc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==kc&&Bc(kc,a);null!==lc&&Bc(lc,a);null!==mc&&Bc(mc,a);nc.forEach(b);oc.forEach(b);for(c=0;c<pc.length;c++)d=pc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<pc.length&&(c=pc[0],null===c.blockedOn);)vc(c),null===c.blockedOn&&pc.shift()}
+function Dc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Ec={animationend:Dc("Animation","AnimationEnd"),animationiteration:Dc("Animation","AnimationIteration"),animationstart:Dc("Animation","AnimationStart"),transitionend:Dc("Transition","TransitionEnd")},Fc={},Gc={};
+fa&&(Gc=document.createElement("div").style,"AnimationEvent"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),"TransitionEvent"in window||delete Ec.transitionend.transition);function Hc(a){if(Fc[a])return Fc[a];if(!Ec[a])return a;var b=Ec[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Gc)return Fc[a]=b[c];return a}
+var Ic=Hc("animationend"),Jc=Hc("animationiteration"),Kc=Hc("animationstart"),Lc=Hc("transitionend"),Mc=new Map,Nc=new Map,Oc=["abort","abort",Ic,"animationEnd",Jc,"animationIteration",Kc,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart",
+"lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lc,"transitionEnd","waiting","waiting"];function Pc(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e="on"+(e[0].toUpperCase()+e.slice(1));Nc.set(d,b);Mc.set(d,e);da(e,[d])}}var Qc=r.unstable_now;Qc();var F=8;
+function Rc(a){if(0!==(1&a))return F=15,1;if(0!==(2&a))return F=14,2;if(0!==(4&a))return F=13,4;var b=24&a;if(0!==b)return F=12,b;if(0!==(a&32))return F=11,32;b=192&a;if(0!==b)return F=10,b;if(0!==(a&256))return F=9,256;b=3584&a;if(0!==b)return F=8,b;if(0!==(a&4096))return F=7,4096;b=4186112&a;if(0!==b)return F=6,b;b=62914560&a;if(0!==b)return F=5,b;if(a&67108864)return F=4,67108864;if(0!==(a&134217728))return F=3,134217728;b=805306368&a;if(0!==b)return F=2,b;if(0!==(1073741824&a))return F=1,1073741824;
+F=8;return a}function Sc(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Tc(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(y(358,a));}}
+function Uc(a,b){var c=a.pendingLanes;if(0===c)return F=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=F=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=Rc(k),e=F):(h&=f,0!==h&&(d=Rc(h),e=F))}else f=c&~g,0!==f?(d=Rc(f),e=F):0!==h&&(d=Rc(h),e=F);if(0===d)return 0;d=31-Vc(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){Rc(b);if(e<=F)return b;F=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Vc(b),e=1<<c,d|=a[c],b&=~e;return d}
+function Wc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Xc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=Yc(24&~b),0===a?Xc(10,b):a;case 10:return a=Yc(192&~b),0===a?Xc(8,b):a;case 8:return a=Yc(3584&~b),0===a&&(a=Yc(4186112&~b),0===a&&(a=512)),a;case 2:return b=Yc(805306368&~b),0===b&&(b=268435456),b}throw Error(y(358,a));}function Yc(a){return a&-a}function Zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}
+function $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}
+function hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0<jc.length&&-1<qc.indexOf(a))a=rc(null,a,b,c,d),jc.push(a);else{var f=yc(a,b,c,d);if(null===f)e&&sc(a,d);else{if(e){if(-1<qc.indexOf(a)){a=rc(f,a,b,c,d);jc.push(a);return}if(uc(f,a,b,c,d))return;sc(a,d)}jd(a,b,d,null,c)}}}}
+function yc(a,b,c,d){var e=xb(d);e=wc(e);if(null!==e){var f=Zb(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=$b(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==e&&(e=null)}}jd(a,b,d,e,c);return null}var kd=null,ld=null,md=null;
+function nd(){if(md)return md;var a,b=ld,c=b.length,d,e="value"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)}function od(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return!0}function qd(){return!1}
+function rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}m(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&
+(a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd});return b}
+var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=m({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=m({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in
+a)return a.movementX;a!==yd&&(yd&&"mousemove"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return"movementY"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=m({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=m({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=m({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=m({},sd,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=m({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",
+Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",
+119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:!1}function zd(){return Pd}
+var Qd=m({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=od(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Nd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return"keypress"===a.type?od(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
+a.type?od(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=m({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=m({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=m({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=m({},Ad,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},
+deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=fa&&"CompositionEvent"in window,be=null;fa&&"documentMode"in document&&(be=document.documentMode);var ce=fa&&"TextEvent"in window&&!be,de=fa&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1;
+function ge(a,b){switch(a){case "keyup":return-1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function he(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}}
+function ke(a,b){if(ie)return"compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return de&&"ko"!==b.locale?null:b.data;default:return null}}
+var le={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!le[a.type]:"textarea"===b?!0:!1}function ne(a,b,c,d){Eb(d);b=oe(b,"onChange");0<b.length&&(c=new td("onChange","change",null,c,d),a.push({event:c,listeners:b}))}var pe=null,qe=null;function re(a){se(a,0)}function te(a){var b=ue(a);if(Wa(b))return a}
+function ve(a,b){if("change"===a)return b}var we=!1;if(fa){var xe;if(fa){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;");ye="function"===typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(a){if("value"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));a=re;if(Kb)a(b);else{Kb=!0;try{Gb(a,b)}finally{Kb=!1,Mb()}}}}
+function Ce(a,b,c){"focusin"===a?(Ae(),pe=b,qe=c,pe.attachEvent("onpropertychange",Be)):"focusout"===a&&Ae()}function De(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return te(qe)}function Ee(a,b){if("click"===a)return te(b)}function Fe(a,b){if("input"===a||"change"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He="function"===typeof Object.is?Object.is:Ge,Ie=Object.prototype.hasOwnProperty;
+function Je(a,b){if(He(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Ie.call(b,c[d])||!He(a[c[d]],b[c[d]]))return!1;return!0}function Ke(a){for(;a&&a.firstChild;)a=a.firstChild;return a}
+function Le(a,b){var c=Ke(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}
+function Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}
+var Pe=fa&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;
+function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,"onSelect"),0<d.length&&(b=new td("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)))}
+Pc("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
+0);Pc("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Pc(Oc,2);for(var Ve="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),We=0;We<Ve.length;We++)Nc.set(Ve[We],0);ea("onMouseEnter",["mouseout","mouseover"]);
+ea("onMouseLeave",["mouseout","mouseover"]);ea("onPointerEnter",["pointerout","pointerover"]);ea("onPointerLeave",["pointerout","pointerover"]);da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));da("onBeforeInput",["compositionend","keypress","textInput","paste"]);da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));
+da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xe));
+function Ze(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;Yb(d,b,void 0,a);a.currentTarget=null}
+function se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}}}if(Ub)throw a=Vb,Ub=!1,Vb=null,a;}
+function G(a,b){var c=$e(b),d=a+"__bubble";c.has(d)||(af(b,a,2,!1),c.add(d))}var bf="_reactListening"+Math.random().toString(36).slice(2);function cf(a){a[bf]||(a[bf]=!0,ba.forEach(function(b){Ye.has(b)||df(b,!1,a,null);df(b,!0,a,null)}))}
+function df(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;"selectionchange"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Ye.has(a)){if("scroll"!==a)return;e|=2;f=d}var g=$e(f),h=a+"__"+(b?"capture":"bubble");g.has(h)||(b&&(e|=4),af(f,a,e,b),g.add(h))}
+function af(a,b,c,d){var e=Nc.get(b);switch(void 0===e?2:e){case 0:e=gd;break;case 1:e=id;break;default:e=hd}c=e.bind(null,b,c,a);e=void 0;!Pb||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}
+function jd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Nb(function(){var d=f,e=xb(c),g=[];
+a:{var h=Mc.get(a);if(void 0!==h){var k=td,x=a;switch(a){case "keypress":if(0===od(c))break a;case "keydown":case "keyup":k=Rd;break;case "focusin":x="focus";k=Fd;break;case "focusout":x="blur";k=Fd;break;case "beforeblur":case "afterblur":k=Fd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Bd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=
+Dd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Vd;break;case Ic:case Jc:case Kc:k=Hd;break;case Lc:k=Xd;break;case "scroll":k=vd;break;case "wheel":k=Zd;break;case "copy":case "cut":case "paste":k=Jd;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Td}var w=0!==(b&4),z=!w&&"scroll"===a,u=w?null!==h?h+"Capture":null:h;w=[];for(var t=d,q;null!==
+t;){q=t;var v=q.stateNode;5===q.tag&&null!==v&&(q=v,null!==u&&(v=Ob(t,u),null!=v&&w.push(ef(t,v,q))));if(z)break;t=t.return}0<w.length&&(h=new k(h,x,null,c,e),g.push({event:h,listeners:w}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&0===(b&16)&&(x=c.relatedTarget||c.fromElement)&&(wc(x)||x[ff]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(x=c.relatedTarget||c.toElement,k=d,x=x?wc(x):null,null!==
+x&&(z=Zb(x),x!==z||5!==x.tag&&6!==x.tag))x=null}else k=null,x=d;if(k!==x){w=Bd;v="onMouseLeave";u="onMouseEnter";t="mouse";if("pointerout"===a||"pointerover"===a)w=Td,v="onPointerLeave",u="onPointerEnter",t="pointer";z=null==k?h:ue(k);q=null==x?h:ue(x);h=new w(v,t+"leave",k,c,e);h.target=z;h.relatedTarget=q;v=null;wc(e)===d&&(w=new w(u,t+"enter",x,c,e),w.target=q,w.relatedTarget=z,v=w);z=v;if(k&&x)b:{w=k;u=x;t=0;for(q=w;q;q=gf(q))t++;q=0;for(v=u;v;v=gf(v))q++;for(;0<t-q;)w=gf(w),t--;for(;0<q-t;)u=
+gf(u),q--;for(;t--;){if(w===u||null!==u&&w===u.alternate)break b;w=gf(w);u=gf(u)}w=null}else w=null;null!==k&&hf(g,h,k,w,!1);null!==x&&null!==z&&hf(g,z,x,w,!0)}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var J=ve;else if(me(h))if(we)J=Fe;else{J=De;var K=Ce}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(J=Ee);if(J&&(J=J(a,d))){ne(g,J,c,e);break a}K&&K(a,h,d);"focusout"===a&&(K=h._wrapperState)&&
+K.controlled&&"number"===h.type&&bb(h,"number",h.value)}K=d?ue(d):window;switch(a){case "focusin":if(me(K)||"true"===K.contentEditable)Qe=K,Re=d,Se=null;break;case "focusout":Se=Re=Qe=null;break;case "mousedown":Te=!0;break;case "contextmenu":case "mouseup":case "dragend":Te=!1;Ue(g,c,e);break;case "selectionchange":if(Pe)break;case "keydown":case "keyup":Ue(g,c,e)}var Q;if(ae)b:{switch(a){case "compositionstart":var L="onCompositionStart";break b;case "compositionend":L="onCompositionEnd";break b;
+case "compositionupdate":L="onCompositionUpdate";break b}L=void 0}else ie?ge(a,c)&&(L="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(L="onCompositionStart");L&&(de&&"ko"!==c.locale&&(ie||"onCompositionStart"!==L?"onCompositionEnd"===L&&ie&&(Q=nd()):(kd=e,ld="value"in kd?kd.value:kd.textContent,ie=!0)),K=oe(d,L),0<K.length&&(L=new Ld(L,a,null,c,e),g.push({event:L,listeners:K}),Q?L.data=Q:(Q=he(c),null!==Q&&(L.data=Q))));if(Q=ce?je(a,c):ke(a,c))d=oe(d,"onBeforeInput"),0<d.length&&(e=new Ld("onBeforeInput",
+"beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=Q)}se(g,b)})}function ef(a,b,c){return{instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Ob(a,c),null!=f&&d.unshift(ef(a,f,e)),f=Ob(a,b),null!=f&&d.push(ef(a,f,e)));a=a.return}return d}function gf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}
+function hf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Ob(c,f),null!=k&&g.unshift(ef(c,k,h))):e||(k=Ob(c,f),null!=k&&g.push(ef(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function jf(){}var kf=null,lf=null;function mf(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
+function nf(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var of="function"===typeof setTimeout?setTimeout:void 0,pf="function"===typeof clearTimeout?clearTimeout:void 0;function qf(a){1===a.nodeType?a.textContent="":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=""))}
+function rf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function sf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}var tf=0;function uf(a){return{$$typeof:Ga,toString:a,valueOf:a}}var vf=Math.random().toString(36).slice(2),wf="__reactFiber$"+vf,xf="__reactProps$"+vf,ff="__reactContainer$"+vf,yf="__reactEvents$"+vf;
+function wc(a){var b=a[wf];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ff]||c[wf]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=sf(a);null!==a;){if(c=a[wf])return c;a=sf(a)}return b}a=c;c=a.parentNode}return null}function Cb(a){a=a[wf]||a[ff];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(y(33));}function Db(a){return a[xf]||null}
+function $e(a){var b=a[yf];void 0===b&&(b=a[yf]=new Set);return b}var zf=[],Af=-1;function Bf(a){return{current:a}}function H(a){0>Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;
+function Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}
+function If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||"Unknown",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}
+var Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};
+function eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}
+function jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});ag=null}catch(c){throw null!==ag&&(ag=ag.slice(a+1)),Of(Uf,ig),c;}finally{cg=!1}}}var kg=ra.ReactCurrentBatchConfig;function lg(a,b){if(a&&a.defaultProps){b=m({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var mg=Bf(null),ng=null,og=null,pg=null;function qg(){pg=og=ng=null}
+function rg(a){var b=mg.current;H(mg);a.type._context._currentValue=b}function sg(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function tg(a,b){ng=a;pg=og=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ug=!0),a.firstContext=null)}
+function vg(a,b){if(pg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)pg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===og){if(null===ng)throw Error(y(308));og=b;ng.dependencies={lanes:0,firstContext:b,responders:null}}else og=og.next=b}return a._currentValue}var wg=!1;function xg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}
+function yg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function zg(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}function Ag(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}
+function Bg(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=
+b;c.lastBaseUpdate=b}
+function Cg(a,b,c,d){var e=a.updateQueue;wg=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var n=a.alternate;if(null!==n){n=n.updateQueue;var A=n.lastBaseUpdate;A!==g&&(null===A?n.firstBaseUpdate=l:A.next=l,n.lastBaseUpdate=k)}}if(null!==f){A=e.baseState;g=0;n=l=k=null;do{h=f.lane;var p=f.eventTime;if((d&h)===h){null!==n&&(n=n.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,
+next:null});a:{var C=a,x=f;h=b;p=c;switch(x.tag){case 1:C=x.payload;if("function"===typeof C){A=C.call(p,A,h);break a}A=C;break a;case 3:C.flags=C.flags&-4097|64;case 0:C=x.payload;h="function"===typeof C?C.call(p,A,h):C;if(null===h||void 0===h)break a;A=m({},A,h);break a;case 2:wg=!0}}null!==f.callback&&(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else p={eventTime:p,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===n?(l=n=p,k=A):n=n.next=p,g|=h;f=f.next;if(null===
+f)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===n&&(k=A);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=n;Dg|=g;a.lanes=g;a.memoizedState=A}}function Eg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(y(191,e));e.call(d)}}}var Fg=(new aa.Component).refs;
+function Gg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:m({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}
+var Kg={isMounted:function(a){return(a=a._reactInternals)?Zb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Hg(),d=Ig(a),e=zg(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=
+b);Ag(a,e);Jg(a,d,c)}};function Lg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Je(c,d)||!Je(e,f):!0}
+function Mg(a,b,c){var d=!1,e=Cf;var f=b.contextType;"object"===typeof f&&null!==f?f=vg(f):(e=Ff(b)?Df:M.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Ef(a,e):Cf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Kg;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
+function Ng(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Kg.enqueueReplaceState(b,b.state,null)}
+function Og(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Fg;xg(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=vg(f):(f=Ff(b)?Df:M.current,e.context=Ef(a,f));Cg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Gg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||
+(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Kg.enqueueReplaceState(e,e.state,null),Cg(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4)}var Pg=Array.isArray;
+function Qg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(y(309));var d=c.stateNode}if(!d)throw Error(y(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Fg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(y(284));if(!c._owner)throw Error(y(290,a));}return a}
+function Rg(a,b){if("textarea"!==a.type)throw Error(y(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b));}
+function Sg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Tg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=2,
+c):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Ug(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Qg(a,b,c),d.return=a,d;d=Vg(c.type,c.key,c.props,null,a.mode,d);d.ref=Qg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
+Wg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function n(a,b,c,d,f){if(null===b||7!==b.tag)return b=Xg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function A(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Ug(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case sa:return c=Vg(b.type,b.key,b.props,null,a.mode,c),c.ref=Qg(a,null,b),c.return=a,c;case ta:return b=Wg(b,a.mode,c),b.return=a,b}if(Pg(b)||La(b))return b=Xg(b,
+a.mode,c,null),b.return=a,b;Rg(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case sa:return c.key===e?c.type===ua?n(a,b,c.props.children,d,e):k(a,b,c,d):null;case ta:return c.key===e?l(a,b,c,d):null}if(Pg(c)||La(c))return null!==e?null:n(a,b,c,d,null);Rg(a,c)}return null}function C(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||
+null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case sa:return a=a.get(null===d.key?c:d.key)||null,d.type===ua?n(b,a,d.props.children,e,d.key):k(b,a,d,e);case ta:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Pg(d)||La(d))return a=a.get(c)||null,n(b,a,d,e,null);Rg(b,d)}return null}function x(e,g,h,k){for(var l=null,t=null,u=g,z=g=0,q=null;null!==u&&z<h.length;z++){u.index>z?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===
+n.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;z<h.length;z++)u=A(e,h[z],k),null!==u&&(g=f(u,g,z),null===t?l=u:t.sibling=u,t=u);return l}for(u=d(e,u);z<h.length;z++)q=C(u,e,z,h[z],k),null!==q&&(a&&null!==q.alternate&&u.delete(null===q.key?z:q.key),g=f(q,g,z),null===t?l=q:t.sibling=q,t=q);a&&u.forEach(function(a){return b(e,a)});return l}function w(e,g,h,k){var l=La(h);if("function"!==typeof l)throw Error(y(150));h=l.call(h);if(null==
+h)throw Error(y(151));for(var t=l=null,u=g,z=g=0,q=null,n=h.next();null!==u&&!n.done;z++,n=h.next()){u.index>z?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&
+u.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);
+d=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=
+Wg(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||"Component"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);
+function dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);
+function ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;
+function mh(a,b){var c=nh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
+function ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}
+function rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}
+function sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;a<th.length;a++)th[a]._workInProgressVersionPrimary=null;th.length=0}var vh=ra.ReactCurrentDispatcher,wh=ra.ReactCurrentBatchConfig,xh=0,R=null,S=null,T=null,yh=!1,zh=!1;function Ah(){throw Error(y(321));}function Bh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return!1;return!0}
+function Ch(a,b,c,d,e,f){xh=f;R=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;vh.current=null===a||null===a.memoizedState?Dh:Eh;a=c(d,e);if(zh){f=0;do{zh=!1;if(!(25>f))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}
+function Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return"function"===typeof b?b(a):b}
+function Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,
+eagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}
+function Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}
+function Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}
+function Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=
+e.entanglements,h=a;0<h;){var k=31-Vc(h),v=1<<k;d[k]|=a;h&=~v}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=p.getSnapshot,c=p.setSnapshot;try{c(a(b._source));var d=Ig(w);e.mutableReadLanes|=d&e.pendingLanes}catch(q){c(function(){throw q;})}})},[b,d]);He(C,c)&&He(x,b)&&He(A,d)||(a={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:n},a.dispatch=l=Oh.bind(null,R,a),k.queue=a,k.baseQueue=null,n=Mh(e,b,c),k.memoizedState=k.baseState=n);return n}
+function Ph(a,b,c){var d=Ih();return Nh(d,a,b,c)}function Qh(a){var b=Hh();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:a};a=a.dispatch=Oh.bind(null,R,a);return[b.memoizedState,a]}
+function Rh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=R.updateQueue;null===b?(b={lastEffect:null},R.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Sh(a){var b=Hh();a={current:a};return b.memoizedState=a}function Th(){return Ih().memoizedState}function Uh(a,b,c,d){var e=Hh();R.flags|=a;e.memoizedState=Rh(1|b,c,void 0,void 0===d?null:d)}
+function Vh(a,b,c,d){var e=Ih();d=void 0===d?null:d;var f=void 0;if(null!==S){var g=S.memoizedState;f=g.destroy;if(null!==d&&Bh(d,g.deps)){Rh(b,c,f,d);return}}R.flags|=a;e.memoizedState=Rh(1|b,c,f,d)}function Wh(a,b){return Uh(516,4,a,b)}function Xh(a,b){return Vh(516,4,a,b)}function Yh(a,b){return Vh(4,2,a,b)}function Zh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}
+function $h(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Vh(4,2,Zh.bind(null,b,a),c)}function ai(){}function bi(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function ci(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}
+function di(a,b){var c=eg();gg(98>c?98:c,function(){a(!0)});gg(97<c?97:c,function(){var c=wh.transition;wh.transition=1;try{a(!1),b()}finally{wh.transition=c}})}
+function Oh(a,b,c){var d=Hg(),e=Ig(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);b.pending=f;g=a.alternate;if(a===R||null!==g&&g===R)zh=yh=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(He(k,h))return}catch(l){}finally{}Jg(a,e,d)}}
+var Gh={readContext:vg,useCallback:Ah,useContext:Ah,useEffect:Ah,useImperativeHandle:Ah,useLayoutEffect:Ah,useMemo:Ah,useReducer:Ah,useRef:Ah,useState:Ah,useDebugValue:Ah,useDeferredValue:Ah,useTransition:Ah,useMutableSource:Ah,useOpaqueIdentifier:Ah,unstable_isNewReconciler:!1},Dh={readContext:vg,useCallback:function(a,b){Hh().memoizedState=[a,void 0===b?null:b];return a},useContext:vg,useEffect:Wh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Uh(4,2,Zh.bind(null,
+b,a),c)},useLayoutEffect:function(a,b){return Uh(4,2,a,b)},useMemo:function(a,b){var c=Hh();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Hh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Oh.bind(null,R,a);return[d.memoizedState,a]},useRef:Sh,useState:Qh,useDebugValue:ai,useDeferredValue:function(a){var b=Qh(a),c=b[0],d=b[1];Wh(function(){var b=wh.transition;
+wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Qh(!1),b=a[0];a=di.bind(null,a[1]);Sh(a);return[a,b]},useMutableSource:function(a,b,c){var d=Hh();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Nh(d,a,b,c)},useOpaqueIdentifier:function(){if(lh){var a=!1,b=uf(function(){a||(a=!0,c("r:"+(tf++).toString(36)));throw Error(y(355));}),c=Qh(b)[1];0===(R.mode&2)&&(R.flags|=516,Rh(5,function(){c("r:"+(tf++).toString(36))},
+void 0,null));return b}b="r:"+(tf++).toString(36);Qh(b);return b},unstable_isNewReconciler:!1},Eh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Kh,useRef:Th,useState:function(){return Kh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Kh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Kh(Jh)[0];return[Th().current,
+a]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Kh(Jh)[0]},unstable_isNewReconciler:!1},Fh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Lh,useRef:Th,useState:function(){return Lh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Lh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Lh(Jh)[0];return[Th().current,
+a]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Lh(Jh)[0]},unstable_isNewReconciler:!1},ei=ra.ReactCurrentOwner,ug=!1;function fi(a,b,c,d){b.child=null===a?Zg(b,null,c,d):Yg(b,a.child,c,d)}function gi(a,b,c,d,e){c=c.render;var f=b.ref;tg(b,e);d=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,d,e);return b.child}
+function ii(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!ji(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ki(a,b,g,d,e,f);a=Vg(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Je,c(e,d)&&a.ref===b.ref))return hi(a,b,f);b.flags|=1;a=Tg(g,d);a.ref=b.ref;a.return=b;return b.child=a}
+function ki(a,b,c,d,e,f){if(null!==a&&Je(a.memoizedProps,d)&&a.ref===b.ref)if(ug=!1,0!==(f&e))0!==(a.flags&16384)&&(ug=!0);else return b.lanes=a.lanes,hi(a,b,f);return li(a,b,c,d,f)}
+function mi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode||"unstable-defer-without-hiding"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},ni(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},ni(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},ni(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,ni(b,d);fi(a,b,e,c);return b.child}
+function oi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function li(a,b,c,d,e){var f=Ff(c)?Df:M.current;f=Ef(b,f);tg(b,e);c=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,c,e);return b.child}
+function pi(a,b,c,d,e){if(Ff(c)){var f=!0;Jf(b)}else f=!1;tg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),Mg(b,c,d),Og(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=vg(l):(l=Ff(c)?Df:M.current,l=Ef(b,l));var n=c.getDerivedStateFromProps,A="function"===typeof n||"function"===typeof g.getSnapshotBeforeUpdate;A||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
+"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Ng(b,g,d,l);wg=!1;var p=b.memoizedState;g.state=p;Cg(b,d,g,e);k=b.memoizedState;h!==d||p!==k||N.current||wg?("function"===typeof n&&(Gg(b,c,n,d),k=b.memoizedState),(h=wg||Lg(b,c,h,d,p,k,l))?(A||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===
+typeof g.componentDidMount&&(b.flags|=4)):("function"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;yg(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:lg(b.type,h);g.props=l;A=b.pendingProps;p=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=vg(k):(k=Ff(c)?Df:M.current,k=Ef(b,k));var C=c.getDerivedStateFromProps;(n="function"===typeof C||
+"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==A||p!==k)&&Ng(b,g,d,k);wg=!1;p=b.memoizedState;g.state=p;Cg(b,d,g,e);var x=b.memoizedState;h!==A||p!==x||N.current||wg?("function"===typeof C&&(Gg(b,c,C,d),x=b.memoizedState),(l=wg||Lg(b,c,l,d,p,x,k))?(n||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,
+x,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||
+h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),d=!1)}return qi(a,b,c,d,f,e)}
+function qi(a,b,c,d,e,f){oi(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Kf(b,c,!1),hi(a,b,f);d=b.stateNode;ei.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Yg(b,a.child,null,f),b.child=Yg(b,null,h,f)):fi(a,b,h,f);b.memoizedState=d.state;e&&Kf(b,c,!0);return b.child}function ri(a){var b=a.stateNode;b.pendingContext?Hf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Hf(a,b.context,!1);eh(a,b.containerInfo)}
+var si={dehydrated:null,retryLane:0};
+function ti(a,b,c){var d=b.pendingProps,e=P.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);I(P,e&1);if(null===a){void 0!==d.fallback&&ph(b);a=d.children;e=d.fallback;if(f)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=si,a;if("number"===typeof d.unstable_expectedLoadTime)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},
+b.memoizedState=si,b.lanes=33554432,a;c=vi({mode:"visible",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:
+{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}function ui(a,b,c,d){var e=a.mode,f=a.child;b={mode:"hidden",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b):f=vi(b,e,0,null);c=Xg(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}
+function xi(a,b,c,d){var e=a.child;a=e.sibling;c=Tg(e,{mode:"visible",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}
+function wi(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:"hidden",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Tg(g,h);null!==a?d=Tg(a,d):(d=Xg(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function yi(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);sg(a.return,b)}
+function zi(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}
+function Ai(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;fi(a,b,d.children,c);d=P.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&yi(a,c);else if(19===a.tag)yi(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(P,d);if(0===(b.mode&2))b.memoizedState=
+null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===ih(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);zi(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===ih(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}zi(b,!0,c,null,f,b.lastEffect);break;case "together":zi(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
+function hi(a,b,c){null!==a&&(b.dependencies=a.dependencies);Dg|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(y(153));if(null!==b.child){a=b.child;c=Tg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Tg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}var Bi,Ci,Di,Ei;
+Bi=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Ci=function(){};
+Di=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;dh(ah.current);var f=null;switch(c){case "input":e=Ya(a,e);d=Ya(a,d);f=[];break;case "option":e=eb(a,e);d=eb(a,d);f=[];break;case "select":e=m({},e,{value:void 0});d=m({},d,{value:void 0});f=[];break;case "textarea":e=gb(a,e);d=gb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=jf)}vb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===
+l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(ca.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||
+(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(ca.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&G("scroll",a),f||h===k||(f=[])):"object"===typeof k&&null!==k&&k.$$typeof===Ga?k.toString():(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",
+c);var l=f;if(b.updateQueue=l)b.flags|=4}};Ei=function(a,b,c,d){c!==d&&(b.flags|=4)};function Fi(a,b){if(!lh)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
+function Gi(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ff(b.type)&&Gf(),null;case 3:fh();H(N);H(M);uh();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)rh(b)?b.flags|=4:d.hydrate||(b.flags|=256);Ci(b);return null;case 5:hh(b);var e=dh(ch.current);c=b.type;if(null!==a&&null!=b.stateNode)Di(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===
+b.stateNode)throw Error(y(166));return null}a=dh(ah.current);if(rh(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[wf]=b;d[xf]=f;switch(c){case "dialog":G("cancel",d);G("close",d);break;case "iframe":case "object":case "embed":G("load",d);break;case "video":case "audio":for(a=0;a<Xe.length;a++)G(Xe[a],d);break;case "source":G("error",d);break;case "img":case "image":case "link":G("error",d);G("load",d);break;case "details":G("toggle",d);break;case "input":Za(d,f);G("invalid",d);break;case "select":d._wrapperState=
+{wasMultiple:!!f.multiple};G("invalid",d);break;case "textarea":hb(d,f),G("invalid",d)}vb(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],"children"===g?"string"===typeof e?d.textContent!==e&&(a=["children",e]):"number"===typeof e&&d.textContent!==""+e&&(a=["children",""+e]):ca.hasOwnProperty(g)&&null!=e&&"onScroll"===g&&G("scroll",d));switch(c){case "input":Va(d);cb(d,f,!0);break;case "textarea":Va(d);jb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=
+jf)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;a===kb.html&&(a=lb(c));a===kb.html?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case "dialog":G("cancel",a);G("close",a);
+e=d;break;case "iframe":case "object":case "embed":G("load",a);e=d;break;case "video":case "audio":for(e=0;e<Xe.length;e++)G(Xe[e],a);e=d;break;case "source":G("error",a);e=d;break;case "img":case "image":case "link":G("error",a);G("load",a);e=d;break;case "details":G("toggle",a);e=d;break;case "input":Za(a,d);e=Ya(a,d);G("invalid",a);break;case "option":e=eb(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=m({},d,{value:void 0});G("invalid",a);break;case "textarea":hb(a,d);e=
+gb(a,d);G("invalid",a);break;default:e=d}vb(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?tb(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&ob(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&pb(a,k):"number"===typeof k&&pb(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(ca.hasOwnProperty(f)?null!=k&&"onScroll"===f&&G("scroll",a):null!=k&&qa(a,f,k,g))}switch(c){case "input":Va(a);cb(a,d,!1);
+break;case "textarea":Va(a);jb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Sa(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,!1):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=jf)}mf(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Ei(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(y(166));
+c=dh(ch.current);dh(ah.current);rh(b)?(d=b.stateNode,c=b.memoizedProps,d[wf]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[wf]=b,b.stateNode=d)}return null;case 13:H(P);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&rh(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(P.current&1))0===V&&(V=3);else{if(0===V||3===V)V=
+4;null===U||0===(Dg&134217727)&&0===(Hi&134217727)||Ii(U,W)}if(d||c)b.flags|=4;return null;case 4:return fh(),Ci(b),null===a&&cf(b.stateNode.containerInfo),null;case 10:return rg(b),null;case 17:return Ff(b.type)&&Gf(),null;case 19:H(P);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)Fi(d,!1);else{if(0!==V||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=ih(a);if(null!==g){b.flags|=64;Fi(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);
+null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,
+f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;I(P,P.current&1|2);return b.child}a=a.sibling}null!==d.tail&&O()>Ji&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&"hidden"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=
+64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}
+function Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}
+function Mi(a,b){try{var c="",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi="function"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}
+function Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}var Ui="function"===typeof WeakSet?WeakSet:Set;
+function Vi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}
+function Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,
+b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));
+return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}
+function aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=sb("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===
+a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}
+function bj(a,b){if(Mf&&"function"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,
+f)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}
+function fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===
+c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}
+function gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}
+function hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}
+function cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,
+8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}
+function ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;"input"===a&&"radio"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;e<f.length;e+=
+2){var g=f[e],h=f[e+1];"style"===g?tb(c,h):"dangerouslySetInnerHTML"===g?ob(c,h):"children"===g?pb(c,h):qa(c,g,h,b)}switch(a){case "input":ab(c,d);break;case "textarea":ib(c,d);break;case "select":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?fb(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?fb(c,!!d.multiple,d.defaultValue,!0):fb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(y(162));b.stateNode.nodeValue=
+b.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,Cc(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(jj=O(),aj(b.child,!0));kj(b);return;case 19:kj(b);return;case 17:return;case 23:case 24:aj(b,null!==b.memoizedState);return}throw Error(y(163));}function kj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ui);b.forEach(function(b){var d=lj.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}
+function mj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}var nj=Math.ceil,oj=ra.ReactCurrentDispatcher,pj=ra.ReactCurrentOwner,X=0,U=null,Y=null,W=0,qj=0,rj=Bf(0),V=0,sj=null,tj=0,Dg=0,Hi=0,uj=0,vj=null,jj=0,Ji=Infinity;function wj(){Ji=O()+500}var Z=null,Qi=!1,Ri=null,Ti=null,xj=!1,yj=null,zj=90,Aj=[],Bj=[],Cj=null,Dj=0,Ej=null,Fj=-1,Gj=0,Hj=0,Ij=null,Jj=!1;function Hg(){return 0!==(X&48)?O():-1!==Fj?Fj:Fj=O()}
+function Ig(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===eg()?1:2;0===Gj&&(Gj=tj);if(0!==kg.transition){0!==Hj&&(Hj=null!==vj?vj.pendingLanes:0);a=Gj;var b=4186112&~Hj;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=eg();0!==(X&4)&&98===a?a=Xc(12,Gj):(a=Sc(a),a=Xc(a,Gj));return a}
+function Jg(a,b,c){if(50<Dj)throw Dj=0,Ej=null,Error(y(185));a=Kj(a,b);if(null===a)return null;$c(a,b,c);a===U&&(Hi|=b,4===V&&Ii(a,W));var d=eg();1===b?0!==(X&8)&&0===(X&48)?Lj(a):(Mj(a,c),0===X&&(wj(),ig())):(0===(X&4)||98!==d&&99!==d||(null===Cj?Cj=new Set([a]):Cj.add(a)),Mj(a,c));vj=a}function Kj(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}
+function Mj(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Vc(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;Rc(k);var n=F;f[h]=10<=n?l+250:6<=n?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Uc(a,a===U?W:0);b=F;if(0===d)null!==c&&(c!==Zf&&Pf(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==Zf&&Pf(c)}15===b?(c=Lj.bind(null,a),null===ag?(ag=[c],bg=Of(Uf,jg)):ag.push(c),
+c=Zf):14===b?c=hg(99,Lj.bind(null,a)):(c=Tc(b),c=hg(c,Nj.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}
+function Nj(a){Fj=-1;Hj=Gj=0;if(0!==(X&48))throw Error(y(327));var b=a.callbackNode;if(Oj()&&a.callbackNode!==b)return null;var c=Uc(a,a===U?W:0);if(0===c)return null;var d=c;var e=X;X|=16;var f=Pj();if(U!==a||W!==d)wj(),Qj(a,d);do try{Rj();break}catch(h){Sj(a,h)}while(1);qg();oj.current=f;X=e;null!==Y?d=0:(U=null,W=0,d=V);if(0!==(tj&Hi))Qj(a,0);else if(0!==d){2===d&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),c=Wc(a),0!==c&&(d=Tj(a,c)));if(1===d)throw b=sj,Qj(a,0),Ii(a,c),Mj(a,O()),b;a.finishedWork=
+a.current.alternate;a.finishedLanes=c;switch(d){case 0:case 1:throw Error(y(345));case 2:Uj(a);break;case 3:Ii(a,c);if((c&62914560)===c&&(d=jj+500-O(),10<d)){if(0!==Uc(a,0))break;e=a.suspendedLanes;if((e&c)!==c){Hg();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=of(Uj.bind(null,a),d);break}Uj(a);break;case 4:Ii(a,c);if((c&4186112)===c)break;d=a.eventTimes;for(e=-1;0<c;){var g=31-Vc(c);f=1<<g;g=d[g];g>e&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>
+c?4320:1960*nj(c/1960))-c;if(10<c){a.timeoutHandle=of(Uj.bind(null,a),c);break}Uj(a);break;case 5:Uj(a);break;default:throw Error(y(329));}}Mj(a,O());return a.callbackNode===b?Nj.bind(null,a):null}function Ii(a,b){b&=~uj;b&=~Hi;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Vc(b),d=1<<c;a[c]=-1;b&=~d}}
+function Lj(a){if(0!==(X&48))throw Error(y(327));Oj();if(a===U&&0!==(a.expiredLanes&W)){var b=W;var c=Tj(a,b);0!==(tj&Hi)&&(b=Uc(a,b),c=Tj(a,b))}else b=Uc(a,0),c=Tj(a,b);0!==a.tag&&2===c&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),b=Wc(a),0!==b&&(c=Tj(a,b)));if(1===c)throw c=sj,Qj(a,0),Ii(a,b),Mj(a,O()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;Uj(a);Mj(a,O());return null}
+function Vj(){if(null!==Cj){var a=Cj;Cj=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;Mj(a,O())})}ig()}function Wj(a,b){var c=X;X|=1;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function Xj(a,b){var c=X;X&=-2;X|=8;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function ni(a,b){I(rj,qj);qj|=b;tj|=b}function Ki(){qj=rj.current;H(rj)}
+function Qj(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,pf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Gf();break;case 3:fh();H(N);H(M);uh();break;case 5:hh(d);break;case 4:fh();break;case 13:H(P);break;case 19:H(P);break;case 10:rg(d);break;case 23:case 24:Ki()}c=c.return}U=a;Y=Tg(a.current,null);W=qj=tj=b;V=0;sj=null;uj=Hi=Dg=0}
+function Sj(a,b){do{var c=Y;try{qg();vh.current=Gh;if(yh){for(var d=R.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}yh=!1}xh=0;T=S=R=null;zh=!1;pj.current=null;if(null===c||null===c.return){V=1;sj=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=W;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k;if(0===(h.mode&2)){var n=h.alternate;n?(h.updateQueue=n.updateQueue,h.memoizedState=n.memoizedState,h.lanes=n.lanes):
+(h.updateQueue=null,h.memoizedState=null)}var A=0!==(P.current&1),p=g;do{var C;if(C=13===p.tag){var x=p.memoizedState;if(null!==x)C=null!==x.dehydrated?!0:!1;else{var w=p.memoizedProps;C=void 0===w.fallback?!1:!0!==w.unstable_avoidThisFallback?!0:A?!1:!0}}if(C){var z=p.updateQueue;if(null===z){var u=new Set;u.add(l);p.updateQueue=u}else z.add(l);if(0===(p.mode&2)){p.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var t=zg(-1,1);t.tag=2;Ag(h,t)}h.lanes|=1;break a}k=
+void 0;h=b;var q=f.pingCache;null===q?(q=f.pingCache=new Oi,k=new Set,q.set(l,k)):(k=q.get(l),void 0===k&&(k=new Set,q.set(l,k)));if(!k.has(h)){k.add(h);var v=Yj.bind(null,f,l,h);l.then(v,v)}p.flags|=4096;p.lanes=b;break a}p=p.return}while(null!==p);k=Error((Ra(h.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==V&&(V=2);k=Mi(k,h);p=
+g;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&("function"===typeof K.getDerivedStateFromError||null!==Q&&"function"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}
+function Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}
+function Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==
+a.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=Li(b);if(null!==c){c.flags&=2047;Y=c;return}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===V&&(V=5)}function Uj(a){var b=eg();gg(99,dk.bind(null,a,b));return null}
+function dk(a,b){do Oj();while(null!==yj);if(0!==(X&48))throw Error(y(327));var c=a.finishedWork;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(y(177));a.callbackNode=null;var d=c.lanes|c.childLanes,e=d,f=a.pendingLanes&~e;a.pendingLanes=e;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=e;a.mutableReadLanes&=e;a.entangledLanes&=e;e=a.entanglements;for(var g=a.eventTimes,h=a.expirationTimes;0<f;){var k=31-Vc(f),l=1<<k;e[k]=0;g[k]=-1;h[k]=-1;f&=~l}null!==
+Cj&&0===(d&24)&&Cj.has(a)&&Cj.delete(a);a===U&&(Y=U=null,W=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,d=c.firstEffect):d=c:d=c.firstEffect;if(null!==d){e=X;X|=32;pj.current=null;kf=fd;g=Ne();if(Oe(g)){if("selectionStart"in g)h={start:g.selectionStart,end:g.selectionEnd};else a:if(h=(h=g.ownerDocument)&&h.defaultView||window,(l=h.getSelection&&h.getSelection())&&0!==l.rangeCount){h=l.anchorNode;f=l.anchorOffset;k=l.focusNode;l=l.focusOffset;try{h.nodeType,k.nodeType}catch(va){h=null;
+break a}var n=0,A=-1,p=-1,C=0,x=0,w=g,z=null;b:for(;;){for(var u;;){w!==h||0!==f&&3!==w.nodeType||(A=n+f);w!==k||0!==l&&3!==w.nodeType||(p=n+l);3===w.nodeType&&(n+=w.nodeValue.length);if(null===(u=w.firstChild))break;z=w;w=u}for(;;){if(w===g)break b;z===h&&++C===f&&(A=n);z===k&&++x===l&&(p=n);if(null!==(u=w.nextSibling))break;w=z;z=w.parentNode}w=u}h=-1===A||-1===p?null:{start:A,end:p}}else h=null;h=h||{start:0,end:0}}else h=null;lf={focusedElem:g,selectionRange:h};fd=!1;Ij=null;Jj=!1;Z=d;do try{ek()}catch(va){if(null===
+Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Ij=null;Z=d;do try{for(g=a;null!==Z;){var t=Z.flags;t&16&&pb(Z.stateNode,"");if(t&128){var q=Z.alternate;if(null!==q){var v=q.ref;null!==v&&("function"===typeof v?v(null):v.current=null)}}switch(t&1038){case 2:fj(Z);Z.flags&=-3;break;case 6:fj(Z);Z.flags&=-3;ij(Z.alternate,Z);break;case 1024:Z.flags&=-1025;break;case 1028:Z.flags&=-1025;ij(Z.alternate,Z);break;case 4:ij(Z.alternate,Z);break;case 8:h=Z;cj(g,h);var J=h.alternate;dj(h);null!==
+J&&dj(J)}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);v=lf;q=Ne();t=v.focusedElem;g=v.selectionRange;if(q!==t&&t&&t.ownerDocument&&Me(t.ownerDocument.documentElement,t)){null!==g&&Oe(t)&&(q=g.start,v=g.end,void 0===v&&(v=q),"selectionStart"in t?(t.selectionStart=q,t.selectionEnd=Math.min(v,t.value.length)):(v=(q=t.ownerDocument||document)&&q.defaultView||window,v.getSelection&&(v=v.getSelection(),h=t.textContent.length,J=Math.min(g.start,h),g=void 0===
+g.end?J:Math.min(g.end,h),!v.extend&&J>g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});"function"===typeof t.focus&&t.focus();for(t=
+0;t<q.length;t++)v=q[t],v.element.scrollLeft=v.left,v.element.scrollTop=v.top}fd=!!kf;lf=kf=null;a.current=c;Z=d;do try{for(t=a;null!==Z;){var K=Z.flags;K&36&&Yi(t,Z.alternate,Z);if(K&128){q=void 0;var Q=Z.ref;if(null!==Q){var L=Z.stateNode;switch(Z.tag){case 5:q=L;break;default:q=L}"function"===typeof Q?Q(q):Q.current=q}}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Z=null;$f();X=e}else a.current=c;if(xj)xj=!1,yj=a,zj=b;else for(Z=d;null!==Z;)b=
+Z.nextEffect,Z.nextEffect=null,Z.flags&8&&(K=Z,K.sibling=null,K.stateNode=null),Z=b;d=a.pendingLanes;0===d&&(Ti=null);1===d?a===Ej?Dj++:(Dj=0,Ej=a):Dj=0;c=c.stateNode;if(Mf&&"function"===typeof Mf.onCommitFiberRoot)try{Mf.onCommitFiberRoot(Lf,c,void 0,64===(c.current.flags&64))}catch(va){}Mj(a,O());if(Qi)throw Qi=!1,a=Ri,Ri=null,a;if(0!==(X&8))return null;ig();return null}
+function ek(){for(;null!==Z;){var a=Z.alternate;Jj||null===Ij||(0!==(Z.flags&8)?dc(Z,Ij)&&(Jj=!0):13===Z.tag&&mj(a,Z)&&dc(Z,Ij)&&(Jj=!0));var b=Z.flags;0!==(b&256)&&Xi(a,Z);0===(b&512)||xj||(xj=!0,hg(97,function(){Oj();return null}));Z=Z.nextEffect}}function Oj(){if(90!==zj){var a=97<zj?97:zj;zj=90;return gg(a,fk)}return!1}function $i(a,b){Aj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}function Zi(a,b){Bj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}
+function fk(){if(null===yj)return!1;var a=yj;yj=null;if(0!==(X&48))throw Error(y(331));var b=X;X|=32;var c=Bj;Bj=[];for(var d=0;d<c.length;d+=2){var e=c[d],f=c[d+1],g=e.destroy;e.destroy=void 0;if("function"===typeof g)try{g()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}c=Aj;Aj=[];for(d=0;d<c.length;d+=2){e=c[d];f=c[d+1];try{var h=e.create;e.destroy=h()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}for(h=a.current.firstEffect;null!==h;)a=h.nextEffect,h.nextEffect=null,h.flags&8&&(h.sibling=
+null,h.stateNode=null),h=a;X=b;ig();return!0}function gk(a,b,c){b=Mi(c,b);b=Pi(a,b,1);Ag(a,b);b=Hg();a=Kj(a,1);null!==a&&($c(a,1,b),Mj(a,b))}
+function Wi(a,b){if(3===a.tag)gk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){gk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d))){a=Mi(b,a);var e=Si(c,a,1);Ag(c,e);e=Hg();c=Kj(c,1);if(null!==c)$c(c,1,e),Mj(c,e);else if("function"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}
+function Yj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Hg();a.pingedLanes|=a.suspendedLanes&c;U===a&&(W&c)===c&&(4===V||3===V&&(W&62914560)===W&&500>O()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;
+ck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==
+b?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if("object"===
+typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);
+a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));
+d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],th.push(f);c=Zg(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else fi(a,b,d,c),sh();b=b.child}return b;case 5:return gh(b),null===a&&
+ph(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,nf(d,e)?g=null:null!==f&&nf(d,f)&&(b.flags|=16),oi(a,b),fi(a,b,g,c),b.child;case 6:return null===a&&ph(b),null;case 13:return ti(a,b,c);case 4:return eh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Yg(b,null,d,c):fi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),gi(a,b,d,e,c);case 7:return fi(a,b,b.pendingProps,c),b.child;case 8:return fi(a,b,b.pendingProps.children,
+c),b.child;case 12:return fi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(mg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=He(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!N.current){b=hi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=
+k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=zg(-1,c&-c),l.tag=2,Ag(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);sg(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}fi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,tg(b,c),e=vg(e,
+f.unstable_observedBits),d=d(e),b.flags|=1,fi(a,b,d,c),b.child;case 14:return e=b.type,f=lg(e,b.pendingProps),f=lg(e.type,f),ii(a,b,e,f,d,c);case 15:return ki(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),b.tag=1,Ff(d)?(a=!0,Jf(b)):a=!1,tg(b,c),Mg(b,d,e),Og(b,d,e,c),qi(null,b,d,!0,a,c);case 19:return Ai(a,b,c);case 23:return mi(a,b,c);case 24:return mi(a,b,c)}throw Error(y(156,b.tag));
+};function ik(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null}function nh(a,b,c,d){return new ik(a,b,c,d)}function ji(a){a=a.prototype;return!(!a||!a.isReactComponent)}
+function hk(a){if("function"===typeof a)return ji(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Aa)return 11;if(a===Da)return 14}return 2}
+function Tg(a,b){var c=a.alternate;null===c?(c=nh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};
+c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}
+function Vg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)ji(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ua:return Xg(c.children,e,f,b);case Ha:g=8;e|=16;break;case wa:g=8;e|=1;break;case xa:return a=nh(12,c,b,e|8),a.elementType=xa,a.type=xa,a.lanes=f,a;case Ba:return a=nh(13,c,b,e),a.type=Ba,a.elementType=Ba,a.lanes=f,a;case Ca:return a=nh(19,c,b,e),a.elementType=Ca,a.lanes=f,a;case Ia:return vi(c,e,f,b);case Ja:return a=nh(24,c,b,e),a.elementType=Ja,a.lanes=f,a;default:if("object"===
+typeof a&&null!==a)switch(a.$$typeof){case ya:g=10;break a;case za:g=9;break a;case Aa:g=11;break a;case Da:g=14;break a;case Ea:g=16;d=null;break a;case Fa:g=22;break a}throw Error(y(130,null==a?a:typeof a,""));}b=nh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Xg(a,b,c,d){a=nh(7,a,d,b);a.lanes=c;return a}function vi(a,b,c,d){a=nh(23,a,d,b);a.elementType=Ia;a.lanes=c;return a}function Ug(a,b,c){a=nh(6,a,null,b);a.lanes=c;return a}
+function Wg(a,b,c){b=nh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
+function jk(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=Zc(0);this.expirationTimes=Zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Zc(0);this.mutableSourceEagerHydrationData=null}
+function kk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ta,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
+function lk(a,b,c,d){var e=b.current,f=Hg(),g=Ig(e);a:if(c){c=c._reactInternals;b:{if(Zb(c)!==c||1!==c.tag)throw Error(y(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(Ff(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(y(171));}if(1===c.tag){var k=c.type;if(Ff(k)){c=If(c,k,h);break a}}c=h}else c=Cf;null===b.context?b.context=c:b.pendingContext=c;b=zg(f,g);b.payload={element:a};d=void 0===d?null:d;null!==
+d&&(b.callback=d);Ag(e,b);Jg(e,g,f);return g}function mk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function nk(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function ok(a,b){nk(a,b);(a=a.alternate)&&nk(a,b)}function pk(){return null}
+function qk(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new jk(a,b,null!=c&&!0===c.hydrate);b=nh(3,null,null,2===b?7:1===b?3:0);c.current=b;b.stateNode=c;xg(b);a[ff]=c.current;cf(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}
+qk.prototype.render=function(a){lk(a,this._internalRoot,null,null)};qk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;lk(null,a,null,function(){b[ff]=null})};function rk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}
+function sk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new qk(a,0,b?{hydrate:!0}:void 0)}
+function tk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=mk(g);h.call(a)}}lk(b,g,a,e)}else{f=c._reactRootContainer=sk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=mk(g);k.call(a)}}Xj(function(){lk(b,g,a,e)})}return mk(g)}ec=function(a){if(13===a.tag){var b=Hg();Jg(a,4,b);ok(a,4)}};fc=function(a){if(13===a.tag){var b=Hg();Jg(a,67108864,b);ok(a,67108864)}};
+gc=function(a){if(13===a.tag){var b=Hg(),c=Ig(a);Jg(a,c,b);ok(a,c)}};hc=function(a,b){return b()};
+yb=function(a,b,c){switch(b){case "input":ab(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(y(90));Wa(d);ab(d,e)}}}break;case "textarea":ib(a,c);break;case "select":b=c.value,null!=b&&fb(a,!!c.multiple,b,!1)}};Gb=Wj;
+Hb=function(a,b,c,d,e){var f=X;X|=4;try{return gg(98,a.bind(null,b,c,d,e))}finally{X=f,0===X&&(wj(),ig())}};Ib=function(){0===(X&49)&&(Vj(),Oj())};Jb=function(a,b){var c=X;X|=2;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}};function uk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!rk(b))throw Error(y(200));return kk(a,b,null,c)}var vk={Events:[Cb,ue,Db,Eb,Fb,Oj,{current:!1}]},wk={findFiberByHostInstance:wc,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"};
+var xk={bundleType:wk.bundleType,version:wk.version,rendererPackageName:wk.rendererPackageName,rendererConfig:wk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ra.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=cc(a);return null===a?null:a.stateNode},findFiberByHostInstance:wk.findFiberByHostInstance||
+pk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var yk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yk.isDisabled&&yk.supportsFiber)try{Lf=yk.inject(xk),Mf=yk}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;exports.createPortal=uk;
+exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(y(188));throw Error(y(268,Object.keys(a)));}a=cc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a,b){var c=X;if(0!==(c&48))return a(b);X|=1;try{if(a)return gg(99,a.bind(null,b))}finally{X=c,ig()}};exports.hydrate=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!0,c)};
+exports.render=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!rk(a))throw Error(y(40));return a._reactRootContainer?(Xj(function(){tk(null,null,a,!1,function(){a._reactRootContainer=null;a[ff]=null})}),!0):!1};exports.unstable_batchedUpdates=Wj;exports.unstable_createPortal=function(a,b){return uk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
+exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!rk(c))throw Error(y(200));if(null==a||void 0===a._reactInternals)throw Error(y(38));return tk(a,b,c,!1,d)};exports.version="17.0.2";
diff --git a/node_modules/react-dom/cjs/react-dom.profiling.min.js b/node_modules/react-dom/cjs/react-dom.profiling.min.js
index a3ba16d..2c017a2 100644
--- a/node_modules/react-dom/cjs/react-dom.profiling.min.js
+++ b/node_modules/react-dom/cjs/react-dom.profiling.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom.profiling.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,294 +6,305 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-
/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
-'use strict';var aa=require("react"),n=require("object-assign"),r=require("scheduler"),t=require("scheduler/tracing");function u(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(u(227));
-function ba(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var ca=!1,da=null,ea=!1,fa=null,ha={onError:function(a){ca=!0;da=a}};function ia(a,b,c,d,e,f,g,h,k){ca=!1;da=null;ba.apply(ha,arguments)}function ja(a,b,c,d,e,f,g,h,k){ia.apply(this,arguments);if(ca){if(ca){var l=da;ca=!1;da=null}else throw Error(u(198));ea||(ea=!0,fa=l)}}var ka=null,la=null,ma=null;
-function na(a,b,c){var d=a.type||"unknown-event";a.currentTarget=ma(c);ja(d,b,void 0,a);a.currentTarget=null}var pa=null,qa={};
-function ra(){if(pa)for(var a in qa){var b=qa[a],c=pa.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!sa[c]){if(!b.extractEvents)throw Error(u(97,a));sa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(ta.hasOwnProperty(h))throw Error(u(99,h));ta[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ua(k[e],g,h);e=!0}else f.registrationName?(ua(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}
-function ua(a,b,c){if(va[a])throw Error(u(100,a));va[a]=b;wa[a]=b.eventTypes[c].dependencies}var sa=[],ta={},va={},wa={};function xa(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!qa.hasOwnProperty(c)||qa[c]!==d){if(qa[c])throw Error(u(102,c));qa[c]=d;b=!0}}b&&ra()}var ya=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),za=null,Aa=null,Ba=null;
-function Ca(a){if(a=la(a)){if("function"!==typeof za)throw Error(u(280));var b=a.stateNode;b&&(b=ka(b),za(a.stateNode,a.type,b))}}function Da(a){Aa?Ba?Ba.push(a):Ba=[a]:Aa=a}function Ea(){if(Aa){var a=Aa,b=Ba;Ba=Aa=null;Ca(a);if(b)for(a=0;a<b.length;a++)Ca(b[a])}}function Fa(a,b){return a(b)}function Ga(a,b,c,d,e){return a(b,c,d,e)}function Ha(){}var Ia=Fa,Ja=!1,Ka=!1;function La(){if(null!==Aa||null!==Ba)Ha(),Ea()}
-function Ma(a,b,c){if(Ka)return a(b,c);Ka=!0;try{return Ia(a,b,c)}finally{Ka=!1,La()}}var Na=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Oa=Object.prototype.hasOwnProperty,Pa={},Qa={};
-function Ra(a){if(Oa.call(Qa,a))return!0;if(Oa.call(Pa,a))return!1;if(Na.test(a))return Qa[a]=!0;Pa[a]=!0;return!1}function Sa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
-function Ta(a,b,c,d){if(null===b||"undefined"===typeof b||Sa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function C(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var D={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){D[a]=new C(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];D[b]=new C(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){D[a]=new C(a,2,!1,a.toLowerCase(),null,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){D[a]=new C(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){D[a]=new C(a,3,!1,a.toLowerCase(),null,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){D[a]=new C(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){D[a]=new C(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){D[a]=new C(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){D[a]=new C(a,5,!1,a.toLowerCase(),null,!1)});var Ua=/[\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()}
-"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Ua,
-Va);D[b]=new C(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ua,Va);D[b]=new C(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ua,Va);D[b]=new C(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){D[a]=new C(a,1,!1,a.toLowerCase(),null,!1)});
-D.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){D[a]=new C(a,1,!1,a.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty("ReactCurrentDispatcher")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty("ReactCurrentBatchConfig")||(Wa.ReactCurrentBatchConfig={suspense:null});
-function Xa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Ta(b,c,e,d)&&(c=null),d||null===e?Ra(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
-var Ya=/^(.*)[\\\/]/,E="function"===typeof Symbol&&Symbol.for,Za=E?Symbol.for("react.element"):60103,$a=E?Symbol.for("react.portal"):60106,ab=E?Symbol.for("react.fragment"):60107,bb=E?Symbol.for("react.strict_mode"):60108,cb=E?Symbol.for("react.profiler"):60114,db=E?Symbol.for("react.provider"):60109,eb=E?Symbol.for("react.context"):60110,fb=E?Symbol.for("react.concurrent_mode"):60111,gb=E?Symbol.for("react.forward_ref"):60112,hb=E?Symbol.for("react.suspense"):60113,ib=E?Symbol.for("react.suspense_list"):
-60120,jb=E?Symbol.for("react.memo"):60115,kb=E?Symbol.for("react.lazy"):60116,lb=E?Symbol.for("react.block"):60121,mb="function"===typeof Symbol&&Symbol.iterator;function nb(a){if(null===a||"object"!==typeof a)return null;a=mb&&a[mb]||a["@@iterator"];return"function"===typeof a?a:null}function ob(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}
-function pb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ab:return"Fragment";case $a:return"Portal";case cb:return"Profiler";case bb:return"StrictMode";case hb:return"Suspense";case ib:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case eb:return"Context.Consumer";case db:return"Context.Provider";case gb:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":
-"ForwardRef");case jb:return pb(a.type);case lb:return pb(a.render);case kb:if(a=1===a._status?a._result:null)return pb(a)}return null}function qb(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=a._debugSource,f=pb(a.type);c=null;d&&(c=pb(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(Ya,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}
-function rb(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function sb(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
-function tb(a){var b=sb(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
-null;delete a[b]}}}}function ub(a){a._valueTracker||(a._valueTracker=tb(a))}function vb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=sb(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function wb(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}
-function xb(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=rb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function yb(a,b){b=b.checked;null!=b&&Xa(a,"checked",b,!1)}
-function zb(a,b){yb(a,b);var c=rb(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Ab(a,b.type,c):b.hasOwnProperty("defaultValue")&&Ab(a,b.type,rb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
-function Db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
-function Ab(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Eb(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Fb(a,b){a=n({children:void 0},b);if(b=Eb(b.children))a.children=b;return a}
-function Gb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+rb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
-function Hb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(u(91));return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Ib(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(u(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:rb(c)}}
-function Jb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Kb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var Lb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
-function Mb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Mb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
-var Ob,Pb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Lb.svg||"innerHTML"in a)a.innerHTML=b;else{Ob=Ob||document.createElement("div");Ob.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Ob.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
-function Qb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Rb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Sb={animationend:Rb("Animation","AnimationEnd"),animationiteration:Rb("Animation","AnimationIteration"),animationstart:Rb("Animation","AnimationStart"),transitionend:Rb("Transition","TransitionEnd")},Tb={},Ub={};
-ya&&(Ub=document.createElement("div").style,"AnimationEvent"in window||(delete Sb.animationend.animation,delete Sb.animationiteration.animation,delete Sb.animationstart.animation),"TransitionEvent"in window||delete Sb.transitionend.transition);function Vb(a){if(Tb[a])return Tb[a];if(!Sb[a])return a;var b=Sb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Ub)return Tb[a]=b[c];return a}
-var Wb=Vb("animationend"),Xb=Vb("animationiteration"),Yb=Vb("animationstart"),Zb=Vb("transitionend"),$b="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ac=new ("function"===typeof WeakMap?WeakMap:Map);function bc(a){var b=ac.get(a);void 0===b&&(b=new Map,ac.set(a,b));return b}
-function cc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function dc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function ec(a){if(cc(a)!==a)throw Error(u(188));}
-function fc(a){var b=a.alternate;if(!b){b=cc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return ec(e),a;if(f===d)return ec(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
-c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function gc(a){a=fc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
-function hc(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function ic(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var jc=null;
-function kc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)na(a,b[d],c[d]);else b&&na(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function lc(a){null!==a&&(jc=hc(jc,a));a=jc;jc=null;if(a){ic(a,kc);if(jc)throw Error(u(95));if(ea)throw a=fa,ea=!1,fa=null,a;}}
-function mc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function nc(a){if(!ya)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}var oc=[];function pc(a){a.topLevelType=null;a.nativeEvent=null;a.targetInst=null;a.ancestors.length=0;10>oc.length&&oc.push(a)}
-function qc(a,b,c,d){if(oc.length){var e=oc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}
-function rc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=sc(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=mc(a.nativeEvent);d=a.topLevelType;var f=a.nativeEvent,g=a.eventSystemFlags;0===c&&(g|=64);for(var h=null,k=0;k<sa.length;k++){var l=sa[k];l&&(l=l.extractEvents(d,b,f,e,g))&&(h=
-hc(h,l))}lc(h)}}function tc(a,b,c){if(!c.has(a)){switch(a){case "scroll":uc(b,"scroll",!0);break;case "focus":case "blur":uc(b,"focus",!0);uc(b,"blur",!0);c.set("blur",null);c.set("focus",null);break;case "cancel":case "close":nc(a)&&uc(b,a,!0);break;case "invalid":case "submit":case "reset":break;default:-1===$b.indexOf(a)&&F(a,b)}c.set(a,null)}}
-var vc,wc,xc,yc=!1,zc=[],Ac=null,Bc=null,Cc=null,Dc=new Map,Ec=new Map,Fc=[],Gc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Hc="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");
-function Ic(a,b){var c=bc(b);Gc.forEach(function(a){tc(a,b,c)});Hc.forEach(function(a){tc(a,b,c)})}function Jc(a,b,c,d,e){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:e,container:d}}
-function Kc(a,b){switch(a){case "focus":case "blur":Ac=null;break;case "dragenter":case "dragleave":Bc=null;break;case "mouseover":case "mouseout":Cc=null;break;case "pointerover":case "pointerout":Dc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Ec.delete(b.pointerId)}}function Lc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=Jc(b,c,d,e,f),null!==b&&(b=Mc(b),null!==b&&wc(b)),a;a.eventSystemFlags|=d;return a}
-function Nc(a,b,c,d,e){switch(b){case "focus":return Ac=Lc(Ac,a,b,c,d,e),!0;case "dragenter":return Bc=Lc(Bc,a,b,c,d,e),!0;case "mouseover":return Cc=Lc(Cc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Dc.set(f,Lc(Dc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Ec.set(f,Lc(Ec.get(f)||null,a,b,c,d,e)),!0}return!1}
-function Oc(a){var b=sc(a.target);if(null!==b){var c=cc(b);if(null!==c)if(b=c.tag,13===b){if(b=dc(c),null!==b){a.blockedOn=b;r.unstable_runWithPriority(a.priority,function(){xc(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Pc(a){if(null!==a.blockedOn)return!1;var b=Qc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);if(null!==b){var c=Mc(b);null!==c&&wc(c);a.blockedOn=b;return!1}return!0}
-function Rc(a,b,c){Pc(a)&&c.delete(b)}function Sc(){for(yc=!1;0<zc.length;){var a=zc[0];if(null!==a.blockedOn){a=Mc(a.blockedOn);null!==a&&vc(a);break}var b=Qc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);null!==b?a.blockedOn=b:zc.shift()}null!==Ac&&Pc(Ac)&&(Ac=null);null!==Bc&&Pc(Bc)&&(Bc=null);null!==Cc&&Pc(Cc)&&(Cc=null);Dc.forEach(Rc);Ec.forEach(Rc)}function Tc(a,b){a.blockedOn===b&&(a.blockedOn=null,yc||(yc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Sc)))}
-function Uc(a){function b(b){return Tc(b,a)}if(0<zc.length){Tc(zc[0],a);for(var c=1;c<zc.length;c++){var d=zc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Ac&&Tc(Ac,a);null!==Bc&&Tc(Bc,a);null!==Cc&&Tc(Cc,a);Dc.forEach(b);Ec.forEach(b);for(c=0;c<Fc.length;c++)d=Fc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Fc.length&&(c=Fc[0],null===c.blockedOn);)Oc(c),null===c.blockedOn&&Fc.shift()}
-var Vc={},Wc=new Map,Xc=new Map,Yc=["abort","abort",Wb,"animationEnd",Xb,"animationIteration",Yb,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking",
-"seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Zb,"transitionEnd","waiting","waiting"];function Zc(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f="on"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+"Capture"},dependencies:[d],eventPriority:b};Xc.set(d,b);Wc.set(d,f);Vc[e]=f}}
-Zc("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);
-Zc("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Zc(Yc,2);for(var $c="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),ad=0;ad<$c.length;ad++)Xc.set($c[ad],0);
-var bd=r.unstable_UserBlockingPriority,cd=r.unstable_runWithPriority,dd=!0;function F(a,b){uc(b,a,!1)}function uc(a,b,c){var d=Xc.get(b);switch(void 0===d?2:d){case 0:d=ed.bind(null,b,1,a);break;case 1:d=fd.bind(null,b,1,a);break;default:d=gd.bind(null,b,1,a)}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1)}function ed(a,b,c,d){Ja||Ha();var e=gd,f=Ja;Ja=!0;try{Ga(e,a,b,c,d)}finally{(Ja=f)||La()}}function fd(a,b,c,d){cd(bd,gd.bind(null,a,b,c,d))}
-function gd(a,b,c,d){if(dd)if(0<zc.length&&-1<Gc.indexOf(a))a=Jc(null,a,b,c,d),zc.push(a);else{var e=Qc(a,b,c,d);if(null===e)Kc(a,d);else if(-1<Gc.indexOf(a))a=Jc(e,a,b,c,d),zc.push(a);else if(!Nc(e,a,b,c,d)){Kc(a,d);a=qc(a,d,null,b);try{Ma(rc,a)}finally{pc(a)}}}}
-function Qc(a,b,c,d){c=mc(d);c=sc(c);if(null!==c){var e=cc(c);if(null===e)c=null;else{var f=e.tag;if(13===f){c=dc(e);if(null!==c)return c;c=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null}else e!==c&&(c=null)}}a=qc(a,d,c,b);try{Ma(rc,a)}finally{pc(a)}return null}
-var hd={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
-floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},id=["Webkit","ms","Moz","O"];Object.keys(hd).forEach(function(a){id.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);hd[b]=hd[a]})});function jd(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||hd.hasOwnProperty(a)&&hd[a]?(""+b).trim():b+"px"}
-function kd(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=jd(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var ld=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
-function md(a,b){if(b){if(ld[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(u(137,a,""));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(u(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(u(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(u(62,""));}}
-function nd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var od=Lb.html;function pd(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=bc(a);b=wa[b];for(var d=0;d<b.length;d++)tc(b[d],a,c)}function qd(){}
-function rd(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function sd(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function td(a,b){var c=sd(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=sd(c)}}
-function ud(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?ud(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function vd(){for(var a=window,b=rd();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=rd(a.document)}return b}
-function wd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var xd="$",yd="/$",zd="$?",Ad="$!",Bd=null,Cd=null;function Dd(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
-function Ed(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Fd="function"===typeof setTimeout?setTimeout:void 0,Gd="function"===typeof clearTimeout?clearTimeout:void 0;function Hd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}
-function Id(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===xd||c===Ad||c===zd){if(0===b)return a;b--}else c===yd&&b++}a=a.previousSibling}return null}var Jd=Math.random().toString(36).slice(2),Kd="__reactInternalInstance$"+Jd,Ld="__reactEventHandlers$"+Jd,Md="__reactContainere$"+Jd;
-function sc(a){var b=a[Kd];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Md]||c[Kd]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Id(a);null!==a;){if(c=a[Kd])return c;a=Id(a)}return b}a=c;c=a.parentNode}return null}function Mc(a){a=a[Kd]||a[Md];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Nd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Od(a){return a[Ld]||null}
-function Pd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}
-function Qd(a,b){var c=a.stateNode;if(!c)return null;var d=ka(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(u(231,
-b,typeof c));return c}function Rd(a,b,c){if(b=Qd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=hc(c._dispatchListeners,b),c._dispatchInstances=hc(c._dispatchInstances,a)}function Sd(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Pd(b);for(b=c.length;0<b--;)Rd(c[b],"captured",a);for(b=0;b<c.length;b++)Rd(c[b],"bubbled",a)}}
-function Td(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Qd(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=hc(c._dispatchListeners,b),c._dispatchInstances=hc(c._dispatchInstances,a))}function Ud(a){a&&a.dispatchConfig.registrationName&&Td(a._targetInst,null,a)}function Vd(a){ic(a,Sd)}var Wd=null,Xd=null,Yd=null;
-function Zd(){if(Yd)return Yd;var a,b=Xd,c=b.length,d,e="value"in Wd?Wd.value:Wd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Yd=e.slice(a,1<d?1-d:void 0)}function $d(){return!0}function ae(){return!1}
-function G(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?$d:ae;this.isPropagationStopped=ae;return this}
-n(G.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=$d)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=$d)},persist:function(){this.isPersistent=$d},isPersistent:ae,destructor:function(){var a=this.constructor.Interface,
-b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=ae;this._dispatchInstances=this._dispatchListeners=null}});G.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
-G.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;be(c);return c};be(G);function ce(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
-function de(a){if(!(a instanceof this))throw Error(u(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function be(a){a.eventPool=[];a.getPooled=ce;a.release=de}var ee=G.extend({data:null}),fe=G.extend({data:null}),ge=[9,13,27,32],he=ya&&"CompositionEvent"in window,ie=null;ya&&"documentMode"in document&&(ie=document.documentMode);
-var je=ya&&"TextEvent"in window&&!ie,ke=ya&&(!he||ie&&8<ie&&11>=ie),le=String.fromCharCode(32),me={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
-captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},ne=!1;
-function oe(a,b){switch(a){case "keyup":return-1!==ge.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function pe(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var qe=!1;function re(a,b){switch(a){case "compositionend":return pe(b);case "keypress":if(32!==b.which)return null;ne=!0;return le;case "textInput":return a=b.data,a===le&&ne?null:a;default:return null}}
-function se(a,b){if(qe)return"compositionend"===a||!he&&oe(a,b)?(a=Zd(),Yd=Xd=Wd=null,qe=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return ke&&"ko"!==b.locale?null:b.data;default:return null}}
-var te={eventTypes:me,extractEvents:function(a,b,c,d){var e;if(he)b:{switch(a){case "compositionstart":var f=me.compositionStart;break b;case "compositionend":f=me.compositionEnd;break b;case "compositionupdate":f=me.compositionUpdate;break b}f=void 0}else qe?oe(a,c)&&(f=me.compositionEnd):"keydown"===a&&229===c.keyCode&&(f=me.compositionStart);f?(ke&&"ko"!==c.locale&&(qe||f!==me.compositionStart?f===me.compositionEnd&&qe&&(e=Zd()):(Wd=d,Xd="value"in Wd?Wd.value:Wd.textContent,qe=!0)),f=ee.getPooled(f,
-b,c,d),e?f.data=e:(e=pe(c),null!==e&&(f.data=e)),Vd(f),e=f):e=null;(a=je?re(a,c):se(a,c))?(b=fe.getPooled(me.beforeInput,b,c,d),b.data=a,Vd(b)):b=null;return null===e?b:null===b?e:[e,b]}},ue={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ve(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!ue[a.type]:"textarea"===b?!0:!1}
-var we={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function xe(a,b,c){a=G.getPooled(we.change,a,b,c);a.type="change";Da(c);Vd(a);return a}var ye=null,ze=null;function Ae(a){lc(a)}function Be(a){var b=Nd(a);if(vb(b))return a}function Ce(a,b){if("change"===a)return b}var De=!1;ya&&(De=nc("input")&&(!document.documentMode||9<document.documentMode));
-function Ee(){ye&&(ye.detachEvent("onpropertychange",Fe),ze=ye=null)}function Fe(a){if("value"===a.propertyName&&Be(ze))if(a=xe(ze,a,mc(a)),Ja)lc(a);else{Ja=!0;try{Fa(Ae,a)}finally{Ja=!1,La()}}}function Ge(a,b,c){"focus"===a?(Ee(),ye=b,ze=c,ye.attachEvent("onpropertychange",Fe)):"blur"===a&&Ee()}function He(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return Be(ze)}function Ie(a,b){if("click"===a)return Be(b)}function Je(a,b){if("input"===a||"change"===a)return Be(b)}
-var Ke={eventTypes:we,_isInputEventSupported:De,extractEvents:function(a,b,c,d){var e=b?Nd(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=Ce;else if(ve(e))if(De)g=Je;else{g=He;var h=Ge}else(f=e.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(g=Ie);if(g&&(g=g(a,b)))return xe(g,c,d);h&&h(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Ab(e,"number",e.value)}},Le=G.extend({view:null,detail:null}),
-Me={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ne(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Me[a])?!!b[a]:!1}function Oe(){return Ne}
-var Pe=0,Qe=0,Re=!1,Se=!1,Te=Le.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Oe,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=Pe;Pe=a.screenX;return Re?"mousemove"===a.type?a.screenX-b:0:(Re=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;
-var b=Qe;Qe=a.screenY;return Se?"mousemove"===a.type?a.screenY-b:0:(Se=!0,0)}}),Ue=Te.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Ve={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",
-dependencies:["pointerout","pointerover"]}},We={eventTypes:Ve,extractEvents:function(a,b,c,d,e){var f="mouseover"===a||"pointerover"===a,g="mouseout"===a||"pointerout"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?sc(b):null,null!==b){var h=cc(b);if(b!==h||5!==b.tag&&6!==b.tag)b=null}}else g=null;if(g===b)return null;if("mouseout"===a||"mouseover"===
-a){var k=Te;var l=Ve.mouseLeave;var m=Ve.mouseEnter;var q="mouse"}else if("pointerout"===a||"pointerover"===a)k=Ue,l=Ve.pointerLeave,m=Ve.pointerEnter,q="pointer";a=null==g?f:Nd(g);f=null==b?f:Nd(b);l=k.getPooled(l,g,c,d);l.type=q+"leave";l.target=a;l.relatedTarget=f;c=k.getPooled(m,b,c,d);c.type=q+"enter";c.target=f;c.relatedTarget=a;d=g;q=b;if(d&&q)a:{k=d;m=q;g=0;for(a=k;a;a=Pd(a))g++;a=0;for(b=m;b;b=Pd(b))a++;for(;0<g-a;)k=Pd(k),g--;for(;0<a-g;)m=Pd(m),a--;for(;g--;){if(k===m||k===m.alternate)break a;
-k=Pd(k);m=Pd(m)}k=null}else k=null;m=k;for(k=[];d&&d!==m;){g=d.alternate;if(null!==g&&g===m)break;k.push(d);d=Pd(d)}for(d=[];q&&q!==m;){g=q.alternate;if(null!==g&&g===m)break;d.push(q);q=Pd(q)}for(q=0;q<k.length;q++)Td(k[q],"bubbled",l);for(q=d.length;0<q--;)Td(d[q],"captured",c);return 0===(e&64)?[l]:[l,c]}};function Xe(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Ye="function"===typeof Object.is?Object.is:Xe,Ze=Object.prototype.hasOwnProperty;
-function $e(a,b){if(Ye(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Ze.call(b,c[d])||!Ye(a[c[d]],b[c[d]]))return!1;return!0}
-var af=ya&&"documentMode"in document&&11>=document.documentMode,bf={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},cf=null,df=null,ef=null,ff=!1;
-function gf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(ff||null==cf||cf!==rd(c))return null;c=cf;"selectionStart"in c&&wd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return ef&&$e(ef,c)?null:(ef=c,a=G.getPooled(bf.select,df,a,b),a.type="select",a.target=cf,Vd(a),a)}
-var hf={eventTypes:bf,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=bc(e);f=wa.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?Nd(b):window;switch(a){case "focus":if(ve(e)||"true"===e.contentEditable)cf=e,df=b,ef=null;break;case "blur":ef=df=cf=null;break;case "mousedown":ff=!0;break;case "contextmenu":case "mouseup":case "dragend":return ff=!1,gf(c,d);case "selectionchange":if(af)break;
-case "keydown":case "keyup":return gf(c,d)}return null}},jf=G.extend({animationName:null,elapsedTime:null,pseudoElement:null}),kf=G.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),lf=Le.extend({relatedTarget:null});function mf(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
-var nf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},of={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
-116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pf=Le.extend({key:function(a){if(a.key){var b=nf[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=mf(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?of[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Oe,charCode:function(a){return"keypress"===
-a.type?mf(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?mf(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),qf=Te.extend({dataTransfer:null}),rf=Le.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Oe}),sf=G.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),tf=Te.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in
-a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),uf={eventTypes:Vc,extractEvents:function(a,b,c,d){var e=Wc.get(a);if(!e)return null;switch(a){case "keypress":if(0===mf(c))return null;case "keydown":case "keyup":a=pf;break;case "blur":case "focus":a=lf;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=
-Te;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=qf;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=rf;break;case Wb:case Xb:case Yb:a=jf;break;case Zb:a=sf;break;case "scroll":a=Le;break;case "wheel":a=tf;break;case "copy":case "cut":case "paste":a=kf;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=
-Ue;break;default:a=G}b=a.getPooled(e,b,c,d);Vd(b);return b}};if(pa)throw Error(u(101));pa=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));ra();var vf=Mc;ka=Od;la=vf;ma=Nd;xa({SimpleEventPlugin:uf,EnterLeaveEventPlugin:We,ChangeEventPlugin:Ke,SelectEventPlugin:hf,BeforeInputEventPlugin:te});var wf=[],xf=-1;function H(a){0>xf||(a.current=wf[xf],wf[xf]=null,xf--)}
-function I(a,b){xf++;wf[xf]=a.current;a.current=b}var yf={},J={current:yf},K={current:!1},zf=yf;function Af(a,b){var c=a.type.contextTypes;if(!c)return yf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function M(a){a=a.childContextTypes;return null!==a&&void 0!==a}
-function Bf(){H(K);H(J)}function Cf(a,b,c){if(J.current!==yf)throw Error(u(168));I(J,b);I(K,c)}function Df(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||"Unknown",e));return n({},c,{},d)}function Ef(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||yf;zf=J.current;I(J,a);I(K,K.current);return!0}
-function Ff(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Df(a,b,zf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}var Gf=r.unstable_runWithPriority,Hf=r.unstable_scheduleCallback,If=r.unstable_cancelCallback,Jf=r.unstable_shouldYield,Kf=r.unstable_requestPaint,Lf=r.unstable_now,Mf=r.unstable_getCurrentPriorityLevel,Nf=r.unstable_ImmediatePriority,Of=r.unstable_UserBlockingPriority,Pf=r.unstable_NormalPriority,Qf=r.unstable_LowPriority,Rf=r.unstable_IdlePriority;
-if(null==t.__interactionsRef||null==t.__interactionsRef.current)throw Error(u(302));var Sf={},Tf=void 0!==Kf?Kf:function(){},Uf=null,Vf=null,Wf=!1,Xf=Lf(),N=1E4>Xf?Lf:function(){return Lf()-Xf};function Yf(){switch(Mf()){case Nf:return 99;case Of:return 98;case Pf:return 97;case Qf:return 96;case Rf:return 95;default:throw Error(u(332));}}function Zf(a){switch(a){case 99:return Nf;case 98:return Of;case 97:return Pf;case 96:return Qf;case 95:return Rf;default:throw Error(u(332));}}
-function $f(a,b){a=Zf(a);return Gf(a,b)}function ag(a,b,c){a=Zf(a);return Hf(a,b,c)}function bg(a){null===Uf?(Uf=[a],Vf=Hf(Nf,cg)):Uf.push(a);return Sf}function dg(){if(null!==Vf){var a=Vf;Vf=null;If(a)}cg()}function cg(){if(!Wf&&null!==Uf){Wf=!0;var a=0;try{var b=Uf;$f(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});Uf=null}catch(c){throw null!==Uf&&(Uf=Uf.slice(a+1)),Hf(Nf,dg),c;}finally{Wf=!1}}}
-function eg(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function fg(a,b){if(1073741823===b)return 99;if(1===b||2===b)return 95;a=10*(1073741821-b)-10*(1073741821-a);return 0>=a?99:250>=a?98:5250>=a?97:95}function gg(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}var hg={current:null},ig=null,jg=null,kg=null;function lg(){kg=jg=ig=null}function mg(a){var b=hg.current;H(hg);a.type._context._currentValue=b}
-function ng(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function og(a,b){ig=a;kg=jg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(pg=!0),a.firstContext=null)}
-function qg(a,b){if(kg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)kg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===jg){if(null===ig)throw Error(u(308));jg=b;ig.dependencies={expirationTime:0,firstContext:b,responders:null}}else jg=jg.next=b}return a._currentValue}var rg=!1;function sg(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}
-function tg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function ug(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function vg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}
-function wg(a,b){var c=a.alternate;null!==c&&tg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}
-function xg(a,b,c,d){var e=a.updateQueue;rg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,q=null,x=null;if(null!==h){var y=h;do{g=y.expirationTime;if(g<d){var S={expirationTime:y.expirationTime,suspenseConfig:y.suspenseConfig,tag:y.tag,payload:y.payload,callback:y.callback,next:null};null===x?(q=x=S,
-m=k):x=x.next=S;g>l&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:y.suspenseConfig,tag:y.tag,payload:y.payload,callback:y.callback,next:null});yg(g,y.suspenseConfig);a:{var L=a,A=y;g=b;S=c;switch(A.tag){case 1:L=A.payload;if("function"===typeof L){k=L.call(S,k,g);break a}k=L;break a;case 3:L.effectTag=L.effectTag&-4097|64;case 0:L=A.payload;g="function"===typeof L?L.call(S,k,g):L;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:rg=!0}}null!==y.callback&&(a.effectTag|=
-32,g=e.effects,null===g?e.effects=[y]:g.push(y))}y=y.next;if(null===y||y===h)if(g=e.shared.pending,null===g)break;else y=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=q;e.baseState=m;e.baseQueue=x;zg(l);a.expirationTime=l;a.memoizedState=k}}function Ag(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=e;e=c;if("function"!==typeof d)throw Error(u(191,d));d.call(e)}}}
-var Bg=Wa.ReactCurrentBatchConfig,Cg=(new aa.Component).refs;function Dg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;0===a.expirationTime&&(a.updateQueue.baseState=c)}
-var Hg={isMounted:function(a){return(a=a._reactInternalFiber)?cc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=Eg(),e=Bg.suspense;d=Fg(d,a,e);e=ug(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);vg(a,e);Gg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=Eg(),e=Bg.suspense;d=Fg(d,a,e);e=ug(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);vg(a,e);Gg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=Eg(),d=Bg.suspense;
-c=Fg(c,a,d);d=ug(c,d);d.tag=2;void 0!==b&&null!==b&&(d.callback=b);vg(a,d);Gg(a,c)}};function Ig(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!$e(c,d)||!$e(e,f):!0}
-function Jg(a,b,c){var d=!1,e=yf;var f=b.contextType;"object"===typeof f&&null!==f?f=qg(f):(e=M(b)?zf:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Af(a,e):yf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Hg;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
-function Kg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Hg.enqueueReplaceState(b,b.state,null)}
-function Lg(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Cg;sg(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=qg(f):(f=M(b)?zf:J.current,e.context=Af(a,f));xg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Dg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||
-(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Hg.enqueueReplaceState(e,e.state,null),xg(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.effectTag|=4)}var Mg=Array.isArray;
-function Ng(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(u(309));var d=c.stateNode}if(!d)throw Error(u(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Cg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(u(284));if(!c._owner)throw Error(u(290,a));}return a}
-function Og(a,b){if("textarea"!==a.type)throw Error(u(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,""));}
-function Pg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Qg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=
-2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Rg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Ng(a,b,c),d.return=a,d;d=Sg(c.type,c.key,c.props,null,a.mode,d);d.ref=Ng(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==
-c.implementation)return b=Tg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Ug(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function q(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Rg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Za:return c=Sg(b.type,b.key,b.props,null,a.mode,c),c.ref=Ng(a,null,b),c.return=a,c;case $a:return b=Tg(b,a.mode,c),b.return=a,b}if(Mg(b)||
-nb(b))return b=Ug(b,a.mode,c,null),b.return=a,b;Og(a,b)}return null}function x(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Za:return c.key===e?c.type===ab?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case $a:return c.key===e?l(a,b,c,d):null}if(Mg(c)||nb(c))return null!==e?null:m(a,b,c,d,null);Og(a,c)}return null}function y(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=
-a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Za:return a=a.get(null===d.key?c:d.key)||null,d.type===ab?m(b,a,d.props.children,e,d.key):k(b,a,d,e);case $a:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Mg(d)||nb(d))return a=a.get(c)||null,m(b,a,d,e,null);Og(b,d)}return null}function S(e,g,h,k){for(var l=null,m=null,p=g,v=g=0,A=null;null!==p&&v<h.length;v++){p.index>v?(A=p,p=null):A=p.sibling;var w=x(e,p,h[v],k);if(null===w){null===p&&(p=A);break}a&&
-p&&null===w.alternate&&b(e,p);g=f(w,g,v);null===m?l=w:m.sibling=w;m=w;p=A}if(v===h.length)return c(e,p),l;if(null===p){for(;v<h.length;v++)p=q(e,h[v],k),null!==p&&(g=f(p,g,v),null===m?l=p:m.sibling=p,m=p);return l}for(p=d(e,p);v<h.length;v++)A=y(p,e,v,h[v],k),null!==A&&(a&&null!==A.alternate&&p.delete(null===A.key?v:A.key),g=f(A,g,v),null===m?l=A:m.sibling=A,m=A);a&&p.forEach(function(a){return b(e,a)});return l}function L(e,g,h,k){var l=nb(h);if("function"!==typeof l)throw Error(u(150));h=l.call(h);
-if(null==h)throw Error(u(151));for(var m=l=null,p=g,v=g=0,A=null,w=h.next();null!==p&&!w.done;v++,w=h.next()){p.index>v?(A=p,p=null):A=p.sibling;var X=x(e,p,w.value,k);if(null===X){null===p&&(p=A);break}a&&p&&null===X.alternate&&b(e,p);g=f(X,g,v);null===m?l=X:m.sibling=X;m=X;p=A}if(w.done)return c(e,p),l;if(null===p){for(;!w.done;v++,w=h.next())w=q(e,w.value,k),null!==w&&(g=f(w,g,v),null===m?l=w:m.sibling=w,m=w);return l}for(p=d(e,p);!w.done;v++,w=h.next())w=y(p,e,v,w.value,k),null!==w&&(a&&null!==
-w.alternate&&p.delete(null===w.key?v:w.key),g=f(w,g,v),null===m?l=w:m.sibling=w,m=w);a&&p.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,
-k.sibling);d=e(k,f.props);d.ref=Ng(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ab?(d=Ug(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Sg(f.type,f.key,f.props,null,a.mode,h),h.ref=Ng(a,d,f),h.return=a,a=h)}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=
-d.sibling}d=Tg(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Rg(f,a.mode,h),d.return=a,a=d),g(a);if(Mg(f))return S(a,d,f,h);if(nb(f))return L(a,d,f,h);l&&Og(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||"Component"));}return c(a,d)}}var Vg=Pg(!0),Wg=Pg(!1),Xg={},Yg={current:Xg},Zg={current:Xg},$g={current:Xg};
-function ah(a){if(a===Xg)throw Error(u(174));return a}function bh(a,b){I($g,b);I(Zg,a);I(Yg,Xg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Nb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Nb(b,a)}H(Yg);I(Yg,b)}function ch(){H(Yg);H(Zg);H($g)}function dh(a){ah($g.current);var b=ah(Yg.current);var c=Nb(b,a.type);b!==c&&(I(Zg,a),I(Yg,c))}function eh(a){Zg.current===a&&(H(Yg),H(Zg))}var O={current:0};
-function fh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===zd||c.data===Ad))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function gh(a,b){return{responder:a,props:b}}
-var hh=Wa.ReactCurrentDispatcher,ih=Wa.ReactCurrentBatchConfig,jh=0,P=null,Q=null,R=null,kh=!1;function lh(){throw Error(u(321));}function mh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!Ye(a[c],b[c]))return!1;return!0}
-function nh(a,b,c,d,e,f){jh=f;P=b;b.memoizedState=null;b.updateQueue=null;b.expirationTime=0;hh.current=null===a||null===a.memoizedState?oh:ph;a=c(d,e);if(b.expirationTime===jh){f=0;do{b.expirationTime=0;if(!(25>f))throw Error(u(301));f+=1;R=Q=null;b.updateQueue=null;hh.current=qh;a=c(d,e)}while(b.expirationTime===jh)}hh.current=rh;b=null!==Q&&null!==Q.next;jh=0;R=Q=P=null;kh=!1;if(b)throw Error(u(300));return a}
-function sh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===R?P.memoizedState=R=a:R=R.next=a;return R}function th(){if(null===Q){var a=P.alternate;a=null!==a?a.memoizedState:null}else a=Q.next;var b=null===R?P.memoizedState:R.next;if(null!==b)R=b,Q=a;else{if(null===a)throw Error(u(310));Q=a;a={memoizedState:Q.memoizedState,baseState:Q.baseState,baseQueue:Q.baseQueue,queue:Q.queue,next:null};null===R?P.memoizedState=R=a:R=R.next=a}return R}
-function uh(a,b){return"function"===typeof b?b(a):b}
-function vh(a){var b=th(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=Q,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(l<jh){var m={expirationTime:k.expirationTime,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=m,f=d):h=h.next=m;l>P.expirationTime&&
-(P.expirationTime=l,zg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),yg(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;Ye(d,b.memoizedState)||(pg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}
-function wh(a){var b=th(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);Ye(f,b.memoizedState)||(pg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}
-function xh(a){var b=sh();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:uh,lastRenderedState:a};a=a.dispatch=yh.bind(null,P,a);return[b.memoizedState,a]}function zh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=P.updateQueue;null===b?(b={lastEffect:null},P.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}
-function Ah(){return th().memoizedState}function Bh(a,b,c,d){var e=sh();P.effectTag|=a;e.memoizedState=zh(1|b,c,void 0,void 0===d?null:d)}function Ch(a,b,c,d){var e=th();d=void 0===d?null:d;var f=void 0;if(null!==Q){var g=Q.memoizedState;f=g.destroy;if(null!==d&&mh(d,g.deps)){zh(b,c,f,d);return}}P.effectTag|=a;e.memoizedState=zh(1|b,c,f,d)}function Dh(a,b){return Bh(516,4,a,b)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Ch(4,2,a,b)}
-function Gh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Hh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ch(4,2,Gh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){sh().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=th();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&mh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}
-function Mh(a,b){var c=th();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&mh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=Yf();$f(98>d?98:d,function(){a(!0)});$f(97<d?97:d,function(){var d=ih.suspense;ih.suspense=void 0===b?null:b;try{a(!1),c()}finally{ih.suspense=d}})}
-function yh(a,b,c){var d=Eg(),e=Bg.suspense;d=Fg(d,a,e);e={expirationTime:d,suspenseConfig:e,action:c,eagerReducer:null,eagerState:null,next:null};var f=b.pending;null===f?e.next=e:(e.next=f.next,f.next=e);b.pending=e;f=a.alternate;if(a===P||null!==f&&f===P)kh=!0,e.expirationTime=jh,P.expirationTime=jh;else{if(0===a.expirationTime&&(null===f||0===f.expirationTime)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.eagerReducer=f;e.eagerState=h;if(Ye(h,g))return}catch(k){}finally{}Gg(a,
-d)}}
-var rh={readContext:qg,useCallback:lh,useContext:lh,useEffect:lh,useImperativeHandle:lh,useLayoutEffect:lh,useMemo:lh,useReducer:lh,useRef:lh,useState:lh,useDebugValue:lh,useResponder:lh,useDeferredValue:lh,useTransition:lh},oh={readContext:qg,useCallback:Kh,useContext:qg,useEffect:Dh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Bh(4,2,Gh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Bh(4,2,a,b)},useMemo:function(a,b){var c=sh();b=void 0===b?null:b;
-a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=sh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=yh.bind(null,P,a);return[d.memoizedState,a]},useRef:function(a){var b=sh();a={current:a};return b.memoizedState=a},useState:xh,useDebugValue:Jh,useResponder:gh,useDeferredValue:function(a,b){var c=xh(a),d=c[0],e=c[1];Dh(function(){var c=ih.suspense;ih.suspense=void 0===b?null:b;try{e(a)}finally{ih.suspense=
-c}},[a,b]);return d},useTransition:function(a){var b=xh(!1),c=b[0];b=b[1];return[Kh(Nh.bind(null,b,a),[b,a]),c]}},ph={readContext:qg,useCallback:Lh,useContext:qg,useEffect:Eh,useImperativeHandle:Hh,useLayoutEffect:Fh,useMemo:Mh,useReducer:vh,useRef:Ah,useState:function(){return vh(uh)},useDebugValue:Jh,useResponder:gh,useDeferredValue:function(a,b){var c=vh(uh),d=c[0],e=c[1];Eh(function(){var c=ih.suspense;ih.suspense=void 0===b?null:b;try{e(a)}finally{ih.suspense=c}},[a,b]);return d},useTransition:function(a){var b=
-vh(uh),c=b[0];b=b[1];return[Lh(Nh.bind(null,b,a),[b,a]),c]}},qh={readContext:qg,useCallback:Lh,useContext:qg,useEffect:Eh,useImperativeHandle:Hh,useLayoutEffect:Fh,useMemo:Mh,useReducer:wh,useRef:Ah,useState:function(){return wh(uh)},useDebugValue:Jh,useResponder:gh,useDeferredValue:function(a,b){var c=wh(uh),d=c[0],e=c[1];Eh(function(){var c=ih.suspense;ih.suspense=void 0===b?null:b;try{e(a)}finally{ih.suspense=c}},[a,b]);return d},useTransition:function(a){var b=wh(uh),c=b[0];b=b[1];return[Lh(Nh.bind(null,
-b,a),[b,a]),c]}},Oh=r.unstable_now,Ph=0,Qh=-1;function Rh(a,b){if(0<=Qh){var c=Oh()-Qh;a.actualDuration+=c;b&&(a.selfBaseDuration=c);Qh=-1}}var Sh=null,Th=null,Uh=!1;function Vh(a,b){var c=Wh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}
-function Xh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
-function Yh(a){if(Uh){var b=Th;if(b){var c=b;if(!Xh(a,b)){b=Hd(c.nextSibling);if(!b||!Xh(a,b)){a.effectTag=a.effectTag&-1025|2;Uh=!1;Sh=a;return}Vh(Sh,c)}Sh=a;Th=Hd(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,Uh=!1,Sh=a}}function Zh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;Sh=a}
-function $h(a){if(a!==Sh)return!1;if(!Uh)return Zh(a),Uh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Ed(b,a.memoizedProps))for(b=Th;b;)Vh(a,b),b=Hd(b.nextSibling);Zh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(u(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===yd){if(0===b){Th=Hd(a.nextSibling);break a}b--}else c!==xd&&c!==Ad&&c!==zd||b++}a=a.nextSibling}Th=null}}else Th=Sh?Hd(a.stateNode.nextSibling):null;return!0}
-function ai(){Th=Sh=null;Uh=!1}var bi=Wa.ReactCurrentOwner,pg=!1;function ci(a,b,c,d){b.child=null===a?Wg(b,null,c,d):Vg(b,a.child,c,d)}function di(a,b,c,d,e){c=c.render;var f=b.ref;og(b,e);d=nh(a,b,c,d,f,e);if(null!==a&&!pg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),ei(a,b,e);b.effectTag|=1;ci(a,b,d,e);return b.child}
-function fi(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!gi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,hi(a,b,g,d,e,f);a=Sg(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:$e,c(e,d)&&a.ref===b.ref))return ei(a,b,f);b.effectTag|=1;a=Qg(g,d);a.ref=b.ref;a.return=b;return b.child=a}
-function hi(a,b,c,d,e,f){return null!==a&&$e(a.memoizedProps,d)&&a.ref===b.ref&&(pg=!1,e<f)?(b.expirationTime=a.expirationTime,ei(a,b,f)):ii(a,b,c,d,f)}function ji(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function ii(a,b,c,d,e){var f=M(c)?zf:J.current;f=Af(b,f);og(b,e);c=nh(a,b,c,d,f,e);if(null!==a&&!pg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),ei(a,b,e);b.effectTag|=1;ci(a,b,c,e);return b.child}
-function ki(a,b,c,d,e){if(M(c)){var f=!0;Ef(b)}else f=!1;og(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Jg(b,c,d),Lg(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=qg(l):(l=M(c)?zf:J.current,l=Af(b,l));var m=c.getDerivedStateFromProps,q="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;q||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
-"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Kg(b,g,d,l);rg=!1;var x=b.memoizedState;g.state=x;xg(b,d,g,e);k=b.memoizedState;h!==d||x!==k||K.current||rg?("function"===typeof m&&(Dg(b,c,m,d),k=b.memoizedState),(h=rg||Ig(b,c,h,d,x,k,l))?(q||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===
-typeof g.componentDidMount&&(b.effectTag|=4)):("function"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,tg(a,b),h=b.memoizedProps,g.props=b.type===b.elementType?h:gg(b.type,h),k=g.context,l=c.contextType,"object"===typeof l&&null!==l?l=qg(l):(l=M(c)?zf:J.current,l=Af(b,l)),m=c.getDerivedStateFromProps,(q="function"===typeof m||"function"===
-typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Kg(b,g,d,l),rg=!1,k=b.memoizedState,g.state=k,xg(b,d,g,e),x=b.memoizedState,h!==d||k!==x||K.current||rg?("function"===typeof m&&(Dg(b,c,m,d),x=b.memoizedState),(m=rg||Ig(b,c,h,d,k,x,l))?(q||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,
-x,l),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,l)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=l,d=m):
-("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return li(a,b,c,d,f,e)}
-function li(a,b,c,d,e,f){ji(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Ff(b,c,!1),ei(a,b,f);d=b.stateNode;bi.current=b;if(g&&"function"!==typeof c.getDerivedStateFromError){var h=null;Qh=-1}else h=d.render();b.effectTag|=1;null!==a&&g?(g=h,b.child=Vg(b,a.child,null,f),b.child=Vg(b,null,g,f)):ci(a,b,h,f);b.memoizedState=d.state;e&&Ff(b,c,!0);return b.child}
-function mi(a){var b=a.stateNode;b.pendingContext?Cf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Cf(a,b.context,!1);bh(a,b.containerInfo)}var ni={dehydrated:null,retryTime:0};
-function oi(a,b,c){var d=b.mode,e=b.pendingProps,f=O.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);I(O,f&1);if(null===a){void 0!==e.fallback&&Yh(b);if(g){g=e.fallback;e=Ug(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Ug(g,d,c,null);c.return=
-b;e.sibling=c;b.memoizedState=ni;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Wg(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=Qg(a,a.pendingProps);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;if(b.mode&8){g=0;for(a=c.child;null!==a;)g+=a.treeBaseDuration,a=a.sibling;c.treeBaseDuration=g}d=Qg(d,e);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=
-ni;b.child=c;return d}c=Vg(b,a.child,e.children,c);b.memoizedState=null;return b.child=c}a=a.child;if(g){g=e.fallback;e=Ug(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;if(b.mode&8){a=0;for(f=e.child;null!==f;)a+=f.treeBaseDuration,f=f.sibling;e.treeBaseDuration=a}c=Ug(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=ni;b.child=e;return c}b.memoizedState=
-null;return b.child=Vg(b,a,e.children,c)}function pi(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);ng(a.return,b)}function qi(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailExpiration:0,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}
-function ri(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;ci(a,b,d.children,c);d=O.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&pi(a,c);else if(19===a.tag)pi(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(O,d);if(0===(b.mode&2))b.memoizedState=
-null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===fh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);qi(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===fh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}qi(b,!0,c,null,f,b.lastEffect);break;case "together":qi(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
-function ei(a,b,c){null!==a&&(b.dependencies=a.dependencies);Qh=-1;var d=b.expirationTime;0!==d&&zg(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(u(153));if(null!==b.child){a=b.child;c=Qg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Qg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}var si,ti,ui,vi;
-si=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};ti=function(){};
-ui=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;ah(Yg.current);a=null;switch(c){case "input":f=wb(g,f);d=wb(g,d);a=[];break;case "option":f=Fb(g,f);d=Fb(g,d);a=[];break;case "select":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case "textarea":f=Hb(g,f);d=Hb(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=qd)}md(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if("style"===
-h)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]="");else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(va.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if("style"===h)if(g){for(k in g)!g.hasOwnProperty(k)||l&&l.hasOwnProperty(k)||(c||(c={}),c[k]="");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),
-c[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else"dangerouslySetInnerHTML"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,l)):"children"===h?g===l||"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(h,""+l):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(va.hasOwnProperty(h)?(null!=l&&pd(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=a||[]).push("style",c);e=a;if(b.updateQueue=e)b.effectTag|=4}};
-vi=function(a,b,c,d){c!==d&&(b.effectTag|=4)};function wi(a,b){switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
-function xi(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return M(b.type)&&Bf(),null;case 3:return ch(),H(K),H(J),c=b.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==a&&null!==a.child||!$h(b)||(b.effectTag|=4),ti(b),null;case 5:eh(b);c=ah($g.current);var e=b.type;if(null!==a&&null!=b.stateNode)ui(a,b,e,d,c),a.ref!==b.ref&&(b.effectTag|=128);else{if(!d){if(null===b.stateNode)throw Error(u(166));
-return null}a=ah(Yg.current);if($h(b)){d=b.stateNode;e=b.type;var f=b.memoizedProps;d[Kd]=b;d[Ld]=f;switch(e){case "iframe":case "object":case "embed":F("load",d);break;case "video":case "audio":for(a=0;a<$b.length;a++)F($b[a],d);break;case "source":F("error",d);break;case "img":case "image":case "link":F("error",d);F("load",d);break;case "form":F("reset",d);F("submit",d);break;case "details":F("toggle",d);break;case "input":xb(d,f);F("invalid",d);pd(c,"onChange");break;case "select":d._wrapperState=
-{wasMultiple:!!f.multiple};F("invalid",d);pd(c,"onChange");break;case "textarea":Ib(d,f),F("invalid",d),pd(c,"onChange")}md(e,f);a=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(a=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(a=["children",""+h]):va.hasOwnProperty(g)&&null!=h&&pd(c,g)}switch(e){case "input":ub(d);Db(d,f,!0);break;case "textarea":ub(d);Kb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&
-(d.onclick=qd)}c=a;b.updateQueue=c;null!==c&&(b.effectTag|=4)}else{g=9===c.nodeType?c:c.ownerDocument;a===od&&(a=Mb(e));a===od?"script"===e?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),"select"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Kd]=b;a[Ld]=d;si(a,b,!1,!1);b.stateNode=a;g=nd(e,d);switch(e){case "iframe":case "object":case "embed":F("load",
-a);h=d;break;case "video":case "audio":for(h=0;h<$b.length;h++)F($b[h],a);h=d;break;case "source":F("error",a);h=d;break;case "img":case "image":case "link":F("error",a);F("load",a);h=d;break;case "form":F("reset",a);F("submit",a);h=d;break;case "details":F("toggle",a);h=d;break;case "input":xb(a,d);h=wb(a,d);F("invalid",a);pd(c,"onChange");break;case "option":h=Fb(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};h=n({},d,{value:void 0});F("invalid",a);pd(c,"onChange");break;case "textarea":Ib(a,
-d);h=Hb(a,d);F("invalid",a);pd(c,"onChange");break;default:h=d}md(e,h);var k=h;for(f in k)if(k.hasOwnProperty(f)){var l=k[f];"style"===f?kd(a,l):"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,null!=l&&Pb(a,l)):"children"===f?"string"===typeof l?("textarea"!==e||""!==l)&&Qb(a,l):"number"===typeof l&&Qb(a,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(va.hasOwnProperty(f)?null!=l&&pd(c,f):null!=l&&Xa(a,f,l,g))}switch(e){case "input":ub(a);Db(a,d,!1);
-break;case "textarea":ub(a);Kb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+rb(d.value));break;case "select":a.multiple=!!d.multiple;c=d.value;null!=c?Gb(a,!!d.multiple,c,!1):null!=d.defaultValue&&Gb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof h.onClick&&(a.onclick=qd)}Dd(e,d)&&(b.effectTag|=4)}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)vi(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(u(166));
-c=ah($g.current);ah(Yg.current);$h(b)?(c=b.stateNode,d=b.memoizedProps,c[Kd]=b,c.nodeValue!==d&&(b.effectTag|=4)):(c=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),c[Kd]=b,b.stateNode=c)}return null;case 13:H(O);d=b.memoizedState;if(0!==(b.effectTag&64))return b.expirationTime=c,b;c=null!==d;d=!1;null===a?void 0!==b.memoizedProps.fallback&&$h(b):(e=a.memoizedState,d=null!==e,c||null===e||(e=a.child.sibling,null!==e&&(f=b.firstEffect,null!==f?(b.firstEffect=e,e.nextEffect=f):(b.firstEffect=b.lastEffect=
-e,e.nextEffect=null),e.effectTag=8)));if(c&&!d&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(O.current&1))T===yi&&(T=zi);else{if(T===yi||T===zi)T=Ai;0!==Bi&&null!==Ci&&(Di(Ci,U),Ei(Ci,Bi))}if(c||d)b.effectTag|=4;return null;case 4:return ch(),ti(b),null;case 10:return mg(b),null;case 17:return M(b.type)&&Bf(),null;case 19:H(O);d=b.memoizedState;if(null===d)return null;e=0!==(b.effectTag&64);f=d.rendering;if(null===f)if(e)wi(d,!1);else{if(T!==yi||null!==a&&0!==
-(a.effectTag&64))for(f=b.child;null!==f;){a=fh(f);if(null!==a){b.effectTag|=64;wi(d,!1);e=a.updateQueue;null!==e&&(b.updateQueue=e,b.effectTag|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;for(d=b.child;null!==d;)e=d,a=c,e.effectTag&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null,f=e.alternate,null===f?(e.childExpirationTime=0,e.expirationTime=a,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.selfBaseDuration=0,e.treeBaseDuration=
-0):(e.childExpirationTime=f.childExpirationTime,e.expirationTime=f.expirationTime,e.child=f.child,e.memoizedProps=f.memoizedProps,e.memoizedState=f.memoizedState,e.updateQueue=f.updateQueue,a=f.dependencies,e.dependencies=null===a?null:{expirationTime:a.expirationTime,firstContext:a.firstContext,responders:a.responders},e.selfBaseDuration=f.selfBaseDuration,e.treeBaseDuration=f.treeBaseDuration),d=d.sibling;I(O,O.current&1|2);return b.child}f=f.sibling}}else{if(!e)if(a=fh(f),null!==a){if(b.effectTag|=
-64,e=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),wi(d,!0),null===d.tail&&"hidden"===d.tailMode&&!f.alternate)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*N()-d.renderingStartTime>d.tailExpiration&&1<c&&(b.effectTag|=64,e=!0,wi(d,!1),--c,b.expirationTime=b.childExpirationTime=c,Fi(c));d.isBackwards?(f.sibling=b.child,b.child=f):(c=d.last,null!==c?c.sibling=f:b.child=f,d.last=f)}return null!==d.tail?(0===d.tailExpiration&&(d.tailExpiration=N()+500),
-c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=N(),c.sibling=null,b=O.current,I(O,e?b&1|2:b&1),c):null}throw Error(u(156,b.tag));}
-function Gi(a){switch(a.tag){case 1:M(a.type)&&Bf();var b=a.effectTag;return b&4096?(a.effectTag=b&-4097|64,a):null;case 3:ch();H(K);H(J);b=a.effectTag;if(0!==(b&64))throw Error(u(285));a.effectTag=b&-4097|64;return a;case 5:return eh(a),null;case 13:return H(O),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return H(O),null;case 4:return ch(),null;case 10:return mg(a),null;default:return null}}function Hi(a,b){return{value:a,source:b,stack:qb(b)}}
-var Ii="function"===typeof WeakSet?WeakSet:Set;function Ji(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=qb(c));null!==c&&pb(c.type);b=b.value;null!==a&&1===a.tag&&pb(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Ki(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Li(a,c)}}function Mi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Li(a,c)}else b.current=null}
-function Ni(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:gg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(u(163));}
-function Oi(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.destroy;c.destroy=void 0;void 0!==d&&d()}c=c.next}while(c!==b)}}function Pi(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}
-function Qi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:Pi(3,c);return;case 1:a=c.stateNode;if(c.effectTag&4)if(null===b)a.componentDidMount();else{var d=c.elementType===c.type?b.memoizedProps:gg(c.type,b.memoizedProps);a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}b=c.updateQueue;null!==b&&Ag(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Ag(c,b,a)}return;
-case 5:a=c.stateNode;null===b&&c.effectTag&4&&Dd(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:d=c.memoizedProps.onRender;"function"===typeof d&&d(c.memoizedProps.id,null===b?"mount":"update",c.actualDuration,c.treeBaseDuration,c.actualStartTime,Ph,a.memoizedInteractions);return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Uc(c))));return;case 19:case 17:case 20:case 21:return}throw Error(u(163));}
-function Ri(a,b,c){"function"===typeof Si&&Si(b);switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;$f(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){Li(g,h)}}a=a.next}while(a!==d)})}break;case 1:Mi(b);c=b.stateNode;"function"===typeof c.componentWillUnmount&&Ki(b,c);break;case 5:Mi(b);break;case 4:Ti(a,b,c)}}
-function Ui(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;a.stateNode=null;null!==b&&Ui(b)}function Vi(a){return 5===a.tag||3===a.tag||4===a.tag}
-function Wi(a){a:{for(var b=a.return;null!==b;){if(Vi(b)){var c=b;break a}b=b.return}throw Error(u(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(u(161));}c.effectTag&16&&(Qb(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Vi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;
-if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}d?Xi(a,c,b):Yi(a,c,b)}
-function Xi(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=qd));else if(4!==d&&(a=a.child,null!==a))for(Xi(a,b,c),a=a.sibling;null!==a;)Xi(a,b,c),a=a.sibling}
-function Yi(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Yi(a,b,c),a=a.sibling;null!==a;)Yi(a,b,c),a=a.sibling}
-function Ti(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(u(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,l=c,m=k;;)if(Ri(h,m,l),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break a;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=m.return;m=m.sibling}g?(h=
-f,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Ri(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}
-function Zi(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:Oi(3,b);return;case 1:return;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Ld]=d;"input"===a&&"radio"===d.type&&null!=d.name&&yb(c,d);nd(a,e);b=nd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?kd(c,h):"dangerouslySetInnerHTML"===g?Pb(c,h):"children"===g?Qb(c,h):Xa(c,g,h,b)}switch(a){case "input":zb(c,d);break;
-case "textarea":Jb(c,d);break;case "select":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?Gb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?Gb(c,!!d.multiple,d.defaultValue,!0):Gb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(u(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,Uc(b.containerInfo));return;case 12:return;case 13:c=b;null===b.memoizedState?
-d=!1:(d=!0,c=b.child,$i=N());if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null,f.style.display=jd("display",e));else if(6===a.tag)a.stateNode.nodeValue=d?"":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=f;
-continue}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===c)break;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}aj(b);return;case 19:aj(b);return;case 17:return}throw Error(u(163));}
-function aj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ii);b.forEach(function(b){var d=bj.bind(null,a,b);c.has(b)||(!0!==b.__reactDoNotTraceInteractions&&(d=t.unstable_wrap(d)),c.add(b),b.then(d,d))})}}var cj="function"===typeof WeakMap?WeakMap:Map;function dj(a,b,c){c=ug(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){ej||(ej=!0,fj=d);Ji(a,b)};return c}
-function gj(a,b,c){c=ug(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ji(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===hj?hj=new Set([this]):hj.add(this),Ji(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}
-var ij=Math.ceil,jj=Wa.ReactCurrentDispatcher,kj=Wa.ReactCurrentOwner,V=0,lj=8,mj=16,nj=32,yi=0,oj=1,pj=2,zi=3,Ai=4,qj=5,W=V,Ci=null,Y=null,U=0,T=yi,rj=null,sj=1073741823,tj=1073741823,uj=null,Bi=0,vj=!1,$i=0,wj=500,Z=null,ej=!1,fj=null,hj=null,xj=!1,yj=null,zj=90,Aj=0,Bj=null,Cj=0,Dj=null,Ej=null,Fj=0;function Eg(){return(W&(mj|nj))!==V?1073741821-(N()/10|0):0!==Fj?Fj:Fj=1073741821-(N()/10|0)}
-function Fg(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=Yf();if(0===(b&4))return 99===d?1073741823:1073741822;if((W&mj)!==V)return U;if(null!==c)a=eg(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=eg(a,150,100);break;case 97:case 96:a=eg(a,5E3,250);break;case 95:a=2;break;default:throw Error(u(326));}null!==Ci&&a===U&&--a;return a}
-function Gg(a,b){if(50<Cj)throw Cj=0,Dj=null,Error(u(185));a=Gj(a,b);if(null!==a){var c=Yf();1073741823===b?(W&lj)!==V&&(W&(mj|nj))===V?(Hj(a,b),Ij(a)):(Jj(a),Hj(a,b),W===V&&dg()):(Jj(a),Hj(a,b));(W&4)===V||98!==c&&99!==c||(null===Bj?Bj=new Map([[a,b]]):(c=Bj.get(a),(void 0===c||c>b)&&Bj.set(a,b)))}}
-function Gj(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(Ci===e&&(zg(b),T===Ai&&Di(e,U)),Ei(e,b));return e}
-function Kj(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Lj(a,b))return b;var c=a.lastPingedTime;a=a.nextKnownPendingLevel;a=c>a?c:a;return 2>=a&&b!==a?0:a}
-function Jj(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=bg(Ij.bind(null,a));else{var b=Kj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Eg();d=fg(d,b);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Sf&&If(c)}a.callbackExpirationTime=b;a.callbackPriority=d;b=1073741823===b?bg(Ij.bind(null,a)):ag(d,Mj.bind(null,a),{timeout:10*(1073741821-
-b)-N()});a.callbackNode=b}}}
-function Mj(a,b){Fj=0;if(b)return b=Eg(),Nj(a,b),Jj(a),null;var c=Kj(a);if(0!==c){b=a.callbackNode;if((W&(mj|nj))!==V)throw Error(u(327));Oj();if(a!==Ci||c!==U)Pj(a,c),Qj(a,c);if(null!==Y){var d=W;W|=mj;var e=Rj(),f=Sj(a);do try{Tj();break}catch(h){Uj(a,h)}while(1);lg();W=d;jj.current=e;t.__interactionsRef.current=f;if(T===oj)throw b=rj,Pj(a,c),Di(a,c),Jj(a),b;if(null===Y)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=T,Ci=null,d){case yi:case oj:throw Error(u(345));case pj:Nj(a,
-2<c?2:c);break;case zi:Di(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Vj(e));if(1073741823===sj&&(e=$i+wj-N(),10<e)){if(vj&&(f=a.lastPingedTime,0===f||f>=c)){a.lastPingedTime=c;Pj(a,c);break}f=Kj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Fd(Wj.bind(null,a),e);break}Wj(a);break;case Ai:Di(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Vj(e));if(vj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Pj(a,c);break}e=Kj(a);if(0!==e&&
-e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}1073741823!==tj?d=10*(1073741821-tj)-N():1073741823===sj?d=0:(d=10*(1073741821-sj)-5E3,e=N(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*ij(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=Fd(Wj.bind(null,a),d);break}Wj(a);break;case qj:if(1073741823!==sj&&null!==uj){f=sj;var g=uj;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=N()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),
-d=f<=e?0:e+d-f);if(10<d){Di(a,c);a.timeoutHandle=Fd(Wj.bind(null,a),d);break}}Wj(a);break;default:throw Error(u(329));}Jj(a);if(a.callbackNode===b)return Mj.bind(null,a)}}return null}
-function Ij(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if((W&(mj|nj))!==V)throw Error(u(327));Oj();if(a!==Ci||b!==U)Pj(a,b),Qj(a,b);if(null!==Y){var c=W;W|=mj;var d=Rj(),e=Sj(a);do try{Xj();break}catch(f){Uj(a,f)}while(1);lg();W=c;jj.current=d;t.__interactionsRef.current=e;if(T===oj)throw c=rj,Pj(a,b),Di(a,b),Jj(a),c;if(null!==Y)throw Error(u(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;Ci=null;Wj(a);Jj(a)}return null}
-function Yj(){if(null!==Bj){var a=Bj;Bj=null;a.forEach(function(a,c){Nj(c,a);Jj(c)});dg()}}function Zj(a,b){var c=W;W|=1;try{return a(b)}finally{W=c,W===V&&dg()}}function ak(a,b){var c=W;W&=-2;W|=lj;try{return a(b)}finally{W=c,W===V&&dg()}}
-function Pj(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Gd(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Bf();break;case 3:ch();H(K);H(J);break;case 5:eh(d);break;case 4:ch();break;case 13:H(O);break;case 19:H(O);break;case 10:mg(d)}c=c.return}Ci=a;Y=Qg(a.current,null);U=b;T=yi;rj=null;tj=sj=1073741823;uj=null;Bi=0;vj=!1;Ej=null}
-function Uj(a,b){do{try{lg();hh.current=rh;if(kh)for(var c=P.memoizedState;null!==c;){var d=c.queue;null!==d&&(d.pending=null);c=c.next}jh=0;R=Q=P=null;kh=!1;if(null===Y||null===Y.return)return T=oj,rj=b,Y=null;Y.mode&8&&Rh(Y,!0);a:{var e=a,f=Y.return,g=Y,h=b;b=U;g.effectTag|=2048;g.firstEffect=g.lastEffect=null;if(null!==h&&"object"===typeof h&&"function"===typeof h.then){var k=h;if(0===(g.mode&2)){var l=g.alternate;l?(g.updateQueue=l.updateQueue,g.memoizedState=l.memoizedState,g.expirationTime=
-l.expirationTime):(g.updateQueue=null,g.memoizedState=null)}var m=0!==(O.current&1),q=f;do{var x;if(x=13===q.tag){var y=q.memoizedState;if(null!==y)x=null!==y.dehydrated?!0:!1;else{var S=q.memoizedProps;x=void 0===S.fallback?!1:!0!==S.unstable_avoidThisFallback?!0:m?!1:!0}}if(x){var L=q.updateQueue;if(null===L){var A=new Set;A.add(k);q.updateQueue=A}else L.add(k);if(0===(q.mode&2)){q.effectTag|=64;g.effectTag&=-2981;if(1===g.tag)if(null===g.alternate)g.tag=17;else{var v=ug(1073741823,null);v.tag=
-2;vg(g,v)}g.expirationTime=1073741823;break a}h=void 0;g=b;var w=e.pingCache;null===w?(w=e.pingCache=new cj,h=new Set,w.set(k,h)):(h=w.get(k),void 0===h&&(h=new Set,w.set(k,h)));if(!h.has(g)){h.add(g);var X=bk.bind(null,e,k,g);k.then(X,X)}q.effectTag|=4096;q.expirationTime=b;break a}q=q.return}while(null!==q);h=Error((pb(g.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+
-qb(g))}T!==qj&&(T=pj);h=Hi(h,g);q=f;do{switch(q.tag){case 3:k=h;q.effectTag|=4096;q.expirationTime=b;var z=dj(q,k,b);wg(q,z);break a;case 1:k=h;var B=q.type,p=q.stateNode;if(0===(q.effectTag&64)&&("function"===typeof B.getDerivedStateFromError||null!==p&&"function"===typeof p.componentDidCatch&&(null===hj||!hj.has(p)))){q.effectTag|=4096;q.expirationTime=b;var Bb=gj(q,k,b);wg(q,Bb);break a}}q=q.return}while(null!==q)}Y=ck(Y)}catch(oa){b=oa;continue}break}while(1)}
-function Rj(){var a=jj.current;jj.current=rh;return null===a?rh:a}function Sj(a){var b=t.__interactionsRef.current;t.__interactionsRef.current=a.memoizedInteractions;return b}function yg(a,b){a<sj&&2<a&&(sj=a);null!==b&&a<tj&&2<a&&(tj=a,uj=b)}function zg(a){a>Bi&&(Bi=a)}function Xj(){for(;null!==Y;)Y=dk(Y)}function Tj(){for(;null!==Y&&!Jf();)Y=dk(Y)}
-function dk(a){var b=a.alternate;0!==(a.mode&8)?(Qh=Oh(),0>a.actualStartTime&&(a.actualStartTime=Oh()),b=ek(b,a,U),Rh(a,!0)):b=ek(b,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=ck(a));kj.current=null;return b}
-function ck(a){Y=a;do{var b=Y.alternate;a=Y.return;if(0===(Y.effectTag&2048)){if(0===(Y.mode&8))b=xi(b,Y,U);else{var c=Y;Qh=Oh();0>c.actualStartTime&&(c.actualStartTime=Oh());b=xi(b,Y,U);Rh(Y,!1)}c=Y;if(1===U||1!==c.childExpirationTime){var d=0;if(0!==(c.mode&8)){for(var e=c.actualDuration,f=c.selfBaseDuration,g=null===c.alternate||c.child!==c.alternate.child,h=c.child;null!==h;){var k=h.expirationTime,l=h.childExpirationTime;k>d&&(d=k);l>d&&(d=l);g&&(e+=h.actualDuration);f+=h.treeBaseDuration;h=
-h.sibling}c.actualDuration=e;c.treeBaseDuration=f}else for(e=c.child;null!==e;)f=e.expirationTime,g=e.childExpirationTime,f>d&&(d=f),g>d&&(d=g),e=e.sibling;c.childExpirationTime=d}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=Y.firstEffect),null!==Y.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=Y.firstEffect),a.lastEffect=Y.lastEffect),1<Y.effectTag&&(null!==a.lastEffect?a.lastEffect.nextEffect=Y:a.firstEffect=Y,a.lastEffect=Y))}else{b=Gi(Y);
-if(0!==(Y.mode&8)){Rh(Y,!1);c=Y.actualDuration;for(d=Y.child;null!==d;)c+=d.actualDuration,d=d.sibling;Y.actualDuration=c}if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=Y.sibling;if(null!==b)return b;Y=a}while(null!==Y);T===yi&&(T=qj);return null}function Vj(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Wj(a){var b=Yf();$f(99,fk.bind(null,a,b));return null}
-function fk(a,b){do Oj();while(null!==yj);if((W&(mj|nj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Vj(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=
-d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===Ci&&(Y=Ci=null,U=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=W;W|=nj;var g=Sj(a);kj.current=null;Bd=dd;var h=vd();if(wd(h)){if("selectionStart"in h)var k={start:h.selectionStart,end:h.selectionEnd};else a:{k=(k=h.ownerDocument)&&k.defaultView||window;var l=k.getSelection&&k.getSelection();if(l&&0!==l.rangeCount){k=l.anchorNode;var m=
-l.anchorOffset,q=l.focusNode;l=l.focusOffset;try{k.nodeType,q.nodeType}catch(Cb){k=null;break a}var x=0,y=-1,S=-1,L=0,A=0,v=h,w=null;b:for(;;){for(var X;;){v!==k||0!==m&&3!==v.nodeType||(y=x+m);v!==q||0!==l&&3!==v.nodeType||(S=x+l);3===v.nodeType&&(x+=v.nodeValue.length);if(null===(X=v.firstChild))break;w=v;v=X}for(;;){if(v===h)break b;w===k&&++L===m&&(y=x);w===q&&++A===l&&(S=x);if(null!==(X=v.nextSibling))break;v=w;w=v.parentNode}v=X}k=-1===y||-1===S?null:{start:y,end:S}}else k=null}k=k||{start:0,
-end:0}}else k=null;Cd={activeElementDetached:null,focusedElem:h,selectionRange:k};dd=!1;Z=e;do try{gk()}catch(Cb){if(null===Z)throw Error(u(330));Li(Z,Cb);Z=Z.nextEffect}while(null!==Z);Ph=Oh();Z=e;do try{for(h=a,k=b;null!==Z;){var z=Z.effectTag;z&16&&Qb(Z.stateNode,"");if(z&128){var B=Z.alternate;if(null!==B){var p=B.ref;null!==p&&("function"===typeof p?p(null):p.current=null)}}switch(z&1038){case 2:Wi(Z);Z.effectTag&=-3;break;case 6:Wi(Z);Z.effectTag&=-3;Zi(Z.alternate,Z);break;case 1024:Z.effectTag&=
--1025;break;case 1028:Z.effectTag&=-1025;Zi(Z.alternate,Z);break;case 4:Zi(Z.alternate,Z);break;case 8:m=Z,Ti(h,m,k),Ui(m)}Z=Z.nextEffect}}catch(Cb){if(null===Z)throw Error(u(330));Li(Z,Cb);Z=Z.nextEffect}while(null!==Z);p=Cd;B=vd();z=p.focusedElem;k=p.selectionRange;if(B!==z&&z&&z.ownerDocument&&ud(z.ownerDocument.documentElement,z)){null!==k&&wd(z)&&(B=k.start,p=k.end,void 0===p&&(p=B),"selectionStart"in z?(z.selectionStart=B,z.selectionEnd=Math.min(p,z.value.length)):(p=(B=z.ownerDocument||document)&&
-B.defaultView||window,p.getSelection&&(p=p.getSelection(),m=z.textContent.length,h=Math.min(k.start,m),k=void 0===k.end?h:Math.min(k.end,m),!p.extend&&h>k&&(m=k,k=h,h=m),m=td(z,h),q=td(z,k),m&&q&&(1!==p.rangeCount||p.anchorNode!==m.node||p.anchorOffset!==m.offset||p.focusNode!==q.node||p.focusOffset!==q.offset)&&(B=B.createRange(),B.setStart(m.node,m.offset),p.removeAllRanges(),h>k?(p.addRange(B),p.extend(q.node,q.offset)):(B.setEnd(q.node,q.offset),p.addRange(B))))));B=[];for(p=z;p=p.parentNode;)1===
-p.nodeType&&B.push({element:p,left:p.scrollLeft,top:p.scrollTop});"function"===typeof z.focus&&z.focus();for(z=0;z<B.length;z++)p=B[z],p.element.scrollLeft=p.left,p.element.scrollTop=p.top}dd=!!Bd;Cd=Bd=null;a.current=c;Z=e;do try{for(z=a;null!==Z;){var Bb=Z.effectTag;Bb&36&&Qi(z,Z.alternate,Z);if(Bb&128){B=void 0;var oa=Z.ref;if(null!==oa){var Ih=Z.stateNode;switch(Z.tag){case 5:B=Ih;break;default:B=Ih}"function"===typeof oa?oa(B):oa.current=B}}Z=Z.nextEffect}}catch(Cb){if(null===Z)throw Error(u(330));
-Li(Z,Cb);Z=Z.nextEffect}while(null!==Z);Z=null;Tf();t.__interactionsRef.current=g;W=f}else a.current=c,Ph=Oh();if(Bb=xj)xj=!1,yj=a,Aj=d,zj=b;else for(Z=e;null!==Z;)b=Z.nextEffect,Z.nextEffect=null,Z=b;b=a.firstPendingTime;if(0!==b){if(null!==Ej)for(e=Ej,Ej=null,oa=0;oa<e.length;oa++)hk(a,e[oa],a.memoizedInteractions);Hj(a,b)}else hj=null;Bb||ik(a,d);1073741823===b?a===Dj?Cj++:(Cj=0,Dj=a):Cj=0;"function"===typeof jk&&jk(c.stateNode,d);Jj(a);if(ej)throw ej=!1,a=fj,fj=null,a;if((W&lj)!==V)return null;
-dg();return null}function gk(){for(;null!==Z;){var a=Z.effectTag;0!==(a&256)&&Ni(Z.alternate,Z);0===(a&512)||xj||(xj=!0,ag(97,function(){Oj();return null}));Z=Z.nextEffect}}function Oj(){if(90!==zj){var a=97<zj?97:zj;zj=90;return $f(a,kk)}}
-function kk(){if(null===yj)return!1;var a=yj,b=Aj;yj=null;Aj=0;if((W&(mj|nj))!==V)throw Error(u(331));var c=W;W|=nj;for(var d=Sj(a),e=a.current.firstEffect;null!==e;){try{var f=e;if(0!==(f.effectTag&512))switch(f.tag){case 0:case 11:case 15:case 22:Oi(5,f),Pi(5,f)}}catch(g){if(null===e)throw Error(u(330));Li(e,g)}f=e.nextEffect;e.nextEffect=null;e=f}t.__interactionsRef.current=d;ik(a,b);W=c;dg();return!0}
-function lk(a,b,c){b=Hi(c,b);b=dj(a,b,1073741823);vg(a,b);a=Gj(a,1073741823);null!==a&&(Jj(a),Hj(a,1073741823))}function Li(a,b){if(3===a.tag)lk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){lk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===hj||!hj.has(d))){a=Hi(b,a);a=gj(c,a,1073741823);vg(c,a);c=Gj(c,1073741823);null!==c&&(Jj(c),Hj(c,1073741823));break}}c=c.return}}
-function bk(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);Ci===a&&U===c?T===Ai||T===zi&&1073741823===sj&&N()-$i<wj?Pj(a,U):vj=!0:Lj(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,Jj(a),Hj(a,c)))}function bj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=Eg(),b=Fg(b,a,null));a=Gj(a,b);null!==a&&(Jj(a),Hj(a,b))}var ek;
-ek=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||K.current)pg=!0;else{if(d<c){pg=!1;switch(b.tag){case 3:mi(b);ai();break;case 5:dh(b);if(b.mode&4&&1!==c&&e.hidden)return Fi(1),b.expirationTime=b.childExpirationTime=1,null;break;case 1:M(b.type)&&Ef(b);break;case 4:bh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;e=b.type._context;I(hg,e._currentValue);e._currentValue=d;break;case 12:b.childExpirationTime>=c&&(b.effectTag|=4);
-break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;if(0!==d&&d>=c)return oi(a,b,c);I(O,O.current&1);b=ei(a,b,c);return null!==b?b.sibling:null}I(O,O.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return ri(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(O,O.current);if(!d)return null}return ei(a,b,c)}pg=!1}}else pg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,
-b.effectTag|=2);a=b.pendingProps;e=Af(b,J.current);og(b,c);e=nh(null,b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(M(d)){var f=!0;Ef(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;sg(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Dg(b,d,g,a);e.updater=Hg;b.stateNode=e;e._reactInternalFiber=b;Lg(b,d,a,c);b=li(null,b,d,!0,f,c)}else b.tag=0,ci(null,
-b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=mk(e);a=gg(e,a);switch(f){case 0:b=ii(null,b,e,a,c);break a;case 1:b=ki(null,b,e,a,c);break a;case 11:b=di(null,b,e,a,c);break a;case 14:b=fi(null,b,e,gg(e.type,a),d,c);break a}throw Error(u(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:gg(d,e),ii(a,b,d,e,c);case 1:return d=
-b.type,e=b.pendingProps,e=b.elementType===d?e:gg(d,e),ki(a,b,d,e,c);case 3:mi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;tg(a,b);xg(b,d,null,c);d=b.memoizedState.element;if(d===e)ai(),b=ei(a,b,c);else{if(e=b.stateNode.hydrate)Th=Hd(b.stateNode.containerInfo.firstChild),Sh=b,e=Uh=!0;if(e)for(c=Wg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else ci(a,b,d,c),ai();b=b.child}return b;case 5:return dh(b),
-null===a&&Yh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ed(d,e)?g=null:null!==f&&Ed(d,f)&&(b.effectTag|=16),ji(a,b),b.mode&4&&1!==c&&e.hidden?(Fi(1),b.expirationTime=b.childExpirationTime=1,b=null):(ci(a,b,g,c),b=b.child),b;case 6:return null===a&&Yh(b),null;case 13:return oi(a,b,c);case 4:return bh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Vg(b,null,d,c):ci(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:gg(d,e),
-di(a,b,d,e,c);case 7:return ci(a,b,b.pendingProps,c),b.child;case 8:return ci(a,b,b.pendingProps.children,c),b.child;case 12:return b.effectTag|=4,ci(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(hg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=Ye(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=ei(a,
-b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=ug(c,null),l.tag=2,vg(h,l));h.expirationTime<c&&(h.expirationTime=c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);ng(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==
-g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}ci(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,og(b,c),e=qg(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,ci(a,b,d,c),b.child;case 14:return e=b.type,f=gg(e,b.pendingProps),f=gg(e.type,f),fi(a,b,e,f,d,c);case 15:return hi(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:gg(d,e),null!==a&&(a.alternate=null,b.alternate=
-null,b.effectTag|=2),b.tag=1,M(d)?(a=!0,Ef(b)):a=!1,og(b,c),Jg(b,d,e),Lg(b,d,e,c),li(null,b,d,!0,a,c);case 19:return ri(a,b,c)}throw Error(u(156,b.tag));};function Fi(a){null===Ej?Ej=[a]:Ej.push(a)}function hk(a,b,c){if(0<c.size){var d=a.pendingInteractionMap,e=d.get(b);null!=e?c.forEach(function(a){e.has(a)||a.__count++;e.add(a)}):(d.set(b,new Set(c)),c.forEach(function(a){a.__count++}));d=t.__subscriberRef.current;if(null!==d)d.onWorkScheduled(c,1E3*b+a.interactionThreadID)}}
-function Hj(a,b){hk(a,b,t.__interactionsRef.current)}function Qj(a,b){var c=new Set;a.pendingInteractionMap.forEach(function(a,d){d>=b&&a.forEach(function(a){return c.add(a)})});a.memoizedInteractions=c;if(0<c.size){var d=t.__subscriberRef.current;if(null!==d){a=1E3*b+a.interactionThreadID;try{d.onWorkStarted(c,a)}catch(e){ag(99,function(){throw e;})}}}}
-function ik(a,b){var c=a.firstPendingTime;try{var d=t.__subscriberRef.current;if(null!==d&&0<a.memoizedInteractions.size)d.onWorkStopped(a.memoizedInteractions,1E3*b+a.interactionThreadID)}catch(f){ag(99,function(){throw f;})}finally{var e=a.pendingInteractionMap;e.forEach(function(a,b){b>c&&(e.delete(b),a.forEach(function(a){a.__count--;if(null!==d&&0===a.__count)try{d.onInteractionScheduledWorkCompleted(a)}catch(k){ag(99,function(){throw k;})}}))})}}var jk=null,Si=null,nk="undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
-function ok(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);jk=function(a,e){try{var d=64===(a.current.effectTag&64),g=1073741821-(N()/10|0),h=fg(g,e);b.onCommitFiberRoot(c,a,h,d)}catch(k){}};Si=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}
-function pk(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null;this.actualDuration=0;this.actualStartTime=-1;this.treeBaseDuration=this.selfBaseDuration=0}
-function Wh(a,b,c,d){return new pk(a,b,c,d)}function gi(a){a=a.prototype;return!(!a||!a.isReactComponent)}function mk(a){if("function"===typeof a)return gi(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===gb)return 11;if(a===jb)return 14}return 2}
-function Qg(a,b){var c=a.alternate;null===c?(c=Wh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null,c.actualDuration=0,c.actualStartTime=-1);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=
-null===b?null:{expirationTime:b.expirationTime,firstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;c.selfBaseDuration=a.selfBaseDuration;c.treeBaseDuration=a.treeBaseDuration;return c}
-function Sg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)gi(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ab:return Ug(c.children,e,f,b);case fb:g=8;e|=7;break;case bb:g=8;e|=1;break;case cb:return a=Wh(12,c,b,e|8),a.elementType=cb,a.type=cb,a.expirationTime=f,a;case hb:return a=Wh(13,c,b,e),a.type=hb,a.elementType=hb,a.expirationTime=f,a;case ib:return a=Wh(19,c,b,e),a.elementType=ib,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case db:g=
-10;break a;case eb:g=9;break a;case gb:g=11;break a;case jb:g=14;break a;case kb:g=16;d=null;break a;case lb:g=22;break a}throw Error(u(130,null==a?a:typeof a,""));}b=Wh(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Ug(a,b,c,d){a=Wh(7,a,d,b);a.expirationTime=c;return a}function Rg(a,b,c){a=Wh(6,a,null,b);a.expirationTime=c;return a}
-function Tg(a,b,c){b=Wh(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
-function qk(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0;this.interactionThreadID=t.unstable_getThreadID();this.memoizedInteractions=
-new Set;this.pendingInteractionMap=new Map}function Lj(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function Di(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}
-function Ei(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Nj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}
-function rk(a,b,c,d){var e=b.current,f=Eg(),g=Bg.suspense;f=Fg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(cc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(M(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(M(k)){c=Df(c,k,h);break a}}c=h}else c=yf;null===b.context?b.context=c:b.pendingContext=c;b=ug(f,g);b.payload={element:a};d=void 0===
-d?null:d;null!==d&&(b.callback=d);vg(e,b);Gg(e,f);return f}function sk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function tk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=b)}function uk(a,b){tk(a,b);(a=a.alternate)&&tk(a,b)}
-function vk(a,b,c){c=null!=c&&!0===c.hydrate;var d=new qk(a,b,c);var e=2===b?7:1===b?3:0;nk&&(e|=8);e=Wh(3,null,null,e);d.current=e;e.stateNode=d;sg(e);a[Md]=d.current;c&&0!==b&&Ic(a,9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}vk.prototype.render=function(a){rk(a,this._internalRoot,null,null)};vk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;rk(null,a,null,function(){b[Md]=null})};
-function wk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function xk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new vk(a,0,b?{hydrate:!0}:void 0)}
-function yk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=sk(g);h.call(a)}}rk(b,g,a,e)}else{f=c._reactRootContainer=xk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=sk(g);k.call(a)}}ak(function(){rk(b,g,a,e)})}return sk(g)}function zk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:$a,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
-vc=function(a){if(13===a.tag){var b=eg(Eg(),150,100);Gg(a,b);uk(a,b)}};wc=function(a){13===a.tag&&(Gg(a,3),uk(a,3))};xc=function(a){if(13===a.tag){var b=Eg();b=Fg(b,a,null);Gg(a,b);uk(a,b)}};
-za=function(a,b,c){switch(b){case "input":zb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Od(d);if(!e)throw Error(u(90));vb(d);zb(d,e)}}}break;case "textarea":Jb(a,c);break;case "select":b=c.value,null!=b&&Gb(a,!!c.multiple,b,!1)}};Fa=Zj;
-Ga=function(a,b,c,d,e){var f=W;W|=4;try{return $f(98,a.bind(null,b,c,d,e))}finally{W=f,W===V&&dg()}};Ha=function(){(W&(1|mj|nj))===V&&(Yj(),Oj())};Ia=function(a,b){var c=W;W|=2;try{return a(b)}finally{W=c,W===V&&dg()}};function Ak(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!wk(b))throw Error(u(200));return zk(a,b,null,c)}var Bk={Events:[Mc,Nd,Od,xa,ta,Vd,function(a){ic(a,Ud)},Da,Ea,gd,lc,Oj,{current:!1}]};
-(function(a){var b=a.findFiberByHostInstance;return ok(n({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=gc(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:sc,bundleType:0,version:"16.14.0",
-rendererPackageName:"react-dom"});exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Bk;exports.createPortal=Ak;exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if("function"===typeof a.render)throw Error(u(188));throw Error(u(268,Object.keys(a)));}a=gc(b);a=null===a?null:a.stateNode;return a};
-exports.flushSync=function(a,b){if((W&(mj|nj))!==V)throw Error(u(187));var c=W;W|=1;try{return $f(99,a.bind(null,b))}finally{W=c,dg()}};exports.hydrate=function(a,b,c){if(!wk(b))throw Error(u(200));return yk(null,a,b,!0,c)};exports.render=function(a,b,c){if(!wk(b))throw Error(u(200));return yk(null,a,b,!1,c)};
-exports.unmountComponentAtNode=function(a){if(!wk(a))throw Error(u(40));return a._reactRootContainer?(ak(function(){yk(null,null,a,!1,function(){a._reactRootContainer=null;a[Md]=null})}),!0):!1};exports.unstable_batchedUpdates=Zj;exports.unstable_createPortal=function(a,b){return Ak(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
-exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!wk(c))throw Error(u(200));if(null==a||void 0===a._reactInternalFiber)throw Error(u(38));return yk(a,b,c,!1,d)};exports.version="16.14.0";
+'use strict';var aa=require("react"),n=require("object-assign"),r=require("scheduler"),x=require("scheduler/tracing");function E(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(E(227));var ba=new Set,ca={};
+function da(a,b){ea(a,b);ea(a+"Capture",b)}function ea(a,b){ca[a]=b;for(a=0;a<b.length;a++)ba.add(b[a])}
+var fa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ha=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ia=Object.prototype.hasOwnProperty,
+ja={},ka={};function la(a){if(ia.call(ka,a))return!0;if(ia.call(ja,a))return!1;if(ha.test(a))return ka[a]=!0;ja[a]=!0;return!1}function ma(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
+function na(a,b,c,d){if(null===b||"undefined"===typeof b||ma(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function F(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var G={};
+"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){G[a]=new F(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];G[b]=new F(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){G[a]=new F(a,2,!1,a.toLowerCase(),null,!1,!1)});
+["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){G[a]=new F(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){G[a]=new F(a,3,!1,a.toLowerCase(),null,!1,!1)});
+["checked","multiple","muted","selected"].forEach(function(a){G[a]=new F(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){G[a]=new F(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){G[a]=new F(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){G[a]=new F(a,5,!1,a.toLowerCase(),null,!1,!1)});var pa=/[\-:]([a-z])/g;function qa(a){return a[1].toUpperCase()}
+"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(pa,
+qa);G[b]=new F(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(pa,qa);G[b]=new F(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(pa,qa);G[b]=new F(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){G[a]=new F(a,1,!1,a.toLowerCase(),null,!1,!1)});
+G.xlinkHref=new F("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){G[a]=new F(a,1,!1,a.toLowerCase(),null,!0,!0)});
+function ra(a,b,c,d){var e=G.hasOwnProperty(b)?G[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(na(b,c,e,d)&&(c=null),d||null===e?la(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
+var sa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ta=60103,ua=60106,va=60107,wa=60108,ya=60114,za=60109,Aa=60110,Ba=60112,Ca=60113,Da=60120,Ea=60115,Fa=60116,Ga=60121,Ha=60128,Ia=60129,Ja=60130,Ka=60131;
+if("function"===typeof Symbol&&Symbol.for){var H=Symbol.for;ta=H("react.element");ua=H("react.portal");va=H("react.fragment");wa=H("react.strict_mode");ya=H("react.profiler");za=H("react.provider");Aa=H("react.context");Ba=H("react.forward_ref");Ca=H("react.suspense");Da=H("react.suspense_list");Ea=H("react.memo");Fa=H("react.lazy");Ga=H("react.block");H("react.scope");Ha=H("react.opaque.id");Ia=H("react.debug_trace_mode");Ja=H("react.offscreen");Ka=H("react.legacy_hidden")}
+var La="function"===typeof Symbol&&Symbol.iterator;function Ma(a){if(null===a||"object"!==typeof a)return null;a=La&&a[La]||a["@@iterator"];return"function"===typeof a?a:null}var Na;function Oa(a){if(void 0===Na)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);Na=b&&b[1]||""}return"\n"+Na+a}var Pa=!1;
+function Qa(a,b){if(!a||Pa)return"";Pa=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();}catch(k){d=k}a()}}catch(k){if(k&&d&&"string"===typeof k.stack){for(var e=k.stack.split("\n"),
+f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return"\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Pa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Oa(a):""}
+function Ra(a){switch(a.tag){case 5:return Oa(a.type);case 16:return Oa("Lazy");case 13:return Oa("Suspense");case 19:return Oa("SuspenseList");case 0:case 2:case 15:return a=Qa(a.type,!1),a;case 11:return a=Qa(a.type.render,!1),a;case 22:return a=Qa(a.type._render,!1),a;case 1:return a=Qa(a.type,!0),a;default:return""}}
+function Sa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case va:return"Fragment";case ua:return"Portal";case ya:return"Profiler";case wa:return"StrictMode";case Ca:return"Suspense";case Da:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Aa:return(a.displayName||"Context")+".Consumer";case za:return(a._context.displayName||"Context")+".Provider";case Ba:var b=a.render;b=b.displayName||b.name||"";
+return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Ea:return Sa(a.type);case Ga:return Sa(a._render);case Fa:b=a._payload;a=a._init;try{return Sa(a(b))}catch(c){}}return null}function Ta(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function Ua(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
+function Va(a){var b=Ua(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
+null;delete a[b]}}}}function Wa(a){a._valueTracker||(a._valueTracker=Va(a))}function Xa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ua(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Ya(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}
+function Za(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function $a(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Ta(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ra(a,"checked",b,!1)}
+function bb(a,b){ab(a,b);var c=Ta(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Ta(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
+function db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
+function cb(a,b,c){if("number"!==b||Ya(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function eb(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function fb(a,b){a=n({children:void 0},b);if(b=eb(b.children))a.children=b;return a}
+function gb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+Ta(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
+function hb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(E(91));return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function jb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(E(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(E(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Ta(c)}}
+function kb(a,b){var c=Ta(b.value),d=Ta(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var mb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
+function nb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ob(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?nb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
+var pb,qb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==mb.svg||"innerHTML"in a)a.innerHTML=b;else{pb=pb||document.createElement("div");pb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
+function rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}
+var sb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
+floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tb=["Webkit","ms","Moz","O"];Object.keys(sb).forEach(function(a){tb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);sb[b]=sb[a]})});function ub(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||sb.hasOwnProperty(a)&&sb[a]?(""+b).trim():b+"px"}
+function vb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=ub(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var wb=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
+function xb(a,b){if(b){if(wb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(E(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(E(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(E(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(E(62));}}
+function yb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function zb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var Ab=null,Bb=null,Cb=null;
+function Db(a){if(a=Eb(a)){if("function"!==typeof Ab)throw Error(E(280));var b=a.stateNode;b&&(b=Fb(b),Ab(a.stateNode,a.type,b))}}function Gb(a){Bb?Cb?Cb.push(a):Cb=[a]:Bb=a}function Hb(){if(Bb){var a=Bb,b=Cb;Cb=Bb=null;Db(a);if(b)for(a=0;a<b.length;a++)Db(b[a])}}function Ib(a,b){return a(b)}function Jb(a,b,c,d,e){return a(b,c,d,e)}function Kb(){}var Lb=Ib,Mb=!1,Nb=!1;function Ob(){if(null!==Bb||null!==Cb)Kb(),Hb()}
+function Pb(a,b,c){if(Nb)return a(b,c);Nb=!0;try{return Lb(a,b,c)}finally{Nb=!1,Ob()}}
+function Qb(a,b){var c=a.stateNode;if(null===c)return null;var d=Fb(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==
+typeof c)throw Error(E(231,b,typeof c));return c}var Rb=!1;if(fa)try{var Sb={};Object.defineProperty(Sb,"passive",{get:function(){Rb=!0}});window.addEventListener("test",Sb,Sb);window.removeEventListener("test",Sb,Sb)}catch(a){Rb=!1}function Tb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(p){this.onError(p)}}var Ub=!1,Vb=null,Wb=!1,Xb=null,Yb={onError:function(a){Ub=!0;Vb=a}};function Zb(a,b,c,d,e,f,g,h,k){Ub=!1;Vb=null;Tb.apply(Yb,arguments)}
+function $b(a,b,c,d,e,f,g,h,k){Zb.apply(this,arguments);if(Ub){if(Ub){var l=Vb;Ub=!1;Vb=null}else throw Error(E(198));Wb||(Wb=!0,Xb=l)}}function ac(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function bc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function cc(a){if(ac(a)!==a)throw Error(E(188));}
+function dc(a){var b=a.alternate;if(!b){b=ac(a);if(null===b)throw Error(E(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return cc(e),a;if(f===d)return cc(e),b;f=f.sibling}throw Error(E(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
+c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(E(189));}}if(c.alternate!==d)throw Error(E(190));}if(3!==c.tag)throw Error(E(188));return c.stateNode.current===c?a:b}function ec(a){a=dc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
+function fc(a,b){for(var c=a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}var gc,hc,ic,jc,kc=!1,lc=[],mc=null,nc=null,oc=null,pc=new Map,qc=new Map,rc=[],sc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
+function tc(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function uc(a,b){switch(a){case "focusin":case "focusout":mc=null;break;case "dragenter":case "dragleave":nc=null;break;case "mouseover":case "mouseout":oc=null;break;case "pointerover":case "pointerout":pc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":qc.delete(b.pointerId)}}
+function vc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=tc(b,c,d,e,f),null!==b&&(b=Eb(b),null!==b&&hc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}
+function wc(a,b,c,d,e){switch(b){case "focusin":return mc=vc(mc,a,b,c,d,e),!0;case "dragenter":return nc=vc(nc,a,b,c,d,e),!0;case "mouseover":return oc=vc(oc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;pc.set(f,vc(pc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,qc.set(f,vc(qc.get(f)||null,a,b,c,d,e)),!0}return!1}
+function xc(a){var b=yc(a.target);if(null!==b){var c=ac(b);if(null!==c)if(b=c.tag,13===b){if(b=bc(c),null!==b){a.blockedOn=b;jc(a.lanePriority,function(){r.unstable_runWithPriority(a.priority,function(){ic(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}
+function zc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=Ac(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c)return b=Eb(c),null!==b&&hc(b),a.blockedOn=c,!1;b.shift()}return!0}function Bc(a,b,c){zc(a)&&c.delete(b)}
+function Cc(){for(kc=!1;0<lc.length;){var a=lc[0];if(null!==a.blockedOn){a=Eb(a.blockedOn);null!==a&&gc(a);break}for(var b=a.targetContainers;0<b.length;){var c=Ac(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&lc.shift()}null!==mc&&zc(mc)&&(mc=null);null!==nc&&zc(nc)&&(nc=null);null!==oc&&zc(oc)&&(oc=null);pc.forEach(Bc);qc.forEach(Bc)}
+function Dc(a,b){a.blockedOn===b&&(a.blockedOn=null,kc||(kc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Cc)))}
+function Ec(a){function b(b){return Dc(b,a)}if(0<lc.length){Dc(lc[0],a);for(var c=1;c<lc.length;c++){var d=lc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==mc&&Dc(mc,a);null!==nc&&Dc(nc,a);null!==oc&&Dc(oc,a);pc.forEach(b);qc.forEach(b);for(c=0;c<rc.length;c++)d=rc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<rc.length&&(c=rc[0],null===c.blockedOn);)xc(c),null===c.blockedOn&&rc.shift()}
+function Fc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Gc={animationend:Fc("Animation","AnimationEnd"),animationiteration:Fc("Animation","AnimationIteration"),animationstart:Fc("Animation","AnimationStart"),transitionend:Fc("Transition","TransitionEnd")},Hc={},Ic={};
+fa&&(Ic=document.createElement("div").style,"AnimationEvent"in window||(delete Gc.animationend.animation,delete Gc.animationiteration.animation,delete Gc.animationstart.animation),"TransitionEvent"in window||delete Gc.transitionend.transition);function Jc(a){if(Hc[a])return Hc[a];if(!Gc[a])return a;var b=Gc[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Ic)return Hc[a]=b[c];return a}
+var Kc=Jc("animationend"),Lc=Jc("animationiteration"),Mc=Jc("animationstart"),Nc=Jc("transitionend"),Oc=new Map,Pc=new Map,Qc=["abort","abort",Kc,"animationEnd",Lc,"animationIteration",Mc,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart",
+"lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Nc,"transitionEnd","waiting","waiting"];function Rc(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e="on"+(e[0].toUpperCase()+e.slice(1));Pc.set(d,b);Oc.set(d,e);da(e,[d])}}var Sc=r.unstable_now;if(null==x.__interactionsRef||null==x.__interactionsRef.current)throw Error(E(302));Sc();var I=8;
+function Tc(a){if(0!==(1&a))return I=15,1;if(0!==(2&a))return I=14,2;if(0!==(4&a))return I=13,4;var b=24&a;if(0!==b)return I=12,b;if(0!==(a&32))return I=11,32;b=192&a;if(0!==b)return I=10,b;if(0!==(a&256))return I=9,256;b=3584&a;if(0!==b)return I=8,b;if(0!==(a&4096))return I=7,4096;b=4186112&a;if(0!==b)return I=6,b;b=62914560&a;if(0!==b)return I=5,b;if(a&67108864)return I=4,67108864;if(0!==(a&134217728))return I=3,134217728;b=805306368&a;if(0!==b)return I=2,b;if(0!==(1073741824&a))return I=1,1073741824;
+I=8;return a}function Uc(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Vc(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(E(358,a));}}
+function Wc(a,b){var c=a.pendingLanes;if(0===c)return I=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=I=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=Tc(k),e=I):(h&=f,0!==h&&(d=Tc(h),e=I))}else f=c&~g,0!==f?(d=Tc(f),e=I):0!==h&&(d=Tc(h),e=I);if(0===d)return 0;d=31-Xc(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){Tc(b);if(e<=I)return b;I=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Xc(b),e=1<<c,d|=a[c],b&=~e;return d}
+function Yc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Zc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=$c(24&~b),0===a?Zc(10,b):a;case 10:return a=$c(192&~b),0===a?Zc(8,b):a;case 8:return a=$c(3584&~b),0===a&&(a=$c(4186112&~b),0===a&&(a=512)),a;case 2:return b=$c(805306368&~b),0===b&&(b=268435456),b}throw Error(E(358,a));}function $c(a){return a&-a}function ad(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}
+function bd(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Xc(b);a[b]=c}var Xc=Math.clz32?Math.clz32:cd,dd=Math.log,ed=Math.LN2;function cd(a){return 0===a?32:31-(dd(a)/ed|0)|0}var fd=r.unstable_UserBlockingPriority,gd=r.unstable_runWithPriority,hd=!0;function id(a,b,c,d){Mb||Kb();var e=jd,f=Mb;Mb=!0;try{Jb(e,a,b,c,d)}finally{(Mb=f)||Ob()}}function kd(a,b,c,d){gd(fd,jd.bind(null,a,b,c,d))}
+function jd(a,b,c,d){if(hd){var e;if((e=0===(b&4))&&0<lc.length&&-1<sc.indexOf(a))a=tc(null,a,b,c,d),lc.push(a);else{var f=Ac(a,b,c,d);if(null===f)e&&uc(a,d);else{if(e){if(-1<sc.indexOf(a)){a=tc(f,a,b,c,d);lc.push(a);return}if(wc(f,a,b,c,d))return;uc(a,d)}ld(a,b,d,null,c)}}}}
+function Ac(a,b,c,d){var e=zb(d);e=yc(e);if(null!==e){var f=ac(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=bc(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==e&&(e=null)}}ld(a,b,d,e,c);return null}var md=null,nd=null,od=null;
+function pd(){if(od)return od;var a,b=nd,c=b.length,d,e="value"in md?md.value:md.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return od=e.slice(a,1<d?1-d:void 0)}function qd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function rd(){return!0}function sd(){return!1}
+function td(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?rd:sd;this.isPropagationStopped=sd;return this}n(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&
+(a.returnValue=!1),this.isDefaultPrevented=rd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=rd)},persist:function(){},isPersistent:rd});return b}
+var ud={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vd=td(ud),wd=n({},ud,{view:0,detail:0}),xd=td(wd),yd,zd,Ad,Cd=n({},wd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in
+a)return a.movementX;a!==Ad&&(Ad&&"mousemove"===a.type?(yd=a.screenX-Ad.screenX,zd=a.screenY-Ad.screenY):zd=yd=0,Ad=a);return yd},movementY:function(a){return"movementY"in a?a.movementY:zd}}),Dd=td(Cd),Ed=n({},Cd,{dataTransfer:0}),Fd=td(Ed),Gd=n({},wd,{relatedTarget:0}),Hd=td(Gd),Id=n({},ud,{animationName:0,elapsedTime:0,pseudoElement:0}),Jd=td(Id),Kd=n({},ud,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Ld=td(Kd),Md=n({},ud,{data:0}),Nd=td(Md),Od={Esc:"Escape",
+Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",
+119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Qd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Qd[a])?!!b[a]:!1}function Bd(){return Rd}
+var Sd=n({},wd,{key:function(a){if(a.key){var b=Od[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=qd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Pd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bd,charCode:function(a){return"keypress"===a.type?qd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
+a.type?qd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Td=td(Sd),Ud=n({},Cd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vd=td(Ud),Wd=n({},wd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bd}),Xd=td(Wd),Yd=n({},ud,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zd=td(Yd),$d=n({},Cd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},
+deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),ae=td($d),be=[9,13,27,32],ce=fa&&"CompositionEvent"in window,de=null;fa&&"documentMode"in document&&(de=document.documentMode);var ee=fa&&"TextEvent"in window&&!de,fe=fa&&(!ce||de&&8<de&&11>=de),ge=String.fromCharCode(32),he=!1;
+function ie(a,b){switch(a){case "keyup":return-1!==be.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function je(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ke=!1;function le(a,b){switch(a){case "compositionend":return je(b);case "keypress":if(32!==b.which)return null;he=!0;return ge;case "textInput":return a=b.data,a===ge&&he?null:a;default:return null}}
+function me(a,b){if(ke)return"compositionend"===a||!ce&&ie(a,b)?(a=pd(),od=nd=md=null,ke=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return fe&&"ko"!==b.locale?null:b.data;default:return null}}
+var ne={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!ne[a.type]:"textarea"===b?!0:!1}function pe(a,b,c,d){Gb(d);b=qe(b,"onChange");0<b.length&&(c=new vd("onChange","change",null,c,d),a.push({event:c,listeners:b}))}var re=null,se=null;function te(a){ue(a,0)}function ve(a){var b=we(a);if(Xa(b))return a}
+function xe(a,b){if("change"===a)return b}var ye=!1;if(fa){var ze;if(fa){var Ae="oninput"in document;if(!Ae){var Be=document.createElement("div");Be.setAttribute("oninput","return;");Ae="function"===typeof Be.oninput}ze=Ae}else ze=!1;ye=ze&&(!document.documentMode||9<document.documentMode)}function Ce(){re&&(re.detachEvent("onpropertychange",De),se=re=null)}function De(a){if("value"===a.propertyName&&ve(se)){var b=[];pe(b,se,a,zb(a));a=te;if(Mb)a(b);else{Mb=!0;try{Ib(a,b)}finally{Mb=!1,Ob()}}}}
+function Ee(a,b,c){"focusin"===a?(Ce(),re=b,se=c,re.attachEvent("onpropertychange",De)):"focusout"===a&&Ce()}function Fe(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return ve(se)}function Ge(a,b){if("click"===a)return ve(b)}function He(a,b){if("input"===a||"change"===a)return ve(b)}function Ie(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Je="function"===typeof Object.is?Object.is:Ie,Ke=Object.prototype.hasOwnProperty;
+function Le(a,b){if(Je(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Ke.call(b,c[d])||!Je(a[c[d]],b[c[d]]))return!1;return!0}function Me(a){for(;a&&a.firstChild;)a=a.firstChild;return a}
+function Ne(a,b){var c=Me(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Me(c)}}function Oe(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Oe(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}
+function Pe(){for(var a=window,b=Ya();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Ya(a.document)}return b}function Qe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}
+var Re=fa&&"documentMode"in document&&11>=document.documentMode,Se=null,Te=null,Ue=null,Ve=!1;
+function We(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Ve||null==Se||Se!==Ya(d)||(d=Se,"selectionStart"in d&&Qe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Ue&&Le(Ue,d)||(Ue=d,d=qe(Te,"onSelect"),0<d.length&&(b=new vd("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Se)))}
+Rc("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
+0);Rc("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Rc(Qc,2);for(var Xe="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ye=0;Ye<Xe.length;Ye++)Pc.set(Xe[Ye],0);ea("onMouseEnter",["mouseout","mouseover"]);
+ea("onMouseLeave",["mouseout","mouseover"]);ea("onPointerEnter",["pointerout","pointerover"]);ea("onPointerLeave",["pointerout","pointerover"]);da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));da("onBeforeInput",["compositionend","keypress","textInput","paste"]);da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));
+da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ze="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),$e=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ze));
+function af(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;$b(d,b,void 0,a);a.currentTarget=null}
+function ue(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;af(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;af(e,h,l);f=k}}}if(Wb)throw a=Xb,Wb=!1,Xb=null,a;}
+function K(a,b){var c=bf(b),d=a+"__bubble";c.has(d)||(cf(b,a,2,!1),c.add(d))}var df="_reactListening"+Math.random().toString(36).slice(2);function ef(a){a[df]||(a[df]=!0,ba.forEach(function(b){$e.has(b)||ff(b,!1,a,null);ff(b,!0,a,null)}))}
+function ff(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;"selectionchange"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&$e.has(a)){if("scroll"!==a)return;e|=2;f=d}var g=bf(f),h=a+"__"+(b?"capture":"bubble");g.has(h)||(b&&(e|=4),cf(f,a,e,b),g.add(h))}
+function cf(a,b,c,d){var e=Pc.get(b);switch(void 0===e?2:e){case 0:e=id;break;case 1:e=kd;break;default:e=jd}c=e.bind(null,b,c,a);e=void 0;!Rb||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}
+function ld(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=yc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Pb(function(){var d=f,e=zb(c),g=[];
+a:{var h=Oc.get(a);if(void 0!==h){var k=vd,t=a;switch(a){case "keypress":if(0===qd(c))break a;case "keydown":case "keyup":k=Td;break;case "focusin":t="focus";k=Hd;break;case "focusout":t="blur";k=Hd;break;case "beforeblur":case "afterblur":k=Hd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Dd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=
+Fd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Xd;break;case Kc:case Lc:case Mc:k=Jd;break;case Nc:k=Zd;break;case "scroll":k=xd;break;case "wheel":k=ae;break;case "copy":case "cut":case "paste":k=Ld;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Vd}var z=0!==(b&4),B=!z&&"scroll"===a,u=z?null!==h?h+"Capture":null:h;z=[];for(var v=d,C;null!==
+v;){C=v;var w=C.stateNode;5===C.tag&&null!==w&&(C=w,null!==u&&(w=Qb(v,u),null!=w&&z.push(gf(v,w,C))));if(B)break;v=v.return}0<z.length&&(h=new k(h,t,null,c,e),g.push({event:h,listeners:z}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&0===(b&16)&&(t=c.relatedTarget||c.fromElement)&&(yc(t)||t[hf]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(t=c.relatedTarget||c.toElement,k=d,t=t?yc(t):null,null!==
+t&&(B=ac(t),t!==B||5!==t.tag&&6!==t.tag))t=null}else k=null,t=d;if(k!==t){z=Dd;w="onMouseLeave";u="onMouseEnter";v="mouse";if("pointerout"===a||"pointerover"===a)z=Vd,w="onPointerLeave",u="onPointerEnter",v="pointer";B=null==k?h:we(k);C=null==t?h:we(t);h=new z(w,v+"leave",k,c,e);h.target=B;h.relatedTarget=C;w=null;yc(e)===d&&(z=new z(u,v+"enter",t,c,e),z.target=C,z.relatedTarget=B,w=z);B=w;if(k&&t)b:{z=k;u=t;v=0;for(C=z;C;C=jf(C))v++;C=0;for(w=u;w;w=jf(w))C++;for(;0<v-C;)z=jf(z),v--;for(;0<C-v;)u=
+jf(u),C--;for(;v--;){if(z===u||null!==u&&z===u.alternate)break b;z=jf(z);u=jf(u)}z=null}else z=null;null!==k&&kf(g,h,k,z,!1);null!==t&&null!==B&&kf(g,B,t,z,!0)}}}a:{h=d?we(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var A=xe;else if(oe(h))if(ye)A=He;else{A=Fe;var m=Ee}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(A=Ge);if(A&&(A=A(a,d))){pe(g,A,c,e);break a}m&&m(a,h,d);"focusout"===a&&(m=h._wrapperState)&&
+m.controlled&&"number"===h.type&&cb(h,"number",h.value)}m=d?we(d):window;switch(a){case "focusin":if(oe(m)||"true"===m.contentEditable)Se=m,Te=d,Ue=null;break;case "focusout":Ue=Te=Se=null;break;case "mousedown":Ve=!0;break;case "contextmenu":case "mouseup":case "dragend":Ve=!1;We(g,c,e);break;case "selectionchange":if(Re)break;case "keydown":case "keyup":We(g,c,e)}var J;if(ce)b:{switch(a){case "compositionstart":var M="onCompositionStart";break b;case "compositionend":M="onCompositionEnd";break b;
+case "compositionupdate":M="onCompositionUpdate";break b}M=void 0}else ke?ie(a,c)&&(M="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(M="onCompositionStart");M&&(fe&&"ko"!==c.locale&&(ke||"onCompositionStart"!==M?"onCompositionEnd"===M&&ke&&(J=pd()):(md=e,nd="value"in md?md.value:md.textContent,ke=!0)),m=qe(d,M),0<m.length&&(M=new Nd(M,a,null,c,e),g.push({event:M,listeners:m}),J?M.data=J:(J=je(c),null!==J&&(M.data=J))));if(J=ee?le(a,c):me(a,c))d=qe(d,"onBeforeInput"),0<d.length&&(e=new Nd("onBeforeInput",
+"beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=J)}ue(g,b)})}function gf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function qe(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Qb(a,c),null!=f&&d.unshift(gf(a,f,e)),f=Qb(a,b),null!=f&&d.push(gf(a,f,e)));a=a.return}return d}function jf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}
+function kf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Qb(c,f),null!=k&&g.unshift(gf(c,k,h))):e||(k=Qb(c,f),null!=k&&g.push(gf(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function lf(){}var mf=null,nf=null;function of(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
+function pf(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var qf="function"===typeof setTimeout?setTimeout:void 0,rf="function"===typeof clearTimeout?clearTimeout:void 0;function sf(a){1===a.nodeType?a.textContent="":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=""))}
+function tf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function uf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}var vf=0;function wf(a){return{$$typeof:Ha,toString:a,valueOf:a}}var xf=Math.random().toString(36).slice(2),yf="__reactFiber$"+xf,zf="__reactProps$"+xf,hf="__reactContainer$"+xf,Af="__reactEvents$"+xf;
+function yc(a){var b=a[yf];if(b)return b;for(var c=a.parentNode;c;){if(b=c[hf]||c[yf]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=uf(a);null!==a;){if(c=a[yf])return c;a=uf(a)}return b}a=c;c=a.parentNode}return null}function Eb(a){a=a[yf]||a[hf];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function we(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(E(33));}function Fb(a){return a[zf]||null}
+function bf(a){var b=a[Af];void 0===b&&(b=a[Af]=new Set);return b}var Bf=[],Cf=-1;function Df(a){return{current:a}}function L(a){0>Cf||(a.current=Bf[Cf],Bf[Cf]=null,Cf--)}function N(a,b){Cf++;Bf[Cf]=a.current;a.current=b}var Ef={},O=Df(Ef),Ff=Df(!1),Gf=Ef;
+function Hf(a,b){var c=a.type.contextTypes;if(!c)return Ef;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function If(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Jf(){L(Ff);L(O)}function Kf(a,b,c){if(O.current!==Ef)throw Error(E(168));N(O,b);N(Ff,c)}
+function Lf(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(E(108,Sa(b)||"Unknown",e));return n({},c,d)}function Mf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ef;Gf=O.current;N(O,a);N(Ff,Ff.current);return!0}
+function Nf(a,b,c){var d=a.stateNode;if(!d)throw Error(E(169));c?(a=Lf(a,b,Gf),d.__reactInternalMemoizedMergedChildContext=a,L(Ff),L(O),N(O,a)):L(Ff);N(Ff,c)}
+var Of=null,Pf=null,Qf="undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__,Rf=r.unstable_runWithPriority,Sf=r.unstable_scheduleCallback,Tf=r.unstable_cancelCallback,Uf=r.unstable_shouldYield,Vf=r.unstable_requestPaint,Wf=r.unstable_now,Xf=r.unstable_getCurrentPriorityLevel,Yf=r.unstable_ImmediatePriority,Zf=r.unstable_UserBlockingPriority,$f=r.unstable_NormalPriority,ag=r.unstable_LowPriority,bg=r.unstable_IdlePriority;
+if(null==x.__interactionsRef||null==x.__interactionsRef.current)throw Error(E(302));var cg={},dg=void 0!==Vf?Vf:function(){},eg=null,fg=null,gg=!1,hg=Wf(),P=1E4>hg?Wf:function(){return Wf()-hg};function ig(){switch(Xf()){case Yf:return 99;case Zf:return 98;case $f:return 97;case ag:return 96;case bg:return 95;default:throw Error(E(332));}}function jg(a){switch(a){case 99:return Yf;case 98:return Zf;case 97:return $f;case 96:return ag;case 95:return bg;default:throw Error(E(332));}}
+function kg(a,b){a=jg(a);return Rf(a,b)}function lg(a,b,c){a=jg(a);return Sf(a,b,c)}function mg(){if(null!==fg){var a=fg;fg=null;Tf(a)}ng()}function ng(){if(!gg&&null!==eg){gg=!0;var a=0;try{var b=eg;kg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});eg=null}catch(c){throw null!==eg&&(eg=eg.slice(a+1)),Sf(Yf,mg),c;}finally{gg=!1}}}var og=sa.ReactCurrentBatchConfig;
+function pg(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var qg=Df(null),rg=null,sg=null,tg=null;function ug(){tg=sg=rg=null}function vg(a){var b=qg.current;L(qg);a.type._context._currentValue=b}function wg(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}
+function xg(a,b){rg=a;tg=sg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(yg=!0),a.firstContext=null)}function zg(a,b){if(tg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)tg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===sg){if(null===rg)throw Error(E(308));sg=b;rg.dependencies={lanes:0,firstContext:b,responders:null}}else sg=sg.next=b}return a._currentValue}var Ag=!1;
+function Bg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Cg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Dg(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}
+function Eg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}
+function Fg(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=
+b;c.lastBaseUpdate=b}
+function Gg(a,b,c,d){var e=a.updateQueue;Ag=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var p=a.alternate;if(null!==p){p=p.updateQueue;var y=p.lastBaseUpdate;y!==g&&(null===y?p.firstBaseUpdate=l:y.next=l,p.lastBaseUpdate=k)}}if(null!==f){y=e.baseState;g=0;p=l=k=null;do{h=f.lane;var q=f.eventTime;if((d&h)===h){null!==p&&(p=p.next={eventTime:q,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,
+next:null});a:{var D=a,t=f;h=b;q=c;switch(t.tag){case 1:D=t.payload;if("function"===typeof D){y=D.call(q,y,h);break a}y=D;break a;case 3:D.flags=D.flags&-4097|64;case 0:D=t.payload;h="function"===typeof D?D.call(q,y,h):D;if(null===h||void 0===h)break a;y=n({},y,h);break a;case 2:Ag=!0}}null!==f.callback&&(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else q={eventTime:q,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===p?(l=p=q,k=y):p=p.next=q,g|=h;f=f.next;if(null===
+f)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===p&&(k=y);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=p;Hg|=g;a.lanes=g;a.memoizedState=y}}function Ig(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(E(191,e));e.call(d)}}}var Jg=(new aa.Component).refs;
+function Kg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}
+var Og={isMounted:function(a){return(a=a._reactInternals)?ac(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Lg(),e=Mg(a),f=Dg(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Eg(a,f);Ng(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Lg(),e=Mg(a),f=Dg(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Eg(a,f);Ng(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Lg(),d=Mg(a),e=Dg(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=
+b);Eg(a,e);Ng(a,d,c)}};function Pg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Le(c,d)||!Le(e,f):!0}
+function Qg(a,b,c){var d=!1,e=Ef;var f=b.contextType;"object"===typeof f&&null!==f?f=zg(f):(e=If(b)?Gf:O.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Hf(a,e):Ef);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Og;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
+function Rg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Og.enqueueReplaceState(b,b.state,null)}
+function Sg(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Jg;Bg(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=zg(f):(f=If(b)?Gf:O.current,e.context=Hf(a,f));Gg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Kg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||
+(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Og.enqueueReplaceState(e,e.state,null),Gg(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4)}var Tg=Array.isArray;
+function Ug(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(E(309));var d=c.stateNode}if(!d)throw Error(E(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Jg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(E(284));if(!c._owner)throw Error(E(290,a));}return a}
+function Vg(a,b){if("textarea"!==a.type)throw Error(E(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b));}
+function Wg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Xg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=2,
+c):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Yg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Ug(a,b,c),d.return=a,d;d=Zg(c.type,c.key,c.props,null,a.mode,d);d.ref=Ug(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
+$g(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function p(a,b,c,d,f){if(null===b||7!==b.tag)return b=ah(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function y(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Yg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case ta:return c=Zg(b.type,b.key,b.props,null,a.mode,c),c.ref=Ug(a,null,b),c.return=a,c;case ua:return b=$g(b,a.mode,c),b.return=a,b}if(Tg(b)||Ma(b))return b=ah(b,
+a.mode,c,null),b.return=a,b;Vg(a,b)}return null}function q(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case ta:return c.key===e?c.type===va?p(a,b,c.props.children,d,e):k(a,b,c,d):null;case ua:return c.key===e?l(a,b,c,d):null}if(Tg(c)||Ma(c))return null!==e?null:p(a,b,c,d,null);Vg(a,c)}return null}function D(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||
+null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case ta:return a=a.get(null===d.key?c:d.key)||null,d.type===va?p(b,a,d.props.children,e,d.key):k(b,a,d,e);case ua:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Tg(d)||Ma(d))return a=a.get(c)||null,p(b,a,d,e,null);Vg(b,d)}return null}function t(e,g,h,k){for(var l=null,u=null,m=g,v=g=0,B=null;null!==m&&v<h.length;v++){m.index>v?(B=m,m=null):B=m.sibling;var p=q(e,m,h[v],k);if(null===p){null===m&&(m=B);break}a&&m&&null===
+p.alternate&&b(e,m);g=f(p,g,v);null===u?l=p:u.sibling=p;u=p;m=B}if(v===h.length)return c(e,m),l;if(null===m){for(;v<h.length;v++)m=y(e,h[v],k),null!==m&&(g=f(m,g,v),null===u?l=m:u.sibling=m,u=m);return l}for(m=d(e,m);v<h.length;v++)B=D(m,e,v,h[v],k),null!==B&&(a&&null!==B.alternate&&m.delete(null===B.key?v:B.key),g=f(B,g,v),null===u?l=B:u.sibling=B,u=B);a&&m.forEach(function(a){return b(e,a)});return l}function z(e,g,h,k){var l=Ma(h);if("function"!==typeof l)throw Error(E(150));h=l.call(h);if(null==
+h)throw Error(E(151));for(var u=l=null,m=g,v=g=0,B=null,p=h.next();null!==m&&!p.done;v++,p=h.next()){m.index>v?(B=m,m=null):B=m.sibling;var t=q(e,m,p.value,k);if(null===t){null===m&&(m=B);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,v);null===u?l=t:u.sibling=t;u=t;m=B}if(p.done)return c(e,m),l;if(null===m){for(;!p.done;v++,p=h.next())p=y(e,p.value,k),null!==p&&(g=f(p,g,v),null===u?l=p:u.sibling=p,u=p);return l}for(m=d(e,m);!p.done;v++,p=h.next())p=D(m,e,v,p.value,k),null!==p&&(a&&null!==p.alternate&&
+m.delete(null===p.key?v:p.key),g=f(p,g,v),null===u?l=p:u.sibling=p,u=p);a&&m.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===va&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case ta:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===va){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);
+d=e(k,f.props);d.ref=Ug(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===va?(d=ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Zg(f.type,f.key,f.props,null,a.mode,h),h.ref=Ug(a,d,f),h.return=a,a=h)}return g(a);case ua:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=
+$g(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Yg(f,a.mode,h),d.return=a,a=d),g(a);if(Tg(f))return t(a,d,f,h);if(Ma(f))return z(a,d,f,h);l&&Vg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(E(152,Sa(a.type)||"Component"));}return c(a,d)}}var bh=Wg(!0),ch=Wg(!1),dh={},eh=Df(dh),fh=Df(dh),gh=Df(dh);
+function hh(a){if(a===dh)throw Error(E(174));return a}function ih(a,b){N(gh,b);N(fh,a);N(eh,dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:ob(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=ob(b,a)}L(eh);N(eh,b)}function jh(){L(eh);L(fh);L(gh)}function kh(a){hh(gh.current);var b=hh(eh.current);var c=ob(b,a.type);b!==c&&(N(fh,a),N(eh,c))}function lh(a){fh.current===a&&(L(eh),L(fh))}var Q=Df(0);
+function mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var nh=null,oh=null,ph=!1;
+function qh(a,b){var c=rh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function sh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
+function th(a){if(ph){var b=oh;if(b){var c=b;if(!sh(a,b)){b=tf(c.nextSibling);if(!b||!sh(a,b)){a.flags=a.flags&-1025|2;ph=!1;nh=a;return}qh(nh,c)}nh=a;oh=tf(b.firstChild)}else a.flags=a.flags&-1025|2,ph=!1,nh=a}}function uh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;nh=a}
+function vh(a){if(a!==nh)return!1;if(!ph)return uh(a),ph=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!pf(b,a.memoizedProps))for(b=oh;b;)qh(a,b),b=tf(b.nextSibling);uh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(E(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){oh=tf(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}oh=null}}else oh=nh?tf(a.stateNode.nextSibling):null;return!0}
+function wh(){oh=nh=null;ph=!1}var xh=[];function yh(){for(var a=0;a<xh.length;a++)xh[a]._workInProgressVersionPrimary=null;xh.length=0}var zh=sa.ReactCurrentDispatcher,Ah=sa.ReactCurrentBatchConfig,Bh=0,R=null,S=null,T=null,Ch=!1,Dh=!1;function Eh(){throw Error(E(321));}function Fh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!Je(a[c],b[c]))return!1;return!0}
+function Gh(a,b,c,d,e,f){Bh=f;R=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;zh.current=null===a||null===a.memoizedState?Hh:Ih;a=c(d,e);if(Dh){f=0;do{Dh=!1;if(!(25>f))throw Error(E(301));f+=1;T=S=null;b.updateQueue=null;zh.current=Jh;a=c(d,e)}while(Dh)}zh.current=Kh;b=null!==S&&null!==S.next;Bh=0;T=S=R=null;Ch=!1;if(b)throw Error(E(300));return a}function Lh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}
+function Mh(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(E(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Nh(a,b){return"function"===typeof b?b(a):b}
+function Oh(a){var b=Mh(),c=b.queue;if(null===c)throw Error(E(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((Bh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var p={lane:l,action:k.action,eagerReducer:k.eagerReducer,
+eagerState:k.eagerState,next:null};null===h?(g=h=p,f=d):h=h.next=p;R.lanes|=l;Hg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;Je(d,b.memoizedState)||(yg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}
+function Ph(a){var b=Mh(),c=b.queue;if(null===c)throw Error(E(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);Je(f,b.memoizedState)||(yg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}
+function Qh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(Bh&a)===a)b._workInProgressVersionPrimary=d,xh.push(b);if(a)return c(b._source);xh.push(b);throw Error(E(350));}
+function Rh(a,b,c,d){var e=U;if(null===e)throw Error(E(349));var f=b._getVersion,g=f(b._source),h=zh.current,k=h.useState(function(){return Qh(e,b,c)}),l=k[1],p=k[0];k=T;var y=a.memoizedState,q=y.refs,D=q.getSnapshot,t=y.source;y=y.subscribe;var z=R;a.memoizedState={refs:q,source:b,subscribe:d};h.useEffect(function(){q.getSnapshot=c;q.setSnapshot=l;var a=f(b._source);if(!Je(g,a)){a=c(b._source);Je(p,a)||(l(a),a=Mg(z),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=
+e.entanglements,h=a;0<h;){var k=31-Xc(h),t=1<<k;d[k]|=a;h&=~t}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=q.getSnapshot,c=q.setSnapshot;try{c(a(b._source));var d=Mg(z);e.mutableReadLanes|=d&e.pendingLanes}catch(C){c(function(){throw C;})}})},[b,d]);Je(D,c)&&Je(t,b)&&Je(y,d)||(a={pending:null,dispatch:null,lastRenderedReducer:Nh,lastRenderedState:p},a.dispatch=l=Sh.bind(null,R,a),k.queue=a,k.baseQueue=null,p=Qh(e,b,c),k.memoizedState=k.baseState=p);return p}
+function Th(a,b,c){var d=Mh();return Rh(d,a,b,c)}function Uh(a){var b=Lh();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Nh,lastRenderedState:a};a=a.dispatch=Sh.bind(null,R,a);return[b.memoizedState,a]}
+function Vh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=R.updateQueue;null===b?(b={lastEffect:null},R.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Wh(a){var b=Lh();a={current:a};return b.memoizedState=a}function Xh(){return Mh().memoizedState}function Yh(a,b,c,d){var e=Lh();R.flags|=a;e.memoizedState=Vh(1|b,c,void 0,void 0===d?null:d)}
+function Zh(a,b,c,d){var e=Mh();d=void 0===d?null:d;var f=void 0;if(null!==S){var g=S.memoizedState;f=g.destroy;if(null!==d&&Fh(d,g.deps)){Vh(b,c,f,d);return}}R.flags|=a;e.memoizedState=Vh(1|b,c,f,d)}function $h(a,b){return Yh(516,4,a,b)}function ai(a,b){return Zh(516,4,a,b)}function bi(a,b){return Zh(4,2,a,b)}function ci(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}
+function di(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Zh(4,2,ci.bind(null,b,a),c)}function ei(){}function fi(a,b){var c=Mh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Fh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function gi(a,b){var c=Mh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Fh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}
+function hi(a,b){var c=ig();kg(98>c?98:c,function(){a(!0)});kg(97<c?97:c,function(){var c=Ah.transition;Ah.transition=1;try{a(!1),b()}finally{Ah.transition=c}})}
+function Sh(a,b,c){var d=Lg(),e=Mg(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);b.pending=f;g=a.alternate;if(a===R||null!==g&&g===R)Dh=Ch=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(Je(k,h))return}catch(l){}finally{}Ng(a,e,d)}}
+var Kh={readContext:zg,useCallback:Eh,useContext:Eh,useEffect:Eh,useImperativeHandle:Eh,useLayoutEffect:Eh,useMemo:Eh,useReducer:Eh,useRef:Eh,useState:Eh,useDebugValue:Eh,useDeferredValue:Eh,useTransition:Eh,useMutableSource:Eh,useOpaqueIdentifier:Eh,unstable_isNewReconciler:!1},Hh={readContext:zg,useCallback:function(a,b){Lh().memoizedState=[a,void 0===b?null:b];return a},useContext:zg,useEffect:$h,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Yh(4,2,ci.bind(null,
+b,a),c)},useLayoutEffect:function(a,b){return Yh(4,2,a,b)},useMemo:function(a,b){var c=Lh();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Lh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Sh.bind(null,R,a);return[d.memoizedState,a]},useRef:Wh,useState:Uh,useDebugValue:ei,useDeferredValue:function(a){var b=Uh(a),c=b[0],d=b[1];$h(function(){var b=Ah.transition;
+Ah.transition=1;try{d(a)}finally{Ah.transition=b}},[a]);return c},useTransition:function(){var a=Uh(!1),b=a[0];a=hi.bind(null,a[1]);Wh(a);return[a,b]},useMutableSource:function(a,b,c){var d=Lh();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Rh(d,a,b,c)},useOpaqueIdentifier:function(){if(ph){var a=!1,b=wf(function(){a||(a=!0,c("r:"+(vf++).toString(36)));throw Error(E(355));}),c=Uh(b)[1];0===(R.mode&2)&&(R.flags|=516,Vh(5,function(){c("r:"+(vf++).toString(36))},
+void 0,null));return b}b="r:"+(vf++).toString(36);Uh(b);return b},unstable_isNewReconciler:!1},Ih={readContext:zg,useCallback:fi,useContext:zg,useEffect:ai,useImperativeHandle:di,useLayoutEffect:bi,useMemo:gi,useReducer:Oh,useRef:Xh,useState:function(){return Oh(Nh)},useDebugValue:ei,useDeferredValue:function(a){var b=Oh(Nh),c=b[0],d=b[1];ai(function(){var b=Ah.transition;Ah.transition=1;try{d(a)}finally{Ah.transition=b}},[a]);return c},useTransition:function(){var a=Oh(Nh)[0];return[Xh().current,
+a]},useMutableSource:Th,useOpaqueIdentifier:function(){return Oh(Nh)[0]},unstable_isNewReconciler:!1},Jh={readContext:zg,useCallback:fi,useContext:zg,useEffect:ai,useImperativeHandle:di,useLayoutEffect:bi,useMemo:gi,useReducer:Ph,useRef:Xh,useState:function(){return Ph(Nh)},useDebugValue:ei,useDeferredValue:function(a){var b=Ph(Nh),c=b[0],d=b[1];ai(function(){var b=Ah.transition;Ah.transition=1;try{d(a)}finally{Ah.transition=b}},[a]);return c},useTransition:function(){var a=Ph(Nh)[0];return[Xh().current,
+a]},useMutableSource:Th,useOpaqueIdentifier:function(){return Ph(Nh)[0]},unstable_isNewReconciler:!1},ii=r.unstable_now,ji=0,ki=-1;function li(a,b){if(0<=ki){var c=ii()-ki;a.actualDuration+=c;b&&(a.selfBaseDuration=c);ki=-1}}function mi(a){for(var b=a.child;b;)a.actualDuration+=b.actualDuration,b=b.sibling}var ni=sa.ReactCurrentOwner,yg=!1;function oi(a,b,c,d){b.child=null===a?ch(b,null,c,d):bh(b,a.child,c,d)}
+function pi(a,b,c,d,e){c=c.render;var f=b.ref;xg(b,e);d=Gh(a,b,c,d,f,e);if(null!==a&&!yg)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,qi(a,b,e);b.flags|=1;oi(a,b,d,e);return b.child}
+function ri(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!si(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ti(a,b,g,d,e,f);a=Zg(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Le,c(e,d)&&a.ref===b.ref))return qi(a,b,f);b.flags|=1;a=Xg(g,d);a.ref=b.ref;a.return=b;return b.child=a}
+function ti(a,b,c,d,e,f){if(null!==a&&Le(a.memoizedProps,d)&&a.ref===b.ref)if(yg=!1,0!==(f&e))0!==(a.flags&16384)&&(yg=!0);else return b.lanes=a.lanes,qi(a,b,f);return ui(a,b,c,d,f)}
+function vi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode||"unstable-defer-without-hiding"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},wi(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},wi(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,xi(1073741824),b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},wi(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,wi(b,d);oi(a,b,e,c);return b.child}
+function yi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function ui(a,b,c,d,e){var f=If(c)?Gf:O.current;f=Hf(b,f);xg(b,e);c=Gh(a,b,c,d,f,e);if(null!==a&&!yg)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,qi(a,b,e);b.flags|=1;oi(a,b,c,e);return b.child}
+function zi(a,b,c,d,e){if(If(c)){var f=!0;Mf(b)}else f=!1;xg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),Qg(b,c,d),Sg(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=zg(l):(l=If(c)?Gf:O.current,l=Hf(b,l));var p=c.getDerivedStateFromProps,y="function"===typeof p||"function"===typeof g.getSnapshotBeforeUpdate;y||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
+"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Rg(b,g,d,l);Ag=!1;var q=b.memoizedState;g.state=q;Gg(b,d,g,e);k=b.memoizedState;h!==d||q!==k||Ff.current||Ag?("function"===typeof p&&(Kg(b,c,p,d),k=b.memoizedState),(h=Ag||Pg(b,c,h,d,q,k,l))?(y||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===
+typeof g.componentDidMount&&(b.flags|=4)):("function"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;Cg(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:pg(b.type,h);g.props=l;y=b.pendingProps;q=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=zg(k):(k=If(c)?Gf:O.current,k=Hf(b,k));var D=c.getDerivedStateFromProps;(p="function"===typeof D||
+"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==y||q!==k)&&Rg(b,g,d,k);Ag=!1;q=b.memoizedState;g.state=q;Gg(b,d,g,e);var t=b.memoizedState;h!==y||q!==t||Ff.current||Ag?("function"===typeof D&&(Kg(b,c,D,d),t=b.memoizedState),(l=Ag||Pg(b,c,l,d,q,t,k))?(p||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&
+g.componentWillUpdate(d,t,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,t,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&q===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&q===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=t),g.props=d,g.state=t,g.context=
+k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&q===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&q===a.memoizedState||(b.flags|=256),d=!1)}return Ai(a,b,c,d,f,e)}
+function Ai(a,b,c,d,e,f){yi(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Nf(b,c,!1),qi(a,b,f);d=b.stateNode;ni.current=b;if(g&&"function"!==typeof c.getDerivedStateFromError){var h=null;ki=-1}else h=d.render();b.flags|=1;null!==a&&g?(g=h,b.child=bh(b,a.child,null,f),b.child=bh(b,null,g,f)):oi(a,b,h,f);b.memoizedState=d.state;e&&Nf(b,c,!0);return b.child}
+function Bi(a){var b=a.stateNode;b.pendingContext?Kf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Kf(a,b.context,!1);ih(a,b.containerInfo)}var Ci={dehydrated:null,retryLane:0};
+function Di(a,b,c){var d=b.pendingProps,e=Q.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);N(Q,e&1);if(null===a){void 0!==d.fallback&&th(b);a=d.children;e=d.fallback;if(f)return a=Ei(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=Ci,a;if("number"===typeof d.unstable_expectedLoadTime)return a=Ei(b,a,e,c),b.child.memoizedState={baseLanes:c},
+b.memoizedState=Ci,b.lanes=33554432,xi(33554432),a;c=Fi({mode:"visible",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=Gi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=Ci,d;c=Hi(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=Gi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===
+e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=Ci,d;c=Hi(a,b,d.children,c);b.memoizedState=null;return c}function Ei(a,b,c,d){var e=a.mode,f=a.child;b={mode:"hidden",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b,a.mode&8&&(f.actualDuration=0,f.actualStartTime=-1,f.selfBaseDuration=0,f.treeBaseDuration=0)):f=Fi(b,e,0,null);c=ah(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}
+function Hi(a,b,c,d){var e=a.child;a=e.sibling;c=Xg(e,{mode:"visible",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}
+function Gi(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:"hidden",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,b.mode&8&&(c.actualDuration=0,c.actualStartTime=-1,c.selfBaseDuration=g.selfBaseDuration,c.treeBaseDuration=g.treeBaseDuration),g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Xg(g,h);null!==a?d=Xg(a,d):(d=ah(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=
+c;return d}function Ii(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);wg(a.return,b)}function Ji(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}
+function Ki(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;oi(a,b,d.children,c);d=Q.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&Ii(a,c);else if(19===a.tag)Ii(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}N(Q,d);if(0===(b.mode&2))b.memoizedState=
+null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===mh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ji(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===mh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ji(b,!0,c,null,f,b.lastEffect);break;case "together":Ji(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
+function qi(a,b,c){null!==a&&(b.dependencies=a.dependencies);ki=-1;Hg|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(E(153));if(null!==b.child){a=b.child;c=Xg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Xg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}var Li,Mi,Ni,Oi;
+Li=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Mi=function(){};
+Ni=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;hh(eh.current);var f=null;switch(c){case "input":e=Za(a,e);d=Za(a,d);f=[];break;case "option":e=fb(a,e);d=fb(a,d);f=[];break;case "select":e=n({},e,{value:void 0});d=n({},d,{value:void 0});f=[];break;case "textarea":e=hb(a,e);d=hb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=lf)}xb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===
+l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(ca.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||
+(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(ca.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&K("scroll",a),f||h===k||(f=[])):"object"===typeof k&&null!==k&&k.$$typeof===Ha?k.toString():(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",
+c);var l=f;if(b.updateQueue=l)b.flags|=4}};Oi=function(a,b,c,d){c!==d&&(b.flags|=4)};function Pi(a,b){if(!ph)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
+function Qi(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return If(b.type)&&Jf(),null;case 3:jh();L(Ff);L(O);yh();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)vh(b)?b.flags|=4:d.hydrate||(b.flags|=256);Mi(b);return null;case 5:lh(b);var e=hh(gh.current);c=b.type;if(null!==a&&null!=b.stateNode)Ni(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===
+b.stateNode)throw Error(E(166));return null}a=hh(eh.current);if(vh(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[yf]=b;d[zf]=f;switch(c){case "dialog":K("cancel",d);K("close",d);break;case "iframe":case "object":case "embed":K("load",d);break;case "video":case "audio":for(a=0;a<Ze.length;a++)K(Ze[a],d);break;case "source":K("error",d);break;case "img":case "image":case "link":K("error",d);K("load",d);break;case "details":K("toggle",d);break;case "input":$a(d,f);K("invalid",d);break;case "select":d._wrapperState=
+{wasMultiple:!!f.multiple};K("invalid",d);break;case "textarea":jb(d,f),K("invalid",d)}xb(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],"children"===g?"string"===typeof e?d.textContent!==e&&(a=["children",e]):"number"===typeof e&&d.textContent!==""+e&&(a=["children",""+e]):ca.hasOwnProperty(g)&&null!=e&&"onScroll"===g&&K("scroll",d));switch(c){case "input":Wa(d);db(d,f,!0);break;case "textarea":Wa(d);lb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=
+lf)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;a===mb.html&&(a=nb(c));a===mb.html?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[yf]=b;a[zf]=d;Li(a,b,!1,!1);b.stateNode=a;g=yb(c,d);switch(c){case "dialog":K("cancel",a);K("close",a);
+e=d;break;case "iframe":case "object":case "embed":K("load",a);e=d;break;case "video":case "audio":for(e=0;e<Ze.length;e++)K(Ze[e],a);e=d;break;case "source":K("error",a);e=d;break;case "img":case "image":case "link":K("error",a);K("load",a);e=d;break;case "details":K("toggle",a);e=d;break;case "input":$a(a,d);e=Za(a,d);K("invalid",a);break;case "option":e=fb(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=n({},d,{value:void 0});K("invalid",a);break;case "textarea":jb(a,d);e=
+hb(a,d);K("invalid",a);break;default:e=d}xb(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?vb(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&qb(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&rb(a,k):"number"===typeof k&&rb(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(ca.hasOwnProperty(f)?null!=k&&"onScroll"===f&&K("scroll",a):null!=k&&ra(a,f,k,g))}switch(c){case "input":Wa(a);db(a,d,!1);
+break;case "textarea":Wa(a);lb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Ta(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?gb(a,!!d.multiple,f,!1):null!=d.defaultValue&&gb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=lf)}of(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Oi(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(E(166));
+c=hh(gh.current);hh(eh.current);vh(b)?(d=b.stateNode,c=b.memoizedProps,d[yf]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[yf]=b,b.stateNode=d)}return null;case 13:L(Q);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,0!==(b.mode&8)&&mi(b),b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&vh(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(Q.current&1))0===V&&(V=3);
+else{if(0===V||3===V)V=4;null===U||0===(Hg&134217727)&&0===(Ri&134217727)||Si(U,W)}if(d||c)b.flags|=4;return null;case 4:return jh(),Mi(b),null===a&&ef(b.stateNode.containerInfo),null;case 10:return vg(b),null;case 17:return If(b.type)&&Jf(),null;case 19:L(Q);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)Pi(d,!1);else{if(0!==V||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=mh(a);if(null!==g){b.flags|=64;Pi(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=
+f,b.flags|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,g=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,a=f.alternate,null===a?(f.childLanes=0,f.lanes=g,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null,f.selfBaseDuration=0,f.treeBaseDuration=0):(f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,
+f.updateQueue=a.updateQueue,f.type=a.type,g=a.dependencies,f.dependencies=null===g?null:{lanes:g.lanes,firstContext:g.firstContext},f.selfBaseDuration=a.selfBaseDuration,f.treeBaseDuration=a.treeBaseDuration),c=c.sibling;N(Q,Q.current&1|2);return b.child}a=a.sibling}null!==d.tail&&P()>Ti&&(b.flags|=64,f=!0,Pi(d,!1),b.lanes=33554432,xi(33554432))}else{if(!f)if(a=mh(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Pi(d,!0),null===d.tail&&"hidden"===d.tailMode&&
+!g.alternate&&!ph)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*P()-d.renderingStartTime>Ti&&1073741824!==c&&(b.flags|=64,f=!0,Pi(d,!1),b.lanes=33554432,xi(33554432));d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=P(),c.sibling=null,b=Q.current,N(Q,f?b&1|2:b&1),c):null;case 23:case 24:return Ui(),null!==a&&null!==
+a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(E(156,b.tag));}
+function Vi(a){switch(a.tag){case 1:If(a.type)&&Jf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,0!==(a.mode&8)&&mi(a),a):null;case 3:jh();L(Ff);L(O);yh();b=a.flags;if(0!==(b&64))throw Error(E(285));a.flags=b&-4097|64;return a;case 5:return lh(a),null;case 13:return L(Q),b=a.flags,b&4096?(a.flags=b&-4097|64,0!==(a.mode&8)&&mi(a),a):null;case 19:return L(Q),null;case 4:return jh(),null;case 10:return vg(a),null;case 23:case 24:return Ui(),null;default:return null}}
+function Wi(a,b){try{var c="",d=b;do c+=Ra(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e}}function Xi(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Yi="function"===typeof WeakMap?WeakMap:Map;function Zi(a,b,c){c=Dg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){$i||($i=!0,aj=d);Xi(a,b)};return c}
+function bj(a,b,c){c=Dg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Xi(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===cj?cj=new Set([this]):cj.add(this),Xi(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}var dj="function"===typeof WeakSet?WeakSet:Set;
+function ej(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){fj(a,c)}else b.current=null}function gj(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:pg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&sf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(E(163));}
+function hj(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(ij(c,a),jj(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:pg(c.type,b.memoizedProps),a.componentDidUpdate(d,
+b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Ig(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Ig(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&of(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:d=c.memoizedProps.onRender;e=ji;"function"===typeof d&&d(c.memoizedProps.id,null===b?"mount":"update",c.actualDuration,c.treeBaseDuration,
+c.actualStartTime,e,a.memoizedInteractions);return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Ec(c))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(E(163));}
+function kj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=ub("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===
+a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}
+function lj(a,b){if(Pf&&"function"===typeof Pf.onCommitFiberUnmount)try{Pf.onCommitFiberUnmount(Of,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))ij(b,c);else{d=b;try{e()}catch(f){fj(d,f)}}c=c.next}while(c!==a)}break;case 1:ej(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){fj(b,
+f)}break;case 5:ej(b);break;case 4:mj(a,b)}}function nj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function oj(a){return 5===a.tag||3===a.tag||4===a.tag}
+function pj(a){a:{for(var b=a.return;null!==b;){if(oj(b))break a;b=b.return}throw Error(E(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(E(161));}c.flags&16&&(rb(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||oj(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===
+c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?qj(a,c,b):rj(a,c,b)}
+function qj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=lf));else if(4!==d&&(a=a.child,null!==a))for(qj(a,b,c),a=a.sibling;null!==a;)qj(a,b,c),a=a.sibling}
+function rj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(rj(a,b,c),a=a.sibling;null!==a;)rj(a,b,c),a=a.sibling}
+function mj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(E(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(lj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,
+8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(lj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}
+function sj(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[zf]=d;"input"===a&&"radio"===d.type&&null!=d.name&&ab(c,d);yb(a,e);b=yb(a,d);for(e=0;e<f.length;e+=
+2){var g=f[e],h=f[e+1];"style"===g?vb(c,h):"dangerouslySetInnerHTML"===g?qb(c,h):"children"===g?rb(c,h):ra(c,g,h,b)}switch(a){case "input":bb(c,d);break;case "textarea":kb(c,d);break;case "select":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?gb(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?gb(c,!!d.multiple,d.defaultValue,!0):gb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(E(162));b.stateNode.nodeValue=
+b.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,Ec(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(tj=P(),kj(b.child,!0));uj(b);return;case 19:uj(b);return;case 17:return;case 23:case 24:kj(b,null!==b.memoizedState);return}throw Error(E(163));}
+function uj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new dj);b.forEach(function(b){var d=vj.bind(null,a,b);c.has(b)||(!0!==b.__reactDoNotTraceInteractions&&(d=x.unstable_wrap(d)),c.add(b),b.then(d,d))})}}function wj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}
+var xj=Math.ceil,yj=sa.ReactCurrentDispatcher,zj=sa.ReactCurrentOwner,X=0,U=null,Y=null,W=0,Aj=0,Bj=Df(0),V=0,Cj=null,Dj=0,Hg=0,Ri=0,Ej=0,Fj=null,tj=0,Ti=Infinity;function Gj(){Ti=P()+500}var Z=null,$i=!1,aj=null,cj=null,Hj=!1,Ij=null,Jj=90,Kj=0,Lj=[],Mj=[],Nj=null,Oj=0,Pj=null,Qj=null,Rj=-1,Sj=0,Tj=0,Uj=null,Vj=!1;function Lg(){return 0!==(X&48)?P():-1!==Rj?Rj:Rj=P()}
+function Mg(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===ig()?1:2;0===Sj&&(Sj=Dj);if(0!==og.transition){0!==Tj&&(Tj=null!==Fj?Fj.pendingLanes:0);a=Sj;var b=4186112&~Tj;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=ig();0!==(X&4)&&98===a?a=Zc(12,Sj):(a=Uc(a),a=Zc(a,Sj));return a}
+function Ng(a,b,c){if(50<Oj)throw Oj=0,Pj=null,Error(E(185));a=Wj(a,b);if(null===a)return null;bd(a,b,c);a===U&&(Ri|=b,4===V&&Si(a,W));var d=ig();1===b?0!==(X&8)&&0===(X&48)?(Xj(a,b),Yj(a)):(Zj(a,c),Xj(a,b),0===X&&(Gj(),mg())):(0===(X&4)||98!==d&&99!==d||(null===Nj?Nj=new Set([a]):Nj.add(a)),Zj(a,c),Xj(a,b));Fj=a}
+function Wj(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}
+function Zj(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Xc(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;Tc(k);var p=I;f[h]=10<=p?l+250:6<=p?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Wc(a,a===U?W:0);b=I;if(0===d)null!==c&&(c!==cg&&Tf(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==cg&&Tf(c)}15===b?(c=Yj.bind(null,a),null===eg?(eg=[c],fg=Sf(Yf,ng)):eg.push(c),
+c=cg):14===b?c=lg(99,Yj.bind(null,a)):(c=Vc(b),c=lg(c,ak.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}
+function ak(a){Rj=-1;Tj=Sj=0;if(0!==(X&48))throw Error(E(327));var b=a.callbackNode;if(bk()&&a.callbackNode!==b)return null;var c=Wc(a,a===U?W:0);if(0===c)return null;var d=c;var e=X;X|=16;var f=ck();if(U!==a||W!==d)Gj(),dk(a,d),ek(a,d);d=fk(a);do try{gk();break}catch(h){hk(a,h)}while(1);ug();x.__interactionsRef.current=d;yj.current=f;X=e;null!==Y?e=0:(U=null,W=0,e=V);if(0!==(Dj&Ri))dk(a,0);else if(0!==e){2===e&&(X|=64,a.hydrate&&(a.hydrate=!1,sf(a.containerInfo)),c=Yc(a),0!==c&&(e=ik(a,c)));if(1===
+e)throw b=Cj,dk(a,0),Si(a,c),Zj(a,P()),b;a.finishedWork=a.current.alternate;a.finishedLanes=c;switch(e){case 0:case 1:throw Error(E(345));case 2:jk(a);break;case 3:Si(a,c);if((c&62914560)===c&&(e=tj+500-P(),10<e)){if(0!==Wc(a,0))break;f=a.suspendedLanes;if((f&c)!==c){Lg();a.pingedLanes|=a.suspendedLanes&f;break}a.timeoutHandle=qf(jk.bind(null,a),e);break}jk(a);break;case 4:Si(a,c);if((c&4186112)===c)break;e=a.eventTimes;for(f=-1;0<c;){var g=31-Xc(c);d=1<<g;g=e[g];g>f&&(f=g);c&=~d}c=f;c=P()-c;c=(120>
+c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>c?4320:1960*xj(c/1960))-c;if(10<c){a.timeoutHandle=qf(jk.bind(null,a),c);break}jk(a);break;case 5:jk(a);break;default:throw Error(E(329));}}Zj(a,P());return a.callbackNode===b?ak.bind(null,a):null}function Si(a,b){b&=~Ej;b&=~Ri;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Xc(b),d=1<<c;a[c]=-1;b&=~d}}
+function Yj(a){if(0!==(X&48))throw Error(E(327));bk();if(a===U&&0!==(a.expiredLanes&W)){var b=W;var c=ik(a,b);0!==(Dj&Ri)&&(b=Wc(a,b),c=ik(a,b))}else b=Wc(a,0),c=ik(a,b);0!==a.tag&&2===c&&(X|=64,a.hydrate&&(a.hydrate=!1,sf(a.containerInfo)),b=Yc(a),0!==b&&(c=ik(a,b)));if(1===c)throw c=Cj,dk(a,0),Si(a,b),Zj(a,P()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;jk(a);Zj(a,P());return null}
+function kk(){if(null!==Nj){var a=Nj;Nj=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;Zj(a,P())})}mg()}function lk(a,b){var c=X;X|=1;try{return a(b)}finally{X=c,0===X&&(Gj(),mg())}}function mk(a,b){var c=X;X&=-2;X|=8;try{return a(b)}finally{X=c,0===X&&(Gj(),mg())}}function wi(a,b){N(Bj,Aj);Aj|=b;Dj|=b}function Ui(){Aj=Bj.current;L(Bj)}
+function dk(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,rf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Jf();break;case 3:jh();L(Ff);L(O);yh();break;case 5:lh(d);break;case 4:jh();break;case 13:L(Q);break;case 19:L(Q);break;case 10:vg(d);break;case 23:case 24:Ui()}c=c.return}U=a;Y=Xg(a.current,null);W=Aj=Dj=b;V=0;Cj=null;Ej=Ri=Hg=0;Qj=null}
+function hk(a,b){do{var c=Y;try{ug();zh.current=Kh;if(Ch){for(var d=R.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}Ch=!1}Bh=0;T=S=R=null;Dh=!1;zj.current=null;if(null===c||null===c.return){V=1;Cj=b;Y=null;break}c.mode&8&&li(c,!0);a:{var f=a,g=c.return,h=c,k=b;b=W;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k;if(0===(h.mode&2)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,
+h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var y=0!==(Q.current&1),q=g;do{var D;if(D=13===q.tag){var t=q.memoizedState;if(null!==t)D=null!==t.dehydrated?!0:!1;else{var z=q.memoizedProps;D=void 0===z.fallback?!1:!0!==z.unstable_avoidThisFallback?!0:y?!1:!0}}if(D){var B=q.updateQueue;if(null===B){var u=new Set;u.add(l);q.updateQueue=u}else B.add(l);if(0===(q.mode&2)){q.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var v=Dg(-1,1);v.tag=2;Eg(h,
+v)}h.lanes|=1;break a}k=void 0;h=b;var C=f.pingCache;null===C?(C=f.pingCache=new Yi,k=new Set,C.set(l,k)):(k=C.get(l),void 0===k&&(k=new Set,C.set(l,k)));if(!k.has(h)){k.add(h);var w=nk.bind(null,f,l,h);l.then(w,w)}q.flags|=4096;q.lanes=b;break a}q=q.return}while(null!==q);k=Error((Sa(h.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==
+V&&(V=2);k=Wi(k,h);q=g;do{switch(q.tag){case 3:f=k;q.flags|=4096;b&=-b;q.lanes|=b;var A=Zi(q,f,b);Fg(q,A);break a;case 1:f=k;var m=q.type,J=q.stateNode;if(0===(q.flags&64)&&("function"===typeof m.getDerivedStateFromError||null!==J&&"function"===typeof J.componentDidCatch&&(null===cj||!cj.has(J)))){q.flags|=4096;b&=-b;q.lanes|=b;var M=bj(q,f,b);Fg(q,M);break a}}q=q.return}while(null!==q)}ok(c)}catch(oa){b=oa;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}
+function ck(){var a=yj.current;yj.current=Kh;return null===a?Kh:a}function fk(a){var b=x.__interactionsRef.current;x.__interactionsRef.current=a.memoizedInteractions;return b}function ik(a,b){var c=X;X|=16;var d=ck();if(U!==a||W!==b)dk(a,b),ek(a,b);b=fk(a);do try{pk();break}catch(e){hk(a,e)}while(1);ug();x.__interactionsRef.current=b;X=c;yj.current=d;if(null!==Y)throw Error(E(261));U=null;W=0;return V}function pk(){for(;null!==Y;)qk(Y)}function gk(){for(;null!==Y&&!Uf();)qk(Y)}
+function qk(a){var b=a.alternate;0!==(a.mode&8)?(ki=ii(),0>a.actualStartTime&&(a.actualStartTime=ii()),b=rk(b,a,Aj),li(a,!0)):b=rk(b,a,Aj);a.memoizedProps=a.pendingProps;null===b?ok(a):Y=b;zj.current=null}
+function ok(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){if(0===(b.mode&8))c=Qi(c,b,Aj);else{var d=b;ki=ii();0>d.actualStartTime&&(d.actualStartTime=ii());c=Qi(c,b,Aj);li(b,!1)}if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(Aj&1073741824)||0===(c.mode&4)){d=0;if(0!==(c.mode&8)){for(var e=c.actualDuration,f=c.selfBaseDuration,g=null===c.alternate||c.child!==c.alternate.child,h=c.child;null!==h;)d|=h.lanes|h.childLanes,g&&(e+=h.actualDuration),
+f+=h.treeBaseDuration,h=h.sibling;13===c.tag&&null!==c.memoizedState&&(g=c.child,null!==g&&(f-=g.treeBaseDuration));c.actualDuration=e;c.treeBaseDuration=f}else for(e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==a.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=
+b,a.lastEffect=b))}else{c=Vi(b);if(null!==c){c.flags&=2047;Y=c;return}if(0!==(b.mode&8)){li(b,!1);c=b.actualDuration;for(d=b.child;null!==d;)c+=d.actualDuration,d=d.sibling;b.actualDuration=c}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===V&&(V=5)}function jk(a){var b=ig();kg(99,sk.bind(null,a,b));return null}
+function sk(a,b){do bk();while(null!==Ij);if(0!==(X&48))throw Error(E(327));var c=a.finishedWork,d=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(E(177));a.callbackNode=null;var e=c.lanes|c.childLanes,f=e,g=a.pendingLanes&~f;a.pendingLanes=f;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=f;a.mutableReadLanes&=f;a.entangledLanes&=f;f=a.entanglements;for(var h=a.eventTimes,k=a.expirationTimes;0<g;){var l=31-Xc(g),p=1<<l;f[l]=0;h[l]=-1;
+k[l]=-1;g&=~p}null!==Nj&&0===(e&24)&&Nj.has(a)&&Nj.delete(a);a===U&&(Y=U=null,W=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){f=X;X|=32;h=fk(a);zj.current=null;mf=hd;k=Pe();if(Qe(k)){if("selectionStart"in k)g={start:k.selectionStart,end:k.selectionEnd};else a:{g=(g=k.ownerDocument)&&g.defaultView||window;var y=g.getSelection&&g.getSelection();if(y&&0!==y.rangeCount){g=y.anchorNode;l=y.anchorOffset;p=y.focusNode;y=y.focusOffset;try{g.nodeType,
+p.nodeType}catch(ib){g=null;break a}var q=0,D=-1,t=-1,z=0,B=0,u=k,v=null;b:for(;;){for(var C;;){u!==g||0!==l&&3!==u.nodeType||(D=q+l);u!==p||0!==y&&3!==u.nodeType||(t=q+y);3===u.nodeType&&(q+=u.nodeValue.length);if(null===(C=u.firstChild))break;v=u;u=C}for(;;){if(u===k)break b;v===g&&++z===l&&(D=q);v===p&&++B===y&&(t=q);if(null!==(C=u.nextSibling))break;u=v;v=u.parentNode}u=C}g=-1===D||-1===t?null:{start:D,end:t}}else g=null}g=g||{start:0,end:0}}else g=null;nf={focusedElem:k,selectionRange:g};hd=
+!1;Uj=null;Vj=!1;Z=e;do try{tk()}catch(ib){if(null===Z)throw Error(E(330));fj(Z,ib);Z=Z.nextEffect}while(null!==Z);Uj=null;ji=ii();Z=e;do try{for(k=a;null!==Z;){var w=Z.flags;w&16&&rb(Z.stateNode,"");if(w&128){var A=Z.alternate;if(null!==A){var m=A.ref;null!==m&&("function"===typeof m?m(null):m.current=null)}}switch(w&1038){case 2:pj(Z);Z.flags&=-3;break;case 6:pj(Z);Z.flags&=-3;sj(Z.alternate,Z);break;case 1024:Z.flags&=-1025;break;case 1028:Z.flags&=-1025;sj(Z.alternate,Z);break;case 4:sj(Z.alternate,
+Z);break;case 8:g=Z;mj(k,g);var J=g.alternate;nj(g);null!==J&&nj(J)}Z=Z.nextEffect}}catch(ib){if(null===Z)throw Error(E(330));fj(Z,ib);Z=Z.nextEffect}while(null!==Z);m=nf;A=Pe();w=m.focusedElem;k=m.selectionRange;if(A!==w&&w&&w.ownerDocument&&Oe(w.ownerDocument.documentElement,w)){null!==k&&Qe(w)&&(A=k.start,m=k.end,void 0===m&&(m=A),"selectionStart"in w?(w.selectionStart=A,w.selectionEnd=Math.min(m,w.value.length)):(m=(A=w.ownerDocument||document)&&A.defaultView||window,m.getSelection&&(m=m.getSelection(),
+g=w.textContent.length,J=Math.min(k.start,g),k=void 0===k.end?J:Math.min(k.end,g),!m.extend&&J>k&&(g=k,k=J,J=g),g=Ne(w,J),l=Ne(w,k),g&&l&&(1!==m.rangeCount||m.anchorNode!==g.node||m.anchorOffset!==g.offset||m.focusNode!==l.node||m.focusOffset!==l.offset)&&(A=A.createRange(),A.setStart(g.node,g.offset),m.removeAllRanges(),J>k?(m.addRange(A),m.extend(l.node,l.offset)):(A.setEnd(l.node,l.offset),m.addRange(A))))));A=[];for(m=w;m=m.parentNode;)1===m.nodeType&&A.push({element:m,left:m.scrollLeft,top:m.scrollTop});
+"function"===typeof w.focus&&w.focus();for(w=0;w<A.length;w++)m=A[w],m.element.scrollLeft=m.left,m.element.scrollTop=m.top}hd=!!mf;nf=mf=null;a.current=c;Z=e;do try{for(w=a;null!==Z;){var M=Z.flags;M&36&&hj(w,Z.alternate,Z);if(M&128){A=void 0;var oa=Z.ref;if(null!==oa){var xa=Z.stateNode;switch(Z.tag){case 5:A=xa;break;default:A=xa}"function"===typeof oa?oa(A):oa.current=A}}Z=Z.nextEffect}}catch(ib){if(null===Z)throw Error(E(330));fj(Z,ib);Z=Z.nextEffect}while(null!==Z);Z=null;dg();x.__interactionsRef.current=
+h;X=f}else a.current=c,ji=ii();if(M=Hj)Hj=!1,Ij=a,Kj=d,Jj=b;else for(Z=e;null!==Z;)oa=Z.nextEffect,Z.nextEffect=null,Z.flags&8&&(xa=Z,xa.sibling=null,xa.stateNode=null),Z=oa;e=a.pendingLanes;if(0!==e){if(null!==Qj)for(oa=Qj,Qj=null,xa=0;xa<oa.length;xa++)uk(a,oa[xa],a.memoizedInteractions);Xj(a,e)}else cj=null;M||vk(a,d);1===e?a===Pj?Oj++:(Oj=0,Pj=a):Oj=0;c=c.stateNode;if(Pf&&"function"===typeof Pf.onCommitFiberRoot)try{Pf.onCommitFiberRoot(Of,c,b,64===(c.current.flags&64))}catch(ib){}Zj(a,P());if($i)throw $i=
+!1,a=aj,aj=null,a;if(0!==(X&8))return null;mg();return null}function tk(){for(;null!==Z;){var a=Z.alternate;Vj||null===Uj||(0!==(Z.flags&8)?fc(Z,Uj)&&(Vj=!0):13===Z.tag&&wj(a,Z)&&fc(Z,Uj)&&(Vj=!0));var b=Z.flags;0!==(b&256)&&gj(a,Z);0===(b&512)||Hj||(Hj=!0,lg(97,function(){bk();return null}));Z=Z.nextEffect}}function bk(){if(90!==Jj){var a=97<Jj?97:Jj;Jj=90;return kg(a,wk)}return!1}function jj(a,b){Lj.push(b,a);Hj||(Hj=!0,lg(97,function(){bk();return null}))}
+function ij(a,b){Mj.push(b,a);Hj||(Hj=!0,lg(97,function(){bk();return null}))}
+function wk(){if(null===Ij)return!1;var a=Ij,b=Kj;Ij=null;Kj=0;if(0!==(X&48))throw Error(E(331));var c=X;X|=32;var d=fk(a),e=Mj;Mj=[];for(var f=0;f<e.length;f+=2){var g=e[f],h=e[f+1],k=g.destroy;g.destroy=void 0;if("function"===typeof k)try{k()}catch(p){if(null===h)throw Error(E(330));fj(h,p)}}e=Lj;Lj=[];for(f=0;f<e.length;f+=2){g=e[f];h=e[f+1];try{var l=g.create;g.destroy=l()}catch(p){if(null===h)throw Error(E(330));fj(h,p)}}for(e=a.current.firstEffect;null!==e;)l=e.nextEffect,e.nextEffect=null,
+e.flags&8&&(e.sibling=null,e.stateNode=null),e=l;x.__interactionsRef.current=d;vk(a,b);X=c;mg();return!0}function xk(a,b,c){b=Wi(c,b);b=Zi(a,b,1);Eg(a,b);b=Lg();a=Wj(a,1);null!==a&&(bd(a,1,b),Zj(a,b),Xj(a,1))}
+function fj(a,b){if(3===a.tag)xk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){xk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===cj||!cj.has(d))){a=Wi(b,a);var e=bj(c,a,1);Eg(c,e);e=Lg();c=Wj(c,1);if(null!==c)bd(c,1,e),Zj(c,e),Xj(c,1);else if("function"===typeof d.componentDidCatch&&(null===cj||!cj.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}
+function nk(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Lg();a.pingedLanes|=a.suspendedLanes&c;U===a&&(W&c)===c&&(4===V||3===V&&(W&62914560)===W&&500>P()-tj?dk(a,0):Ej|=c);Zj(a,b);Xj(a,c)}function vj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===ig()?1:2:(0===Sj&&(Sj=Dj),b=$c(62914560&~Sj),0===b&&(b=4194304)));c=Lg();a=Wj(a,b);null!==a&&(bd(a,b,c),Zj(a,c),Xj(a,b))}var rk;
+rk=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||Ff.current)yg=!0;else if(0!==(c&d))yg=0!==(a.flags&16384)?!0:!1;else{yg=!1;switch(b.tag){case 3:Bi(b);wh();break;case 5:kh(b);break;case 1:If(b.type)&&Mf(b);break;case 4:ih(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;N(qg,e._currentValue);e._currentValue=d;break;case 12:0!==(c&b.childLanes)&&(b.flags|=4);d=b.stateNode;d.effectDuration=0;d.passiveEffectDuration=0;break;case 13:if(null!==
+b.memoizedState){if(0!==(c&b.child.childLanes))return Di(a,b,c);N(Q,Q.current&1);b=qi(a,b,c);return null!==b?b.sibling:null}N(Q,Q.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ki(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);N(Q,Q.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,vi(a,b,c)}return qi(a,b,c)}else yg=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=
+null,b.flags|=2);a=b.pendingProps;e=Hf(b,O.current);xg(b,c);e=Gh(null,b,d,a,e,c);b.flags|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(If(d)){var f=!0;Mf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;Bg(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Kg(b,d,g,a);e.updater=Og;b.stateNode=e;e._reactInternals=b;Sg(b,d,a,c);b=Ai(null,b,d,!0,f,c)}else b.tag=0,oi(null,b,e,
+c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=yk(e);a=pg(e,a);switch(f){case 0:b=ui(null,b,e,a,c);break a;case 1:b=zi(null,b,e,a,c);break a;case 11:b=pi(null,b,e,a,c);break a;case 14:b=ri(null,b,e,pg(e.type,a),d,c);break a}throw Error(E(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:pg(d,e),ui(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,
+e=b.elementType===d?e:pg(d,e),zi(a,b,d,e,c);case 3:Bi(b);d=b.updateQueue;if(null===a||null===d)throw Error(E(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;Cg(a,b);Gg(b,d,null,c);d=b.memoizedState.element;if(d===e)wh(),b=qi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)oh=tf(b.stateNode.containerInfo.firstChild),nh=b,f=ph=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],xh.push(f);c=ch(b,null,d,c);for(b.child=
+c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else oi(a,b,d,c),wh();b=b.child}return b;case 5:return kh(b),null===a&&th(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,pf(d,e)?g=null:null!==f&&pf(d,f)&&(b.flags|=16),yi(a,b),oi(a,b,g,c),b.child;case 6:return null===a&&th(b),null;case 13:return Di(a,b,c);case 4:return ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=bh(b,null,d,c):oi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?
+e:pg(d,e),pi(a,b,d,e,c);case 7:return oi(a,b,b.pendingProps,c),b.child;case 8:return oi(a,b,b.pendingProps.children,c),b.child;case 12:return b.flags|=4,d=b.stateNode,d.effectDuration=0,d.passiveEffectDuration=0,oi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;N(qg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=Je(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):
+1073741823)|0,0===f){if(g.children===e.children&&!Ff.current){b=qi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Dg(-1,c&-c),l.tag=2,Eg(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);wg(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=
+null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}oi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,xg(b,c),e=zg(e,f.unstable_observedBits),d=d(e),b.flags|=1,oi(a,b,d,c),b.child;case 14:return e=b.type,f=pg(e,b.pendingProps),f=pg(e.type,f),ri(a,b,e,f,d,c);case 15:return ti(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:pg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=
+2),b.tag=1,If(d)?(a=!0,Mf(b)):a=!1,xg(b,c),Qg(b,d,e),Sg(b,d,e,c),Ai(null,b,d,!0,a,c);case 19:return Ki(a,b,c);case 23:return vi(a,b,c);case 24:return vi(a,b,c)}throw Error(E(156,b.tag));};function xi(a){null===Qj?Qj=[a]:Qj.push(a)}
+function uk(a,b,c){if(0<c.size){var d=a.pendingInteractionMap,e=d.get(b);null!=e?c.forEach(function(a){e.has(a)||a.__count++;e.add(a)}):(d.set(b,new Set(c)),c.forEach(function(a){a.__count++}));d=x.__subscriberRef.current;if(null!==d)d.onWorkScheduled(c,1E3*b+a.interactionThreadID)}}function Xj(a,b){uk(a,b,x.__interactionsRef.current)}
+function ek(a,b){var c=new Set;a.pendingInteractionMap.forEach(function(a,d){0!==(b&d)&&a.forEach(function(a){return c.add(a)})});a.memoizedInteractions=c;if(0<c.size){var d=x.__subscriberRef.current;if(null!==d){a=1E3*b+a.interactionThreadID;try{d.onWorkStarted(c,a)}catch(e){lg(99,function(){throw e;})}}}}
+function vk(a,b){var c=a.pendingLanes;try{var d=x.__subscriberRef.current;if(null!==d&&0<a.memoizedInteractions.size)d.onWorkStopped(a.memoizedInteractions,1E3*b+a.interactionThreadID)}catch(f){lg(99,function(){throw f;})}finally{var e=a.pendingInteractionMap;e.forEach(function(a,b){0===(c&b)&&(e.delete(b),a.forEach(function(a){a.__count--;if(null!==d&&0===a.__count)try{d.onInteractionScheduledWorkCompleted(a)}catch(k){lg(99,function(){throw k;})}}))})}}
+function zk(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null;this.actualDuration=0;this.actualStartTime=-1;this.treeBaseDuration=this.selfBaseDuration=0}
+function rh(a,b,c,d){return new zk(a,b,c,d)}function si(a){a=a.prototype;return!(!a||!a.isReactComponent)}function yk(a){if("function"===typeof a)return si(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Ba)return 11;if(a===Ea)return 14}return 2}
+function Xg(a,b){var c=a.alternate;null===c?(c=rh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null,c.actualDuration=0,c.actualStartTime=-1);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:
+{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;c.selfBaseDuration=a.selfBaseDuration;c.treeBaseDuration=a.treeBaseDuration;return c}
+function Zg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)si(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case va:return ah(c.children,e,f,b);case Ia:g=8;e|=16;break;case wa:g=8;e|=1;break;case ya:return a=rh(12,c,b,e|8),a.elementType=ya,a.type=ya,a.lanes=f,a.stateNode={effectDuration:0,passiveEffectDuration:0},a;case Ca:return a=rh(13,c,b,e),a.type=Ca,a.elementType=Ca,a.lanes=f,a;case Da:return a=rh(19,c,b,e),a.elementType=Da,a.lanes=f,a;case Ja:return Fi(c,e,f,b);case Ka:return a=
+rh(24,c,b,e),a.elementType=Ka,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case za:g=10;break a;case Aa:g=9;break a;case Ba:g=11;break a;case Ea:g=14;break a;case Fa:g=16;d=null;break a;case Ga:g=22;break a}throw Error(E(130,null==a?a:typeof a,""));}b=rh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function ah(a,b,c,d){a=rh(7,a,d,b);a.lanes=c;return a}function Fi(a,b,c,d){a=rh(23,a,d,b);a.elementType=Ja;a.lanes=c;return a}
+function Yg(a,b,c){a=rh(6,a,null,b);a.lanes=c;return a}function $g(a,b,c){b=rh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
+function Ak(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=ad(0);this.expirationTimes=ad(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=ad(0);this.mutableSourceEagerHydrationData=null;this.interactionThreadID=
+x.unstable_getThreadID();this.memoizedInteractions=new Set;this.pendingInteractionMap=new Map}function Bk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ua,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
+function Ck(a,b,c,d){var e=b.current,f=Lg(),g=Mg(e);a:if(c){c=c._reactInternals;b:{if(ac(c)!==c||1!==c.tag)throw Error(E(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(If(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(E(171));}if(1===c.tag){var k=c.type;if(If(k)){c=Lf(c,k,h);break a}}c=h}else c=Ef;null===b.context?b.context=c:b.pendingContext=c;b=Dg(f,g);b.payload={element:a};d=void 0===d?null:d;null!==
+d&&(b.callback=d);Eg(e,b);Ng(e,g,f);return g}function Dk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Ek(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function Fk(a,b){Ek(a,b);(a=a.alternate)&&Ek(a,b)}function Gk(){return null}
+function Hk(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new Ak(a,b,null!=c&&!0===c.hydrate);b=2===b?7:1===b?3:0;Qf&&(b|=8);b=rh(3,null,null,b);c.current=b;b.stateNode=c;Bg(b);a[hf]=c.current;ef(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}
+Hk.prototype.render=function(a){Ck(a,this._internalRoot,null,null)};Hk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;Ck(null,a,null,function(){b[hf]=null})};function Ik(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}
+function Jk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new Hk(a,0,b?{hydrate:!0}:void 0)}
+function Kk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=Dk(g);h.call(a)}}Ck(b,g,a,e)}else{f=c._reactRootContainer=Jk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=Dk(g);k.call(a)}}mk(function(){Ck(b,g,a,e)})}return Dk(g)}gc=function(a){if(13===a.tag){var b=Lg();Ng(a,4,b);Fk(a,4)}};hc=function(a){if(13===a.tag){var b=Lg();Ng(a,67108864,b);Fk(a,67108864)}};
+ic=function(a){if(13===a.tag){var b=Lg(),c=Mg(a);Ng(a,c,b);Fk(a,c)}};jc=function(a,b){return b()};
+Ab=function(a,b,c){switch(b){case "input":bb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Fb(d);if(!e)throw Error(E(90));Xa(d);bb(d,e)}}}break;case "textarea":kb(a,c);break;case "select":b=c.value,null!=b&&gb(a,!!c.multiple,b,!1)}};Ib=lk;
+Jb=function(a,b,c,d,e){var f=X;X|=4;try{return kg(98,a.bind(null,b,c,d,e))}finally{X=f,0===X&&(Gj(),mg())}};Kb=function(){0===(X&49)&&(kk(),bk())};Lb=function(a,b){var c=X;X|=2;try{return a(b)}finally{X=c,0===X&&(Gj(),mg())}};function Lk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ik(b))throw Error(E(200));return Bk(a,b,null,c)}var Mk={Events:[Eb,we,Fb,Gb,Hb,bk,{current:!1}]},Nk={findFiberByHostInstance:yc,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"};
+var Ok={bundleType:Nk.bundleType,version:Nk.version,rendererPackageName:Nk.rendererPackageName,rendererConfig:Nk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=ec(a);return null===a?null:a.stateNode},findFiberByHostInstance:Nk.findFiberByHostInstance||
+Gk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Pk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pk.isDisabled&&Pk.supportsFiber)try{Of=Pk.inject(Ok),Pf=Pk}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mk;exports.createPortal=Lk;
+exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(E(188));throw Error(E(268,Object.keys(a)));}a=ec(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a,b){var c=X;if(0!==(c&48))return a(b);X|=1;try{if(a)return kg(99,a.bind(null,b))}finally{X=c,mg()}};exports.hydrate=function(a,b,c){if(!Ik(b))throw Error(E(200));return Kk(null,a,b,!0,c)};
+exports.render=function(a,b,c){if(!Ik(b))throw Error(E(200));return Kk(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!Ik(a))throw Error(E(40));return a._reactRootContainer?(mk(function(){Kk(null,null,a,!1,function(){a._reactRootContainer=null;a[hf]=null})}),!0):!1};exports.unstable_batchedUpdates=lk;exports.unstable_createPortal=function(a,b){return Lk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
+exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Ik(c))throw Error(E(200));if(null==a||void 0===a._reactInternals)throw Error(E(38));return Kk(a,b,c,!1,d)};exports.version="17.0.2";
diff --git a/node_modules/react-dom/package.json b/node_modules/react-dom/package.json
index b2fb01f..c23d7cd 100644
--- a/node_modules/react-dom/package.json
+++ b/node_modules/react-dom/package.json
@@ -1,25 +1,29 @@
{
- "browser": {
- "./server.js": "./server.browser.js",
- "./unstable-fizz.js": "./unstable-fizz.browser.js"
- },
- "browserify": {
- "transform": [
- "loose-envify"
- ]
+ "name": "react-dom",
+ "version": "17.0.2",
+ "description": "React package for working with the DOM.",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/facebook/react.git",
+ "directory": "packages/react-dom"
},
+ "keywords": [
+ "react"
+ ],
+ "license": "MIT",
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
- "bundleDependencies": false,
+ "homepage": "https://reactjs.org/",
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
- "prop-types": "^15.6.2",
- "scheduler": "^0.19.1"
+ "scheduler": "^0.20.2"
+ },
+ "peerDependencies": {
+ "react": "17.0.2"
},
- "deprecated": false,
- "description": "React package for working with the DOM.",
"files": [
"LICENSE",
"README.md",
@@ -30,31 +34,16 @@
"server.browser.js",
"server.node.js",
"test-utils.js",
- "unstable-fire.js",
- "unstable-fizz.js",
- "unstable-fizz.browser.js",
- "unstable-fizz.node.js",
- "unstable-native-dependencies.js",
"cjs/",
"umd/"
],
- "homepage": "https://reactjs.org/",
- "keywords": [
- "react"
- ],
- "license": "MIT",
- "main": "index.js",
- "name": "react-dom",
- "peerDependencies": {
- "react": "^16.14.0"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/facebook/react.git",
- "directory": "packages/react-dom"
- },
- "scripts": {
- "start": "node server.js"
+ "browser": {
+ "./server.js": "./server.browser.js",
+ "./unstable-fizz.js": "./unstable-fizz.browser.js"
},
- "version": "16.14.0"
+ "browserify": {
+ "transform": [
+ "loose-envify"
+ ]
+ }
}
diff --git a/node_modules/react-dom/umd/react-dom-server.browser.development.js b/node_modules/react-dom/umd/react-dom-server.browser.development.js
index 3c10dd6..4dd5d34 100644
--- a/node_modules/react-dom/umd/react-dom-server.browser.development.js
+++ b/node_modules/react-dom/umd/react-dom-server.browser.development.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-server.browser.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,14 +6,11 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-
-'use strict';
-
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react')) :
- typeof define === 'function' && define.amd ? define(['react'], factory) :
- (global = global || self, global.ReactDOMServer = factory(global.React));
-}(this, (function (React) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
+ typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
+ (global = global || self, factory(global.ReactDOMServer = {}, global.React));
+}(this, (function (exports, React) { 'use strict';
// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be replaced with error codes
@@ -28,23 +25,10 @@
return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
}
- var ReactVersion = '16.14.0';
-
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
- // Current owner and dispatcher used to share the same ref,
- // but PR #14548 split them out to better support the react-debug-tools package.
-
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
- }
+ // TODO: this is special because it gets imported during build.
+ var ReactVersion = '17.0.2';
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
- }
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
// by calls to these methods by a Babel plugin.
//
@@ -74,16 +58,12 @@
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
}
var argsWithFormat = args.map(function (item) {
@@ -95,75 +75,60 @@
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
}
}
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var _assign = ReactInternals.assign;
+ // ATTENTION
+ // When adding new symbols to this file,
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
-
- var Uninitialized = -1;
- var Pending = 0;
- var Resolved = 1;
- var Rejected = 2;
- function refineResolvedLazyComponent(lazyComponent) {
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
- }
- function initializeLazyComponentType(lazyComponent) {
- if (lazyComponent._status === Uninitialized) {
- lazyComponent._status = Pending;
- var ctor = lazyComponent._ctor;
- var thenable = ctor();
- lazyComponent._result = thenable;
- thenable.then(function (moduleObject) {
- if (lazyComponent._status === Pending) {
- var defaultExport = moduleObject.default;
-
- {
- if (defaultExport === undefined) {
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
- }
- }
-
- lazyComponent._status = Resolved;
- lazyComponent._result = defaultExport;
- }
- }, function (error) {
- if (lazyComponent._status === Pending) {
- lazyComponent._status = Rejected;
- lazyComponent._result = error;
- }
- });
- }
+ var REACT_ELEMENT_TYPE = 0xeac7;
+ var REACT_PORTAL_TYPE = 0xeaca;
+ var REACT_FRAGMENT_TYPE = 0xeacb;
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
+ var REACT_PROFILER_TYPE = 0xead2;
+ var REACT_PROVIDER_TYPE = 0xeacd;
+ var REACT_CONTEXT_TYPE = 0xeace;
+ var REACT_FORWARD_REF_TYPE = 0xead0;
+ var REACT_SUSPENSE_TYPE = 0xead1;
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
+ var REACT_MEMO_TYPE = 0xead3;
+ var REACT_LAZY_TYPE = 0xead4;
+ var REACT_BLOCK_TYPE = 0xead9;
+ var REACT_SERVER_BLOCK_TYPE = 0xeada;
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
+ var REACT_SCOPE_TYPE = 0xead7;
+ var REACT_OPAQUE_ID_TYPE = 0xeae0;
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
+ var REACT_OFFSCREEN_TYPE = 0xeae2;
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
+
+ if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor = Symbol.for;
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
+ REACT_MEMO_TYPE = symbolFor('react.memo');
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
+ REACT_BLOCK_TYPE = symbolFor('react.block');
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
}
function getWrappedName(outerType, innerType, wrapperName) {
@@ -171,6 +136,10 @@
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
}
+ function getContextName(type) {
+ return type.displayName || 'Context';
+ }
+
function getComponentName(type) {
if (type == null) {
// Host root, text node or just invalid type.
@@ -199,7 +168,7 @@
return 'Portal';
case REACT_PROFILER_TYPE:
- return "Profiler";
+ return 'Profiler';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
@@ -214,10 +183,12 @@
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
- return 'Context.Consumer';
+ var context = type;
+ return getContextName(context) + '.Consumer';
case REACT_PROVIDER_TYPE:
- return 'Context.Provider';
+ var provider = type;
+ return getContextName(provider._context) + '.Provider';
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, 'ForwardRef');
@@ -226,18 +197,19 @@
return getComponentName(type.type);
case REACT_BLOCK_TYPE:
- return getComponentName(type.render);
+ return getComponentName(type._render);
case REACT_LAZY_TYPE:
{
- var thenable = type;
- var resolvedThenable = refineResolvedLazyComponent(thenable);
-
- if (resolvedThenable) {
- return getComponentName(resolvedThenable);
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ return getComponentName(init(payload));
+ } catch (x) {
+ return null;
}
-
- break;
}
}
}
@@ -245,153 +217,412 @@
return null;
}
- var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
- function describeComponentFrame (name, source, ownerName) {
- var sourceInfo = '';
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
- if (source) {
- var path = source.fileName;
- var fileName = path.replace(BEFORE_SLASH_RE, '');
+ var enableSuspenseServerRenderer = false;
- {
- // In DEV, include code for a common special case:
- // prefer "folder/index.js" instead of just "index.js".
- if (/^index\./.test(fileName)) {
- var match = path.match(BEFORE_SLASH_RE);
+ // Helpers to patch console.logs to avoid logging during side-effect free
+ // replaying on render function. This currently only patches the object
+ // lazily which won't cover if the log function was extracted eagerly.
+ // We could also eagerly patch the method.
+ var disabledDepth = 0;
+ var prevLog;
+ var prevInfo;
+ var prevWarn;
+ var prevError;
+ var prevGroup;
+ var prevGroupCollapsed;
+ var prevGroupEnd;
+
+ function disabledLog() {}
+
+ disabledLog.__reactDisabledLog = true;
+ function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
+
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ disabledDepth++;
+ }
+ }
+ function reenableLogs() {
+ {
+ disabledDepth--;
+
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ log: _assign({}, props, {
+ value: prevLog
+ }),
+ info: _assign({}, props, {
+ value: prevInfo
+ }),
+ warn: _assign({}, props, {
+ value: prevWarn
+ }),
+ error: _assign({}, props, {
+ value: prevError
+ }),
+ group: _assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: _assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: _assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ if (disabledDepth < 0) {
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
+ }
+ }
+ }
+
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
+ var prefix;
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === undefined) {
+ // Extract the VM specific prefix used by each line.
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || '';
+ }
+ } // We use the prefix to ensure our stacks line up with native stack frames.
+
+
+ return '\n' + prefix + name;
+ }
+ }
+ var reentry = false;
+ var componentFrameCache;
+
+ {
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+ }
+
+ function describeNativeComponentFrame(fn, construct) {
+ // If something asked for a stack inside a fake render, it should get ignored.
+ if (!fn || reentry) {
+ return '';
+ }
+
+ {
+ var frame = componentFrameCache.get(fn);
+
+ if (frame !== undefined) {
+ return frame;
+ }
+ }
+
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
+
+ Error.prepareStackTrace = undefined;
+ var previousDispatcher;
+
+ {
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
+ // for warnings.
+
+ ReactCurrentDispatcher.current = null;
+ disableLogs();
+ }
+
+ try {
+ // This should throw.
+ if (construct) {
+ // Something should be setting the props in the constructor.
+ var Fake = function () {
+ throw Error();
+ }; // $FlowFixMe
+
+
+ Object.defineProperty(Fake.prototype, 'props', {
+ set: function () {
+ // We use a throwing setter instead of frozen or non-writable props
+ // because that won't throw in a non-strict mode function.
+ throw Error();
+ }
+ });
+
+ if (typeof Reflect === 'object' && Reflect.construct) {
+ // We construct a different control for this case to include any extra
+ // frames added by the construct call.
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
+ }
+
+ fn.call(Fake.prototype);
+ }
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+
+ fn();
+ }
+ } catch (sample) {
+ // This is inlined manually because closure doesn't do it for us.
+ if (sample && control && typeof sample.stack === 'string') {
+ // This extracts the first frame from the sample that isn't also in the control.
+ // Skipping one frame that we assume is the frame that calls the two.
+ var sampleLines = sample.stack.split('\n');
+ var controlLines = control.stack.split('\n');
+ var s = sampleLines.length - 1;
+ var c = controlLines.length - 1;
+
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
+ // We expect at least one stack frame to be shared.
+ // Typically this will be the root most one. However, stack frames may be
+ // cut off due to maximum stack limits. In this case, one maybe cut off
+ // earlier than the other. We assume that the sample is longer or the same
+ // and there for cut off earlier. So we should find the root most frame in
+ // the sample somewhere in the control.
+ c--;
+ }
- if (match) {
- var pathBeforeSlash = match[1];
+ for (; s >= 1 && c >= 0; s--, c--) {
+ // Next we find the first one that isn't the same which should be the
+ // frame that called our sample function and the control.
+ if (sampleLines[s] !== controlLines[c]) {
+ // In V8, the first line is describing the message but other VMs don't.
+ // If we're about to return the first line, and the control is also on the same
+ // line, that's a pretty good indicator that our sample threw at same line as
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
+ // This can happen if you passed a class to function component, or non-function.
+ if (s !== 1 || c !== 1) {
+ do {
+ s--;
+ c--; // We may still have similar intermediate frames from the construct call.
+ // The next one that isn't the same should be our match though.
+
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
- if (pathBeforeSlash) {
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
- fileName = folderName + '/' + fileName;
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, _frame);
+ }
+ } // Return the line we found.
+
+
+ return _frame;
+ }
+ } while (s >= 1 && c >= 0);
}
+
+ break;
}
}
}
+ } finally {
+ reentry = false;
+
+ {
+ ReactCurrentDispatcher.current = previousDispatcher;
+ reenableLogs();
+ }
+
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ } // Fallback to just using the name if we couldn't make it throw.
+
+
+ var name = fn ? fn.displayName || fn.name : '';
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
- } else if (ownerName) {
- sourceInfo = ' (created by ' + ownerName + ')';
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
}
- return '\n in ' + (name || 'Unknown') + sourceInfo;
+ return syntheticFrame;
+ }
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
}
- var enableSuspenseServerRenderer = false;
+ function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+ }
- var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
+ if (type == null) {
+ return '';
+ }
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
+ if (typeof type === 'function') {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
- var ReactPropTypesSecret_1 = ReactPropTypesSecret;
+ if (typeof type === 'string') {
+ return describeBuiltInComponentFrame(type);
+ }
- var printWarning$1 = function() {};
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame('Suspense');
- {
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
- var loggedTypeFailures = {};
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- printWarning$1 = function(text) {
- var message = 'Warning: ' + text;
- if (typeof console !== 'undefined') {
- console.error(message);
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame('SuspenseList');
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+
+ case REACT_MEMO_TYPE:
+ // Memo may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+
+ case REACT_BLOCK_TYPE:
+ return describeFunctionComponentFrame(type._render);
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ // Lazy may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {}
+ }
}
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
+ }
+
+ return '';
}
- /**
- * Assert that the values match with the type specs.
- * Error messages are memorized and will only be shown once.
- *
- * @param {object} typeSpecs Map of name to a ReactPropType
- * @param {object} values Runtime values that need to be type-checked
- * @param {string} location e.g. "prop", "context", "child context"
- * @param {string} componentName Name of the component for error messages.
- * @param {?Function} getStack Returns the component stack.
- * @private
- */
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
+ var loggedTypeFailures = {};
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+
+ function setCurrentlyValidatingElement(element) {
{
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ ReactDebugCurrentFrame.setExtraStackFrame(stack);
+ } else {
+ ReactDebugCurrentFrame.setExtraStackFrame(null);
+ }
+ }
+ }
+
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
+ {
+ // $FlowFixMe This is okay but Flow doesn't know it.
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
+
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
- var error;
- // Prop type validation may throw. In case they do, we don't want to
+ 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') {
- 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] + '`.'
- );
+ 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 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
+
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
} catch (ex) {
- error = ex;
+ error$1 = ex;
}
- if (error && !(error instanceof Error)) {
- printWarning$1(
- (componentName || 'React class') + ': type specification of ' +
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
- 'You may have forgotten to pass an argument to the type checker ' +
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
- 'shape all require an argument).'
- );
+
+ if (error$1 && !(error$1 instanceof Error)) {
+ setCurrentlyValidatingElement(element);
+
+ error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
+
+ setCurrentlyValidatingElement(null);
}
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
+
+ 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.message] = true;
+ loggedTypeFailures[error$1.message] = true;
+ setCurrentlyValidatingElement(element);
- var stack = getStack ? getStack() : '';
+ error('Failed %s type: %s', location, error$1.message);
- printWarning$1(
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
- );
+ setCurrentlyValidatingElement(null);
}
}
}
}
}
- /**
- * Resets warning cache when testing.
- *
- * @private
- */
- checkPropTypes.resetWarningCache = function() {
- {
- loggedTypeFailures = {};
- }
- };
-
- var checkPropTypes_1 = checkPropTypes;
-
- var ReactDebugCurrentFrame;
var didWarnAboutInvalidateContextType;
{
- ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
didWarnAboutInvalidateContextType = new Set();
}
@@ -419,7 +650,7 @@
function checkContextTypes(typeSpecs, values, location) {
{
- checkPropTypes_1(typeSpecs, values, location, 'Component', ReactDebugCurrentFrame.getCurrentStack);
+ checkPropTypes(typeSpecs, values, location, 'Component');
}
}
@@ -548,7 +779,7 @@
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
- // Attributes that aren't in the whitelist are presumed to have this type.
+ // Attributes that aren't in the filter are presumed to have this type.
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
@@ -663,6 +894,7 @@
}
if (propertyInfo !== null) {
+
switch (propertyInfo.type) {
case BOOLEAN:
return !value;
@@ -684,7 +916,7 @@
return properties.hasOwnProperty(name) ? properties[name] : null;
}
- function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
this.attributeName = attributeName;
this.attributeNamespace = attributeNamespace;
@@ -692,6 +924,7 @@
this.propertyName = name;
this.type = type;
this.sanitizeURL = sanitizeURL;
+ this.removeEmptyString = removeEmptyString;
} // When adding attributes to this list, be sure to also add them to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.
@@ -703,11 +936,11 @@
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
-
reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // A few React string attributes have a different name.
// This is a mapping from React prop names to the attribute names.
@@ -718,6 +951,7 @@
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" HTML attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -727,6 +961,7 @@
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" SVG attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -737,16 +972,18 @@
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML boolean attributes.
['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
- 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
'itemScope'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are the few React props that we set as DOM properties
// rather than attributes. These are all booleans.
@@ -760,6 +997,7 @@
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.
@@ -771,6 +1009,7 @@
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be positive numbers.
@@ -781,6 +1020,7 @@
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be numbers.
@@ -788,6 +1028,7 @@
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
});
var CAMELIZE = /[\-\:]([a-z])/g;
@@ -796,7 +1037,7 @@
return token[1].toUpperCase();
}; // This is a list of all SVG attributes that need special casing, namespacing,
// or boolean value assignment. Regular attributes that just accept strings
- // and have the same names are omitted, just like in the HTML whitelist.
+ // and have the same names are omitted, just like in the HTML attribute filter.
// Some of these attributes can be hard to find. This list was created by
// scraping the MDN documentation.
@@ -808,6 +1049,7 @@
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // String SVG attributes with the xlink namespace.
@@ -817,7 +1059,8 @@
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false);
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
+ false);
}); // String SVG attributes with the xml namespace.
['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
@@ -826,7 +1069,8 @@
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false);
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
+ false);
}); // These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.
@@ -835,25 +1079,23 @@
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These attributes accept URLs. These must not allow javascript: URLS.
// These will also need to accept Trusted Types object in the future.
var xlinkHref = 'xlinkHref';
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
- 'xlink:href', 'http://www.w3.org/1999/xlink', true);
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
+ false);
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ true, // sanitizeURL
true);
});
- var ReactDebugCurrentFrame$1 = null;
-
- {
- ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
- } // A javascript: URL can contain leading C0 control or \u0020 SPACE,
// and any newline or tab are filtered out as if they're not part of the URL.
// https://url.spec.whatwg.org/#url-parsing
// Tab or newline are defined as \r\n\t:
@@ -864,7 +1106,6 @@
/* eslint-disable max-len */
-
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
var didWarn = false;
@@ -1067,13 +1308,13 @@
function resolveCurrentlyRenderingComponent() {
if (!(currentlyRenderingComponent !== null)) {
{
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
+ throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
}
}
{
if (isInHookUserCodeInDev) {
- error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
}
}
@@ -1178,28 +1419,25 @@
children = Component(props, refOrContext);
}
+ resetHooksState();
+ return children;
+ } // Reset the internal hooks state if an error occurs while rendering a component
+
+ function resetHooksState() {
+ {
+ isInHookUserCodeInDev = false;
+ }
+
currentlyRenderingComponent = null;
+ didScheduleRenderPhaseUpdate = false;
firstWorkInProgressHook = null;
numberOfReRenders = 0;
renderPhaseUpdates = null;
workInProgressHook = null;
-
- {
- isInHookUserCodeInDev = false;
- } // These were reset above
- // currentlyRenderingComponent = null;
- // didScheduleRenderPhaseUpdate = false;
- // firstWorkInProgressHook = null;
- // numberOfReRenders = 0;
- // renderPhaseUpdates = null;
- // workInProgressHook = null;
-
-
- return children;
}
function readContext(context, observedBits) {
- var threadID = currentThreadID;
+ var threadID = currentPartialRenderer.threadID;
validateContextBounds(context, threadID);
{
@@ -1217,7 +1455,7 @@
}
resolveCurrentlyRenderingComponent();
- var threadID = currentThreadID;
+ var threadID = currentPartialRenderer.threadID;
validateContextBounds(context, threadID);
return context[threadID];
}
@@ -1374,7 +1612,7 @@
{
currentHookNameInDev = 'useLayoutEffect';
- error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://fb.me/react-uselayouteffect-ssr for common fixes.');
+ error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');
}
}
@@ -1417,23 +1655,24 @@
}
function useCallback(callback, deps) {
- // Callbacks are passed as they are in the server environment.
- return callback;
- }
-
- function useResponder(responder, props) {
- return {
- props: props,
- responder: responder
- };
+ return useMemo(function () {
+ return callback;
+ }, deps);
+ } // TODO Decide on how to implement this hook for server rendering.
+ // If a mutation occurs during render, consider triggering a Suspense boundary
+ // and falling back to client rendering.
+
+ function useMutableSource(source, getSnapshot, subscribe) {
+ resolveCurrentlyRenderingComponent();
+ return getSnapshot(source._source);
}
- function useDeferredValue(value, config) {
+ function useDeferredValue(value) {
resolveCurrentlyRenderingComponent();
return value;
}
- function useTransition(config) {
+ function useTransition() {
resolveCurrentlyRenderingComponent();
var startTransition = function (callback) {
@@ -1443,11 +1682,15 @@
return [startTransition, false];
}
+ function useOpaqueIdentifier() {
+ return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
+ }
+
function noop() {}
- var currentThreadID = 0;
- function setCurrentThreadID(threadID) {
- currentThreadID = threadID;
+ var currentPartialRenderer = null;
+ function setCurrentPartialRenderer(renderer) {
+ currentPartialRenderer = renderer;
}
var Dispatcher = {
readContext: readContext,
@@ -1464,9 +1707,11 @@
useEffect: noop,
// Debugging effect
useDebugValue: noop,
- useResponder: useResponder,
useDeferredValue: useDeferredValue,
- useTransition: useTransition
+ useTransition: useTransition,
+ useOpaqueIdentifier: useOpaqueIdentifier,
+ // Subscriptions are not setup in a server environment.
+ useMutableSource: useMutableSource
};
var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
@@ -1505,49 +1750,28 @@
return parentNamespace;
}
- var ReactDebugCurrentFrame$2 = null;
- var ReactControlledValuePropTypes = {
- checkPropTypes: null
+ var hasReadOnlyValue = {
+ button: true,
+ checkbox: true,
+ image: true,
+ hidden: true,
+ radio: true,
+ reset: true,
+ submit: true
};
-
- {
- ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
- var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
- };
- var propTypes = {
- value: function (props, propName, componentName) {
- if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
- },
- checked: function (props, propName, componentName) {
- if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+ function checkControlledValueProps(tagName, props) {
+ {
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
+ error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
}
- };
- /**
- * Provide a linked `value` attribute for controlled forms. You should not use
- * this outside of the ReactDOM controlled form components.
- */
- ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
- checkPropTypes_1(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
- };
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
+ error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+ }
+ }
}
- // For HTML, certain tags should omit their close tag. We keep a whitelist for
+ // For HTML, certain tags should omit their close tag. We keep a list for
// those special-case tags.
var omittedCloseTags = {
area: true,
@@ -1575,11 +1799,6 @@
}, omittedCloseTags);
var HTML = '__html';
- var ReactDebugCurrentFrame$3 = null;
-
- {
- ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
- }
function assertValidProps(tag, props) {
if (!props) {
@@ -1590,7 +1809,7 @@
if (voidElementTags[tag]) {
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
{
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
}
}
}
@@ -1604,7 +1823,7 @@
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
{
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
}
}
}
@@ -1617,7 +1836,7 @@
if (!(props.style == null || typeof props.style === 'object')) {
{
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
}
}
}
@@ -1755,7 +1974,7 @@
switch (tagName) {
// These are reserved SVG and MathML elements.
- // We don't mind this whitelist too much because we expect it to never grow.
+ // We don't mind this list too much because we expect it to never grow.
// The alternative is to track the namespace in a few places which is convoluted.
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
case 'annotation-xml':
@@ -1998,9 +2217,9 @@
}).join(', ');
if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
} else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
}
}
}
@@ -2032,21 +2251,7 @@
}
}
- /**
- * Mapping from registration name to plugin module
- */
-
- var registrationNameModules = {};
- /**
- * Mapping from lowercase registration names to the properly cased version,
- * used to warn in the case of missing event handlers. Available
- * only in true.
- * @type {Object}
- */
-
- var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
-
- // When adding attributes to the HTML or SVG whitelist, be sure to
+ // When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
@@ -2096,9 +2301,11 @@
dir: 'dir',
disabled: 'disabled',
disablepictureinpicture: 'disablePictureInPicture',
+ disableremoteplayback: 'disableRemotePlayback',
download: 'download',
draggable: 'draggable',
enctype: 'encType',
+ enterkeyhint: 'enterKeyHint',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
@@ -2545,7 +2752,7 @@
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
return true;
}
@@ -2560,8 +2767,11 @@
} // We can't rely on the event system being injected on the server.
- if (canUseEventSystem) {
- if (registrationNameModules.hasOwnProperty(name)) {
+ if (eventRegistry != null) {
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
+
+ if (registrationNameDependencies.hasOwnProperty(name)) {
return true;
}
@@ -2681,12 +2891,12 @@
};
}
- var warnUnknownProperties = function (type, props, canUseEventSystem) {
+ var warnUnknownProperties = function (type, props, eventRegistry) {
{
var unknownProps = [];
for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
if (!isValid) {
unknownProps.push(key);
@@ -2698,19 +2908,19 @@
}).join(', ');
if (unknownProps.length === 1) {
- error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
} else if (unknownProps.length > 1) {
- error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
}
}
};
- function validateProperties$2(type, props, canUseEventSystem) {
+ function validateProperties$2(type, props, eventRegistry) {
if (isCustomComponent(type, props)) {
return;
}
- warnUnknownProperties(type, props, canUseEventSystem);
+ warnUnknownProperties(type, props, eventRegistry);
}
var toArray = React.Children.toArray; // This is only used in DEV.
@@ -2719,8 +2929,8 @@
// Each stack is an array of frames which may contain nested stacks of elements.
var currentDebugStacks = [];
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
- var ReactDebugCurrentFrame$4;
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
+ var ReactDebugCurrentFrame$1;
var prevGetCurrentStackImpl = null;
var getCurrentServerStackImpl = function () {
@@ -2742,22 +2952,16 @@
var hasWarnedAboutUsingContextAsConsumer = false;
{
- ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame;
+ ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
validatePropertiesInDevelopment = function (type, props) {
validateProperties(type, props);
validateProperties$1(type, props);
- validateProperties$2(type, props,
- /* canUseEventSystem */
- false);
+ validateProperties$2(type, props, null);
};
describeStackFrame = function (element) {
- var source = element._source;
- var type = element.type;
- var name = getComponentName(type);
- var ownerName = null;
- return describeComponentFrame(name, source, ownerName);
+ return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
};
pushCurrentDebugStack = function (stack) {
@@ -2766,8 +2970,8 @@
if (currentDebugStacks.length === 1) {
// We are entering a server renderer.
// Remember the previous (e.g. client) global stack implementation.
- prevGetCurrentStackImpl = ReactDebugCurrentFrame$4.getCurrentStack;
- ReactDebugCurrentFrame$4.getCurrentStack = getCurrentServerStackImpl;
+ prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
+ ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
}
};
@@ -2788,7 +2992,7 @@
if (currentDebugStacks.length === 0) {
// We are exiting the server renderer.
// Restore the previous (e.g. client) global stack implementation.
- ReactDebugCurrentFrame$4.getCurrentStack = prevGetCurrentStackImpl;
+ ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
prevGetCurrentStackImpl = null;
}
};
@@ -2912,7 +3116,7 @@
}
}
- function shouldConstruct(Component) {
+ function shouldConstruct$1(Component) {
return Component.prototype && Component.prototype.isReactComponent;
}
@@ -2992,6 +3196,7 @@
function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
var ret = '<' + tagVerbatim;
+ var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
for (var propKey in props) {
if (!hasOwnProperty$2.call(props, propKey)) {
@@ -3010,7 +3215,7 @@
var markup = null;
- if (isCustomComponent(tagLowercase, props)) {
+ if (isCustomComponent$1) {
if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
markup = createMarkupForCustomAttribute(propKey, propValue);
}
@@ -3065,7 +3270,7 @@
function processChild(element, Component) {
- var isClass = shouldConstruct(Component);
+ var isClass = shouldConstruct$1(Component);
var publicContext = processContext(Component, context, threadID, isClass);
var queue = [];
var replace = false;
@@ -3146,20 +3351,26 @@
inst = Component(element.props, publicContext, updater);
inst = finishHooks(Component, element.props, inst, publicContext);
- if (inst == null || inst.render == null) {
- child = inst;
- validateRenderResult(child, Component);
- return;
- }
-
{
- var _componentName3 = getComponentName(Component) || 'Unknown';
+ // Support for module components is deprecated and is removed behind a flag.
+ // Whether or not it would crash later, we want to show a good message in DEV first.
+ if (inst != null && inst.render != null) {
+ var _componentName3 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutModulePatternComponent[_componentName3]) {
- error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
+ if (!didWarnAboutModulePatternComponent[_componentName3]) {
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
- didWarnAboutModulePatternComponent[_componentName3] = true;
+ didWarnAboutModulePatternComponent[_componentName3] = true;
+ }
}
+ } // If the flag is on, everything is assumed to be a function component.
+ // Otherwise, we also do the unfortunate dynamic checks.
+
+
+ if ( inst == null || inst.render == null) {
+ child = inst;
+ validateRenderResult(child, Component);
+ return;
}
}
@@ -3180,7 +3391,7 @@
if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
warn( // keep this warning in sync with ReactStrictModeWarning.js
- 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
+ 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
didWarnAboutDeprecatedWillMount[_componentName4] = true;
}
@@ -3280,12 +3491,10 @@
};
}
- var ReactDOMServerRenderer =
- /*#__PURE__*/
- function () {
+ var ReactDOMServerRenderer = /*#__PURE__*/function () {
// TODO: type this more strictly:
// DEV-only
- function ReactDOMServerRenderer(children, makeStaticMarkup) {
+ function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
var flatChildren = flattenTopLevelChildren(children);
var topFrame = {
type: null,
@@ -3312,7 +3521,10 @@
this.contextIndex = -1;
this.contextStack = [];
- this.contextValueStack = [];
+ this.contextValueStack = []; // useOpaqueIdentifier ID
+
+ this.uniqueID = 0;
+ this.identifierPrefix = options && options.identifierPrefix || '';
{
this.contextProviderStack = [];
@@ -3400,10 +3612,10 @@
return null;
}
- var prevThreadID = currentThreadID;
- setCurrentThreadID(this.threadID);
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = Dispatcher;
+ var prevPartialRenderer = currentPartialRenderer;
+ setCurrentPartialRenderer(this);
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = Dispatcher;
try {
// Markup generated within <Suspense> ends up buffered until we know
@@ -3509,8 +3721,9 @@
return out[0];
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
- setCurrentThreadID(prevThreadID);
+ ReactCurrentDispatcher$1.current = prevDispatcher;
+ setCurrentPartialRenderer(prevPartialRenderer);
+ resetHooksState();
}
};
@@ -3588,8 +3801,16 @@
}
switch (elementType) {
+ // TODO: LegacyHidden acts the same as a fragment. This only works
+ // because we currently assume that every instance of LegacyHidden is
+ // accompanied by a host component wrapper. In the hidden mode, the host
+ // component is given a `hidden` attribute, which ensures that the
+ // initial HTML is not visible. To support the use of LegacyHidden as a
+ // true fragment, without an extra DOM node, we would have to hide the
+ // initial HTML in some other way.
+ case REACT_LEGACY_HIDDEN_TYPE:
+ case REACT_DEBUG_TRACING_MODE_TYPE:
case REACT_STRICT_MODE_TYPE:
- case REACT_CONCURRENT_MODE_TYPE:
case REACT_PROFILER_TYPE:
case REACT_SUSPENSE_LIST_TYPE:
case REACT_FRAGMENT_TYPE:
@@ -3623,6 +3844,17 @@
}
}
}
+ // eslint-disable-next-line-no-fallthrough
+
+ case REACT_SCOPE_TYPE:
+ {
+
+ {
+ {
+ throw Error( "ReactDOMServer does not yet support scope components." );
+ }
+ }
+ }
}
if (typeof elementType === 'object' && elementType !== null) {
@@ -3631,50 +3863,50 @@
{
var element = nextChild;
- var _nextChildren4;
+ var _nextChildren5;
var componentIdentity = {};
prepareToUseHooks(componentIdentity);
- _nextChildren4 = elementType.render(element.props, element.ref);
- _nextChildren4 = finishHooks(elementType.render, element.props, _nextChildren4, element.ref);
- _nextChildren4 = toArray(_nextChildren4);
- var _frame4 = {
+ _nextChildren5 = elementType.render(element.props, element.ref);
+ _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
+ _nextChildren5 = toArray(_nextChildren5);
+ var _frame5 = {
type: null,
domNamespace: parentNamespace,
- children: _nextChildren4,
+ children: _nextChildren5,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame4.debugElementStack = [];
+ _frame5.debugElementStack = [];
}
- this.stack.push(_frame4);
+ this.stack.push(_frame5);
return '';
}
case REACT_MEMO_TYPE:
{
var _element = nextChild;
- var _nextChildren5 = [React.createElement(elementType.type, _assign({
+ var _nextChildren6 = [React.createElement(elementType.type, _assign({
ref: _element.ref
}, _element.props))];
- var _frame5 = {
+ var _frame6 = {
type: null,
domNamespace: parentNamespace,
- children: _nextChildren5,
+ children: _nextChildren6,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame5.debugElementStack = [];
+ _frame6.debugElementStack = [];
}
- this.stack.push(_frame5);
+ this.stack.push(_frame6);
return '';
}
@@ -3683,23 +3915,23 @@
var provider = nextChild;
var nextProps = provider.props;
- var _nextChildren6 = toArray(nextProps.children);
+ var _nextChildren7 = toArray(nextProps.children);
- var _frame6 = {
+ var _frame7 = {
type: provider,
domNamespace: parentNamespace,
- children: _nextChildren6,
+ children: _nextChildren7,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame6.debugElementStack = [];
+ _frame7.debugElementStack = [];
}
this.pushProvider(provider);
- this.stack.push(_frame6);
+ this.stack.push(_frame7);
return '';
}
@@ -3735,22 +3967,22 @@
validateContextBounds(reactContext, threadID);
var nextValue = reactContext[threadID];
- var _nextChildren7 = toArray(_nextProps.children(nextValue));
+ var _nextChildren8 = toArray(_nextProps.children(nextValue));
- var _frame7 = {
+ var _frame8 = {
type: nextChild,
domNamespace: parentNamespace,
- children: _nextChildren7,
+ children: _nextChildren8,
childIndex: 0,
context: context,
footer: ''
};
{
- _frame7.debugElementStack = [];
+ _frame8.debugElementStack = [];
}
- this.stack.push(_frame7);
+ this.stack.push(_frame8);
return '';
}
// eslint-disable-next-line-no-fallthrough
@@ -3773,54 +4005,27 @@
// suspense server-side renderer is enabled so synchronously
// resolved constructors are supported.
- initializeLazyComponentType(lazyComponent);
-
- switch (lazyComponent._status) {
- case Resolved:
- {
- var _nextChildren9 = [React.createElement(lazyComponent._result, _assign({
- ref: _element2.ref
- }, _element2.props))];
- var _frame9 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren9,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame9.debugElementStack = [];
- }
-
- this.stack.push(_frame9);
- return '';
- }
-
- case Rejected:
- throw lazyComponent._result;
-
- case Pending:
- default:
- {
- {
- throw Error( "ReactDOMServer does not yet support lazy-loaded components." );
- }
- }
-
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_SCOPE_TYPE:
- {
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ var result = init(payload);
+ var _nextChildren10 = [React.createElement(result, _assign({
+ ref: _element2.ref
+ }, _element2.props))];
+ var _frame10 = {
+ type: null,
+ domNamespace: parentNamespace,
+ children: _nextChildren10,
+ childIndex: 0,
+ context: context,
+ footer: ''
+ };
{
- {
- throw Error( "ReactDOMServer does not yet support scope components." );
- }
+ _frame10.debugElementStack = [];
}
+
+ this.stack.push(_frame10);
+ return '';
}
}
}
@@ -3872,16 +4077,16 @@
if (tag === 'input') {
{
- ReactControlledValuePropTypes.checkPropTypes('input', props);
+ checkControlledValueProps('input', props);
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
- error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
+ error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
didWarnDefaultChecked = true;
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
- error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', 'A component', props.type);
+ error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
didWarnDefaultInputValue = true;
}
@@ -3897,10 +4102,10 @@
});
} else if (tag === 'textarea') {
{
- ReactControlledValuePropTypes.checkPropTypes('textarea', props);
+ checkControlledValueProps('textarea', props);
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
- error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
+ error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnDefaultTextareaValue = true;
}
@@ -3950,7 +4155,7 @@
});
} else if (tag === 'select') {
{
- ReactControlledValuePropTypes.checkPropTypes('select', props);
+ checkControlledValueProps('select', props);
for (var i = 0; i < valuePropNames.length; i++) {
var propName = valuePropNames[i];
@@ -3969,7 +4174,7 @@
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
- error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
+ error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnDefaultSelectValue = true;
}
@@ -4084,8 +4289,8 @@
* See https://reactjs.org/docs/react-dom-server.html#rendertostring
*/
- function renderToString(element) {
- var renderer = new ReactDOMServerRenderer(element, false);
+ function renderToString(element, options) {
+ var renderer = new ReactDOMServerRenderer(element, false, options);
try {
var markup = renderer.read(Infinity);
@@ -4100,8 +4305,8 @@
* See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
*/
- function renderToStaticMarkup(element) {
- var renderer = new ReactDOMServerRenderer(element, true);
+ function renderToStaticMarkup(element, options) {
+ var renderer = new ReactDOMServerRenderer(element, true, options);
try {
var markup = renderer.read(Infinity);
@@ -4125,23 +4330,12 @@
throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
}
}
- } // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
-
-
- var ReactDOMServer = {
- renderToString: renderToString,
- renderToStaticMarkup: renderToStaticMarkup,
- renderToNodeStream: renderToNodeStream,
- renderToStaticNodeStream: renderToStaticNodeStream,
- version: ReactVersion
- };
-
- // TODO: decide on the top-level export form.
- // This is hacky but makes it work with both Rollup and Jest
-
-
- var server_browser = ReactDOMServer.default || ReactDOMServer;
+ }
- return server_browser;
+ exports.renderToNodeStream = renderToNodeStream;
+ exports.renderToStaticMarkup = renderToStaticMarkup;
+ exports.renderToStaticNodeStream = renderToStaticNodeStream;
+ exports.renderToString = renderToString;
+ exports.version = ReactVersion;
})));
diff --git a/node_modules/react-dom/umd/react-dom-server.browser.production.min.js b/node_modules/react-dom/umd/react-dom-server.browser.production.min.js
index 34d7a7b..79e9a22 100644
--- a/node_modules/react-dom/umd/react-dom-server.browser.production.min.js
+++ b/node_modules/react-dom/umd/react-dom-server.browser.production.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-server.browser.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,40 +6,41 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-'use strict';(function(k,p){"object"===typeof exports&&"undefined"!==typeof module?module.exports=p(require("react")):"function"===typeof define&&define.amd?define(["react"],p):(k=k||self,k.ReactDOMServer=p(k.React))})(this,function(k){function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-function ta(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(c){0===a._status&&(c=c.default,a._status=1,a._result=c)},function(c){0===a._status&&(a._status=2,a._result=c)})}}function D(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case L:return"Fragment";case W:return"Portal";case X:return"Profiler";case Y:return"StrictMode";case M:return"Suspense";case Z:return"SuspenseList"}if("object"===
-typeof a)switch(a.$$typeof){case aa:return"Context.Consumer";case N:return"Context.Provider";case ba:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case ca:return D(a.type);case ua:return D(a.render);case da:if(a=1===a._status?a._result:null)return D(a)}return null}function E(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function va(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return E(d,
-c),d[c];if(a=a.contextTypes){c={};for(var g in a)c[g]=b[g];b=c}else b=ea;return b}function fa(a){if(ha.call(ia,a))return!0;if(ha.call(ja,a))return!1;if(wa.test(a))return ia[a]=!0;ja[a]=!0;return!1}function xa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function ya(a,b,c,d){if(null===b||"undefined"===typeof b||
-xa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function n(a,b,c,d,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=g;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=h}function C(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=za.exec(a);if(b){var c="",d,g=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b=
-"&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}g!==d&&(c+=a.substring(g,d));g=d+1;c+=b}a=g!==d?c+a.substring(g,d):c}return a}function Aa(a,b){var c=m.hasOwnProperty(a)?m[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||ya(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);
-return a+'="'+(C(b)+'"')}return fa(a)?a+'="'+(C(b)+'"'):""}function Ba(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function A(){if(null===u)throw Error(p(321));return u}function ka(){if(0<I)throw Error(p(312));return{memoizedState:null,queue:null,next:null}}function O(){null===e?null===J?(F=!1,J=e=ka()):(F=!0,e=J):null===e.next?(F=!1,e=e.next=ka()):(F=!0,e=e.next);return e}function la(a,b,c,d){for(;P;)P=!1,I+=1,e=null,c=a(b,d);J=u=null;I=0;e=t=null;return c}function ma(a,b){return"function"===
-typeof b?b(a):b}function na(a,b,c){u=A();e=O();if(F){var d=e.queue;b=d.dispatch;if(null!==t&&(c=t.get(d),void 0!==c)){t.delete(d);d=e.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);e.memoizedState=d;return[d,b]}return[e.memoizedState,b]}a=a===ma?"function"===typeof b?b():b:void 0!==c?c(b):b;e.memoizedState=a;a=e.queue={last:null,dispatch:null};a=a.dispatch=Ca.bind(null,u,a);return[e.memoizedState,a]}function Ca(a,b,c){if(!(25>I))throw Error(p(301));if(a===u)if(P=!0,a={action:c,next:null},
-null===t&&(t=new Map),c=t.get(b),void 0===c)t.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Q(){}function oa(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Da(a){if(void 0===a||null===a)return a;var b="";k.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function pa(a,b){if(void 0===a)throw Error(p(152,D(b)||"Component"));}function Ea(a,b,c){function d(d,
-h){var f=h.prototype&&h.prototype.isReactComponent,g=va(h,b,c,f),v=[],z=!1,e={isMounted:function(a){return!1},enqueueForceUpdate:function(a){if(null===v)return null},enqueueReplaceState:function(a,c){z=!0;v=[c]},enqueueSetState:function(a,c){if(null===v)return null;v.push(c)}};if(f){if(f=new h(d.props,g,e),"function"===typeof h.getDerivedStateFromProps){var l=h.getDerivedStateFromProps.call(null,d.props,f.state);null!=l&&(f.state=x({},f.state,l))}}else if(u={},f=h(d.props,g,e),f=la(h,d.props,f,g),
-null==f||null==f.render){a=f;pa(a,h);return}f.props=d.props;f.context=g;f.updater=e;e=f.state;void 0===e&&(f.state=e=null);if("function"===typeof f.UNSAFE_componentWillMount||"function"===typeof f.componentWillMount)if("function"===typeof f.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&f.componentWillMount(),"function"===typeof f.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&f.UNSAFE_componentWillMount(),v.length){e=v;var m=z;v=null;z=!1;if(m&&1===
-e.length)f.state=e[0];else{l=m?e[0]:f.state;var q=!0;for(m=m?1:0;m<e.length;m++){var r=e[m];r="function"===typeof r?r.call(f,l,d.props,g):r;null!=r&&(q?(q=!1,l=x({},l,r)):x(l,r))}f.state=l}}else v=null;a=f.render();pa(a,h);if("function"===typeof f.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var k=f.getChildContext();for(var n in k)if(!(n in d))throw Error(p(108,D(h)||"Unknown",n));}k&&(b=x({},b,k))}for(;k.isValidElement(a);){var g=a,h=g.type;if("function"!==typeof h)break;d(g,h)}return{child:a,
-context:b}}var x=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,l="function"===typeof Symbol&&Symbol.for,W=l?Symbol.for("react.portal"):60106,L=l?Symbol.for("react.fragment"):60107,Y=l?Symbol.for("react.strict_mode"):60108,X=l?Symbol.for("react.profiler"):60114,N=l?Symbol.for("react.provider"):60109,aa=l?Symbol.for("react.context"):60110,Fa=l?Symbol.for("react.concurrent_mode"):60111,ba=l?Symbol.for("react.forward_ref"):60112,M=l?Symbol.for("react.suspense"):60113,Z=l?Symbol.for("react.suspense_list"):
-60120,ca=l?Symbol.for("react.memo"):60115,da=l?Symbol.for("react.lazy"):60116,ua=l?Symbol.for("react.block"):60121,Ga=l?Symbol.for("react.fundamental"):60117,Ha=l?Symbol.for("react.scope"):60119;l=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;l.hasOwnProperty("ReactCurrentDispatcher")||(l.ReactCurrentDispatcher={current:null});l.hasOwnProperty("ReactCurrentBatchConfig")||(l.ReactCurrentBatchConfig={suspense:null});for(var ea={},q=new Uint16Array(16),K=0;15>K;K++)q[K]=K+1;q[15]=0;var wa=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
-ha=Object.prototype.hasOwnProperty,ja={},ia={},m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){m[a]=new n(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];m[b]=new n(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){m[a]=new n(a,
-2,!1,a.toLowerCase(),null,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){m[a]=new n(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){m[a]=new n(a,3,!1,a.toLowerCase(),null,!1)});["checked","multiple","muted","selected"].forEach(function(a){m[a]=
-new n(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){m[a]=new n(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){m[a]=new n(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){m[a]=new n(a,5,!1,a.toLowerCase(),null,!1)});var S=/[\-:]([a-z])/g,T=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
-a.replace(S,T);m[b]=new n(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(S,T);m[b]=new n(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(S,T);m[b]=new n(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){m[a]=new n(a,1,!1,a.toLowerCase(),null,!1)});m.xlinkHref=new n("xlinkHref",1,!1,"xlink:href",
-"http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){m[a]=new n(a,1,!1,a.toLowerCase(),null,!0)});var za=/["'&<>]/,Ia="function"===typeof Object.is?Object.is:Ba,u=null,J=null,e=null,F=!1,P=!1,t=null,I=0,G=0,Ja={readContext:function(a,b){b=G;E(a,b);return a[b]},useContext:function(a,b){A();b=G;E(a,b);return a[b]},useMemo:function(a,b){u=A();e=O();b=void 0===b?null:b;if(null!==e){var c=e.memoizedState;if(null!==c&&null!==b){a:{var d=c[1];if(null===d)d=!1;else{for(var g=
-0;g<d.length&&g<b.length;g++)if(!Ia(b[g],d[g])){d=!1;break a}d=!0}}if(d)return c[0]}}a=a();e.memoizedState=[a,b];return a},useReducer:na,useRef:function(a){u=A();e=O();var b=e.memoizedState;return null===b?(a={current:a},e.memoizedState=a):b},useState:function(a){return na(ma,a)},useLayoutEffect:function(a,b){},useCallback:function(a,b){return a},useImperativeHandle:Q,useEffect:Q,useDebugValue:Q,useResponder:function(a,b){return{props:b,responder:a}},useDeferredValue:function(a,b){A();return a},useTransition:function(a){A();
-return[function(a){a()},!1]}},qa={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Ka=x({menuitem:!0},qa),H={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,
-gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},La=["Webkit","ms","Moz","O"];Object.keys(H).forEach(function(a){La.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);H[b]=H[a]})});var Ma=/([A-Z])/g,Na=/^ms-/,B=k.Children.toArray,U=l.ReactCurrentDispatcher,
-Oa={listing:!0,pre:!0,textarea:!0},Pa=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,ra={},V={},Qa=Object.prototype.hasOwnProperty,Ra={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},sa=function(){function a(a,b){k.isValidElement(a)?a.type!==L?a=[a]:(a=a.props.children,a=k.isValidElement(a)?[a]:B(a)):a=B(a);a={type:null,domNamespace:"http://www.w3.org/1999/xhtml",children:a,childIndex:0,context:ea,footer:""};var c=q[0];if(0===c){var h=q;c=h.length;var d=
-2*c;if(!(65536>=d))throw Error(p(304));var z=new Uint16Array(d);z.set(h);q=z;q[0]=c+1;for(h=c;h<d-1;h++)q[h]=h+1;q[d-1]=0}else q[0]=q[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[]}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;q[a]=q[0];q[0]=a}};b.pushProvider=
-function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;E(c,h);var v=c[h];this.contextStack[b]=c;this.contextValueStack[b]=v;c[h]=a.props.value};b.popProvider=function(a){a=this.contextIndex;var b=this.contextStack[a],c=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=c};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;
-var b=G;G=this.threadID;var c=U.current;U.current=Ja;try{for(var h=[""],v=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var z=this.threadID;q[z]=q[0];q[0]=z;break}var f=this.stack[this.stack.length-1];if(v||f.childIndex>=f.children.length){var e=f.footer;""!==e&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===f.type)this.currentSelectValue=null;else if(null!=f.type&&null!=f.type.type&&f.type.type.$$typeof===N)this.popProvider(f.type);else if(f.type===M){this.suspenseDepth--;
-var l=h.pop();if(v){v=!1;var m=f.fallbackFrame;if(!m)throw Error(p(303));this.stack.push(m);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=l}h[this.suspenseDepth]+=e}else{var k=f.children[f.childIndex++],n="";try{n+=this.render(k,f.context,f.domNamespace)}catch(R){if(null!=R&&"function"===typeof R.then)throw Error(p(294));throw R;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=n}}return h[0]}finally{U.current=c,G=b}};b.render=function(a,b,g){if("string"===
-typeof a||"number"===typeof a){g=""+a;if(""===g)return"";if(this.makeStaticMarkup)return C(g);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+C(g);this.previousWasTextNode=!0;return C(g)}b=Ea(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return"";if(!k.isValidElement(a)){if(null!=a&&null!=a.$$typeof){g=a.$$typeof;if(g===W)throw Error(p(257));throw Error(p(258,g.toString()));}a=B(a);this.stack.push({type:null,domNamespace:g,children:a,childIndex:0,context:b,footer:""});return""}var c=
-a.type;if("string"===typeof c)return this.renderDOM(a,b,g);switch(c){case Y:case Fa:case X:case Z:case L:return a=B(a.props.children),this.stack.push({type:null,domNamespace:g,children:a,childIndex:0,context:b,footer:""}),"";case M:throw Error(p(294));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ba:u={};var d=c.render(a.props,a.ref);d=la(c.render,a.props,d,a.ref);d=B(d);this.stack.push({type:null,domNamespace:g,children:d,childIndex:0,context:b,footer:""});return"";case ca:return a=[k.createElement(c.type,
-x({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:g,children:a,childIndex:0,context:b,footer:""}),"";case N:return c=B(a.props.children),g={type:a,domNamespace:g,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(g),"";case aa:c=a.type;d=a.props;var e=this.threadID;E(c,e);c=B(d.children(c[e]));this.stack.push({type:a,domNamespace:g,children:c,childIndex:0,context:b,footer:""});return"";case Ga:throw Error(p(338));case da:switch(c=a.type,ta(c),c._status){case 1:return a=
-[k.createElement(c._result,x({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:g,children:a,childIndex:0,context:b,footer:""}),"";case 2:throw c._result;default:throw Error(p(295));}case Ha:throw Error(p(343));}throw Error(p(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,g){var c=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===g&&oa(c);if(!ra.hasOwnProperty(c)){if(!Pa.test(c))throw Error(p(65,c));ra[c]=!0}var d=a.props;if("input"===c)d=x({type:void 0},d,{defaultChecked:void 0,
-defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var e=d.value;if(null==e){e=d.defaultValue;var f=d.children;if(null!=f){if(null!=e)throw Error(p(92));if(Array.isArray(f)){if(!(1>=f.length))throw Error(p(93));f=f[0]}e=""+f}null==e&&(e="")}d=x({},d,{value:void 0,children:""+e})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=x({},d,{value:void 0});else if("option"===c){f=this.currentSelectValue;
-var l=Da(d.children);if(null!=f){var m=null!=d.value?d.value+"":l;e=!1;if(Array.isArray(f))for(var k=0;k<f.length;k++){if(""+f[k]===m){e=!0;break}}else e=""+f===m;d=x({selected:void 0,children:void 0},d,{selected:e,children:l})}}if(e=d){if(Ka[c]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(p(137,c,""));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(p(60));if(!("object"===typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML))throw Error(p(61));
-}if(null!=e.style&&"object"!==typeof e.style)throw Error(p(62,""));}e=d;f=this.makeStaticMarkup;l=1===this.stack.length;m="<"+a.type;for(w in e)if(Qa.call(e,w)){var n=e[w];if(null!=n){if("style"===w){k=void 0;var q="",u="";for(k in n)if(n.hasOwnProperty(k)){var y=0===k.indexOf("--"),r=n[k];if(null!=r){if(y)var t=k;else if(t=k,V.hasOwnProperty(t))t=V[t];else{var A=t.replace(Ma,"-$1").toLowerCase().replace(Na,"-ms-");t=V[t]=A}q+=u+t+":";u=k;y=null==r||"boolean"===typeof r||""===r?"":y||"number"!==typeof r||
-0===r||H.hasOwnProperty(u)&&H[u]?(""+r).trim():r+"px";q+=y;u=";"}}n=q||null}k=null;b:if(y=c,r=e,-1===y.indexOf("-"))y="string"===typeof r.is;else switch(y){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":y=!1;break b;default:y=!0}y?Ra.hasOwnProperty(w)||(k=w,k=fa(k)&&null!=n?k+'="'+(C(n)+'"'):""):k=Aa(w,n);k&&(m+=" "+k)}}f||l&&(m+=' data-reactroot=""');var w=m;e="";qa.hasOwnProperty(c)?
-w+="/>":(w+=">",e="</"+a.type+">");a:{f=d.dangerouslySetInnerHTML;if(null!=f){if(null!=f.__html){f=f.__html;break a}}else if(f=d.children,"string"===typeof f||"number"===typeof f){f=C(f);break a}f=null}null!=f?(d=[],Oa.hasOwnProperty(c)&&"\n"===f.charAt(0)&&(w+="\n"),w+=f):d=B(d.children);a=a.type;g=null==g||"http://www.w3.org/1999/xhtml"===g?oa(a):"http://www.w3.org/2000/svg"===g&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":g;this.stack.push({domNamespace:g,type:c,children:d,childIndex:0,
-context:b,footer:e});this.previousWasTextNode=!1;return w};return a}();l={renderToString:function(a){a=new sa(a,!1);try{return a.read(Infinity)}finally{a.destroy()}},renderToStaticMarkup:function(a){a=new sa(a,!0);try{return a.read(Infinity)}finally{a.destroy()}},renderToNodeStream:function(){throw Error(p(207));},renderToStaticNodeStream:function(){throw Error(p(208));},version:"16.14.0"};return l.default||l});
+(function(){'use strict';(function(x,r){"object"===typeof exports&&"undefined"!==typeof module?r(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],r):(x=x||self,r(x.ReactDOMServer={},x.React))})(this,function(x,r){function t(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
+function E(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case I:return"Fragment";case P:return"Portal";case Q:return"Profiler";case R:return"StrictMode";case J:return"Suspense";case S:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case T:return(a.displayName||"Context")+".Consumer";case K:return(a._context.displayName||"Context")+".Provider";case U:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
+(""!==b?"ForwardRef("+b+")":"ForwardRef");case V:return E(a.type);case ea:return E(a._render);case W:b=a._payload;a=a._init;try{return E(a(b))}catch(c){}}return null}function F(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function Aa(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return F(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=fa;return b}function ha(a){if(ia.call(ja,a))return!0;if(ia.call(ka,a))return!1;if(Ba.test(a))return ja[a]=
+!0;ka[a]=!0;return!1}function Ca(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function Da(a,b,c,d){if(null===b||"undefined"===typeof b||Ca(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function q(a,
+b,c,d,f,k,w){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=k;this.removeEmptyString=w}function C(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=Ea.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==
+d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}function Fa(a,b){var c=m.hasOwnProperty(a)?m[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||Da(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(C(b)+'"')}return ha(a)?a+'="'+(C(b)+'"'):""}function Ga(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function A(){if(null===
+u)throw Error(t(321));return u}function la(){if(0<L)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function X(){null===g?null===M?(G=!1,M=g=la()):(G=!0,g=M):null===g.next?(G=!1,g=g.next=la()):(G=!0,g=g.next);return g}function ma(a,b,c,d){for(;N;)N=!1,L+=1,g=null,c=a(b,d);na();return c}function na(){u=null;N=!1;M=null;L=0;g=v=null}function oa(a,b){return"function"===typeof b?b(a):b}function pa(a,b,c){u=A();g=X();if(G){var d=g.queue;b=d.dispatch;if(null!==v&&(c=v.get(d),void 0!==
+c)){v.delete(d);d=g.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);g.memoizedState=d;return[d,b]}return[g.memoizedState,b]}a=a===oa?"function"===typeof b?b():b:void 0!==c?c(b):b;g.memoizedState=a;a=g.queue={last:null,dispatch:null};a=a.dispatch=Ha.bind(null,u,a);return[g.memoizedState,a]}function qa(a,b){u=A();g=X();b=void 0===b?null:b;if(null!==g){var c=g.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Ia(b[f],d[f])){d=
+!1;break a}d=!0}if(d)return c[0]}}a=a();g.memoizedState=[a,b];return a}function Ha(a,b,c){if(!(25>L))throw Error(t(301));if(a===u)if(N=!0,a={action:c,next:null},null===v&&(v=new Map),c=v.get(b),void 0===c)v.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Y(){}function ra(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ja(a){if(void 0===a||null===a)return a;var b=
+"";r.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function sa(a,b){if(void 0===a)throw Error(t(152,E(b)||"Component"));}function Ka(a,b,c){function d(d,k){var e=k.prototype&&k.prototype.isReactComponent,f=Aa(k,b,c,e),w=[],h=!1,g={isMounted:function(a){return!1},enqueueForceUpdate:function(a){if(null===w)return null},enqueueReplaceState:function(a,c){h=!0;w=[c]},enqueueSetState:function(a,c){if(null===w)return null;w.push(c)}};if(e){if(e=new k(d.props,f,g),"function"===typeof k.getDerivedStateFromProps){var p=
+k.getDerivedStateFromProps.call(null,d.props,e.state);null!=p&&(e.state=z({},e.state,p))}}else if(u={},e=k(d.props,f,g),e=ma(k,d.props,e,f),null==e||null==e.render){a=e;sa(a,k);return}e.props=d.props;e.context=f;e.updater=g;g=e.state;void 0===g&&(e.state=g=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof k.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&
+"function"!==typeof k.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),w.length){g=w;var l=h;w=null;h=!1;if(l&&1===g.length)e.state=g[0];else{p=l?g[0]:e.state;var m=!0;for(l=l?1:0;l<g.length;l++){var n=g[l];n="function"===typeof n?n.call(e,p,d.props,f):n;null!=n&&(m?(m=!1,p=z({},p,n)):z(p,n))}e.state=p}}else w=null;a=e.render();sa(a,k);if("function"===typeof e.getChildContext&&(d=k.childContextTypes,"object"===typeof d)){var q=e.getChildContext();for(var r in q)if(!(r in d))throw Error(t(108,
+E(k)||"Unknown",r));}q&&(b=z({},b,q))}for(;r.isValidElement(a);){var f=a,k=f.type;if("function"!==typeof k)break;d(f,k)}return{child:a,context:b}}var z=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,P=60106,I=60107,R=60108,Q=60114,K=60109,T=60110,U=60112,J=60113,S=60120,V=60115,W=60116,ea=60121,ta=60117,ua=60119,va=60129,wa=60131;if("function"===typeof Symbol&&Symbol.for){var l=Symbol.for;P=l("react.portal");I=l("react.fragment");R=l("react.strict_mode");Q=l("react.profiler");K=l("react.provider");
+T=l("react.context");U=l("react.forward_ref");J=l("react.suspense");S=l("react.suspense_list");V=l("react.memo");W=l("react.lazy");ea=l("react.block");ta=l("react.fundamental");ua=l("react.scope");va=l("react.debug_trace_mode");wa=l("react.legacy_hidden")}l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;for(var fa={},n=new Uint16Array(16),O=0;15>O;O++)n[O]=O+1;n[15]=0;var Ba=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
+ia=Object.prototype.hasOwnProperty,ka={},ja={},m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){m[a]=new q(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];m[b]=new q(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){m[a]=
+new q(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){m[a]=new q(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){m[a]=new q(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple",
+"muted","selected"].forEach(function(a){m[a]=new q(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){m[a]=new q(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){m[a]=new q(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){m[a]=new q(a,5,!1,a.toLowerCase(),null,!1,!1)});var aa=/[\-:]([a-z])/g,ba=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
+a.replace(aa,ba);m[b]=new q(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(aa,ba);m[b]=new q(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(aa,ba);m[b]=new q(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){m[a]=new q(a,1,!1,a.toLowerCase(),null,!1,!1)});m.xlinkHref=new q("xlinkHref",
+1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){m[a]=new q(a,1,!1,a.toLowerCase(),null,!0,!0)});var Ea=/["'&<>]/,Ia="function"===typeof Object.is?Object.is:Ga,u=null,M=null,g=null,G=!1,N=!1,v=null,L=0,D=null,La={readContext:function(a,b){b=D.threadID;F(a,b);return a[b]},useContext:function(a,b){A();b=D.threadID;F(a,b);return a[b]},useMemo:qa,useReducer:pa,useRef:function(a){u=A();g=X();var b=g.memoizedState;return null===b?(a={current:a},
+g.memoizedState=a):b},useState:function(a){return pa(oa,a)},useLayoutEffect:function(a,b){},useCallback:function(a,b){return qa(function(){return a},b)},useImperativeHandle:Y,useEffect:Y,useDebugValue:Y,useDeferredValue:function(a){A();return a},useTransition:function(){A();return[function(a){a()},!1]},useOpaqueIdentifier:function(){return(D.identifierPrefix||"")+"R:"+(D.uniqueID++).toString(36)},useMutableSource:function(a,b,c){A();return b(a._source)}},xa={area:!0,base:!0,br:!0,col:!0,embed:!0,
+hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Ma=z({menuitem:!0},xa),H={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,
+lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Na=["Webkit","ms","Moz","O"];Object.keys(H).forEach(function(a){Na.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);H[b]=H[a]})});var Oa=/([A-Z])/g,Pa=/^ms-/,B=r.Children.toArray,ca=l.ReactCurrentDispatcher,Qa={listing:!0,pre:!0,textarea:!0},Ra=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,
+ya={},da={},Sa=Object.prototype.hasOwnProperty,Ta={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},za=function(){function a(a,b,f){r.isValidElement(a)?a.type!==I?a=[a]:(a=a.props.children,a=r.isValidElement(a)?[a]:B(a)):a=B(a);a={type:null,domNamespace:"http://www.w3.org/1999/xhtml",children:a,childIndex:0,context:fa,footer:""};var c=n[0];if(0===c){var d=n;c=d.length;var h=2*c;if(!(65536>=h))throw Error(t(304));var e=new Uint16Array(h);
+e.set(d);n=e;n[0]=c+1;for(d=c;d<h-1;d++)n[d]=d+1;n[h-1]=0}else n[0]=n[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||""}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;n[a]=n[0];n[0]=a}};b.pushProvider=
+function(a){var b=++this.contextIndex,c=a.type._context,k=this.threadID;F(c,k);var w=c[k];this.contextStack[b]=c;this.contextValueStack[b]=w;c[k]=a.props.value};b.popProvider=function(a){a=this.contextIndex;var b=this.contextStack[a],c=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=c};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;
+var b=D;D=this;var c=ca.current;ca.current=La;try{for(var k=[""],w=!1;k[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var h=this.threadID;n[h]=n[0];n[0]=h;break}var e=this.stack[this.stack.length-1];if(w||e.childIndex>=e.children.length){var g=e.footer;""!==g&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===K)this.popProvider(e.type);else if(e.type===J){this.suspenseDepth--;
+var l=k.pop();if(w){w=!1;var m=e.fallbackFrame;if(!m)throw Error(t(303));this.stack.push(m);k[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else k[this.suspenseDepth]+=l}k[this.suspenseDepth]+=g}else{var q=e.children[e.childIndex++],p="";try{p+=this.render(q,e.context,e.domNamespace)}catch(Z){if(null!=Z&&"function"===typeof Z.then)throw Error(t(294));throw Z;}finally{}k.length<=this.suspenseDepth&&k.push("");k[this.suspenseDepth]+=p}}return k[0]}finally{ca.current=c,D=b,na()}};b.render=function(a,
+b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return C(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+C(f);this.previousWasTextNode=!0;return C(f)}b=Ka(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return"";if(!r.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===P)throw Error(t(257));throw Error(t(258,f.toString()));}a=B(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});
+return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case wa:case va:case R:case Q:case S:case I:return a=B(a.props.children),this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case J:throw Error(t(294));case ua:throw Error(t(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case U:u={};var d=c.render(a.props,a.ref);d=ma(c.render,a.props,d,a.ref);d=B(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,
+context:b,footer:""});return"";case V:return a=[r.createElement(c.type,z({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case K:return c=B(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case T:c=a.type;d=a.props;var h=this.threadID;F(c,h);c=B(d.children(c[h]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";
+case ta:throw Error(t(338));case W:return c=a.type,d=c._init,c=d(c._payload),a=[r.createElement(c,z({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),""}throw Error(t(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===f&&ra(c);if(!ya.hasOwnProperty(c)){if(!Ra.test(c))throw Error(t(65,c));ya[c]=!0}var d=a.props;if("input"===c)d=z({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,
+value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var h=d.value;if(null==h){h=d.defaultValue;var e=d.children;if(null!=e){if(null!=h)throw Error(t(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(t(93));e=e[0]}h=""+e}null==h&&(h="")}d=z({},d,{value:void 0,children:""+h})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=z({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;
+var g=Ja(d.children);if(null!=e){var l=null!=d.value?d.value+"":g;h=!1;if(Array.isArray(e))for(var n=0;n<e.length;n++){if(""+e[n]===l){h=!0;break}}else h=""+e===l;d=z({selected:void 0,children:void 0},d,{selected:h,children:g})}}if(h=d){if(Ma[c]&&(null!=h.children||null!=h.dangerouslySetInnerHTML))throw Error(t(137,c));if(null!=h.dangerouslySetInnerHTML){if(null!=h.children)throw Error(t(60));if(!("object"===typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML))throw Error(t(61));
+}if(null!=h.style&&"object"!==typeof h.style)throw Error(t(62));}h=d;e=this.makeStaticMarkup;g=1===this.stack.length;l="<"+a.type;b:if(-1===c.indexOf("-"))n="string"===typeof h.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":n=!1;break b;default:n=!0}for(y in h)if(Sa.call(h,y)){var m=h[y];if(null!=m){if("style"===y){var p=void 0,q="",r="";for(p in m)if(m.hasOwnProperty(p)){var x=
+0===p.indexOf("--"),u=m[p];if(null!=u){if(x)var v=p;else if(v=p,da.hasOwnProperty(v))v=da[v];else{var A=v.replace(Oa,"-$1").toLowerCase().replace(Pa,"-ms-");v=da[v]=A}q+=r+v+":";r=p;x=null==u||"boolean"===typeof u||""===u?"":x||"number"!==typeof u||0===u||H.hasOwnProperty(r)&&H[r]?(""+u).trim():u+"px";q+=x;r=";"}}m=q||null}p=null;n?Ta.hasOwnProperty(y)||(p=y,p=ha(p)&&null!=m?p+'="'+(C(m)+'"'):""):p=Fa(y,m);p&&(l+=" "+p)}}e||g&&(l+=' data-reactroot=""');var y=l;h="";xa.hasOwnProperty(c)?y+="/>":(y+=
+">",h="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=C(e);break a}e=null}null!=e?(d=[],Qa.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(y+="\n"),y+=e):d=B(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?ra(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:h});
+this.previousWasTextNode=!1;return y};return a}();x.renderToNodeStream=function(){throw Error(t(207));};x.renderToStaticMarkup=function(a,b){a=new za(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};x.renderToStaticNodeStream=function(){throw Error(t(208));};x.renderToString=function(a,b){a=new za(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};x.version="17.0.2"});
+})();
diff --git a/node_modules/react-dom/umd/react-dom-test-utils.development.js b/node_modules/react-dom/umd/react-dom-test-utils.development.js
index 645f28b..59e1032 100644
--- a/node_modules/react-dom/umd/react-dom-test-utils.development.js
+++ b/node_modules/react-dom/umd/react-dom-test-utils.development.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-test-utils.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,33 +6,16 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-
-'use strict';
-
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('react-dom')) :
- typeof define === 'function' && define.amd ? define(['react', 'react-dom'], factory) :
- (global = global || self, global.ReactTestUtils = factory(global.React, global.ReactDOM));
-}(this, (function (React, ReactDOM) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom')) :
+ typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom'], factory) :
+ (global = global || self, factory(global.ReactTestUtils = {}, global.React, global.ReactDOM));
+}(this, (function (exports, React, ReactDOM) { 'use strict';
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var _assign = ReactInternals.assign;
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
- // Current owner and dispatcher used to share the same ref,
- // but PR #14548 split them out to better support the react-debug-tools package.
-
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
- }
-
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
- }
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
// by calls to these methods by a Babel plugin.
//
@@ -62,16 +45,12 @@
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
-
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
}
var argsWithFormat = args.map(function (item) {
@@ -83,17 +62,6 @@
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
}
}
@@ -107,7 +75,57 @@
* If this becomes an actual Map, that will break.
*/
function get(key) {
- return key._reactInternalFiber;
+ return key._reactInternals;
+ }
+
+ // ATTENTION
+ // When adding new symbols to this file,
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
+ // nor polyfill, then a plain number is used for performance.
+ var REACT_ELEMENT_TYPE = 0xeac7;
+ var REACT_PORTAL_TYPE = 0xeaca;
+ var REACT_FRAGMENT_TYPE = 0xeacb;
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
+ var REACT_PROFILER_TYPE = 0xead2;
+ var REACT_PROVIDER_TYPE = 0xeacd;
+ var REACT_CONTEXT_TYPE = 0xeace;
+ var REACT_FORWARD_REF_TYPE = 0xead0;
+ var REACT_SUSPENSE_TYPE = 0xead1;
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
+ var REACT_MEMO_TYPE = 0xead3;
+ var REACT_LAZY_TYPE = 0xead4;
+ var REACT_BLOCK_TYPE = 0xead9;
+ var REACT_SERVER_BLOCK_TYPE = 0xeada;
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
+ var REACT_SCOPE_TYPE = 0xead7;
+ var REACT_OPAQUE_ID_TYPE = 0xeae0;
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
+ var REACT_OFFSCREEN_TYPE = 0xeae2;
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
+
+ if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor = Symbol.for;
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
+ REACT_MEMO_TYPE = symbolFor('react.memo');
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
+ REACT_BLOCK_TYPE = symbolFor('react.block');
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
}
var FunctionComponent = 0;
@@ -119,15 +137,15 @@
var HostText = 6;
// Don't change these two values. They're used by React Dev Tools.
- var NoEffect =
- /* */
+ var NoFlags =
+ /* */
0;
var Placement =
- /* */
+ /* */
2;
var Hydrating =
- /* */
+ /* */
1024;
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
@@ -143,7 +161,7 @@
do {
node = nextNode;
- if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {
+ if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
// This is an insertion or in-progress hydration. The nearest possible
// mounted fiber is the parent but we need to continue to figure out
// if that one is still mounted.
@@ -348,28 +366,45 @@
return alternate;
}
- var EVENT_POOL_SIZE = 10;
/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ * `charCode` represents the actual "character code" and is safe to use with
+ * `String.fromCharCode`. As such, only keys that correspond to printable
+ * characters produce a valid `charCode`, the only exception to this is Enter.
+ * The Tab-key is considered non-printable and does not have a `charCode`,
+ * presumably because it does not produce a tab-character in browsers.
+ *
+ * @param {object} nativeEvent Native browser event.
+ * @return {number} Normalized `charCode` property.
*/
+ function getEventCharCode(nativeEvent) {
+ var charCode;
+ var keyCode = nativeEvent.keyCode;
- var EventInterface = {
- type: null,
- target: null,
- // currentTarget is set when dispatching; no use in copying it here
- currentTarget: function () {
- return null;
- },
- eventPhase: null,
- bubbles: null,
- cancelable: null,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: null,
- isTrusted: null
- };
+ if ('charCode' in nativeEvent) {
+ charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
+
+ if (charCode === 0 && keyCode === 13) {
+ charCode = 13;
+ }
+ } else {
+ // IE8 does not implement `charCode`, but `keyCode` has the correct value.
+ charCode = keyCode;
+ } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
+ // report Enter as charCode 10 when ctrl is pressed.
+
+
+ if (charCode === 10) {
+ charCode = 13;
+ } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
+ // Must not discard the (non-)printable Enter-key.
+
+
+ if (charCode >= 32 || charCode === 13) {
+ return charCode;
+ }
+
+ return 0;
+ }
function functionThatReturnsTrue() {
return true;
@@ -377,433 +412,518 @@
function functionThatReturnsFalse() {
return false;
- }
- /**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- *
- * @param {object} dispatchConfig Configuration used to dispatch this event.
- * @param {*} targetInst Marker identifying the event target.
- * @param {object} nativeEvent Native browser event.
- * @param {DOMEventTarget} nativeEventTarget Target node.
- */
+ } // This is intentionally a factory so that we have different returned constructors.
+ // If we had a single constructor, it would be megamorphic and engines would deopt.
- function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
- {
- // these have a getter/setter for warnings
- delete this.nativeEvent;
- delete this.preventDefault;
- delete this.stopPropagation;
- delete this.isDefaultPrevented;
- delete this.isPropagationStopped;
- }
-
- this.dispatchConfig = dispatchConfig;
- this._targetInst = targetInst;
- this.nativeEvent = nativeEvent;
- var Interface = this.constructor.Interface;
+ function createSyntheticEvent(Interface) {
+ /**
+ * Synthetic events are dispatched by event plugins, typically in response to a
+ * top-level event delegation handler.
+ *
+ * These systems should generally use pooling to reduce the frequency of garbage
+ * collection. The system should check `isPersistent` to determine whether the
+ * event should be released into the pool after being dispatched. Users that
+ * need a persisted event should invoke `persist`.
+ *
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
+ * DOM interface; custom application-specific events can also subclass this.
+ */
+ function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
+ this._reactName = reactName;
+ this._targetInst = targetInst;
+ this.type = reactEventType;
+ this.nativeEvent = nativeEvent;
+ this.target = nativeEventTarget;
+ this.currentTarget = null;
+
+ for (var _propName in Interface) {
+ if (!Interface.hasOwnProperty(_propName)) {
+ continue;
+ }
- for (var propName in Interface) {
- if (!Interface.hasOwnProperty(propName)) {
- continue;
- }
+ var normalize = Interface[_propName];
- {
- delete this[propName]; // this has a getter/setter for warnings
+ if (normalize) {
+ this[_propName] = normalize(nativeEvent);
+ } else {
+ this[_propName] = nativeEvent[_propName];
+ }
}
- var normalize = Interface[propName];
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
- if (normalize) {
- this[propName] = normalize(nativeEvent);
+ if (defaultPrevented) {
+ this.isDefaultPrevented = functionThatReturnsTrue;
} else {
- if (propName === 'target') {
- this.target = nativeEventTarget;
- } else {
- this[propName] = nativeEvent[propName];
- }
+ this.isDefaultPrevented = functionThatReturnsFalse;
}
+
+ this.isPropagationStopped = functionThatReturnsFalse;
+ return this;
}
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
+ _assign(SyntheticBaseEvent.prototype, {
+ preventDefault: function () {
+ this.defaultPrevented = true;
+ var event = this.nativeEvent;
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
+ if (!event) {
+ return;
+ }
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
- }
+ if (event.preventDefault) {
+ event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
+ } else if (typeof event.returnValue !== 'unknown') {
+ event.returnValue = false;
+ }
- _assign(SyntheticEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
+ this.isDefaultPrevented = functionThatReturnsTrue;
+ },
+ stopPropagation: function () {
+ var event = this.nativeEvent;
- if (!event) {
- return;
- }
+ if (!event) {
+ return;
+ }
- if (event.preventDefault) {
- event.preventDefault();
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
+ if (event.stopPropagation) {
+ event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
+ } else if (typeof event.cancelBubble !== 'unknown') {
+ // The ChangeEventPlugin registers a "propertychange" event for
+ // IE. This event does not support bubbling or cancelling, and
+ // any references to cancelBubble throw "Member not found". A
+ // typeof check of "unknown" circumvents this issue (and is also
+ // IE specific).
+ event.cancelBubble = true;
+ }
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
+ this.isPropagationStopped = functionThatReturnsTrue;
+ },
- if (!event) {
- return;
- }
+ /**
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
+ * them back into the pool. This allows a way to hold onto a reference that
+ * won't be added back into the pool.
+ */
+ persist: function () {// Modern event system doesn't use pooling.
+ },
- if (event.stopPropagation) {
- event.stopPropagation();
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
+ /**
+ * Checks if this event should be released back into the pool.
+ *
+ * @return {boolean} True if this should not be released, false otherwise.
+ */
+ isPersistent: functionThatReturnsTrue
+ });
- this.isPropagationStopped = functionThatReturnsTrue;
- },
+ return SyntheticBaseEvent;
+ }
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {
- this.isPersistent = functionThatReturnsTrue;
+
+ var EventInterface = {
+ eventPhase: 0,
+ bubbles: 0,
+ cancelable: 0,
+ timeStamp: function (event) {
+ return event.timeStamp || Date.now();
},
+ defaultPrevented: 0,
+ isTrusted: 0
+ };
+ var SyntheticEvent = createSyntheticEvent(EventInterface);
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsFalse,
+ var UIEventInterface = _assign({}, EventInterface, {
+ view: 0,
+ detail: 0
+ });
- /**
- * `PooledClass` looks for `destructor` on each instance it releases.
- */
- destructor: function () {
- var Interface = this.constructor.Interface;
+ var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
+ var lastMovementX;
+ var lastMovementY;
+ var lastMouseEvent;
- for (var propName in Interface) {
- {
- Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
- }
+ function updateMouseMovementPolyfillState(event) {
+ if (event !== lastMouseEvent) {
+ if (lastMouseEvent && event.type === 'mousemove') {
+ lastMovementX = event.screenX - lastMouseEvent.screenX;
+ lastMovementY = event.screenY - lastMouseEvent.screenY;
+ } else {
+ lastMovementX = 0;
+ lastMovementY = 0;
}
- this.dispatchConfig = null;
- this._targetInst = null;
- this.nativeEvent = null;
- this.isDefaultPrevented = functionThatReturnsFalse;
- this.isPropagationStopped = functionThatReturnsFalse;
- this._dispatchListeners = null;
- this._dispatchInstances = null;
+ lastMouseEvent = event;
+ }
+ }
+ /**
+ * @interface MouseEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
- {
- Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
- Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
- Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
- Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
- Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
+
+ var MouseEventInterface = _assign({}, UIEventInterface, {
+ screenX: 0,
+ screenY: 0,
+ clientX: 0,
+ clientY: 0,
+ pageX: 0,
+ pageY: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ getModifierState: getEventModifierState,
+ button: 0,
+ buttons: 0,
+ relatedTarget: function (event) {
+ if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
+ return event.relatedTarget;
+ },
+ movementX: function (event) {
+ if ('movementX' in event) {
+ return event.movementX;
}
+
+ updateMouseMovementPolyfillState(event);
+ return lastMovementX;
+ },
+ movementY: function (event) {
+ if ('movementY' in event) {
+ return event.movementY;
+ } // Don't need to call updateMouseMovementPolyfillState() here
+ // because it's guaranteed to have already run when movementX
+ // was copied.
+
+
+ return lastMovementY;
}
});
- SyntheticEvent.Interface = EventInterface;
+ var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
+ /**
+ * @interface DragEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+ var DragEventInterface = _assign({}, MouseEventInterface, {
+ dataTransfer: 0
+ });
+
+ var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
/**
- * Helper to reduce boilerplate when creating subclasses.
+ * @interface FocusEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
- SyntheticEvent.extend = function (Interface) {
- var Super = this;
+ var FocusEventInterface = _assign({}, UIEventInterface, {
+ relatedTarget: 0
+ });
- var E = function () {};
+ var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
+ */
- E.prototype = Super.prototype;
- var prototype = new E();
+ var AnimationEventInterface = _assign({}, EventInterface, {
+ animationName: 0,
+ elapsedTime: 0,
+ pseudoElement: 0
+ });
- function Class() {
- return Super.apply(this, arguments);
+ var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/clipboard-apis/
+ */
+
+ var ClipboardEventInterface = _assign({}, EventInterface, {
+ clipboardData: function (event) {
+ return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
}
+ });
- _assign(prototype, Class.prototype);
+ var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
+ */
- Class.prototype = prototype;
- Class.prototype.constructor = Class;
- Class.Interface = _assign({}, Super.Interface, Interface);
- Class.extend = Super.extend;
- addEventPoolingTo(Class);
- return Class;
- };
+ var CompositionEventInterface = _assign({}, EventInterface, {
+ data: 0
+ });
- addEventPoolingTo(SyntheticEvent);
+ var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
/**
- * Helper to nullify syntheticEvent instance properties when destructing
- *
- * @param {String} propName
- * @param {?object} getVal
- * @return {object} defineProperty object
+ * Normalization of deprecated HTML5 `key` values
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
*/
- function getPooledWarningPropertyDefinition(propName, getVal) {
- var isFunction = typeof getVal === 'function';
- return {
- configurable: true,
- set: set,
- get: get
- };
+ var normalizeKey = {
+ Esc: 'Escape',
+ Spacebar: ' ',
+ Left: 'ArrowLeft',
+ Up: 'ArrowUp',
+ Right: 'ArrowRight',
+ Down: 'ArrowDown',
+ Del: 'Delete',
+ Win: 'OS',
+ Menu: 'ContextMenu',
+ Apps: 'ContextMenu',
+ Scroll: 'ScrollLock',
+ MozPrintableKey: 'Unidentified'
+ };
+ /**
+ * Translation from legacy `keyCode` to HTML5 `key`
+ * Only special keys supported, all others depend on keyboard layout or browser
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
+ */
- function set(val) {
- var action = isFunction ? 'setting the method' : 'setting the property';
- warn(action, 'This is effectively a no-op');
- return val;
- }
+ var translateToKey = {
+ '8': 'Backspace',
+ '9': 'Tab',
+ '12': 'Clear',
+ '13': 'Enter',
+ '16': 'Shift',
+ '17': 'Control',
+ '18': 'Alt',
+ '19': 'Pause',
+ '20': 'CapsLock',
+ '27': 'Escape',
+ '32': ' ',
+ '33': 'PageUp',
+ '34': 'PageDown',
+ '35': 'End',
+ '36': 'Home',
+ '37': 'ArrowLeft',
+ '38': 'ArrowUp',
+ '39': 'ArrowRight',
+ '40': 'ArrowDown',
+ '45': 'Insert',
+ '46': 'Delete',
+ '112': 'F1',
+ '113': 'F2',
+ '114': 'F3',
+ '115': 'F4',
+ '116': 'F5',
+ '117': 'F6',
+ '118': 'F7',
+ '119': 'F8',
+ '120': 'F9',
+ '121': 'F10',
+ '122': 'F11',
+ '123': 'F12',
+ '144': 'NumLock',
+ '145': 'ScrollLock',
+ '224': 'Meta'
+ };
+ /**
+ * @param {object} nativeEvent Native browser event.
+ * @return {string} Normalized `key` property.
+ */
- function get() {
- var action = isFunction ? 'accessing the method' : 'accessing the property';
- var result = isFunction ? 'This is a no-op function' : 'This is set to null';
- warn(action, result);
- return getVal;
- }
+ function getEventKey(nativeEvent) {
+ if (nativeEvent.key) {
+ // Normalize inconsistent values reported by browsers due to
+ // implementations of a working draft specification.
+ // FireFox implements `key` but returns `MozPrintableKey` for all
+ // printable characters (normalized to `Unidentified`), ignore it.
+ var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
- function warn(action, result) {
- {
- error("This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
+ if (key !== 'Unidentified') {
+ return key;
}
- }
- }
+ } // Browser does not implement `key`, polyfill as much of it as we can.
+
+
+ if (nativeEvent.type === 'keypress') {
+ var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
+ // thus be captured by `keypress`, no other non-printable key should.
- function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
- var EventConstructor = this;
+ return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
+ }
- if (EventConstructor.eventPool.length) {
- var instance = EventConstructor.eventPool.pop();
- EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
- return instance;
+ if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
+ // While user keyboard layout determines the actual meaning of each
+ // `keyCode` value, almost all function keys have a universal value.
+ return translateToKey[nativeEvent.keyCode] || 'Unidentified';
}
- return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
+ return '';
}
+ /**
+ * Translation from modifier key to the associated property in the event.
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
+ */
- function releasePooledEvent(event) {
- var EventConstructor = this;
- if (!(event instanceof EventConstructor)) {
- {
- throw Error( "Trying to release an event instance into a pool of a different type." );
- }
- }
+ var modifierKeyToProp = {
+ Alt: 'altKey',
+ Control: 'ctrlKey',
+ Meta: 'metaKey',
+ Shift: 'shiftKey'
+ }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
+ // getModifierState. If getModifierState is not supported, we map it to a set of
+ // modifier keys exposed by the event. In this case, Lock-keys are not supported.
- event.destructor();
+ function modifierStateGetter(keyArg) {
+ var syntheticEvent = this;
+ var nativeEvent = syntheticEvent.nativeEvent;
- if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
- EventConstructor.eventPool.push(event);
+ if (nativeEvent.getModifierState) {
+ return nativeEvent.getModifierState(keyArg);
}
- }
- function addEventPoolingTo(EventConstructor) {
- EventConstructor.eventPool = [];
- EventConstructor.getPooled = getPooledEvent;
- EventConstructor.release = releasePooledEvent;
+ var keyProp = modifierKeyToProp[keyArg];
+ return keyProp ? !!nativeEvent[keyProp] : false;
}
+ function getEventModifierState(nativeEvent) {
+ return modifierStateGetter;
+ }
/**
- * HTML nodeType values that represent the type of the node
+ * @interface KeyboardEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
*/
- var ELEMENT_NODE = 1;
- // Do not use the below two methods directly!
- // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
- // (It is the only module that is allowed to access these methods.)
- function unsafeCastStringToDOMTopLevelType(topLevelType) {
- return topLevelType;
- }
- var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
+ var KeyboardEventInterface = _assign({}, UIEventInterface, {
+ key: getEventKey,
+ code: 0,
+ location: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ repeat: 0,
+ locale: 0,
+ getModifierState: getEventModifierState,
+ // Legacy Interface
+ charCode: function (event) {
+ // `charCode` is the result of a KeyPress event and represents the value of
+ // the actual printable character.
+ // KeyPress is deprecated, but its replacement is not yet final and not
+ // implemented in any major browser. Only KeyPress has charCode.
+ if (event.type === 'keypress') {
+ return getEventCharCode(event);
+ }
- /**
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
- *
- * @param {string} styleProp
- * @param {string} eventName
- * @returns {object}
- */
+ return 0;
+ },
+ keyCode: function (event) {
+ // `keyCode` is the result of a KeyDown/Up event and represents the value of
+ // physical keyboard key.
+ // The actual meaning of the value depends on the users' keyboard layout
+ // which cannot be detected. Assuming that it is a US keyboard layout
+ // provides a surprisingly accurate mapping for US and European users.
+ // Due to this, it is left to the user to implement at this time.
+ if (event.type === 'keydown' || event.type === 'keyup') {
+ return event.keyCode;
+ }
- function makePrefixMap(styleProp, eventName) {
- var prefixes = {};
- prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
- prefixes['Webkit' + styleProp] = 'webkit' + eventName;
- prefixes['Moz' + styleProp] = 'moz' + eventName;
- return prefixes;
- }
- /**
- * A list of event names to a configurable list of vendor prefixes.
- */
+ return 0;
+ },
+ which: function (event) {
+ // `which` is an alias for either `keyCode` or `charCode` depending on the
+ // type of the event.
+ if (event.type === 'keypress') {
+ return getEventCharCode(event);
+ }
+ if (event.type === 'keydown' || event.type === 'keyup') {
+ return event.keyCode;
+ }
- var vendorPrefixes = {
- animationend: makePrefixMap('Animation', 'AnimationEnd'),
- animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
- animationstart: makePrefixMap('Animation', 'AnimationStart'),
- transitionend: makePrefixMap('Transition', 'TransitionEnd')
- };
- /**
- * Event names that have already been detected and prefixed (if applicable).
- */
+ return 0;
+ }
+ });
- var prefixedEventNames = {};
+ var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
/**
- * Element to check for prefixes on.
+ * @interface PointerEvent
+ * @see http://www.w3.org/TR/pointerevents/
*/
- var style = {};
+ var PointerEventInterface = _assign({}, MouseEventInterface, {
+ pointerId: 0,
+ width: 0,
+ height: 0,
+ pressure: 0,
+ tangentialPressure: 0,
+ tiltX: 0,
+ tiltY: 0,
+ twist: 0,
+ pointerType: 0,
+ isPrimary: 0
+ });
+
+ var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
/**
- * Bootstrap if a DOM exists.
+ * @interface TouchEvent
+ * @see http://www.w3.org/TR/touch-events/
*/
- if (canUseDOM) {
- style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
- // the un-prefixed "animation" and "transition" properties are defined on the
- // style object but the events that fire will still be prefixed, so we need
- // to check if the un-prefixed events are usable, and if not remove them from the map.
-
- if (!('AnimationEvent' in window)) {
- delete vendorPrefixes.animationend.animation;
- delete vendorPrefixes.animationiteration.animation;
- delete vendorPrefixes.animationstart.animation;
- } // Same as above
-
+ var TouchEventInterface = _assign({}, UIEventInterface, {
+ touches: 0,
+ targetTouches: 0,
+ changedTouches: 0,
+ altKey: 0,
+ metaKey: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ getModifierState: getEventModifierState
+ });
- if (!('TransitionEvent' in window)) {
- delete vendorPrefixes.transitionend.transition;
- }
- }
+ var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
/**
- * Attempts to determine the correct vendor prefixed event name.
- *
- * @param {string} eventName
- * @returns {string}
+ * @interface Event
+ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
*/
+ var TransitionEventInterface = _assign({}, EventInterface, {
+ propertyName: 0,
+ elapsedTime: 0,
+ pseudoElement: 0
+ });
- function getVendorPrefixedEventName(eventName) {
- if (prefixedEventNames[eventName]) {
- return prefixedEventNames[eventName];
- } else if (!vendorPrefixes[eventName]) {
- return eventName;
- }
-
- var prefixMap = vendorPrefixes[eventName];
+ var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
+ /**
+ * @interface WheelEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
- for (var styleProp in prefixMap) {
- if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
- return prefixedEventNames[eventName] = prefixMap[styleProp];
- }
- }
+ var WheelEventInterface = _assign({}, MouseEventInterface, {
+ deltaX: function (event) {
+ return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
+ 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
+ },
+ deltaY: function (event) {
+ return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
+ 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
+ 'wheelDelta' in event ? -event.wheelDelta : 0;
+ },
+ deltaZ: 0,
+ // Browsers without "deltaMode" is reporting in raw wheel delta where one
+ // notch on the scroll is always +/- 120, roughly equivalent to pixels.
+ // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
+ // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
+ deltaMode: 0
+ });
- return eventName;
- }
+ var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
/**
- * To identify top level events in ReactDOM, we use constants defined by this
- * module. This is the only module that uses the unsafe* methods to express
- * that the constants actually correspond to the browser event names. This lets
- * us save some bundle size by avoiding a top level type -> event name map.
- * The rest of ReactDOM code should import top level types from this file.
+ * HTML nodeType values that represent the type of the node
*/
-
- var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
- var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
- var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
- var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
- var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
- var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
- var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
- var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
- var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
- var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
- var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
- var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
- var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
- var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
- var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
- var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
- var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
- var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
- var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
- var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
- var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
- var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
- var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
- var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
- var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
- var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
- var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
- var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
- var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
- var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
- var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
- var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
- var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
- var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
- var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
- var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
- var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
- var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
- var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
- var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
- var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
- var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
- var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
- var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
- var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
- var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
- var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
- var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
- var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
- var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
- var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
- var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
- var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
- var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
- var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
- var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
- var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
- var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
- var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
- var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
- var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
- var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
- var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
- var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
- var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
- var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
- var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
- var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.
-
- var PLUGIN_EVENT_SYSTEM = 1;
+ var ELEMENT_NODE = 1;
var didWarnAboutMessageChannel = false;
var enqueueTaskImpl = null;
@@ -816,7 +936,7 @@
var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
// version of setImmediate, bypassing fake timers if any.
- enqueueTaskImpl = nodeRequire('timers').setImmediate;
+ enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
} catch (_err) {
// we're in a browser
// we can't use regular timers because they may still be faked
@@ -863,29 +983,24 @@
unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate,
unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting;
- // ReactDOM.js, and ReactTestUtils.js:
-
- var _ReactDOM$__SECRET_IN = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,
-
- /* eslint-disable no-unused-vars */
- getInstanceFromNode = _ReactDOM$__SECRET_IN[0],
- getNodeFromInstance = _ReactDOM$__SECRET_IN[1],
- getFiberCurrentPropsFromNode = _ReactDOM$__SECRET_IN[2],
- injectEventPluginsByName = _ReactDOM$__SECRET_IN[3],
- eventNameDispatchConfigs = _ReactDOM$__SECRET_IN[4],
- accumulateTwoPhaseDispatches = _ReactDOM$__SECRET_IN[5],
- accumulateDirectDispatches = _ReactDOM$__SECRET_IN[6],
- enqueueStateRestore = _ReactDOM$__SECRET_IN[7],
- restoreStateIfNeeded = _ReactDOM$__SECRET_IN[8],
- dispatchEvent = _ReactDOM$__SECRET_IN[9],
- runEventsInBatch = _ReactDOM$__SECRET_IN[10],
-
- /* eslint-enable no-unused-vars */
- flushPassiveEffects = _ReactDOM$__SECRET_IN[11],
- IsThisRendererActing = _ReactDOM$__SECRET_IN[12];
+ var EventInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
+ // const getNodeFromInstance = EventInternals[1];
+ // const getFiberCurrentPropsFromNode = EventInternals[2];
+ // const enqueueStateRestore = EventInternals[3];
+ // const restoreStateIfNeeded = EventInternals[4];
+
+ var flushPassiveEffects = EventInternals[5];
+ var IsThisRendererActing = EventInternals[6];
var batchedUpdates = ReactDOM.unstable_batchedUpdates;
- var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; // this implementation should be exactly the same in
- // ReactTestUtilsAct.js, ReactTestRendererAct.js, createReactNoop.js
+ var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; // This is the public version of `ReactTestUtils.act`. It is implemented in
+ // "userspace" (i.e. not the reconciler), so that it doesn't add to the
+ // production bundle size.
+ // TODO: Remove this implementation of `act` in favor of the one exported by
+ // the reconciler. To do this, we must first drop support for `act` in
+ // production mode.
+ // TODO: Remove support for the mock scheduler build, which was only added for
+ // the purposes of internal testing. Internal tests should use
+ // `unstable_concurrentAct` instead.
var isSchedulerMocked = typeof unstable_flushAllWithoutAsserting === 'function';
@@ -917,15 +1032,12 @@
var actingUpdatesScopeDepth = 0;
-
function act(callback) {
var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth;
- var previousIsSomeRendererActing;
- var previousIsThisRendererActing;
actingUpdatesScopeDepth++;
- previousIsSomeRendererActing = IsSomeRendererActing.current;
- previousIsThisRendererActing = IsThisRendererActing.current;
+ var previousIsSomeRendererActing = IsSomeRendererActing.current;
+ var previousIsThisRendererActing = IsThisRendererActing.current;
IsSomeRendererActing.current = true;
IsThisRendererActing.current = true;
@@ -1032,64 +1144,381 @@
}
}
- var findDOMNode = ReactDOM.findDOMNode; // Keep in sync with ReactDOMUnstableNativeDependencies.js
- // ReactDOM.js, and ReactTestUtilsAct.js:
+ var EventInternals$1 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
+ // const getNodeFromInstance = EventInternals[1];
+ // const getFiberCurrentPropsFromNode = EventInternals[2];
+ // const enqueueStateRestore = EventInternals[3];
+ // const restoreStateIfNeeded = EventInternals[4];
+ // const flushPassiveEffects = EventInternals[5];
+
+ var IsThisRendererActing$1 = EventInternals$1[6];
+ var batchedUpdates$1 = ReactDOM.unstable_batchedUpdates;
+ var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing; // This version of `act` is only used by our tests. Unlike the public version
+ // of `act`, it's designed to work identically in both production and
+ // development. It may have slightly different behavior from the public
+ // version, too, since our constraints in our test suite are not the same as
+ // those of developers using React — we're testing React itself, as opposed to
+ // building an app with React.
+
+ var actingUpdatesScopeDepth$1 = 0;
+ function unstable_concurrentAct(scope) {
+ if (unstable_flushAllWithoutAsserting === undefined) {
+ throw Error('This version of `act` requires a special mock build of Scheduler.');
+ }
- var _ReactDOM$__SECRET_IN$1 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,
- getInstanceFromNode$1 = _ReactDOM$__SECRET_IN$1[0],
+ if (setTimeout._isMockFunction !== true) {
+ throw Error("This version of `act` requires Jest's timer mocks " + '(i.e. jest.useFakeTimers).');
+ }
- /* eslint-disable no-unused-vars */
- getNodeFromInstance$1 = _ReactDOM$__SECRET_IN$1[1],
- getFiberCurrentPropsFromNode$1 = _ReactDOM$__SECRET_IN$1[2],
- injectEventPluginsByName$1 = _ReactDOM$__SECRET_IN$1[3],
+ var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth$1;
+ var previousIsSomeRendererActing = IsSomeRendererActing$1.current;
+ var previousIsThisRendererActing = IsThisRendererActing$1.current;
+ IsSomeRendererActing$1.current = true;
+ IsThisRendererActing$1.current = true;
+ actingUpdatesScopeDepth$1++;
- /* eslint-enable no-unused-vars */
- eventNameDispatchConfigs$1 = _ReactDOM$__SECRET_IN$1[4],
- accumulateTwoPhaseDispatches$1 = _ReactDOM$__SECRET_IN$1[5],
- accumulateDirectDispatches$1 = _ReactDOM$__SECRET_IN$1[6],
- enqueueStateRestore$1 = _ReactDOM$__SECRET_IN$1[7],
- restoreStateIfNeeded$1 = _ReactDOM$__SECRET_IN$1[8],
- dispatchEvent$1 = _ReactDOM$__SECRET_IN$1[9],
- runEventsInBatch$1 = _ReactDOM$__SECRET_IN$1[10],
+ var unwind = function () {
+ actingUpdatesScopeDepth$1--;
+ IsSomeRendererActing$1.current = previousIsSomeRendererActing;
+ IsThisRendererActing$1.current = previousIsThisRendererActing;
- /* eslint-disable no-unused-vars */
- flushPassiveEffects$1 = _ReactDOM$__SECRET_IN$1[11],
- IsThisRendererActing$1
- /* eslint-enable no-unused-vars */
- = _ReactDOM$__SECRET_IN$1[12];
+ {
+ if (actingUpdatesScopeDepth$1 > previousActingUpdatesScopeDepth) {
+ // if it's _less than_ previousActingUpdatesScopeDepth, then we can
+ // assume the 'other' one has warned
+ error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
+ }
+ }
+ }; // TODO: This would be way simpler if 1) we required a promise to be
+ // returned and 2) we could use async/await. Since it's only our used in
+ // our test suite, we should be able to.
- function Event(suffix) {}
- var hasWarnedAboutDeprecatedMockComponent = false;
+ try {
+ var thenable = batchedUpdates$1(scope);
+
+ if (typeof thenable === 'object' && thenable !== null && typeof thenable.then === 'function') {
+ return {
+ then: function (resolve, reject) {
+ thenable.then(function () {
+ flushActWork(function () {
+ unwind();
+ resolve();
+ }, function (error) {
+ unwind();
+ reject(error);
+ });
+ }, function (error) {
+ unwind();
+ reject(error);
+ });
+ }
+ };
+ } else {
+ try {
+ // TODO: Let's not support non-async scopes at all in our tests. Need to
+ // migrate existing tests.
+ var didFlushWork;
+
+ do {
+ didFlushWork = unstable_flushAllWithoutAsserting();
+ } while (didFlushWork);
+ } finally {
+ unwind();
+ }
+ }
+ } catch (error) {
+ unwind();
+ throw error;
+ }
+ }
+
+ function flushActWork(resolve, reject) {
+ // Flush suspended fallbacks
+ // $FlowFixMe: Flow doesn't know about global Jest object
+ jest.runOnlyPendingTimers();
+ enqueueTask(function () {
+ try {
+ var didFlushWork = unstable_flushAllWithoutAsserting();
+
+ if (didFlushWork) {
+ flushActWork(resolve, reject);
+ } else {
+ resolve();
+ }
+ } catch (error) {
+ reject(error);
+ }
+ });
+ }
+
+ function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
+
+ try {
+ func.apply(context, funcArgs);
+ } catch (error) {
+ this.onError(error);
+ }
+ }
+
+ var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
+
+ {
+ // In DEV mode, we swap out invokeGuardedCallback for a special version
+ // that plays more nicely with the browser's DevTools. The idea is to preserve
+ // "Pause on exceptions" behavior. Because React wraps all user-provided
+ // functions in invokeGuardedCallback, and the production version of
+ // invokeGuardedCallback uses a try-catch, all user exceptions are treated
+ // like caught exceptions, and the DevTools won't pause unless the developer
+ // takes the extra step of enabling pause on caught exceptions. This is
+ // unintuitive, though, because even though React has caught the error, from
+ // the developer's perspective, the error is uncaught.
+ //
+ // To preserve the expected "Pause on exceptions" behavior, we don't use a
+ // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
+ // DOM node, and call the user-provided callback from inside an event handler
+ // for that fake event. If the callback throws, the error is "captured" using
+ // a global event handler. But because the error happens in a different
+ // event loop context, it does not interrupt the normal program flow.
+ // Effectively, this gives us try-catch behavior without actually using
+ // try-catch. Neat!
+ // Check that the browser supports the APIs we need to implement our special
+ // DEV version of invokeGuardedCallback
+ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
+ var fakeNode = document.createElement('react');
+
+ invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
+ // If document doesn't exist we know for sure we will crash in this method
+ // when we call document.createEvent(). However this can cause confusing
+ // errors: https://github.com/facebookincubator/create-react-app/issues/3482
+ // So we preemptively throw with a better message instead.
+ if (!(typeof document !== 'undefined')) {
+ {
+ throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
+ }
+ }
+
+ var evt = document.createEvent('Event');
+ var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
+ // set this to true at the beginning, then set it to false right after
+ // calling the function. If the function errors, `didError` will never be
+ // set to false. This strategy works even if the browser is flaky and
+ // fails to call our global error handler, because it doesn't rely on
+ // the error event at all.
+
+ var didError = true; // Keeps track of the value of window.event so that we can reset it
+ // during the callback to let user code access window.event in the
+ // browsers that support it.
+
+ var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
+ // dispatching: https://github.com/facebook/react/issues/13688
+
+ var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
+
+ function restoreAfterDispatch() {
+ // We immediately remove the callback from event listeners so that
+ // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
+ // nested call would trigger the fake event handlers of any call higher
+ // in the stack.
+ fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
+ // window.event assignment in both IE <= 10 as they throw an error
+ // "Member not found" in strict mode, and in Firefox which does not
+ // support window.event.
+
+ if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
+ window.event = windowEvent;
+ }
+ } // Create an event handler for our fake event. We will synchronously
+ // dispatch our fake event using `dispatchEvent`. Inside the handler, we
+ // call the user-provided callback.
+
+
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
+
+ function callCallback() {
+ didCall = true;
+ restoreAfterDispatch();
+ func.apply(context, funcArgs);
+ didError = false;
+ } // Create a global error event handler. We use this to capture the value
+ // that was thrown. It's possible that this error handler will fire more
+ // than once; for example, if non-React code also calls `dispatchEvent`
+ // and a handler for that event throws. We should be resilient to most of
+ // those cases. Even if our error event handler fires more than once, the
+ // last error event is always used. If the callback actually does error,
+ // we know that the last error event is the correct one, because it's not
+ // possible for anything else to have happened in between our callback
+ // erroring and the code that follows the `dispatchEvent` call below. If
+ // the callback doesn't error, but the error event was fired, we know to
+ // ignore it because `didError` will be false, as described above.
+
+
+ var error; // Use this to track whether the error event is ever called.
+
+ var didSetError = false;
+ var isCrossOriginError = false;
+
+ function handleWindowError(event) {
+ error = event.error;
+ didSetError = true;
+
+ if (error === null && event.colno === 0 && event.lineno === 0) {
+ isCrossOriginError = true;
+ }
+
+ if (event.defaultPrevented) {
+ // Some other error handler has prevented default.
+ // Browsers silence the error report if this happens.
+ // We'll remember this to later decide whether to log it or not.
+ if (error != null && typeof error === 'object') {
+ try {
+ error._suppressLogging = true;
+ } catch (inner) {// Ignore.
+ }
+ }
+ }
+ } // Create a fake event type.
+
+
+ var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
+
+ window.addEventListener('error', handleWindowError);
+ fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
+ // errors, it will trigger our global error handler.
+
+ evt.initEvent(evtType, false, false);
+ fakeNode.dispatchEvent(evt);
+
+ if (windowEventDescriptor) {
+ Object.defineProperty(window, 'event', windowEventDescriptor);
+ }
+
+ if (didCall && didError) {
+ if (!didSetError) {
+ // The callback errored, but the error event never fired.
+ error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
+ } else if (isCrossOriginError) {
+ error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
+ }
+
+ this.onError(error);
+ } // Remove our event listeners
+
+
+ window.removeEventListener('error', handleWindowError);
+
+ if (!didCall) {
+ // Something went really wrong, and our event was not dispatched.
+ // https://github.com/facebook/react/issues/16734
+ // https://github.com/facebook/react/issues/16585
+ // Fall back to the production implementation.
+ restoreAfterDispatch();
+ return invokeGuardedCallbackProd.apply(this, arguments);
+ }
+ };
+ }
+ }
+
+ var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
+
+ var hasError = false;
+ var caughtError = null; // Used by event system to capture/rethrow the first error.
+
+ var hasRethrowError = false;
+ var rethrowError = null;
+ var reporter = {
+ onError: function (error) {
+ hasError = true;
+ caughtError = error;
+ }
+ };
/**
- * @class ReactTestUtils
+ * Call a function while guarding against errors that happens within it.
+ * Returns an error if it throws, otherwise null.
+ *
+ * In production, this is implemented using a try-catch. The reason we don't
+ * use a try-catch directly is so that we can swap out a different
+ * implementation in DEV mode.
+ *
+ * @param {String} name of the guard to use for logging or debugging
+ * @param {Function} func The function to invoke
+ * @param {*} context The context to use when calling the function
+ * @param {...*} args Arguments for function
*/
+ function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
+ hasError = false;
+ caughtError = null;
+ invokeGuardedCallbackImpl$1.apply(reporter, arguments);
+ }
/**
- * Simulates a top level event being dispatched from a raw event that occurred
- * on an `Element` node.
- * @param {number} topLevelType A number from `TopLevelEventTypes`
- * @param {!Element} node The dom to simulate an event occurring on.
- * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
+ * Same as invokeGuardedCallback, but instead of returning an error, it stores
+ * it in a global so it can be rethrown by `rethrowCaughtError` later.
+ * TODO: See if caughtError and rethrowError can be unified.
+ *
+ * @param {String} name of the guard to use for logging or debugging
+ * @param {Function} func The function to invoke
+ * @param {*} context The context to use when calling the function
+ * @param {...*} args Arguments for function
*/
- function simulateNativeEventOnNode(topLevelType, node, fakeNativeEvent) {
- fakeNativeEvent.target = node;
- dispatchEvent$1(topLevelType, PLUGIN_EVENT_SYSTEM, document, fakeNativeEvent);
+ function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
+ invokeGuardedCallback.apply(this, arguments);
+
+ if (hasError) {
+ var error = clearCaughtError();
+
+ if (!hasRethrowError) {
+ hasRethrowError = true;
+ rethrowError = error;
+ }
+ }
}
/**
- * Simulates a top level event being dispatched from a raw event that occurred
- * on the `ReactDOMComponent` `comp`.
- * @param {Object} topLevelType A type from `BrowserEventConstants.topLevelTypes`.
- * @param {!ReactDOMComponent} comp
- * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent.
+ * During execution of guarded functions we will capture the first error which
+ * we will rethrow to be handled by the top level error handler.
*/
-
- function simulateNativeEventOnDOMComponent(topLevelType, comp, fakeNativeEvent) {
- simulateNativeEventOnNode(topLevelType, findDOMNode(comp), fakeNativeEvent);
+ function rethrowCaughtError() {
+ if (hasRethrowError) {
+ var error = rethrowError;
+ hasRethrowError = false;
+ rethrowError = null;
+ throw error;
+ }
+ }
+ function clearCaughtError() {
+ if (hasError) {
+ var error = caughtError;
+ hasError = false;
+ caughtError = null;
+ return error;
+ } else {
+ {
+ {
+ throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+ }
}
+ var EventInternals$2 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
+ var getInstanceFromNode = EventInternals$2[0];
+ var getNodeFromInstance = EventInternals$2[1];
+ var getFiberCurrentPropsFromNode = EventInternals$2[2];
+ var enqueueStateRestore = EventInternals$2[3];
+ var restoreStateIfNeeded = EventInternals$2[4]; // const flushPassiveEffects = EventInternals[5];
+ // TODO: This is related to `act`, not events. Move to separate key?
+ // const IsThisRendererActing = EventInternals[6];
+
+ function Event(suffix) {}
+
+ var hasWarnedAboutDeprecatedMockComponent = false;
+ /**
+ * @class ReactTestUtils
+ */
+
function findAllInRenderedFiberTreeInternal(fiber, test) {
if (!fiber) {
return [];
@@ -1177,214 +1606,455 @@
*/
- var ReactTestUtils = {
- renderIntoDocument: function (element) {
- var div = document.createElement('div'); // None of our tests actually require attaching the container to the
- // DOM, and doing so creates a mess that we rely on test isolation to
- // clean up, so we're going to stop honoring the name of this method
- // (and probably rename it eventually) if no problems arise.
- // document.documentElement.appendChild(div);
+ function renderIntoDocument(element) {
+ var div = document.createElement('div'); // None of our tests actually require attaching the container to the
+ // DOM, and doing so creates a mess that we rely on test isolation to
+ // clean up, so we're going to stop honoring the name of this method
+ // (and probably rename it eventually) if no problems arise.
+ // document.documentElement.appendChild(div);
- return ReactDOM.render(element, div);
- },
- isElement: function (element) {
- return React.isValidElement(element);
- },
- isElementOfType: function (inst, convenienceConstructor) {
- return React.isValidElement(inst) && inst.type === convenienceConstructor;
- },
- isDOMComponent: function (inst) {
- return !!(inst && inst.nodeType === ELEMENT_NODE && inst.tagName);
- },
- isDOMComponentElement: function (inst) {
- return !!(inst && React.isValidElement(inst) && !!inst.tagName);
- },
- isCompositeComponent: function (inst) {
- if (ReactTestUtils.isDOMComponent(inst)) {
- // Accessing inst.setState warns; just return false as that'll be what
- // this returns when we have DOM nodes as refs directly
- return false;
- }
+ return ReactDOM.render(element, div);
+ }
- return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';
- },
- isCompositeComponentWithType: function (inst, type) {
- if (!ReactTestUtils.isCompositeComponent(inst)) {
- return false;
- }
+ function isElement(element) {
+ return React.isValidElement(element);
+ }
- var internalInstance = get(inst);
- var constructor = internalInstance.type;
- return constructor === type;
- },
- findAllInRenderedTree: function (inst, test) {
- validateClassInstance(inst, 'findAllInRenderedTree');
+ function isElementOfType(inst, convenienceConstructor) {
+ return React.isValidElement(inst) && inst.type === convenienceConstructor;
+ }
- if (!inst) {
- return [];
- }
+ function isDOMComponent(inst) {
+ return !!(inst && inst.nodeType === ELEMENT_NODE && inst.tagName);
+ }
- var internalInstance = get(inst);
- return findAllInRenderedFiberTreeInternal(internalInstance, test);
- },
+ function isDOMComponentElement(inst) {
+ return !!(inst && React.isValidElement(inst) && !!inst.tagName);
+ }
- /**
- * Finds all instance of components in the rendered tree that are DOM
- * components with the class name matching `className`.
- * @return {array} an array of all the matches.
- */
- scryRenderedDOMComponentsWithClass: function (root, classNames) {
- validateClassInstance(root, 'scryRenderedDOMComponentsWithClass');
- return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
- if (ReactTestUtils.isDOMComponent(inst)) {
- var className = inst.className;
-
- if (typeof className !== 'string') {
- // SVG, probably.
- className = inst.getAttribute('class') || '';
- }
+ function isCompositeComponent(inst) {
+ if (isDOMComponent(inst)) {
+ // Accessing inst.setState warns; just return false as that'll be what
+ // this returns when we have DOM nodes as refs directly
+ return false;
+ }
- var classList = className.split(/\s+/);
+ return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';
+ }
+
+ function isCompositeComponentWithType(inst, type) {
+ if (!isCompositeComponent(inst)) {
+ return false;
+ }
+
+ var internalInstance = get(inst);
+ var constructor = internalInstance.type;
+ return constructor === type;
+ }
+
+ function findAllInRenderedTree(inst, test) {
+ validateClassInstance(inst, 'findAllInRenderedTree');
+
+ if (!inst) {
+ return [];
+ }
+
+ var internalInstance = get(inst);
+ return findAllInRenderedFiberTreeInternal(internalInstance, test);
+ }
+ /**
+ * Finds all instance of components in the rendered tree that are DOM
+ * components with the class name matching `className`.
+ * @return {array} an array of all the matches.
+ */
- if (!Array.isArray(classNames)) {
- if (!(classNames !== undefined)) {
- {
- throw Error( "TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument." );
- }
- }
- classNames = classNames.split(/\s+/);
+ function scryRenderedDOMComponentsWithClass(root, classNames) {
+ validateClassInstance(root, 'scryRenderedDOMComponentsWithClass');
+ return findAllInRenderedTree(root, function (inst) {
+ if (isDOMComponent(inst)) {
+ var className = inst.className;
+
+ if (typeof className !== 'string') {
+ // SVG, probably.
+ className = inst.getAttribute('class') || '';
+ }
+
+ var classList = className.split(/\s+/);
+
+ if (!Array.isArray(classNames)) {
+ if (!(classNames !== undefined)) {
+ {
+ throw Error( "TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument." );
+ }
}
- return classNames.every(function (name) {
- return classList.indexOf(name) !== -1;
- });
+ classNames = classNames.split(/\s+/);
}
- return false;
- });
- },
+ return classNames.every(function (name) {
+ return classList.indexOf(name) !== -1;
+ });
+ }
- /**
- * Like scryRenderedDOMComponentsWithClass but expects there to be one result,
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactDOMComponent} The one match.
- */
- findRenderedDOMComponentWithClass: function (root, className) {
- validateClassInstance(root, 'findRenderedDOMComponentWithClass');
- var all = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className);
+ return false;
+ });
+ }
+ /**
+ * Like scryRenderedDOMComponentsWithClass but expects there to be one result,
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ * @return {!ReactDOMComponent} The one match.
+ */
+
+
+ function findRenderedDOMComponentWithClass(root, className) {
+ validateClassInstance(root, 'findRenderedDOMComponentWithClass');
+ var all = scryRenderedDOMComponentsWithClass(root, className);
+
+ if (all.length !== 1) {
+ throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);
+ }
+
+ return all[0];
+ }
+ /**
+ * Finds all instance of components in the rendered tree that are DOM
+ * components with the tag name matching `tagName`.
+ * @return {array} an array of all the matches.
+ */
+
+
+ function scryRenderedDOMComponentsWithTag(root, tagName) {
+ validateClassInstance(root, 'scryRenderedDOMComponentsWithTag');
+ return findAllInRenderedTree(root, function (inst) {
+ return isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();
+ });
+ }
+ /**
+ * Like scryRenderedDOMComponentsWithTag but expects there to be one result,
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ * @return {!ReactDOMComponent} The one match.
+ */
+
+
+ function findRenderedDOMComponentWithTag(root, tagName) {
+ validateClassInstance(root, 'findRenderedDOMComponentWithTag');
+ var all = scryRenderedDOMComponentsWithTag(root, tagName);
+
+ if (all.length !== 1) {
+ throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);
+ }
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);
+ return all[0];
+ }
+ /**
+ * Finds all instances of components with type equal to `componentType`.
+ * @return {array} an array of all the matches.
+ */
+
+
+ function scryRenderedComponentsWithType(root, componentType) {
+ validateClassInstance(root, 'scryRenderedComponentsWithType');
+ return findAllInRenderedTree(root, function (inst) {
+ return isCompositeComponentWithType(inst, componentType);
+ });
+ }
+ /**
+ * Same as `scryRenderedComponentsWithType` but expects there to be one result
+ * and returns that one result, or throws exception if there is any other
+ * number of matches besides one.
+ * @return {!ReactComponent} The one match.
+ */
+
+
+ function findRenderedComponentWithType(root, componentType) {
+ validateClassInstance(root, 'findRenderedComponentWithType');
+ var all = scryRenderedComponentsWithType(root, componentType);
+
+ if (all.length !== 1) {
+ throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);
+ }
+
+ return all[0];
+ }
+ /**
+ * Pass a mocked component module to this method to augment it with
+ * useful methods that allow it to be used as a dummy React component.
+ * Instead of rendering as usual, the component will become a simple
+ * <div> containing any provided children.
+ *
+ * @param {object} module the mock function object exported from a
+ * module that defines the component to be mocked
+ * @param {?string} mockTagName optional dummy root tag name to return
+ * from render method (overrides
+ * module.mockTagName if provided)
+ * @return {object} the ReactTestUtils object (for chaining)
+ */
+
+
+ function mockComponent(module, mockTagName) {
+ {
+ if (!hasWarnedAboutDeprecatedMockComponent) {
+ hasWarnedAboutDeprecatedMockComponent = true;
+
+ warn('ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + 'See https://reactjs.org/link/test-utils-mock-component for more information.');
}
+ }
- return all[0];
- },
+ mockTagName = mockTagName || module.mockTagName || 'div';
+ module.prototype.render.mockImplementation(function () {
+ return React.createElement(mockTagName, null, this.props.children);
+ });
+ return this;
+ }
- /**
- * Finds all instance of components in the rendered tree that are DOM
- * components with the tag name matching `tagName`.
- * @return {array} an array of all the matches.
- */
- scryRenderedDOMComponentsWithTag: function (root, tagName) {
- validateClassInstance(root, 'scryRenderedDOMComponentsWithTag');
- return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
- return ReactTestUtils.isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();
- });
- },
+ function nativeTouchData(x, y) {
+ return {
+ touches: [{
+ pageX: x,
+ pageY: y
+ }]
+ };
+ } // Start of inline: the below functions were inlined from
+ // EventPropagator.js, as they deviated from ReactDOM's newer
+ // implementations.
- /**
- * Like scryRenderedDOMComponentsWithTag but expects there to be one result,
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactDOMComponent} The one match.
- */
- findRenderedDOMComponentWithTag: function (root, tagName) {
- validateClassInstance(root, 'findRenderedDOMComponentWithTag');
- var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName);
+ /**
+ * Dispatch the event to the listener.
+ * @param {SyntheticEvent} event SyntheticEvent to handle
+ * @param {function} listener Application-level callback
+ * @param {*} inst Internal component instance
+ */
+
+
+ function executeDispatch(event, listener, inst) {
+ var type = event.type || 'unknown-event';
+ event.currentTarget = getNodeFromInstance(inst);
+ invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
+ event.currentTarget = null;
+ }
+ /**
+ * Standard/simple iteration through an event's collected dispatches.
+ */
+
+
+ function executeDispatchesInOrder(event) {
+ var dispatchListeners = event._dispatchListeners;
+ var dispatchInstances = event._dispatchInstances;
+
+ if (Array.isArray(dispatchListeners)) {
+ for (var i = 0; i < dispatchListeners.length; i++) {
+ if (event.isPropagationStopped()) {
+ break;
+ } // Listeners and Instances are two parallel arrays that are always in sync.
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);
+
+ executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
}
+ } else if (dispatchListeners) {
+ executeDispatch(event, dispatchListeners, dispatchInstances);
+ }
- return all[0];
- },
+ event._dispatchListeners = null;
+ event._dispatchInstances = null;
+ }
+ /**
+ * Dispatches an event and releases it back into the pool, unless persistent.
+ *
+ * @param {?object} event Synthetic event to be dispatched.
+ * @private
+ */
- /**
- * Finds all instances of components with type equal to `componentType`.
- * @return {array} an array of all the matches.
- */
- scryRenderedComponentsWithType: function (root, componentType) {
- validateClassInstance(root, 'scryRenderedComponentsWithType');
- return ReactTestUtils.findAllInRenderedTree(root, function (inst) {
- return ReactTestUtils.isCompositeComponentWithType(inst, componentType);
- });
- },
- /**
- * Same as `scryRenderedComponentsWithType` but expects there to be one result
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactComponent} The one match.
- */
- findRenderedComponentWithType: function (root, componentType) {
- validateClassInstance(root, 'findRenderedComponentWithType');
- var all = ReactTestUtils.scryRenderedComponentsWithType(root, componentType);
+ var executeDispatchesAndRelease = function (event) {
+ if (event) {
+ executeDispatchesInOrder(event);
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);
+ if (!event.isPersistent()) {
+ event.constructor.release(event);
}
+ }
+ };
- return all[0];
- },
+ function isInteractive(tag) {
+ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
+ }
- /**
- * Pass a mocked component module to this method to augment it with
- * useful methods that allow it to be used as a dummy React component.
- * Instead of rendering as usual, the component will become a simple
- * <div> containing any provided children.
- *
- * @param {object} module the mock function object exported from a
- * module that defines the component to be mocked
- * @param {?string} mockTagName optional dummy root tag name to return
- * from render method (overrides
- * module.mockTagName if provided)
- * @return {object} the ReactTestUtils object (for chaining)
- */
- mockComponent: function (module, mockTagName) {
+ function getParent(inst) {
+ do {
+ inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
+ // That is depending on if we want nested subtrees (layers) to bubble
+ // events to their parent. We could also go through parentNode on the
+ // host node but that wouldn't work for React Native and doesn't let us
+ // do the portal feature.
+ } while (inst && inst.tag !== HostComponent);
+
+ if (inst) {
+ return inst;
+ }
+
+ return null;
+ }
+ /**
+ * Simulates the traversal of a two-phase, capture/bubble event dispatch.
+ */
+
+
+ function traverseTwoPhase(inst, fn, arg) {
+ var path = [];
+
+ while (inst) {
+ path.push(inst);
+ inst = getParent(inst);
+ }
+
+ var i;
+
+ for (i = path.length; i-- > 0;) {
+ fn(path[i], 'captured', arg);
+ }
+
+ for (i = 0; i < path.length; i++) {
+ fn(path[i], 'bubbled', arg);
+ }
+ }
+
+ function shouldPreventMouseEvent(name, type, props) {
+ switch (name) {
+ case 'onClick':
+ case 'onClickCapture':
+ case 'onDoubleClick':
+ case 'onDoubleClickCapture':
+ case 'onMouseDown':
+ case 'onMouseDownCapture':
+ case 'onMouseMove':
+ case 'onMouseMoveCapture':
+ case 'onMouseUp':
+ case 'onMouseUpCapture':
+ case 'onMouseEnter':
+ return !!(props.disabled && isInteractive(type));
+
+ default:
+ return false;
+ }
+ }
+ /**
+ * @param {object} inst The instance, which is the source of events.
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
+ * @return {?function} The stored callback.
+ */
+
+
+ function getListener(inst, registrationName) {
+ // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
+ // live here; needs to be moved to a better place soon
+ var stateNode = inst.stateNode;
+
+ if (!stateNode) {
+ // Work in progress (ex: onload events in incremental mode).
+ return null;
+ }
+
+ var props = getFiberCurrentPropsFromNode(stateNode);
+
+ if (!props) {
+ // Work in progress.
+ return null;
+ }
+
+ var listener = props[registrationName];
+
+ if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
+ return null;
+ }
+
+ if (!(!listener || typeof listener === 'function')) {
{
- if (!hasWarnedAboutDeprecatedMockComponent) {
- hasWarnedAboutDeprecatedMockComponent = true;
+ throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
+ }
+ }
- warn('ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + 'See https://fb.me/test-utils-mock-component for more information.');
+ return listener;
+ }
+
+ function listenerAtPhase(inst, event, propagationPhase) {
+ var registrationName = event._reactName;
+
+ if (propagationPhase === 'captured') {
+ registrationName += 'Capture';
+ }
+
+ return getListener(inst, registrationName);
+ }
+
+ function accumulateDispatches(inst, ignoredDirection, event) {
+ if (inst && event && event._reactName) {
+ var registrationName = event._reactName;
+ var listener = getListener(inst, registrationName);
+
+ if (listener) {
+ if (event._dispatchListeners == null) {
+ event._dispatchListeners = [];
+ }
+
+ if (event._dispatchInstances == null) {
+ event._dispatchInstances = [];
}
+
+ event._dispatchListeners.push(listener);
+
+ event._dispatchInstances.push(inst);
}
+ }
+ }
- mockTagName = mockTagName || module.mockTagName || 'div';
- module.prototype.render.mockImplementation(function () {
- return React.createElement(mockTagName, null, this.props.children);
- });
- return this;
- },
- nativeTouchData: function (x, y) {
- return {
- touches: [{
- pageX: x,
- pageY: y
- }]
- };
- },
- Simulate: null,
- SimulateNative: {},
- act: act
- };
+ function accumulateDirectionalDispatches(inst, phase, event) {
+ {
+ if (!inst) {
+ error('Dispatching inst must not be null');
+ }
+ }
+
+ var listener = listenerAtPhase(inst, event, phase);
+
+ if (listener) {
+ if (event._dispatchListeners == null) {
+ event._dispatchListeners = [];
+ }
+
+ if (event._dispatchInstances == null) {
+ event._dispatchInstances = [];
+ }
+
+ event._dispatchListeners.push(listener);
+
+ event._dispatchInstances.push(inst);
+ }
+ }
+
+ function accumulateDirectDispatchesSingle(event) {
+ if (event && event._reactName) {
+ accumulateDispatches(event._targetInst, null, event);
+ }
+ }
+
+ function accumulateTwoPhaseDispatchesSingle(event) {
+ if (event && event._reactName) {
+ traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
+ }
+ } // End of inline
+
+
+ var Simulate = {};
+ var directDispatchEventTypes = new Set(['mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave']);
/**
* Exports:
*
- * - `ReactTestUtils.Simulate.click(Element)`
- * - `ReactTestUtils.Simulate.mouseMove(Element)`
- * - `ReactTestUtils.Simulate.change(Element)`
+ * - `Simulate.click(Element)`
+ * - `Simulate.mouseMove(Element)`
+ * - `Simulate.change(Element)`
* - ... (All keys from event plugin `eventTypes` objects)
*/
@@ -1396,104 +2066,71 @@
}
}
- if (!!ReactTestUtils.isCompositeComponent(domNode)) {
+ if (!!isCompositeComponent(domNode)) {
{
throw Error( "TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead." );
}
}
- var dispatchConfig = eventNameDispatchConfigs$1[eventType];
+ var reactName = 'on' + eventType[0].toUpperCase() + eventType.slice(1);
var fakeNativeEvent = new Event();
fakeNativeEvent.target = domNode;
- fakeNativeEvent.type = eventType.toLowerCase(); // We don't use SyntheticEvent.getPooled in order to not have to worry about
- // properly destroying any properties assigned from `eventData` upon release
-
- var targetInst = getInstanceFromNode$1(domNode);
- var event = new SyntheticEvent(dispatchConfig, targetInst, fakeNativeEvent, domNode); // Since we aren't using pooling, always persist the event. This will make
+ fakeNativeEvent.type = eventType.toLowerCase();
+ var targetInst = getInstanceFromNode(domNode);
+ var event = new SyntheticEvent(reactName, fakeNativeEvent.type, targetInst, fakeNativeEvent, domNode); // Since we aren't using pooling, always persist the event. This will make
// sure it's marked and won't warn when setting additional properties.
event.persist();
_assign(event, eventData);
- if (dispatchConfig.phasedRegistrationNames) {
- accumulateTwoPhaseDispatches$1(event);
+ if (directDispatchEventTypes.has(eventType)) {
+ accumulateDirectDispatchesSingle(event);
} else {
- accumulateDirectDispatches$1(event);
+ accumulateTwoPhaseDispatchesSingle(event);
}
ReactDOM.unstable_batchedUpdates(function () {
// Normally extractEvent enqueues a state restore, but we'll just always
// do that since we're by-passing it here.
- enqueueStateRestore$1(domNode);
- runEventsInBatch$1(event);
+ enqueueStateRestore(domNode);
+ executeDispatchesAndRelease(event);
+ rethrowCaughtError();
});
- restoreStateIfNeeded$1();
+ restoreStateIfNeeded();
};
- }
+ } // A one-time snapshot with no plans to update. We'll probably want to deprecate Simulate API.
- function buildSimulators() {
- ReactTestUtils.Simulate = {};
- var eventType;
- for (eventType in eventNameDispatchConfigs$1) {
- /**
- * @param {!Element|ReactDOMComponent} domComponentOrNode
- * @param {?object} eventData Fake event data to use in SyntheticEvent.
- */
- ReactTestUtils.Simulate[eventType] = makeSimulator(eventType);
- }
- }
+ var simulatedEventTypes = ['blur', 'cancel', 'click', 'close', 'contextMenu', 'copy', 'cut', 'auxClick', 'doubleClick', 'dragEnd', 'dragStart', 'drop', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'mouseDown', 'mouseUp', 'paste', 'pause', 'play', 'pointerCancel', 'pointerDown', 'pointerUp', 'rateChange', 'reset', 'seeked', 'submit', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'drag', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'mouseMove', 'mouseOut', 'mouseOver', 'pointerMove', 'pointerOut', 'pointerOver', 'scroll', 'toggle', 'touchMove', 'wheel', 'abort', 'animationEnd', 'animationIteration', 'animationStart', 'canPlay', 'canPlayThrough', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'playing', 'progress', 'seeking', 'stalled', 'suspend', 'timeUpdate', 'transitionEnd', 'waiting', 'mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave', 'change', 'select', 'beforeInput', 'compositionEnd', 'compositionStart', 'compositionUpdate'];
- buildSimulators();
- /**
- * Exports:
- *
- * - `ReactTestUtils.SimulateNative.click(Element/ReactDOMComponent)`
- * - `ReactTestUtils.SimulateNative.mouseMove(Element/ReactDOMComponent)`
- * - `ReactTestUtils.SimulateNative.mouseIn/ReactDOMComponent)`
- * - `ReactTestUtils.SimulateNative.mouseOut(Element/ReactDOMComponent)`
- * - ... (All keys from `BrowserEventConstants.topLevelTypes`)
- *
- * Note: Top level event types are a subset of the entire set of handler types
- * (which include a broader set of "synthetic" events). For example, onDragDone
- * is a synthetic event. Except when testing an event plugin or React's event
- * handling code specifically, you probably want to use ReactTestUtils.Simulate
- * to dispatch synthetic events.
- */
-
- function makeNativeSimulator(eventType, topLevelType) {
- return function (domComponentOrNode, nativeEventData) {
- var fakeNativeEvent = new Event(eventType);
-
- _assign(fakeNativeEvent, nativeEventData);
-
- if (ReactTestUtils.isDOMComponent(domComponentOrNode)) {
- simulateNativeEventOnDOMComponent(topLevelType, domComponentOrNode, fakeNativeEvent);
- } else if (domComponentOrNode.tagName) {
- // Will allow on actual dom nodes.
- simulateNativeEventOnNode(topLevelType, domComponentOrNode, fakeNativeEvent);
- }
- };
+ function buildSimulators() {
+ simulatedEventTypes.forEach(function (eventType) {
+ Simulate[eventType] = makeSimulator(eventType);
+ });
}
- [[TOP_ABORT, 'abort'], [TOP_ANIMATION_END, 'animationEnd'], [TOP_ANIMATION_ITERATION, 'animationIteration'], [TOP_ANIMATION_START, 'animationStart'], [TOP_BLUR, 'blur'], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough'], [TOP_CAN_PLAY, 'canPlay'], [TOP_CANCEL, 'cancel'], [TOP_CHANGE, 'change'], [TOP_CLICK, 'click'], [TOP_CLOSE, 'close'], [TOP_COMPOSITION_END, 'compositionEnd'], [TOP_COMPOSITION_START, 'compositionStart'], [TOP_COMPOSITION_UPDATE, 'compositionUpdate'], [TOP_CONTEXT_MENU, 'contextMenu'], [TOP_COPY, 'copy'], [TOP_CUT, 'cut'], [TOP_DOUBLE_CLICK, 'doubleClick'], [TOP_DRAG_END, 'dragEnd'], [TOP_DRAG_ENTER, 'dragEnter'], [TOP_DRAG_EXIT, 'dragExit'], [TOP_DRAG_LEAVE, 'dragLeave'], [TOP_DRAG_OVER, 'dragOver'], [TOP_DRAG_START, 'dragStart'], [TOP_DRAG, 'drag'], [TOP_DROP, 'drop'], [TOP_DURATION_CHANGE, 'durationChange'], [TOP_EMPTIED, 'emptied'], [TOP_ENCRYPTED, 'encrypted'], [TOP_ENDED, 'ended'], [TOP_ERROR, 'error'], [TOP_FOCUS, 'focus'], [TOP_INPUT, 'input'], [TOP_KEY_DOWN, 'keyDown'], [TOP_KEY_PRESS, 'keyPress'], [TOP_KEY_UP, 'keyUp'], [TOP_LOAD_START, 'loadStart'], [TOP_LOAD_START, 'loadStart'], [TOP_LOAD, 'load'], [TOP_LOADED_DATA, 'loadedData'], [TOP_LOADED_METADATA, 'loadedMetadata'], [TOP_MOUSE_DOWN, 'mouseDown'], [TOP_MOUSE_MOVE, 'mouseMove'], [TOP_MOUSE_OUT, 'mouseOut'], [TOP_MOUSE_OVER, 'mouseOver'], [TOP_MOUSE_UP, 'mouseUp'], [TOP_PASTE, 'paste'], [TOP_PAUSE, 'pause'], [TOP_PLAY, 'play'], [TOP_PLAYING, 'playing'], [TOP_PROGRESS, 'progress'], [TOP_RATE_CHANGE, 'rateChange'], [TOP_SCROLL, 'scroll'], [TOP_SEEKED, 'seeked'], [TOP_SEEKING, 'seeking'], [TOP_SELECTION_CHANGE, 'selectionChange'], [TOP_STALLED, 'stalled'], [TOP_SUSPEND, 'suspend'], [TOP_TEXT_INPUT, 'textInput'], [TOP_TIME_UPDATE, 'timeUpdate'], [TOP_TOGGLE, 'toggle'], [TOP_TOUCH_CANCEL, 'touchCancel'], [TOP_TOUCH_END, 'touchEnd'], [TOP_TOUCH_MOVE, 'touchMove'], [TOP_TOUCH_START, 'touchStart'], [TOP_TRANSITION_END, 'transitionEnd'], [TOP_VOLUME_CHANGE, 'volumeChange'], [TOP_WAITING, 'waiting'], [TOP_WHEEL, 'wheel']].forEach(function (_ref) {
- var topLevelType = _ref[0],
- eventType = _ref[1];
-
- /**
- * @param {!Element|ReactDOMComponent} domComponentOrNode
- * @param {?Event} nativeEventData Fake native event to use in SyntheticEvent.
- */
- ReactTestUtils.SimulateNative[eventType] = makeNativeSimulator(eventType, topLevelType);
- });
-
- // TODO: decide on the top-level export form.
- // This is hacky but makes it work with both Rollup and Jest.
-
-
- var testUtils = ReactTestUtils.default || ReactTestUtils;
+ buildSimulators();
- return testUtils;
+ exports.Simulate = Simulate;
+ exports.act = act;
+ exports.findAllInRenderedTree = findAllInRenderedTree;
+ exports.findRenderedComponentWithType = findRenderedComponentWithType;
+ exports.findRenderedDOMComponentWithClass = findRenderedDOMComponentWithClass;
+ exports.findRenderedDOMComponentWithTag = findRenderedDOMComponentWithTag;
+ exports.isCompositeComponent = isCompositeComponent;
+ exports.isCompositeComponentWithType = isCompositeComponentWithType;
+ exports.isDOMComponent = isDOMComponent;
+ exports.isDOMComponentElement = isDOMComponentElement;
+ exports.isElement = isElement;
+ exports.isElementOfType = isElementOfType;
+ exports.mockComponent = mockComponent;
+ exports.nativeTouchData = nativeTouchData;
+ exports.renderIntoDocument = renderIntoDocument;
+ exports.scryRenderedComponentsWithType = scryRenderedComponentsWithType;
+ exports.scryRenderedDOMComponentsWithClass = scryRenderedDOMComponentsWithClass;
+ exports.scryRenderedDOMComponentsWithTag = scryRenderedDOMComponentsWithTag;
+ exports.traverseTwoPhase = traverseTwoPhase;
+ exports.unstable_concurrentAct = unstable_concurrentAct;
})));
diff --git a/node_modules/react-dom/umd/react-dom-test-utils.production.min.js b/node_modules/react-dom/umd/react-dom-test-utils.production.min.js
index af0ef98..4637aa3 100644
--- a/node_modules/react-dom/umd/react-dom-test-utils.production.min.js
+++ b/node_modules/react-dom/umd/react-dom-test-utils.production.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom-test-utils.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,25 +6,30 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-'use strict';(function(k,n){"object"===typeof exports&&"undefined"!==typeof module?module.exports=n(require("react"),require("react-dom")):"function"===typeof define&&define.amd?define(["react","react-dom"],n):(k=k||self,k.ReactTestUtils=n(k.React,k.ReactDOM))})(this,function(k,n){function l(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-function F(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function G(a){if(F(a)!==a)throw Error(l(188));}function R(a){var b=a.alternate;if(!b){b=F(a);if(null===b)throw Error(l(188));return b!==a?null:a}for(var c=a,e=b;;){var d=c.return;if(null===d)break;var g=d.alternate;if(null===g){e=d.return;if(null!==e){c=e;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===c)return G(d),a;if(g===
-e)return G(d),b;g=g.sibling}throw Error(l(188));}if(c.return!==e.return)c=d,e=g;else{for(var f=!1,m=d.child;m;){if(m===c){f=!0;c=d;e=g;break}if(m===e){f=!0;e=d;c=g;break}m=m.sibling}if(!f){for(m=g.child;m;){if(m===c){f=!0;c=g;e=d;break}if(m===e){f=!0;e=g;c=d;break}m=m.sibling}if(!f)throw Error(l(189));}}if(c.alternate!==e)throw Error(l(190));}if(3!==c.tag)throw Error(l(188));return c.stateNode.current===c?a:b}function u(){return!0}function v(){return!1}function r(a,b,c,e){this.dispatchConfig=a;this._targetInst=
-b;this.nativeEvent=c;a=this.constructor.Interface;for(var d in a)a.hasOwnProperty(d)&&((b=a[d])?this[d]=b(c):"target"===d?this.target=e:this[d]=c[d]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?u:v;this.isPropagationStopped=v;return this}function S(a,b,c,e){if(this.eventPool.length){var d=this.eventPool.pop();this.call(d,a,b,c,e);return d}return new this(a,b,c,e)}function T(a){if(!(a instanceof this))throw Error(l(279));a.destructor();10>this.eventPool.length&&
-this.eventPool.push(a)}function H(a){a.eventPool=[];a.getPooled=S;a.release=T}function w(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function x(a){if(A[a])return A[a];if(!q[a])return a;var b=q[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in I)return A[a]=b[c];return a}function U(a){if(null===y)try{var b=("require"+Math.random()).slice(0,7);y=(module&&module[b])("timers").setImmediate}catch(c){y=function(a){var b=new MessageChannel;b.port1.onmessage=
-a;b.port2.postMessage(void 0)}}return y(a)}function J(a){try{B(),U(function(){B()?J(a):a()})}catch(b){a(b)}}function K(a){}function V(a,b){if(!a)return[];a=R(a);if(!a)return[];for(var c=a,e=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var d=c.stateNode;b(d)&&e.push(d)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return e;for(;!c.sibling;){if(!c.return||c.return===a)return e;c=c.return}c.sibling.return=c.return;c=c.sibling}}}function p(a,b){if(a&&!a._reactInternalFiber){var c=""+a;a=
-Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw Error(l(286,b,a));}}function W(a){return function(b,c){if(k.isValidElement(b))throw Error(l(228));if(f.isCompositeComponent(b))throw Error(l(229));var e=L[a],d=new K;d.target=b;d.type=a.toLowerCase();var g=X(b),h=new r(e,g,d,b);h.persist();t(h,c);e.phasedRegistrationNames?Y(h):Z(h);n.unstable_batchedUpdates(function(){aa(b);ba(h)});ca()}}function da(a,
-b){return function(c,e){var d=new K(a);t(d,e);f.isDOMComponent(c)?(c=ea(c),d.target=c,M(b,1,document,d)):c.tagName&&(d.target=c,M(b,1,document,d))}}var t=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,h=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;h.hasOwnProperty("ReactCurrentDispatcher")||(h.ReactCurrentDispatcher={current:null});h.hasOwnProperty("ReactCurrentBatchConfig")||(h.ReactCurrentBatchConfig={suspense:null});t(r.prototype,{preventDefault:function(){this.defaultPrevented=
-!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=u)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=u)},persist:function(){this.isPersistent=u},isPersistent:v,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=
-null;this.isPropagationStopped=this.isDefaultPrevented=v;this._dispatchInstances=this._dispatchListeners=null}});r.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};r.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,e=function(){};e.prototype=c.prototype;e=new e;t(e,b.prototype);b.prototype=e;b.prototype.constructor=
-b;b.Interface=t({},c.Interface,a);b.extend=c.extend;H(b);return b};H(r);var C=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),q={animationend:w("Animation","AnimationEnd"),animationiteration:w("Animation","AnimationIteration"),animationstart:w("Animation","AnimationStart"),transitionend:w("Transition","TransitionEnd")},A={},I={};C&&(I=document.createElement("div").style,"AnimationEvent"in window||(delete q.animationend.animation,
-delete q.animationiteration.animation,delete q.animationstart.animation),"TransitionEvent"in window||delete q.transitionend.transition);C=x("animationend");var fa=x("animationiteration"),ha=x("animationstart"),ia=x("transitionend"),y=null,N=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_flushAllWithoutAsserting,O=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,ja=O[11],D=O[12],ka=n.unstable_batchedUpdates,E=h.IsSomeRendererActing,P="function"===typeof N,B=N||function(){for(var a=
-!1;ja();)a=!0;return a},z=0,Q=!1,ea=n.findDOMNode;h=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;var X=h[0],L=h[4],Y=h[5],Z=h[6],aa=h[7],ca=h[8],M=h[9],ba=h[10],f={renderIntoDocument:function(a){var b=document.createElement("div");return n.render(a,b)},isElement:function(a){return k.isValidElement(a)},isElementOfType:function(a,b){return k.isValidElement(a)&&a.type===b},isDOMComponent:function(a){return!(!a||1!==a.nodeType||!a.tagName)},isDOMComponentElement:function(a){return!!(a&&
-k.isValidElement(a)&&a.tagName)},isCompositeComponent:function(a){return f.isDOMComponent(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState},isCompositeComponentWithType:function(a,b){return f.isCompositeComponent(a)?a._reactInternalFiber.type===b:!1},findAllInRenderedTree:function(a,b){p(a,"findAllInRenderedTree");return a?V(a._reactInternalFiber,b):[]},scryRenderedDOMComponentsWithClass:function(a,b){p(a,"scryRenderedDOMComponentsWithClass");return f.findAllInRenderedTree(a,
-function(a){if(f.isDOMComponent(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var d=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===b)throw Error(l(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==d.indexOf(a)})}return!1})},findRenderedDOMComponentWithClass:function(a,b){p(a,"findRenderedDOMComponentWithClass");a=f.scryRenderedDOMComponentsWithClass(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for class:"+b);return a[0]},
-scryRenderedDOMComponentsWithTag:function(a,b){p(a,"scryRenderedDOMComponentsWithTag");return f.findAllInRenderedTree(a,function(a){return f.isDOMComponent(a)&&a.tagName.toUpperCase()===b.toUpperCase()})},findRenderedDOMComponentWithTag:function(a,b){p(a,"findRenderedDOMComponentWithTag");a=f.scryRenderedDOMComponentsWithTag(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]},scryRenderedComponentsWithType:function(a,b){p(a,"scryRenderedComponentsWithType");
-return f.findAllInRenderedTree(a,function(a){return f.isCompositeComponentWithType(a,b)})},findRenderedComponentWithType:function(a,b){p(a,"findRenderedComponentWithType");a=f.scryRenderedComponentsWithType(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]},mockComponent:function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return k.createElement(b,null,this.props.children)});return this},nativeTouchData:function(a,
-b){return{touches:[{pageX:a,pageY:b}]}},Simulate:null,SimulateNative:{},act:function(a){function b(){z--;E.current=c;D.current=e}!1===Q&&(Q=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));z++;var c=E.current;var e=D.current;E.current=!0;D.current=!0;try{var d=ka(a)}catch(g){throw b(),g;}if(null!==d&&"object"===typeof d&&"function"===typeof d.then)return{then:function(a,e){d.then(function(){1<z||!0===P&&!0===c?(b(),a()):J(function(c){b();
-c?e(c):a()})},function(a){b();e(a)})}};try{1!==z||!1!==P&&!1!==c||B(),b()}catch(g){throw b(),g;}return{then:function(a){a()}}}};(function(){f.Simulate={};for(var a in L)f.Simulate[a]=W(a)})();[["abort","abort"],[C,"animationEnd"],[fa,"animationIteration"],[ha,"animationStart"],["blur","blur"],["canplaythrough","canPlayThrough"],["canplay","canPlay"],["cancel","cancel"],["change","change"],["click","click"],["close","close"],["compositionend","compositionEnd"],["compositionstart","compositionStart"],
-["compositionupdate","compositionUpdate"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragenter","dragEnter"],["dragexit","dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["dragstart","dragStart"],["drag","drag"],["drop","drop"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["focus","focus"],["input","input"],["keydown","keyDown"],["keypress","keyPress"],
-["keyup","keyUp"],["loadstart","loadStart"],["loadstart","loadStart"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["mousedown","mouseDown"],["mousemove","mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["playing","playing"],["progress","progress"],["ratechange","rateChange"],["scroll","scroll"],["seeked","seeked"],["seeking","seeking"],["selectionchange","selectionChange"],["stalled",
-"stalled"],["suspend","suspend"],["textInput","textInput"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchmove","touchMove"],["touchstart","touchStart"],[ia,"transitionEnd"],["volumechange","volumeChange"],["waiting","waiting"],["wheel","wheel"]].forEach(function(a){var b=a[1];f.SimulateNative[b]=da(b,a[0])});return f.default||f});
+(function(){'use strict';(function(h,p){"object"===typeof exports&&"undefined"!==typeof module?p(exports,require("react"),require("react-dom")):"function"===typeof define&&define.amd?define(["exports","react","react-dom"],p):(h=h||self,p(h.ReactTestUtils={},h.React,h.ReactDOM))})(this,function(h,p,v){function q(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
+function T(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function U(a){if(T(a)!==a)throw Error(q(188));}function ka(a){var b=a.alternate;if(!b){b=T(a);if(null===b)throw Error(q(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var g=e.alternate;if(null===g){d=e.return;if(null!==d){c=d;continue}break}if(e.child===g.child){for(g=e.child;g;){if(g===c)return U(e),a;if(g===
+d)return U(e),b;g=g.sibling}throw Error(q(188));}if(c.return!==d.return)c=e,d=g;else{for(var f=!1,l=e.child;l;){if(l===c){f=!0;c=e;d=g;break}if(l===d){f=!0;d=e;c=g;break}l=l.sibling}if(!f){for(l=g.child;l;){if(l===c){f=!0;c=g;d=e;break}if(l===d){f=!0;d=g;c=e;break}l=l.sibling}if(!f)throw Error(q(189));}}if(c.alternate!==d)throw Error(q(190));}if(3!==c.tag)throw Error(q(188));return c.stateNode.current===c?a:b}function I(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===
+a&&(a=13);return 32<=a||13===a?a:0}function B(){return!0}function V(){return!1}function m(a){function b(c,b,e,g,f){this._reactName=c;this._targetInst=e;this.type=b;this.nativeEvent=g;this.target=f;this.currentTarget=null;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],this[d]=c?c(g):g[d]);this.isDefaultPrevented=(null!=g.defaultPrevented?g.defaultPrevented:!1===g.returnValue)?B:V;this.isPropagationStopped=V;return this}k(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;
+a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=B)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=B)},persist:function(){},isPersistent:B});return b}function la(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=ma[a])?!!b[a]:!1}function J(a){return la}function W(a){if(null===C)try{var b=
+("require"+Math.random()).slice(0,7);C=(module&&module[b]).call(module,"timers").setImmediate}catch(c){C=function(a){var b=new MessageChannel;b.port1.onmessage=a;b.port2.postMessage(void 0)}}return C(a)}function X(a){try{K(),W(function(){K()?X(a):a()})}catch(b){a(b)}}function Y(a,b){jest.runOnlyPendingTimers();W(function(){try{y()?Y(a,b):a()}catch(c){b(c)}})}function na(a,b,c,d,e,g,f,l,h){z=!1;D=null;oa.apply(pa,arguments)}function qa(a,b,c,d,e,g,f,l,h){na.apply(this,arguments);if(z){if(z){var k=
+D;z=!1;D=null}else throw Error(q(198));E||(E=!0,L=k)}}function ra(a){}function sa(a,b){if(!a)return[];a=ka(a);if(!a)return[];for(var c=a,d=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var e=c.stateNode;b(e)&&d.push(e)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return d;for(;!c.sibling;){if(!c.return||c.return===a)return d;c=c.return}c.sibling.return=c.return;c=c.sibling}}}function w(a,b){if(a&&!a._reactInternals){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?
+"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw Error(q(286,b,a));}}function F(a){return!(!a||1!==a.nodeType||!a.tagName)}function M(a){return F(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState}function Z(a,b){return M(a)?a._reactInternals.type===b:!1}function G(a,b){w(a,"findAllInRenderedTree");return a?sa(a._reactInternals,b):[]}function aa(a,b){w(a,"scryRenderedDOMComponentsWithClass");return G(a,function(a){if(F(a)){var c=
+a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var e=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===b)throw Error(q(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==e.indexOf(a)})}return!1})}function ba(a,b){w(a,"scryRenderedDOMComponentsWithTag");return G(a,function(a){return F(a)&&a.tagName.toUpperCase()===b.toUpperCase()})}function ca(a,b){w(a,"scryRenderedComponentsWithType");return G(a,function(a){return Z(a,b)})}function da(a,b,c){var d=a.type||"unknown-event";
+a.currentTarget=ta(c);qa(d,b,void 0,a);a.currentTarget=null}function ea(a,b,c){for(var d=[];a;){d.push(a);do a=a.return;while(a&&5!==a.tag);a=a?a:null}for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}function fa(a,b){var c=a.stateNode;if(!c)return null;var d=ua(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=
+!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(q(231,b,typeof c));return c}function va(a,b,c){a&&c&&c._reactName&&(b=fa(a,c._reactName))&&(null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a))}function wa(a,b,c){var d=c._reactName;"captured"===b&&(d+="Capture");if(b=
+fa(a,d))null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a)}function xa(a){return function(b,c){if(p.isValidElement(b))throw Error(q(228));if(M(b))throw Error(q(229));var d="on"+a[0].toUpperCase()+a.slice(1),e=new ra;e.target=b;e.type=a.toLowerCase();var g=ya(b),f=new za(d,e.type,g,e,b);f.persist();k(f,c);Aa.has(a)?f&&f._reactName&&va(f._targetInst,null,f):f&&f._reactName&&ea(f._targetInst,
+wa,f);v.unstable_batchedUpdates(function(){Ba(b);if(f){var a=f._dispatchListeners,c=f._dispatchInstances;if(Array.isArray(a))for(var d=0;d<a.length&&!f.isPropagationStopped();d++)da(f,a[d],c[d]);else a&&da(f,a,c);f._dispatchListeners=null;f._dispatchInstances=null;f.isPersistent()||f.constructor.release(f)}if(E)throw a=L,E=!1,L=null,a;});Ca()}}var k=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,t=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u={eventPhase:0,bubbles:0,cancelable:0,
+timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},za=m(u),x=k({},u,{view:0,detail:0});m(x);var N,O,A,r=k({},x,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:J,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==A&&(A&&"mousemove"===a.type?
+(N=a.screenX-A.screenX,O=a.screenY-A.screenY):O=N=0,A=a);return N},movementY:function(a){return"movementY"in a?a.movementY:O}});m(r);var n=k({},r,{dataTransfer:0});m(n);n=k({},x,{relatedTarget:0});m(n);n=k({},u,{animationName:0,elapsedTime:0,pseudoElement:0});m(n);n=k({},u,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});m(n);n=k({},u,{data:0});m(n);var Da={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",
+Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ea={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},
+ma={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};n=k({},x,{key:function(a){if(a.key){var b=Da[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=I(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Ea[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:J,charCode:function(a){return"keypress"===a.type?I(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===
+a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?I(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});m(n);n=k({},r,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});m(n);x=k({},x,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:J});m(x);u=k({},u,{propertyName:0,elapsedTime:0,pseudoElement:0});m(u);r=k({},r,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in
+a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0});m(r);var C=null,y=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_flushAllWithoutAsserting;r=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;var Fa=r[5],P=r[6],Ga=v.unstable_batchedUpdates,Q=t.IsSomeRendererActing,ha="function"===typeof y,K=y||function(){for(var a=!1;Fa();)a=!0;return a},H=0,ia=!1,R=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events[6],
+Ha=v.unstable_batchedUpdates,S=t.IsSomeRendererActing,oa=function(a,b,c,d,e,g,f,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(Ia){this.onError(Ia)}},z=!1,D=null,E=!1,L=null,pa={onError:function(a){z=!0;D=a}};t=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;var ya=t[0],ta=t[1],ua=t[2],Ba=t[3],Ca=t[4],ja={},Aa=new Set(["mouseEnter","mouseLeave","pointerEnter","pointerLeave"]),Ja="blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ");
+(function(){Ja.forEach(function(a){ja[a]=xa(a)})})();h.Simulate=ja;h.act=function(a){function b(){H--;Q.current=c;P.current=d}!1===ia&&(ia=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));H++;var c=Q.current,d=P.current;Q.current=!0;P.current=!0;try{var e=Ga(a)}catch(g){throw b(),g;}if(null!==e&&"object"===typeof e&&"function"===typeof e.then)return{then:function(a,d){e.then(function(){1<H||!0===ha&&!0===c?(b(),a()):X(function(c){b();
+c?d(c):a()})},function(a){b();d(a)})}};try{1!==H||!1!==ha&&!1!==c||K(),b()}catch(g){throw b(),g;}return{then:function(a){a()}}};h.findAllInRenderedTree=G;h.findRenderedComponentWithType=function(a,b){w(a,"findRenderedComponentWithType");a=ca(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]};h.findRenderedDOMComponentWithClass=function(a,b){w(a,"findRenderedDOMComponentWithClass");a=aa(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+
+a.length+") for class:"+b);return a[0]};h.findRenderedDOMComponentWithTag=function(a,b){w(a,"findRenderedDOMComponentWithTag");a=ba(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]};h.isCompositeComponent=M;h.isCompositeComponentWithType=Z;h.isDOMComponent=F;h.isDOMComponentElement=function(a){return!!(a&&p.isValidElement(a)&&a.tagName)};h.isElement=function(a){return p.isValidElement(a)};h.isElementOfType=function(a,b){return p.isValidElement(a)&&
+a.type===b};h.mockComponent=function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return p.createElement(b,null,this.props.children)});return this};h.nativeTouchData=function(a,b){return{touches:[{pageX:a,pageY:b}]}};h.renderIntoDocument=function(a){var b=document.createElement("div");return v.render(a,b)};h.scryRenderedComponentsWithType=ca;h.scryRenderedDOMComponentsWithClass=aa;h.scryRenderedDOMComponentsWithTag=ba;h.traverseTwoPhase=ea;h.unstable_concurrentAct=
+function(a){if(void 0===y)throw Error("This version of `act` requires a special mock build of Scheduler.");if(!0!==setTimeout._isMockFunction)throw Error("This version of `act` requires Jest's timer mocks (i.e. jest.useFakeTimers).");var b=S.current,c=R.current;S.current=!0;R.current=!0;var d=function(){S.current=b;R.current=c};try{var e=Ha(a);if("object"===typeof e&&null!==e&&"function"===typeof e.then)return{then:function(a,b){e.then(function(){Y(function(){d();a()},function(a){d();b(a)})},function(a){d();
+b(a)})}};try{do var g=y();while(g)}finally{d()}}catch(f){throw d(),f;}}});
+})();
diff --git a/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.development.js b/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.development.js
deleted file mode 100644
index b204cc7..0000000
--- a/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.development.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-fizz.browser.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
- typeof define === 'function' && define.amd ? define(factory) :
- (global = global || self, global.ReactDOMFizzServer = factory());
-}(this, (function () { 'use strict';
-
- function scheduleWork(callback) {
- callback();
- }
- function flushBuffered(destination) {// WHATWG Streams do not yet have a way to flush the underlying
- // transform streams. https://github.com/whatwg/streams/issues/960
- }
- function writeChunk(destination, buffer) {
- destination.enqueue(buffer);
- return destination.desiredSize > 0;
- }
- function close(destination) {
- destination.close();
- }
- var textEncoder = new TextEncoder();
- function convertStringToBuffer(content) {
- return textEncoder.encode(content);
- }
-
- function formatChunkAsString(type, props) {
- var str = '<' + type + '>';
-
- if (typeof props.children === 'string') {
- str += props.children;
- }
-
- str += '</' + type + '>';
- return str;
- }
- function formatChunk(type, props) {
- return convertStringToBuffer(formatChunkAsString(type, props));
- }
-
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
-
- function createRequest(children, destination) {
- return {
- destination: destination,
- children: children,
- completedChunks: [],
- flowing: false
- };
- }
-
- function performWork(request) {
- var element = request.children;
- request.children = null;
-
- if (element && element.$$typeof !== REACT_ELEMENT_TYPE) {
- return;
- }
-
- var type = element.type;
- var props = element.props;
-
- if (typeof type !== 'string') {
- return;
- }
-
- request.completedChunks.push(formatChunk(type, props));
-
- if (request.flowing) {
- flushCompletedChunks(request);
- }
-
- flushBuffered(request.destination);
- }
-
- function flushCompletedChunks(request) {
- var destination = request.destination;
- var chunks = request.completedChunks;
- request.completedChunks = [];
-
- try {
- for (var i = 0; i < chunks.length; i++) {
- var chunk = chunks[i];
- writeChunk(destination, chunk);
- }
- } finally {
- }
-
- close(destination);
- }
-
- function startWork(request) {
- request.flowing = true;
- scheduleWork(function () {
- return performWork(request);
- });
- }
- function startFlowing(request) {
- request.flowing = false;
- flushCompletedChunks(request);
- }
-
- function renderToReadableStream(children) {
- var request;
- return new ReadableStream({
- start: function (controller) {
- request = createRequest(children, controller);
- startWork(request);
- },
- pull: function (controller) {
- startFlowing(request);
- },
- cancel: function (reason) {}
- });
- }
-
- var ReactDOMFizzServerBrowser = {
- renderToReadableStream: renderToReadableStream
- };
-
- // TODO: decide on the top-level export form.
- // This is hacky but makes it work with both Rollup and Jest
-
-
- var unstableFizz_browser = ReactDOMFizzServerBrowser.default || ReactDOMFizzServerBrowser;
-
- return unstableFizz_browser;
-
-})));
diff --git a/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.production.min.js b/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.production.min.js
deleted file mode 100644
index 8f687a8..0000000
--- a/node_modules/react-dom/umd/react-dom-unstable-fizz.browser.production.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-fizz.browser.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';(function(f,d){"object"===typeof exports&&"undefined"!==typeof module?module.exports=d():"function"===typeof define&&define.amd?define(d):(f=f||self,f.ReactDOMFizzServer=d())})(this,function(){function f(b,c){var a="<"+b+">";"string"===typeof c.children&&(a+=c.children);return a+("</"+b+">")}function d(b){var c=b.destination,a=b.completedChunks;b.completedChunks=[];for(b=0;b<a.length;b++)c.enqueue(a[b]);c.close()}var h=new TextEncoder,k="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):
-60103,g={renderToReadableStream:function(b){var c;return new ReadableStream({start:function(a){a=c={destination:a,children:b,completedChunks:[],flowing:!1};a.flowing=!0;var e=a.children;a.children=null;if(!e||e.$$typeof===k){var g=e.type;e=e.props;"string"===typeof g&&(a.completedChunks.push(h.encode(f(g,e))),a.flowing&&d(a))}},pull:function(a){a=c;a.flowing=!1;d(a)},cancel:function(a){}})}};return g.default||g});
diff --git a/node_modules/react-dom/umd/react-dom-unstable-native-dependencies.development.js b/node_modules/react-dom/umd/react-dom-unstable-native-dependencies.development.js
deleted file mode 100644
index 06ecd18..0000000
--- a/node_modules/react-dom/umd/react-dom-unstable-native-dependencies.development.js
+++ /dev/null
@@ -1,1628 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-native-dependencies.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react-dom'), require('react')) :
- typeof define === 'function' && define.amd ? define(['react-dom', 'react'], factory) :
- (global = global || self, global.ReactDOMUnstableNativeDependencies = factory(global.ReactDOM, global.React));
-}(this, (function (ReactDOM, React) { 'use strict';
-
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
- // Current owner and dispatcher used to share the same ref,
- // but PR #14548 split them out to better support the react-debug-tools package.
-
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
- }
-
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
- }
-
- // by calls to these methods by a Babel plugin.
- //
- // In PROD (or in packages without access to React internals),
- // they are left as they are instead.
-
- function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
- }
- function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
- }
-
- function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
-
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
- }
- }
-
- {
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
- }
- }
-
- var getFiberCurrentPropsFromNode = null;
- var getInstanceFromNode = null;
- var getNodeFromInstance = null;
- function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
- getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
- getInstanceFromNode = getInstanceFromNodeImpl;
- getNodeFromInstance = getNodeFromInstanceImpl;
-
- {
- if (!getNodeFromInstance || !getInstanceFromNode) {
- error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
- }
- }
- }
- var validateEventDispatches;
-
- {
- validateEventDispatches = function (event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
- var listenersIsArr = Array.isArray(dispatchListeners);
- var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
- var instancesIsArr = Array.isArray(dispatchInstances);
- var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
-
- if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {
- error('EventPluginUtils: Invalid `event`.');
- }
- };
- }
- /**
- * Standard/simple iteration through an event's collected dispatches, but stops
- * at the first dispatch execution returning true, and returns that id.
- *
- * @return {?string} id of the first dispatch execution who's listener returns
- * true, or null if no listener returned true.
- */
-
- function executeDispatchesInOrderStopAtTrueImpl(event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
-
- {
- validateEventDispatches(event);
- }
-
- if (Array.isArray(dispatchListeners)) {
- for (var i = 0; i < dispatchListeners.length; i++) {
- if (event.isPropagationStopped()) {
- break;
- } // Listeners and Instances are two parallel arrays that are always in sync.
-
-
- if (dispatchListeners[i](event, dispatchInstances[i])) {
- return dispatchInstances[i];
- }
- }
- } else if (dispatchListeners) {
- if (dispatchListeners(event, dispatchInstances)) {
- return dispatchInstances;
- }
- }
-
- return null;
- }
- /**
- * @see executeDispatchesInOrderStopAtTrueImpl
- */
-
-
- function executeDispatchesInOrderStopAtTrue(event) {
- var ret = executeDispatchesInOrderStopAtTrueImpl(event);
- event._dispatchInstances = null;
- event._dispatchListeners = null;
- return ret;
- }
- /**
- * Execution of a "direct" dispatch - there must be at most one dispatch
- * accumulated on the event or it is considered an error. It doesn't really make
- * sense for an event with multiple dispatches (bubbled) to keep track of the
- * return values at each dispatch execution, but it does tend to make sense when
- * dealing with "direct" dispatches.
- *
- * @return {*} The return value of executing the single dispatch.
- */
-
- function executeDirectDispatch(event) {
- {
- validateEventDispatches(event);
- }
-
- var dispatchListener = event._dispatchListeners;
- var dispatchInstance = event._dispatchInstances;
-
- if (!!Array.isArray(dispatchListener)) {
- {
- throw Error( "executeDirectDispatch(...): Invalid `event`." );
- }
- }
-
- event.currentTarget = dispatchListener ? getNodeFromInstance(dispatchInstance) : null;
- var res = dispatchListener ? dispatchListener(event) : null;
- event.currentTarget = null;
- event._dispatchListeners = null;
- event._dispatchInstances = null;
- return res;
- }
- /**
- * @param {SyntheticEvent} event
- * @return {boolean} True iff number of dispatches accumulated is greater than 0.
- */
-
- function hasDispatches(event) {
- return !!event._dispatchListeners;
- }
-
- var HostComponent = 5;
-
- function getParent(inst) {
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
-
- if (inst) {
- return inst;
- }
-
- return null;
- }
- /**
- * Return the lowest common ancestor of A and B, or null if they are in
- * different trees.
- */
-
-
- function getLowestCommonAncestor(instA, instB) {
- var depthA = 0;
-
- for (var tempA = instA; tempA; tempA = getParent(tempA)) {
- depthA++;
- }
-
- var depthB = 0;
-
- for (var tempB = instB; tempB; tempB = getParent(tempB)) {
- depthB++;
- } // If A is deeper, crawl up.
-
-
- while (depthA - depthB > 0) {
- instA = getParent(instA);
- depthA--;
- } // If B is deeper, crawl up.
-
-
- while (depthB - depthA > 0) {
- instB = getParent(instB);
- depthB--;
- } // Walk in lockstep until we find a match.
-
-
- var depth = depthA;
-
- while (depth--) {
- if (instA === instB || instA === instB.alternate) {
- return instA;
- }
-
- instA = getParent(instA);
- instB = getParent(instB);
- }
-
- return null;
- }
- /**
- * Return if A is an ancestor of B.
- */
-
- function isAncestor(instA, instB) {
- while (instB) {
- if (instA === instB || instA === instB.alternate) {
- return true;
- }
-
- instB = getParent(instB);
- }
-
- return false;
- }
- /**
- * Return the parent instance of the passed-in instance.
- */
-
- function getParentInstance(inst) {
- return getParent(inst);
- }
- /**
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
- */
-
- function traverseTwoPhase(inst, fn, arg) {
- var path = [];
-
- while (inst) {
- path.push(inst);
- inst = getParent(inst);
- }
-
- var i;
-
- for (i = path.length; i-- > 0;) {
- fn(path[i], 'captured', arg);
- }
-
- for (i = 0; i < path.length; i++) {
- fn(path[i], 'bubbled', arg);
- }
- }
-
- function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
- }
-
- function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
-
- default:
- return false;
- }
- }
- /**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
-
-
- function getListener(inst, registrationName) {
- var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
- // live here; needs to be moved to a better place soon
-
- var stateNode = inst.stateNode;
-
- if (!stateNode) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
-
- var props = getFiberCurrentPropsFromNode(stateNode);
-
- if (!props) {
- // Work in progress.
- return null;
- }
-
- listener = props[registrationName];
-
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
-
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
-
- return listener;
- }
-
- /**
- * Accumulates items that must not be null or undefined into the first one. This
- * is used to conserve memory by avoiding array allocations, and thus sacrifices
- * API cleanness. Since `current` can be null before being passed in and not
- * null after this function, make sure to assign it back to `current`:
- *
- * `a = accumulateInto(a, b);`
- *
- * This API should be sparingly used. Try `accumulate` for something cleaner.
- *
- * @return {*|array<*>} An accumulation of items.
- */
-
- function accumulateInto(current, next) {
- if (!(next != null)) {
- {
- throw Error( "accumulateInto(...): Accumulated items must not be null or undefined." );
- }
- }
-
- if (current == null) {
- return next;
- } // Both are not empty. Warning: Never call x.concat(y) when you are not
- // certain that x is an Array (x could be a string with concat method).
-
-
- if (Array.isArray(current)) {
- if (Array.isArray(next)) {
- current.push.apply(current, next);
- return current;
- }
-
- current.push(next);
- return current;
- }
-
- if (Array.isArray(next)) {
- // A bit too dangerous to mutate `next`.
- return [current].concat(next);
- }
-
- return [current, next];
- }
-
- /**
- * @param {array} arr an "accumulation" of items which is either an Array or
- * a single item. Useful when paired with the `accumulate` module. This is a
- * simple utility that allows us to reason about a collection of items, but
- * handling the case when there is exactly one item (and we do not need to
- * allocate an array).
- * @param {function} cb Callback invoked with each element or a collection.
- * @param {?} [scope] Scope used as `this` in a callback.
- */
- function forEachAccumulated(arr, cb, scope) {
- if (Array.isArray(arr)) {
- arr.forEach(cb, scope);
- } else if (arr) {
- cb.call(scope, arr);
- }
- }
-
- /**
- * Some event types have a notion of different registration names for different
- * "phases" of propagation. This finds listeners by a given phase.
- */
- function listenerAtPhase(inst, event, propagationPhase) {
- var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
- return getListener(inst, registrationName);
- }
- /**
- * A small set of propagation patterns, each of which will accept a small amount
- * of information, and generate a set of "dispatch ready event objects" - which
- * are sets of events that have already been annotated with a set of dispatched
- * listener functions/ids. The API is designed this way to discourage these
- * propagation strategies from actually executing the dispatches, since we
- * always want to collect the entire set of dispatches before executing even a
- * single one.
- */
-
- /**
- * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
- * here, allows us to not have to bind or create functions for each event.
- * Mutating the event's members allows us to not have to create a wrapping
- * "dispatch" object that pairs the event with the listener.
- */
-
-
- function accumulateDirectionalDispatches(inst, phase, event) {
- {
- if (!inst) {
- error('Dispatching inst must not be null');
- }
- }
-
- var listener = listenerAtPhase(inst, event, phase);
-
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
- }
- /**
- * Collect dispatches (must be entirely collected before dispatching - see unit
- * tests). Lazily allocate the array to conserve memory. We must loop through
- * each event and perform the traversal for each one. We cannot perform a
- * single traversal for the entire collection of events because each event may
- * have a different target.
- */
-
-
- function accumulateTwoPhaseDispatchesSingle(event) {
- if (event && event.dispatchConfig.phasedRegistrationNames) {
- traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
- }
- }
- /**
- * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
- */
-
-
- function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
- if (event && event.dispatchConfig.phasedRegistrationNames) {
- var targetInst = event._targetInst;
- var parentInst = targetInst ? getParentInstance(targetInst) : null;
- traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
- }
- }
- /**
- * Accumulates without regard to direction, does not look for phased
- * registration names. Same as `accumulateDirectDispatchesSingle` but without
- * requiring that the `dispatchMarker` be the same as the dispatched ID.
- */
-
-
- function accumulateDispatches(inst, ignoredDirection, event) {
- if (inst && event && event.dispatchConfig.registrationName) {
- var registrationName = event.dispatchConfig.registrationName;
- var listener = getListener(inst, registrationName);
-
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
- }
- }
- /**
- * Accumulates dispatches on an `SyntheticEvent`, but only for the
- * `dispatchMarker`.
- * @param {SyntheticEvent} event
- */
-
-
- function accumulateDirectDispatchesSingle(event) {
- if (event && event.dispatchConfig.registrationName) {
- accumulateDispatches(event._targetInst, null, event);
- }
- }
-
- function accumulateTwoPhaseDispatches(events) {
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
- }
- function accumulateTwoPhaseDispatchesSkipTarget(events) {
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
- }
- function accumulateDirectDispatches(events) {
- forEachAccumulated(events, accumulateDirectDispatchesSingle);
- }
-
- var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _assign = ReactInternals.assign;
-
- var EVENT_POOL_SIZE = 10;
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var EventInterface = {
- type: null,
- target: null,
- // currentTarget is set when dispatching; no use in copying it here
- currentTarget: function () {
- return null;
- },
- eventPhase: null,
- bubbles: null,
- cancelable: null,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: null,
- isTrusted: null
- };
-
- function functionThatReturnsTrue() {
- return true;
- }
-
- function functionThatReturnsFalse() {
- return false;
- }
- /**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- *
- * @param {object} dispatchConfig Configuration used to dispatch this event.
- * @param {*} targetInst Marker identifying the event target.
- * @param {object} nativeEvent Native browser event.
- * @param {DOMEventTarget} nativeEventTarget Target node.
- */
-
-
- function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
- {
- // these have a getter/setter for warnings
- delete this.nativeEvent;
- delete this.preventDefault;
- delete this.stopPropagation;
- delete this.isDefaultPrevented;
- delete this.isPropagationStopped;
- }
-
- this.dispatchConfig = dispatchConfig;
- this._targetInst = targetInst;
- this.nativeEvent = nativeEvent;
- var Interface = this.constructor.Interface;
-
- for (var propName in Interface) {
- if (!Interface.hasOwnProperty(propName)) {
- continue;
- }
-
- {
- delete this[propName]; // this has a getter/setter for warnings
- }
-
- var normalize = Interface[propName];
-
- if (normalize) {
- this[propName] = normalize(nativeEvent);
- } else {
- if (propName === 'target') {
- this.target = nativeEventTarget;
- } else {
- this[propName] = nativeEvent[propName];
- }
- }
- }
-
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
-
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
-
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
- }
-
- _assign(SyntheticEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.preventDefault) {
- event.preventDefault();
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
-
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.stopPropagation) {
- event.stopPropagation();
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
-
- this.isPropagationStopped = functionThatReturnsTrue;
- },
-
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {
- this.isPersistent = functionThatReturnsTrue;
- },
-
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsFalse,
-
- /**
- * `PooledClass` looks for `destructor` on each instance it releases.
- */
- destructor: function () {
- var Interface = this.constructor.Interface;
-
- for (var propName in Interface) {
- {
- Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
- }
- }
-
- this.dispatchConfig = null;
- this._targetInst = null;
- this.nativeEvent = null;
- this.isDefaultPrevented = functionThatReturnsFalse;
- this.isPropagationStopped = functionThatReturnsFalse;
- this._dispatchListeners = null;
- this._dispatchInstances = null;
-
- {
- Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
- Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
- Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
- Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
- Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
- }
- }
- });
-
- SyntheticEvent.Interface = EventInterface;
- /**
- * Helper to reduce boilerplate when creating subclasses.
- */
-
- SyntheticEvent.extend = function (Interface) {
- var Super = this;
-
- var E = function () {};
-
- E.prototype = Super.prototype;
- var prototype = new E();
-
- function Class() {
- return Super.apply(this, arguments);
- }
-
- _assign(prototype, Class.prototype);
-
- Class.prototype = prototype;
- Class.prototype.constructor = Class;
- Class.Interface = _assign({}, Super.Interface, Interface);
- Class.extend = Super.extend;
- addEventPoolingTo(Class);
- return Class;
- };
-
- addEventPoolingTo(SyntheticEvent);
- /**
- * Helper to nullify syntheticEvent instance properties when destructing
- *
- * @param {String} propName
- * @param {?object} getVal
- * @return {object} defineProperty object
- */
-
- function getPooledWarningPropertyDefinition(propName, getVal) {
- var isFunction = typeof getVal === 'function';
- return {
- configurable: true,
- set: set,
- get: get
- };
-
- function set(val) {
- var action = isFunction ? 'setting the method' : 'setting the property';
- warn(action, 'This is effectively a no-op');
- return val;
- }
-
- function get() {
- var action = isFunction ? 'accessing the method' : 'accessing the property';
- var result = isFunction ? 'This is a no-op function' : 'This is set to null';
- warn(action, result);
- return getVal;
- }
-
- function warn(action, result) {
- {
- error("This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
- }
- }
- }
-
- function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
- var EventConstructor = this;
-
- if (EventConstructor.eventPool.length) {
- var instance = EventConstructor.eventPool.pop();
- EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
- return instance;
- }
-
- return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
- }
-
- function releasePooledEvent(event) {
- var EventConstructor = this;
-
- if (!(event instanceof EventConstructor)) {
- {
- throw Error( "Trying to release an event instance into a pool of a different type." );
- }
- }
-
- event.destructor();
-
- if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
- EventConstructor.eventPool.push(event);
- }
- }
-
- function addEventPoolingTo(EventConstructor) {
- EventConstructor.eventPool = [];
- EventConstructor.getPooled = getPooledEvent;
- EventConstructor.release = releasePooledEvent;
- }
-
- /**
- * `touchHistory` isn't actually on the native event, but putting it in the
- * interface will ensure that it is cleaned up when pooled/destroyed. The
- * `ResponderEventPlugin` will populate it appropriately.
- */
-
- var ResponderSyntheticEvent = SyntheticEvent.extend({
- touchHistory: function (nativeEvent) {
- return null; // Actually doesn't even look at the native event.
- }
- });
-
- // Note: ideally these would be imported from DOMTopLevelEventTypes,
- // but our build system currently doesn't let us do that from a fork.
- var TOP_TOUCH_START = 'touchstart';
- var TOP_TOUCH_MOVE = 'touchmove';
- var TOP_TOUCH_END = 'touchend';
- var TOP_TOUCH_CANCEL = 'touchcancel';
- var TOP_SCROLL = 'scroll';
- var TOP_SELECTION_CHANGE = 'selectionchange';
- var TOP_MOUSE_DOWN = 'mousedown';
- var TOP_MOUSE_MOVE = 'mousemove';
- var TOP_MOUSE_UP = 'mouseup';
- function isStartish(topLevelType) {
- return topLevelType === TOP_TOUCH_START || topLevelType === TOP_MOUSE_DOWN;
- }
- function isMoveish(topLevelType) {
- return topLevelType === TOP_TOUCH_MOVE || topLevelType === TOP_MOUSE_MOVE;
- }
- function isEndish(topLevelType) {
- return topLevelType === TOP_TOUCH_END || topLevelType === TOP_TOUCH_CANCEL || topLevelType === TOP_MOUSE_UP;
- }
- var startDependencies = [TOP_TOUCH_START, TOP_MOUSE_DOWN];
- var moveDependencies = [TOP_TOUCH_MOVE, TOP_MOUSE_MOVE];
- var endDependencies = [TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_MOUSE_UP];
-
- /**
- * Tracks the position and time of each active touch by `touch.identifier`. We
- * should typically only see IDs in the range of 1-20 because IDs get recycled
- * when touches end and start again.
- */
-
- var MAX_TOUCH_BANK = 20;
- var touchBank = [];
- var touchHistory = {
- touchBank: touchBank,
- numberActiveTouches: 0,
- // If there is only one active touch, we remember its location. This prevents
- // us having to loop through all of the touches all the time in the most
- // common case.
- indexOfSingleActiveTouch: -1,
- mostRecentTimeStamp: 0
- };
-
- function timestampForTouch(touch) {
- // The legacy internal implementation provides "timeStamp", which has been
- // renamed to "timestamp". Let both work for now while we iron it out
- // TODO (evv): rename timeStamp to timestamp in internal code
- return touch.timeStamp || touch.timestamp;
- }
- /**
- * TODO: Instead of making gestures recompute filtered velocity, we could
- * include a built in velocity computation that can be reused globally.
- */
-
-
- function createTouchRecord(touch) {
- return {
- touchActive: true,
- startPageX: touch.pageX,
- startPageY: touch.pageY,
- startTimeStamp: timestampForTouch(touch),
- currentPageX: touch.pageX,
- currentPageY: touch.pageY,
- currentTimeStamp: timestampForTouch(touch),
- previousPageX: touch.pageX,
- previousPageY: touch.pageY,
- previousTimeStamp: timestampForTouch(touch)
- };
- }
-
- function resetTouchRecord(touchRecord, touch) {
- touchRecord.touchActive = true;
- touchRecord.startPageX = touch.pageX;
- touchRecord.startPageY = touch.pageY;
- touchRecord.startTimeStamp = timestampForTouch(touch);
- touchRecord.currentPageX = touch.pageX;
- touchRecord.currentPageY = touch.pageY;
- touchRecord.currentTimeStamp = timestampForTouch(touch);
- touchRecord.previousPageX = touch.pageX;
- touchRecord.previousPageY = touch.pageY;
- touchRecord.previousTimeStamp = timestampForTouch(touch);
- }
-
- function getTouchIdentifier(_ref) {
- var identifier = _ref.identifier;
-
- if (!(identifier != null)) {
- {
- throw Error( "Touch object is missing identifier." );
- }
- }
-
- {
- if (identifier > MAX_TOUCH_BANK) {
- error('Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK);
- }
- }
-
- return identifier;
- }
-
- function recordTouchStart(touch) {
- var identifier = getTouchIdentifier(touch);
- var touchRecord = touchBank[identifier];
-
- if (touchRecord) {
- resetTouchRecord(touchRecord, touch);
- } else {
- touchBank[identifier] = createTouchRecord(touch);
- }
-
- touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
- }
-
- function recordTouchMove(touch) {
- var touchRecord = touchBank[getTouchIdentifier(touch)];
-
- if (touchRecord) {
- touchRecord.touchActive = true;
- touchRecord.previousPageX = touchRecord.currentPageX;
- touchRecord.previousPageY = touchRecord.currentPageY;
- touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;
- touchRecord.currentPageX = touch.pageX;
- touchRecord.currentPageY = touch.pageY;
- touchRecord.currentTimeStamp = timestampForTouch(touch);
- touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
- } else {
- {
- warn('Cannot record touch move without a touch start.\n' + 'Touch Move: %s\n' + 'Touch Bank: %s', printTouch(touch), printTouchBank());
- }
- }
- }
-
- function recordTouchEnd(touch) {
- var touchRecord = touchBank[getTouchIdentifier(touch)];
-
- if (touchRecord) {
- touchRecord.touchActive = false;
- touchRecord.previousPageX = touchRecord.currentPageX;
- touchRecord.previousPageY = touchRecord.currentPageY;
- touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;
- touchRecord.currentPageX = touch.pageX;
- touchRecord.currentPageY = touch.pageY;
- touchRecord.currentTimeStamp = timestampForTouch(touch);
- touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
- } else {
- {
- warn('Cannot record touch end without a touch start.\n' + 'Touch End: %s\n' + 'Touch Bank: %s', printTouch(touch), printTouchBank());
- }
- }
- }
-
- function printTouch(touch) {
- return JSON.stringify({
- identifier: touch.identifier,
- pageX: touch.pageX,
- pageY: touch.pageY,
- timestamp: timestampForTouch(touch)
- });
- }
-
- function printTouchBank() {
- var printed = JSON.stringify(touchBank.slice(0, MAX_TOUCH_BANK));
-
- if (touchBank.length > MAX_TOUCH_BANK) {
- printed += ' (original size: ' + touchBank.length + ')';
- }
-
- return printed;
- }
-
- var ResponderTouchHistoryStore = {
- recordTouchTrack: function (topLevelType, nativeEvent) {
- if (isMoveish(topLevelType)) {
- nativeEvent.changedTouches.forEach(recordTouchMove);
- } else if (isStartish(topLevelType)) {
- nativeEvent.changedTouches.forEach(recordTouchStart);
- touchHistory.numberActiveTouches = nativeEvent.touches.length;
-
- if (touchHistory.numberActiveTouches === 1) {
- touchHistory.indexOfSingleActiveTouch = nativeEvent.touches[0].identifier;
- }
- } else if (isEndish(topLevelType)) {
- nativeEvent.changedTouches.forEach(recordTouchEnd);
- touchHistory.numberActiveTouches = nativeEvent.touches.length;
-
- if (touchHistory.numberActiveTouches === 1) {
- for (var i = 0; i < touchBank.length; i++) {
- var touchTrackToCheck = touchBank[i];
-
- if (touchTrackToCheck != null && touchTrackToCheck.touchActive) {
- touchHistory.indexOfSingleActiveTouch = i;
- break;
- }
- }
-
- {
- var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];
-
- if (activeRecord == null || !activeRecord.touchActive) {
- error('Cannot find single active touch.');
- }
- }
- }
- }
- },
- touchHistory: touchHistory
- };
-
- /**
- * Accumulates items that must not be null or undefined.
- *
- * This is used to conserve memory by avoiding array allocations.
- *
- * @return {*|array<*>} An accumulation of items.
- */
-
- function accumulate(current, next) {
- if (!(next != null)) {
- {
- throw Error( "accumulate(...): Accumulated items must not be null or undefined." );
- }
- }
-
- if (current == null) {
- return next;
- } // Both are not empty. Warning: Never call x.concat(y) when you are not
- // certain that x is an Array (x could be a string with concat method).
-
-
- if (Array.isArray(current)) {
- return current.concat(next);
- }
-
- if (Array.isArray(next)) {
- return [current].concat(next);
- }
-
- return [current, next];
- }
-
- /**
- * Instance of element that should respond to touch/move types of interactions,
- * as indicated explicitly by relevant callbacks.
- */
-
- var responderInst = null;
- /**
- * Count of current touches. A textInput should become responder iff the
- * selection changes while there is a touch on the screen.
- */
-
- var trackedTouchCount = 0;
-
- var changeResponder = function (nextResponderInst, blockHostResponder) {
- var oldResponderInst = responderInst;
- responderInst = nextResponderInst;
-
- if (ResponderEventPlugin.GlobalResponderHandler !== null) {
- ResponderEventPlugin.GlobalResponderHandler.onChange(oldResponderInst, nextResponderInst, blockHostResponder);
- }
- };
-
- var eventTypes = {
- /**
- * On a `touchStart`/`mouseDown`, is it desired that this element become the
- * responder?
- */
- startShouldSetResponder: {
- phasedRegistrationNames: {
- bubbled: 'onStartShouldSetResponder',
- captured: 'onStartShouldSetResponderCapture'
- },
- dependencies: startDependencies
- },
-
- /**
- * On a `scroll`, is it desired that this element become the responder? This
- * is usually not needed, but should be used to retroactively infer that a
- * `touchStart` had occurred during momentum scroll. During a momentum scroll,
- * a touch start will be immediately followed by a scroll event if the view is
- * currently scrolling.
- *
- * TODO: This shouldn't bubble.
- */
- scrollShouldSetResponder: {
- phasedRegistrationNames: {
- bubbled: 'onScrollShouldSetResponder',
- captured: 'onScrollShouldSetResponderCapture'
- },
- dependencies: [TOP_SCROLL]
- },
-
- /**
- * On text selection change, should this element become the responder? This
- * is needed for text inputs or other views with native selection, so the
- * JS view can claim the responder.
- *
- * TODO: This shouldn't bubble.
- */
- selectionChangeShouldSetResponder: {
- phasedRegistrationNames: {
- bubbled: 'onSelectionChangeShouldSetResponder',
- captured: 'onSelectionChangeShouldSetResponderCapture'
- },
- dependencies: [TOP_SELECTION_CHANGE]
- },
-
- /**
- * On a `touchMove`/`mouseMove`, is it desired that this element become the
- * responder?
- */
- moveShouldSetResponder: {
- phasedRegistrationNames: {
- bubbled: 'onMoveShouldSetResponder',
- captured: 'onMoveShouldSetResponderCapture'
- },
- dependencies: moveDependencies
- },
-
- /**
- * Direct responder events dispatched directly to responder. Do not bubble.
- */
- responderStart: {
- registrationName: 'onResponderStart',
- dependencies: startDependencies
- },
- responderMove: {
- registrationName: 'onResponderMove',
- dependencies: moveDependencies
- },
- responderEnd: {
- registrationName: 'onResponderEnd',
- dependencies: endDependencies
- },
- responderRelease: {
- registrationName: 'onResponderRelease',
- dependencies: endDependencies
- },
- responderTerminationRequest: {
- registrationName: 'onResponderTerminationRequest',
- dependencies: []
- },
- responderGrant: {
- registrationName: 'onResponderGrant',
- dependencies: []
- },
- responderReject: {
- registrationName: 'onResponderReject',
- dependencies: []
- },
- responderTerminate: {
- registrationName: 'onResponderTerminate',
- dependencies: []
- }
- };
- /**
- *
- * Responder System:
- * ----------------
- *
- * - A global, solitary "interaction lock" on a view.
- * - If a node becomes the responder, it should convey visual feedback
- * immediately to indicate so, either by highlighting or moving accordingly.
- * - To be the responder means, that touches are exclusively important to that
- * responder view, and no other view.
- * - While touches are still occurring, the responder lock can be transferred to
- * a new view, but only to increasingly "higher" views (meaning ancestors of
- * the current responder).
- *
- * Responder being granted:
- * ------------------------
- *
- * - Touch starts, moves, and scrolls can cause an ID to become the responder.
- * - We capture/bubble `startShouldSetResponder`/`moveShouldSetResponder` to
- * the "appropriate place".
- * - If nothing is currently the responder, the "appropriate place" is the
- * initiating event's `targetID`.
- * - If something *is* already the responder, the "appropriate place" is the
- * first common ancestor of the event target and the current `responderInst`.
- * - Some negotiation happens: See the timing diagram below.
- * - Scrolled views automatically become responder. The reasoning is that a
- * platform scroll view that isn't built on top of the responder system has
- * began scrolling, and the active responder must now be notified that the
- * interaction is no longer locked to it - the system has taken over.
- *
- * - Responder being released:
- * As soon as no more touches that *started* inside of descendants of the
- * *current* responderInst, an `onResponderRelease` event is dispatched to the
- * current responder, and the responder lock is released.
- *
- * TODO:
- * - on "end", a callback hook for `onResponderEndShouldRemainResponder` that
- * determines if the responder lock should remain.
- * - If a view shouldn't "remain" the responder, any active touches should by
- * default be considered "dead" and do not influence future negotiations or
- * bubble paths. It should be as if those touches do not exist.
- * -- For multitouch: Usually a translate-z will choose to "remain" responder
- * after one out of many touches ended. For translate-y, usually the view
- * doesn't wish to "remain" responder after one of many touches end.
- * - Consider building this on top of a `stopPropagation` model similar to
- * `W3C` events.
- * - Ensure that `onResponderTerminate` is called on touch cancels, whether or
- * not `onResponderTerminationRequest` returns `true` or `false`.
- *
- */
-
- /* Negotiation Performed
- +-----------------------+
- / \
- Process low level events to + Current Responder + wantsResponderID
- determine who to perform negot-| (if any exists at all) |
- iation/transition | Otherwise just pass through|
- -------------------------------+----------------------------+------------------+
- Bubble to find first ID | |
- to return true:wantsResponderID| |
- | |
- +-------------+ | |
- | onTouchStart| | |
- +------+------+ none | |
- | return| |
- +-----------v-------------+true| +------------------------+ |
- |onStartShouldSetResponder|----->|onResponderStart (cur) |<-----------+
- +-----------+-------------+ | +------------------------+ | |
- | | | +--------+-------+
- | returned true for| false:REJECT +-------->|onResponderReject
- | wantsResponderID | | | +----------------+
- | (now attempt | +------------------+-----+ |
- | handoff) | | onResponder | |
- +------------------->| TerminationRequest| |
- | +------------------+-----+ |
- | | | +----------------+
- | true:GRANT +-------->|onResponderGrant|
- | | +--------+-------+
- | +------------------------+ | |
- | | onResponderTerminate |<-----------+
- | +------------------+-----+ |
- | | | +----------------+
- | +-------->|onResponderStart|
- | | +----------------+
- Bubble to find first ID | |
- to return true:wantsResponderID| |
- | |
- +-------------+ | |
- | onTouchMove | | |
- +------+------+ none | |
- | return| |
- +-----------v-------------+true| +------------------------+ |
- |onMoveShouldSetResponder |----->|onResponderMove (cur) |<-----------+
- +-----------+-------------+ | +------------------------+ | |
- | | | +--------+-------+
- | returned true for| false:REJECT +-------->|onResponderRejec|
- | wantsResponderID | | | +----------------+
- | (now attempt | +------------------+-----+ |
- | handoff) | | onResponder | |
- +------------------->| TerminationRequest| |
- | +------------------+-----+ |
- | | | +----------------+
- | true:GRANT +-------->|onResponderGrant|
- | | +--------+-------+
- | +------------------------+ | |
- | | onResponderTerminate |<-----------+
- | +------------------+-----+ |
- | | | +----------------+
- | +-------->|onResponderMove |
- | | +----------------+
- | |
- | |
- Some active touch started| |
- inside current responder | +------------------------+ |
- +------------------------->| onResponderEnd | |
- | | +------------------------+ |
- +---+---------+ | |
- | onTouchEnd | | |
- +---+---------+ | |
- | | +------------------------+ |
- +------------------------->| onResponderEnd | |
- No active touches started| +-----------+------------+ |
- inside current responder | | |
- | v |
- | +------------------------+ |
- | | onResponderRelease | |
- | +------------------------+ |
- | |
- + + */
-
- /**
- * A note about event ordering in the `EventPluginRegistry`.
- *
- * Suppose plugins are injected in the following order:
- *
- * `[R, S, C]`
- *
- * To help illustrate the example, assume `S` is `SimpleEventPlugin` (for
- * `onClick` etc) and `R` is `ResponderEventPlugin`.
- *
- * "Deferred-Dispatched Events":
- *
- * - The current event plugin system will traverse the list of injected plugins,
- * in order, and extract events by collecting the plugin's return value of
- * `extractEvents()`.
- * - These events that are returned from `extractEvents` are "deferred
- * dispatched events".
- * - When returned from `extractEvents`, deferred-dispatched events contain an
- * "accumulation" of deferred dispatches.
- * - These deferred dispatches are accumulated/collected before they are
- * returned, but processed at a later time by the `EventPluginRegistry` (hence the
- * name deferred).
- *
- * In the process of returning their deferred-dispatched events, event plugins
- * themselves can dispatch events on-demand without returning them from
- * `extractEvents`. Plugins might want to do this, so that they can use event
- * dispatching as a tool that helps them decide which events should be extracted
- * in the first place.
- *
- * "On-Demand-Dispatched Events":
- *
- * - On-demand-dispatched events are not returned from `extractEvents`.
- * - On-demand-dispatched events are dispatched during the process of returning
- * the deferred-dispatched events.
- * - They should not have side effects.
- * - They should be avoided, and/or eventually be replaced with another
- * abstraction that allows event plugins to perform multiple "rounds" of event
- * extraction.
- *
- * Therefore, the sequence of event dispatches becomes:
- *
- * - `R`s on-demand events (if any) (dispatched by `R` on-demand)
- * - `S`s on-demand events (if any) (dispatched by `S` on-demand)
- * - `C`s on-demand events (if any) (dispatched by `C` on-demand)
- * - `R`s extracted events (if any) (dispatched by `EventPluginRegistry`)
- * - `S`s extracted events (if any) (dispatched by `EventPluginRegistry`)
- * - `C`s extracted events (if any) (dispatched by `EventPluginRegistry`)
- *
- * In the case of `ResponderEventPlugin`: If the `startShouldSetResponder`
- * on-demand dispatch returns `true` (and some other details are satisfied) the
- * `onResponderGrant` deferred dispatched event is returned from
- * `extractEvents`. The sequence of dispatch executions in this case
- * will appear as follows:
- *
- * - `startShouldSetResponder` (`ResponderEventPlugin` dispatches on-demand)
- * - `touchStartCapture` (`EventPluginRegistry` dispatches as usual)
- * - `touchStart` (`EventPluginRegistry` dispatches as usual)
- * - `responderGrant/Reject` (`EventPluginRegistry` dispatches as usual)
- */
-
- function setResponderAndExtractTransfer(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
- var shouldSetEventType = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : topLevelType === TOP_SELECTION_CHANGE ? eventTypes.selectionChangeShouldSetResponder : eventTypes.scrollShouldSetResponder; // TODO: stop one short of the current responder.
-
- var bubbleShouldSetFrom = !responderInst ? targetInst : getLowestCommonAncestor(responderInst, targetInst); // When capturing/bubbling the "shouldSet" event, we want to skip the target
- // (deepest ID) if it happens to be the current responder. The reasoning:
- // It's strange to get an `onMoveShouldSetResponder` when you're *already*
- // the responder.
-
- var skipOverBubbleShouldSetFrom = bubbleShouldSetFrom === responderInst;
- var shouldSetEvent = ResponderSyntheticEvent.getPooled(shouldSetEventType, bubbleShouldSetFrom, nativeEvent, nativeEventTarget);
- shouldSetEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
-
- if (skipOverBubbleShouldSetFrom) {
- accumulateTwoPhaseDispatchesSkipTarget(shouldSetEvent);
- } else {
- accumulateTwoPhaseDispatches(shouldSetEvent);
- }
-
- var wantsResponderInst = executeDispatchesInOrderStopAtTrue(shouldSetEvent);
-
- if (!shouldSetEvent.isPersistent()) {
- shouldSetEvent.constructor.release(shouldSetEvent);
- }
-
- if (!wantsResponderInst || wantsResponderInst === responderInst) {
- return null;
- }
-
- var extracted;
- var grantEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderGrant, wantsResponderInst, nativeEvent, nativeEventTarget);
- grantEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(grantEvent);
- var blockHostResponder = executeDirectDispatch(grantEvent) === true;
-
- if (responderInst) {
- var terminationRequestEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderTerminationRequest, responderInst, nativeEvent, nativeEventTarget);
- terminationRequestEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(terminationRequestEvent);
- var shouldSwitch = !hasDispatches(terminationRequestEvent) || executeDirectDispatch(terminationRequestEvent);
-
- if (!terminationRequestEvent.isPersistent()) {
- terminationRequestEvent.constructor.release(terminationRequestEvent);
- }
-
- if (shouldSwitch) {
- var terminateEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderTerminate, responderInst, nativeEvent, nativeEventTarget);
- terminateEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(terminateEvent);
- extracted = accumulate(extracted, [grantEvent, terminateEvent]);
- changeResponder(wantsResponderInst, blockHostResponder);
- } else {
- var rejectEvent = ResponderSyntheticEvent.getPooled(eventTypes.responderReject, wantsResponderInst, nativeEvent, nativeEventTarget);
- rejectEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(rejectEvent);
- extracted = accumulate(extracted, rejectEvent);
- }
- } else {
- extracted = accumulate(extracted, grantEvent);
- changeResponder(wantsResponderInst, blockHostResponder);
- }
-
- return extracted;
- }
- /**
- * A transfer is a negotiation between a currently set responder and the next
- * element to claim responder status. Any start event could trigger a transfer
- * of responderInst. Any move event could trigger a transfer.
- *
- * @param {string} topLevelType Record from `BrowserEventConstants`.
- * @return {boolean} True if a transfer of responder could possibly occur.
- */
-
-
- function canTriggerTransfer(topLevelType, topLevelInst, nativeEvent) {
- return topLevelInst && ( // responderIgnoreScroll: We are trying to migrate away from specifically
- // tracking native scroll events here and responderIgnoreScroll indicates we
- // will send topTouchCancel to handle canceling touch events instead
- topLevelType === TOP_SCROLL && !nativeEvent.responderIgnoreScroll || trackedTouchCount > 0 && topLevelType === TOP_SELECTION_CHANGE || isStartish(topLevelType) || isMoveish(topLevelType));
- }
- /**
- * Returns whether or not this touch end event makes it such that there are no
- * longer any touches that started inside of the current `responderInst`.
- *
- * @param {NativeEvent} nativeEvent Native touch end event.
- * @return {boolean} Whether or not this touch end event ends the responder.
- */
-
-
- function noResponderTouches(nativeEvent) {
- var touches = nativeEvent.touches;
-
- if (!touches || touches.length === 0) {
- return true;
- }
-
- for (var i = 0; i < touches.length; i++) {
- var activeTouch = touches[i];
- var target = activeTouch.target;
-
- if (target !== null && target !== undefined && target !== 0) {
- // Is the original touch location inside of the current responder?
- var targetInst = getInstanceFromNode(target);
-
- if (isAncestor(responderInst, targetInst)) {
- return false;
- }
- }
- }
-
- return true;
- }
-
- var ResponderEventPlugin = {
- /* For unit testing only */
- _getResponder: function () {
- return responderInst;
- },
- eventTypes: eventTypes,
-
- /**
- * We must be resilient to `targetInst` being `null` on `touchMove` or
- * `touchEnd`. On certain platforms, this means that a native scroll has
- * assumed control and the original touch targets are destroyed.
- */
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- if (isStartish(topLevelType)) {
- trackedTouchCount += 1;
- } else if (isEndish(topLevelType)) {
- if (trackedTouchCount >= 0) {
- trackedTouchCount -= 1;
- } else {
- {
- warn('Ended a touch event which was not counted in `trackedTouchCount`.');
- }
-
- return null;
- }
- }
-
- ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
- var extracted = canTriggerTransfer(topLevelType, targetInst, nativeEvent) ? setResponderAndExtractTransfer(topLevelType, targetInst, nativeEvent, nativeEventTarget) : null; // Responder may or may not have transferred on a new touch start/move.
- // Regardless, whoever is the responder after any potential transfer, we
- // direct all touch start/move/ends to them in the form of
- // `onResponderMove/Start/End`. These will be called for *every* additional
- // finger that move/start/end, dispatched directly to whoever is the
- // current responder at that moment, until the responder is "released".
- //
- // These multiple individual change touch events are are always bookended
- // by `onResponderGrant`, and one of
- // (`onResponderRelease/onResponderTerminate`).
-
- var isResponderTouchStart = responderInst && isStartish(topLevelType);
- var isResponderTouchMove = responderInst && isMoveish(topLevelType);
- var isResponderTouchEnd = responderInst && isEndish(topLevelType);
- var incrementalTouch = isResponderTouchStart ? eventTypes.responderStart : isResponderTouchMove ? eventTypes.responderMove : isResponderTouchEnd ? eventTypes.responderEnd : null;
-
- if (incrementalTouch) {
- var gesture = ResponderSyntheticEvent.getPooled(incrementalTouch, responderInst, nativeEvent, nativeEventTarget);
- gesture.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(gesture);
- extracted = accumulate(extracted, gesture);
- }
-
- var isResponderTerminate = responderInst && topLevelType === TOP_TOUCH_CANCEL;
- var isResponderRelease = responderInst && !isResponderTerminate && isEndish(topLevelType) && noResponderTouches(nativeEvent);
- var finalTouch = isResponderTerminate ? eventTypes.responderTerminate : isResponderRelease ? eventTypes.responderRelease : null;
-
- if (finalTouch) {
- var finalEvent = ResponderSyntheticEvent.getPooled(finalTouch, responderInst, nativeEvent, nativeEventTarget);
- finalEvent.touchHistory = ResponderTouchHistoryStore.touchHistory;
- accumulateDirectDispatches(finalEvent);
- extracted = accumulate(extracted, finalEvent);
- changeResponder(null);
- }
-
- return extracted;
- },
- GlobalResponderHandler: null,
- injection: {
- /**
- * @param {{onChange: (ReactID, ReactID) => void} GlobalResponderHandler
- * Object that handles any change in responder. Use this to inject
- * integration with an existing touch handling system etc.
- */
- injectGlobalResponderHandler: function (GlobalResponderHandler) {
- ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
- }
- }
- };
-
- // Keep in sync with ReactDOM.js, ReactTestUtils.js, and ReactTestUtilsAct.js:
-
- var _ReactDOM$__SECRET_IN = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,
- getInstanceFromNode$1 = _ReactDOM$__SECRET_IN[0],
- getNodeFromInstance$1 = _ReactDOM$__SECRET_IN[1],
- getFiberCurrentPropsFromNode$1 = _ReactDOM$__SECRET_IN[2],
- injectEventPluginsByName = _ReactDOM$__SECRET_IN[3];
- setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
-
- var ReactDOMUnstableNativeDependencies = /*#__PURE__*/Object.freeze({
- __proto__: null,
- ResponderEventPlugin: ResponderEventPlugin,
- ResponderTouchHistoryStore: ResponderTouchHistoryStore,
- injectEventPluginsByName: injectEventPluginsByName
- });
-
- var unstableNativeDependencies = ReactDOMUnstableNativeDependencies;
-
- return unstableNativeDependencies;
-
-})));
diff --git a/node_modules/react-dom/umd/react-dom-unstable-native-dependencies.production.min.js b/node_modules/react-dom/umd/react-dom-unstable-native-dependencies.production.min.js
deleted file mode 100644
index 1cc4e51..0000000
--- a/node_modules/react-dom/umd/react-dom-unstable-native-dependencies.production.min.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/** @license React v16.13.1
- * react-dom-unstable-native-dependencies.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';(function(h,p){"object"===typeof exports&&"undefined"!==typeof module?module.exports=p(require("react-dom"),require("react")):"function"===typeof define&&define.amd?define(["react-dom","react"],p):(h=h||self,h.ReactDOMUnstableNativeDependencies=p(h.ReactDOM,h.React))})(this,function(h,p){function x(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+
-b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function M(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw Error(x(103));a.currentTarget=b?N(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b}function r(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function O(a,b,c){for(var f=[];a;)f.push(a),a=r(a);for(a=f.length;0<a--;)b(f[a],"captured",c);
-for(a=0;a<f.length;a++)b(f[a],"bubbled",c)}function P(a,b){var c=a.stateNode;if(!c)return null;var f=Q(c);if(!f)return null;c=f[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(f=!f.disabled)||(a=a.type,f=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!f;break a;default:a=!1}if(a)return null;
-if(c&&"function"!==typeof c)throw Error(x(231,b,typeof c));return c}function C(a,b){if(null==b)throw Error(x(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function u(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function R(a,b,c){if(b=P(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=C(c._dispatchListeners,b),c._dispatchInstances=C(c._dispatchInstances,a)}function W(a){a&&
-a.dispatchConfig.phasedRegistrationNames&&O(a._targetInst,R,a)}function X(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?r(b):null;O(b,R,a)}}function y(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=P(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=C(a._dispatchListeners,c),a._dispatchInstances=C(a._dispatchInstances,b))}}}function D(){return!0}function E(){return!1}function z(a,b,c,f){this.dispatchConfig=
-a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var d in a)a.hasOwnProperty(d)&&((b=a[d])?this[d]=b(c):"target"===d?this.target=f:this[d]=c[d]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?D:E;this.isPropagationStopped=E;return this}function Y(a,b,c,f){if(this.eventPool.length){var d=this.eventPool.pop();this.call(d,a,b,c,f);return d}return new this(a,b,c,f)}function Z(a){if(!(a instanceof this))throw Error(x(279));a.destructor();
-10>this.eventPool.length&&this.eventPool.push(a)}function S(a){a.eventPool=[];a.getPooled=Y;a.release=Z}function A(a){return"touchstart"===a||"mousedown"===a}function F(a){return"touchmove"===a||"mousemove"===a}function G(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}function l(a){return a.timeStamp||a.timestamp}function J(a){a=a.identifier;if(null==a)throw Error(x(138));return a}function aa(a){var b=J(a),c=v[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=
-l(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=l(a),c.previousPageX=a.pageX,c.previousPageY=a.pageY,c.previousTimeStamp=l(a)):(c={touchActive:!0,startPageX:a.pageX,startPageY:a.pageY,startTimeStamp:l(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:l(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:l(a)},v[b]=c);q.mostRecentTimeStamp=l(a)}function ba(a){var b=v[J(a)];b&&(b.touchActive=!0,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,
-b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=l(a),q.mostRecentTimeStamp=l(a))}function ca(a){var b=v[J(a)];b&&(b.touchActive=!1,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=l(a),q.mostRecentTimeStamp=l(a))}function B(a,b){if(null==b)throw Error(x(334));return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):
-[a,b]}var Q=null,T=null,N=null,K=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign;K(z.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=D)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=D)},persist:function(){this.isPersistent=
-D},isPersistent:E,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=E;this._dispatchInstances=this._dispatchListeners=null}});z.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};z.extend=function(a){function b(){return c.apply(this,
-arguments)}var c=this,f=function(){};f.prototype=c.prototype;f=new f;K(f,b.prototype);b.prototype=f;b.prototype.constructor=b;b.Interface=K({},c.Interface,a);b.extend=c.extend;S(b);return b};S(z);var w=z.extend({touchHistory:function(a){return null}});p=["touchstart","mousedown"];var U=["touchmove","mousemove"],V=["touchcancel","touchend","mouseup"],v=[],q={touchBank:v,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0},t={recordTouchTrack:function(a,b){if(F(a))b.changedTouches.forEach(ba);
-else if(A(a))b.changedTouches.forEach(aa),q.numberActiveTouches=b.touches.length,1===q.numberActiveTouches&&(q.indexOfSingleActiveTouch=b.touches[0].identifier);else if(G(a)&&(b.changedTouches.forEach(ca),q.numberActiveTouches=b.touches.length,1===q.numberActiveTouches))for(a=0;a<v.length;a++)if(b=v[a],null!=b&&b.touchActive){q.indexOfSingleActiveTouch=a;break}},touchHistory:q},k=null,H=0,L=function(a,b){var c=k;k=a;if(null!==I.GlobalResponderHandler)I.GlobalResponderHandler.onChange(c,a,b)},m={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",
-captured:"onStartShouldSetResponderCapture"},dependencies:p},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"},dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},
-dependencies:U},responderStart:{registrationName:"onResponderStart",dependencies:p},responderMove:{registrationName:"onResponderMove",dependencies:U},responderEnd:{registrationName:"onResponderEnd",dependencies:V},responderRelease:{registrationName:"onResponderRelease",dependencies:V},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",
-dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},I={_getResponder:function(){return k},eventTypes:m,extractEvents:function(a,b,c,f,d){if(A(a))H+=1;else if(G(a))if(0<=H)--H;else return null;t.recordTouchTrack(a,c);if(b&&("scroll"===a&&!c.responderIgnoreScroll||0<H&&"selectionchange"===a||A(a)||F(a))){d=A(a)?m.startShouldSetResponder:F(a)?m.moveShouldSetResponder:"selectionchange"===a?m.selectionChangeShouldSetResponder:m.scrollShouldSetResponder;if(k)b:{var e=
-k;for(var g=0,h=e;h;h=r(h))g++;h=0;for(var l=b;l;l=r(l))h++;for(;0<g-h;)e=r(e),g--;for(;0<h-g;)b=r(b),h--;for(;g--;){if(e===b||e===b.alternate)break b;e=r(e);b=r(b)}e=null}else e=b;b=e===k;e=w.getPooled(d,e,c,f);e.touchHistory=t.touchHistory;b?u(e,X):u(e,W);b:{d=e._dispatchListeners;b=e._dispatchInstances;if(Array.isArray(d))for(g=0;g<d.length&&!e.isPropagationStopped();g++){if(d[g](e,b[g])){d=b[g];break b}}else if(d&&d(e,b)){d=b;break b}d=null}e._dispatchInstances=null;e._dispatchListeners=null;
-e.isPersistent()||e.constructor.release(e);if(d&&d!==k)if(e=w.getPooled(m.responderGrant,d,c,f),e.touchHistory=t.touchHistory,u(e,y),b=!0===M(e),k)if(g=w.getPooled(m.responderTerminationRequest,k,c,f),g.touchHistory=t.touchHistory,u(g,y),h=!g._dispatchListeners||M(g),g.isPersistent()||g.constructor.release(g),h){g=w.getPooled(m.responderTerminate,k,c,f);g.touchHistory=t.touchHistory;u(g,y);var n=B(n,[e,g]);L(d,b)}else d=w.getPooled(m.responderReject,d,c,f),d.touchHistory=t.touchHistory,u(d,y),n=B(n,
-d);else n=B(n,e),L(d,b);else n=null}else n=null;d=k&&A(a);e=k&&F(a);b=k&&G(a);if(d=d?m.responderStart:e?m.responderMove:b?m.responderEnd:null)d=w.getPooled(d,k,c,f),d.touchHistory=t.touchHistory,u(d,y),n=B(n,d);d=k&&"touchcancel"===a;if(a=k&&!d&&G(a))a:{if((a=c.touches)&&0!==a.length)for(e=0;e<a.length;e++)if(b=a[e].target,null!==b&&void 0!==b&&0!==b){g=T(b);b:{for(b=k;g;){if(b===g||b===g.alternate){b=!0;break b}g=r(g)}b=!1}if(b){a=!1;break a}}a=!0}if(a=d?m.responderTerminate:a?m.responderRelease:
-null)c=w.getPooled(a,k,c,f),c.touchHistory=t.touchHistory,u(c,y),n=B(n,c),L(null);return n},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){I.GlobalResponderHandler=a}}};h=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;p=h[3];(function(a,b,c){Q=a;T=b;N=c})(h[2],h[0],h[1]);return{__proto__:null,ResponderEventPlugin:I,ResponderTouchHistoryStore:t,injectEventPluginsByName:p}});
diff --git a/node_modules/react-dom/umd/react-dom.development.js b/node_modules/react-dom/umd/react-dom.development.js
index 24b8683..45db5aa 100644
--- a/node_modules/react-dom/umd/react-dom.development.js
+++ b/node_modules/react-dom/umd/react-dom.development.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,30 +6,13 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-
-'use strict';
-
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
(global = global || self, factory(global.ReactDOM = {}, global.React));
}(this, (function (exports, React) { 'use strict';
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
- // Current owner and dispatcher used to share the same ref,
- // but PR #14548 split them out to better support the react-debug-tools package.
-
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
- ReactSharedInternals.ReactCurrentDispatcher = {
- current: null
- };
- }
-
- if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
- ReactSharedInternals.ReactCurrentBatchConfig = {
- suspense: null
- };
- }
+ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
// by calls to these methods by a Babel plugin.
//
@@ -59,16 +42,12 @@
// When changing this logic, you might want to also
// update consoleWithStackDev.www.js as well.
{
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
-
- if (!hasExistingStack) {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
+ if (stack !== '') {
+ format += '%s';
+ args = args.concat([stack]);
}
var argsWithFormat = args.map(function (item) {
@@ -80,17 +59,6 @@
// eslint-disable-next-line react-internal/no-production-logging
Function.prototype.apply.call(console[level], console, argsWithFormat);
-
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- throw new Error(message);
- } catch (x) {}
}
}
@@ -100,318 +68,6 @@
}
}
- var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- try {
- func.apply(context, funcArgs);
- } catch (error) {
- this.onError(error);
- }
- };
-
- {
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
-
- var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
- // If document doesn't exist we know for sure we will crash in this method
- // when we call document.createEvent(). However this can cause confusing
- // errors: https://github.com/facebookincubator/create-react-app/issues/3482
- // So we preemptively throw with a better message instead.
- if (!(typeof document !== 'undefined')) {
- {
- throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
- }
- }
-
- var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We
- // set this to true at the beginning, then set it to false right after
- // calling the function. If the function errors, `didError` will never be
- // set to false. This strategy works even if the browser is flaky and
- // fails to call our global error handler, because it doesn't rely on
- // the error event at all.
-
- var didError = true; // Keeps track of the value of window.event so that we can reset it
- // during the callback to let user code access window.event in the
- // browsers that support it.
-
- var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
- // dispatching: https://github.com/facebook/react/issues/13688
-
- var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously
- // dispatch our fake event using `dispatchEvent`. Inside the handler, we
- // call the user-provided callback.
-
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- function callCallback() {
- // We immediately remove the callback from event listeners so that
- // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
- // nested call would trigger the fake event handlers of any call higher
- // in the stack.
- fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
- // window.event assignment in both IE <= 10 as they throw an error
- // "Member not found" in strict mode, and in Firefox which does not
- // support window.event.
-
- if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
- window.event = windowEvent;
- }
-
- func.apply(context, funcArgs);
- didError = false;
- } // Create a global error event handler. We use this to capture the value
- // that was thrown. It's possible that this error handler will fire more
- // than once; for example, if non-React code also calls `dispatchEvent`
- // and a handler for that event throws. We should be resilient to most of
- // those cases. Even if our error event handler fires more than once, the
- // last error event is always used. If the callback actually does error,
- // we know that the last error event is the correct one, because it's not
- // possible for anything else to have happened in between our callback
- // erroring and the code that follows the `dispatchEvent` call below. If
- // the callback doesn't error, but the error event was fired, we know to
- // ignore it because `didError` will be false, as described above.
-
-
- var error; // Use this to track whether the error event is ever called.
-
- var didSetError = false;
- var isCrossOriginError = false;
-
- function handleWindowError(event) {
- error = event.error;
- didSetError = true;
-
- if (error === null && event.colno === 0 && event.lineno === 0) {
- isCrossOriginError = true;
- }
-
- if (event.defaultPrevented) {
- // Some other error handler has prevented default.
- // Browsers silence the error report if this happens.
- // We'll remember this to later decide whether to log it or not.
- if (error != null && typeof error === 'object') {
- try {
- error._suppressLogging = true;
- } catch (inner) {// Ignore.
- }
- }
- }
- } // Create a fake event type.
-
-
- var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
-
- window.addEventListener('error', handleWindowError);
- fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
- // errors, it will trigger our global error handler.
-
- evt.initEvent(evtType, false, false);
- fakeNode.dispatchEvent(evt);
-
- if (windowEventDescriptor) {
- Object.defineProperty(window, 'event', windowEventDescriptor);
- }
-
- if (didError) {
- if (!didSetError) {
- // The callback errored, but the error event never fired.
- error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
- } else if (isCrossOriginError) {
- error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');
- }
-
- this.onError(error);
- } // Remove our event listeners
-
-
- window.removeEventListener('error', handleWindowError);
- };
-
- invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
- }
- }
-
- var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
-
- var hasError = false;
- var caughtError = null; // Used by event system to capture/rethrow the first error.
-
- var hasRethrowError = false;
- var rethrowError = null;
- var reporter = {
- onError: function (error) {
- hasError = true;
- caughtError = error;
- }
- };
- /**
- * Call a function while guarding against errors that happens within it.
- * Returns an error if it throws, otherwise null.
- *
- * In production, this is implemented using a try-catch. The reason we don't
- * use a try-catch directly is so that we can swap out a different
- * implementation in DEV mode.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
- function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
- hasError = false;
- caughtError = null;
- invokeGuardedCallbackImpl$1.apply(reporter, arguments);
- }
- /**
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
- * TODO: See if caughtError and rethrowError can be unified.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
- function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
- invokeGuardedCallback.apply(this, arguments);
-
- if (hasError) {
- var error = clearCaughtError();
-
- if (!hasRethrowError) {
- hasRethrowError = true;
- rethrowError = error;
- }
- }
- }
- /**
- * During execution of guarded functions we will capture the first error which
- * we will rethrow to be handled by the top level error handler.
- */
-
- function rethrowCaughtError() {
- if (hasRethrowError) {
- var error = rethrowError;
- hasRethrowError = false;
- rethrowError = null;
- throw error;
- }
- }
- function hasCaughtError() {
- return hasError;
- }
- function clearCaughtError() {
- if (hasError) {
- var error = caughtError;
- hasError = false;
- caughtError = null;
- return error;
- } else {
- {
- {
- throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- }
-
- var getFiberCurrentPropsFromNode = null;
- var getInstanceFromNode = null;
- var getNodeFromInstance = null;
- function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
- getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
- getInstanceFromNode = getInstanceFromNodeImpl;
- getNodeFromInstance = getNodeFromInstanceImpl;
-
- {
- if (!getNodeFromInstance || !getInstanceFromNode) {
- error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
- }
- }
- }
- var validateEventDispatches;
-
- {
- validateEventDispatches = function (event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
- var listenersIsArr = Array.isArray(dispatchListeners);
- var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
- var instancesIsArr = Array.isArray(dispatchInstances);
- var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
-
- if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {
- error('EventPluginUtils: Invalid `event`.');
- }
- };
- }
- /**
- * Dispatch the event to the listener.
- * @param {SyntheticEvent} event SyntheticEvent to handle
- * @param {function} listener Application-level callback
- * @param {*} inst Internal component instance
- */
-
-
- function executeDispatch(event, listener, inst) {
- var type = event.type || 'unknown-event';
- event.currentTarget = getNodeFromInstance(inst);
- invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
- event.currentTarget = null;
- }
- /**
- * Standard/simple iteration through an event's collected dispatches.
- */
-
- function executeDispatchesInOrder(event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
-
- {
- validateEventDispatches(event);
- }
-
- if (Array.isArray(dispatchListeners)) {
- for (var i = 0; i < dispatchListeners.length; i++) {
- if (event.isPropagationStopped()) {
- break;
- } // Listeners and Instances are two parallel arrays that are always in sync.
-
-
- executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
- }
- } else if (dispatchListeners) {
- executeDispatch(event, dispatchListeners, dispatchInstances);
- }
-
- event._dispatchListeners = null;
- event._dispatchInstances = null;
- }
-
var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class
@@ -438,148 +94,23 @@
var FundamentalComponent = 20;
var ScopeComponent = 21;
var Block = 22;
+ var OffscreenComponent = 23;
+ var LegacyHiddenComponent = 24;
- /**
- * Injectable ordering of event plugins.
- */
- var eventPluginOrder = null;
- /**
- * Injectable mapping from names to event plugin modules.
- */
-
- var namesToPlugins = {};
- /**
- * Recomputes the plugin list using the injected plugins and plugin ordering.
- *
- * @private
- */
-
- function recomputePluginOrdering() {
- if (!eventPluginOrder) {
- // Wait until an `eventPluginOrder` is injected.
- return;
- }
-
- for (var pluginName in namesToPlugins) {
- var pluginModule = namesToPlugins[pluginName];
- var pluginIndex = eventPluginOrder.indexOf(pluginName);
-
- if (!(pluginIndex > -1)) {
- {
- throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`." );
- }
- }
-
- if (plugins[pluginIndex]) {
- continue;
- }
-
- if (!pluginModule.extractEvents) {
- {
- throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not." );
- }
- }
-
- plugins[pluginIndex] = pluginModule;
- var publishedEvents = pluginModule.eventTypes;
-
- for (var eventName in publishedEvents) {
- if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {
- {
- throw Error( "EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`." );
- }
- }
- }
- }
- }
- /**
- * Publishes an event so that it can be dispatched by the supplied plugin.
- *
- * @param {object} dispatchConfig Dispatch configuration for the event.
- * @param {object} PluginModule Plugin publishing the event.
- * @return {boolean} True if the event was successfully published.
- * @private
- */
-
-
- function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
- if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {
- {
- throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" + eventName + "`." );
- }
- }
-
- eventNameDispatchConfigs[eventName] = dispatchConfig;
- var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
-
- if (phasedRegistrationNames) {
- for (var phaseName in phasedRegistrationNames) {
- if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
- var phasedRegistrationName = phasedRegistrationNames[phaseName];
- publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
- }
- }
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
- return true;
- } else if (dispatchConfig.registrationName) {
- publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
- return true;
- }
+ var enableProfilerTimer = true; // Record durations for commit and passive effects phases.
- return false;
- }
- /**
- * Publishes a registration name that is used to identify dispatched events.
- *
- * @param {string} registrationName Registration name to add.
- * @param {object} PluginModule Plugin publishing the event.
- * @private
- */
-
-
- function publishRegistrationName(registrationName, pluginModule, eventName) {
- if (!!registrationNameModules[registrationName]) {
- {
- throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" + registrationName + "`." );
- }
- }
-
- registrationNameModules[registrationName] = pluginModule;
- registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
-
- {
- var lowerCasedName = registrationName.toLowerCase();
- possibleRegistrationNames[lowerCasedName] = registrationName;
-
- if (registrationName === 'onDoubleClick') {
- possibleRegistrationNames.ondblclick = registrationName;
- }
- }
- }
- /**
- * Registers plugins so that they can extract and dispatch events.
- */
-
- /**
- * Ordered list of injected plugins.
- */
-
-
- var plugins = [];
- /**
- * Mapping from event name to dispatch config
- */
-
- var eventNameDispatchConfigs = {};
- /**
- * Mapping from registration name to plugin module
- */
+ var enableFundamentalAPI = false; // Experimental Scope support.
+ var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)
+ var warnAboutStringRefs = false;
- var registrationNameModules = {};
+ var allNativeEvents = new Set();
/**
* Mapping from registration name to event name
*/
+
var registrationNameDependencies = {};
/**
* Mapping from lowercase registration names to the properly cased version,
@@ -590,278 +121,39 @@
var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
- /**
- * Injects an ordering of plugins (by plugin name). This allows the ordering
- * to be decoupled from injection of the actual plugins so that ordering is
- * always deterministic regardless of packaging, on-the-fly injection, etc.
- *
- * @param {array} InjectedEventPluginOrder
- * @internal
- */
-
- function injectEventPluginOrder(injectedEventPluginOrder) {
- if (!!eventPluginOrder) {
- {
- throw Error( "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React." );
- }
- } // Clone the ordering so it cannot be dynamically mutated.
-
-
- eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
- recomputePluginOrdering();
- }
- /**
- * Injects plugins to be used by plugin event system. The plugin names must be
- * in the ordering injected by `injectEventPluginOrder`.
- *
- * Plugins can be injected as part of page initialization or on-the-fly.
- *
- * @param {object} injectedNamesToPlugins Map from names to plugin modules.
- * @internal
- */
-
- function injectEventPluginsByName(injectedNamesToPlugins) {
- var isOrderingDirty = false;
-
- for (var pluginName in injectedNamesToPlugins) {
- if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
- continue;
- }
-
- var pluginModule = injectedNamesToPlugins[pluginName];
-
- if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
- if (!!namesToPlugins[pluginName]) {
- {
- throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + pluginName + "`." );
- }
- }
-
- namesToPlugins[pluginName] = pluginModule;
- isOrderingDirty = true;
- }
- }
-
- if (isOrderingDirty) {
- recomputePluginOrdering();
- }
+ function registerTwoPhaseEvent(registrationName, dependencies) {
+ registerDirectEvent(registrationName, dependencies);
+ registerDirectEvent(registrationName + 'Capture', dependencies);
}
-
- var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
-
- var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _assign = ReactInternals.assign;
-
- var PLUGIN_EVENT_SYSTEM = 1;
- var IS_REPLAYED = 1 << 5;
- var IS_FIRST_ANCESTOR = 1 << 6;
-
- var restoreImpl = null;
- var restoreTarget = null;
- var restoreQueue = null;
-
- function restoreStateOfTarget(target) {
- // We perform this translation at the end of the event loop so that we
- // always receive the correct fiber here
- var internalInstance = getInstanceFromNode(target);
-
- if (!internalInstance) {
- // Unmounted
- return;
- }
-
- if (!(typeof restoreImpl === 'function')) {
- {
- throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
+ function registerDirectEvent(registrationName, dependencies) {
+ {
+ if (registrationNameDependencies[registrationName]) {
+ error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
}
}
- var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
-
- if (stateNode) {
- var _props = getFiberCurrentPropsFromNode(stateNode);
+ registrationNameDependencies[registrationName] = dependencies;
- restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
- }
- }
-
- function setRestoreImplementation(impl) {
- restoreImpl = impl;
- }
- function enqueueStateRestore(target) {
- if (restoreTarget) {
- if (restoreQueue) {
- restoreQueue.push(target);
- } else {
- restoreQueue = [target];
- }
- } else {
- restoreTarget = target;
- }
- }
- function needsStateRestore() {
- return restoreTarget !== null || restoreQueue !== null;
- }
- function restoreStateIfNeeded() {
- if (!restoreTarget) {
- return;
- }
-
- var target = restoreTarget;
- var queuedTargets = restoreQueue;
- restoreTarget = null;
- restoreQueue = null;
- restoreStateOfTarget(target);
+ {
+ var lowerCasedName = registrationName.toLowerCase();
+ possibleRegistrationNames[lowerCasedName] = registrationName;
- if (queuedTargets) {
- for (var i = 0; i < queuedTargets.length; i++) {
- restoreStateOfTarget(queuedTargets[i]);
+ if (registrationName === 'onDoubleClick') {
+ possibleRegistrationNames.ondblclick = registrationName;
}
}
- }
-
- var enableProfilerTimer = true; // Trace which interactions trigger each commit.
-
- var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
-
- var enableFundamentalAPI = false; // Experimental Scope support.
- var warnAboutStringRefs = false;
-
- // the renderer. Such as when we're dispatching events or if third party
- // libraries need to call batchedUpdates. Eventually, this API will go away when
- // everything is batched by default. We'll then have a similar API to opt-out of
- // scheduled work and instead do synchronous work.
- // Defaults
-
- var batchedUpdatesImpl = function (fn, bookkeeping) {
- return fn(bookkeeping);
- };
-
- var discreteUpdatesImpl = function (fn, a, b, c, d) {
- return fn(a, b, c, d);
- };
-
- var flushDiscreteUpdatesImpl = function () {};
-
- var batchedEventUpdatesImpl = batchedUpdatesImpl;
- var isInsideEventHandler = false;
- var isBatchingEventUpdates = false;
-
- function finishEventHandler() {
- // Here we wait until all updates have propagated, which is important
- // when using controlled components within layers:
- // https://github.com/facebook/react/issues/1698
- // Then we restore state of any controlled component.
- var controlledComponentsHavePendingUpdates = needsStateRestore();
-
- if (controlledComponentsHavePendingUpdates) {
- // If a controlled event was fired, we may need to restore the state of
- // the DOM node back to the controlled value. This is necessary when React
- // bails out of the update without touching the DOM.
- flushDiscreteUpdatesImpl();
- restoreStateIfNeeded();
- }
- }
-
- function batchedUpdates(fn, bookkeeping) {
- if (isInsideEventHandler) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(bookkeeping);
- }
- isInsideEventHandler = true;
-
- try {
- return batchedUpdatesImpl(fn, bookkeeping);
- } finally {
- isInsideEventHandler = false;
- finishEventHandler();
- }
- }
- function batchedEventUpdates(fn, a, b) {
- if (isBatchingEventUpdates) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(a, b);
- }
-
- isBatchingEventUpdates = true;
-
- try {
- return batchedEventUpdatesImpl(fn, a, b);
- } finally {
- isBatchingEventUpdates = false;
- finishEventHandler();
- }
- } // This is for the React Flare event system
- function discreteUpdates(fn, a, b, c, d) {
- var prevIsInsideEventHandler = isInsideEventHandler;
- isInsideEventHandler = true;
-
- try {
- return discreteUpdatesImpl(fn, a, b, c, d);
- } finally {
- isInsideEventHandler = prevIsInsideEventHandler;
-
- if (!isInsideEventHandler) {
- finishEventHandler();
- }
- }
- }
- function flushDiscreteUpdatesIfNeeded(timeStamp) {
- // event.timeStamp isn't overly reliable due to inconsistencies in
- // how different browsers have historically provided the time stamp.
- // Some browsers provide high-resolution time stamps for all events,
- // some provide low-resolution time stamps for all events. FF < 52
- // even mixes both time stamps together. Some browsers even report
- // negative time stamps or time stamps that are 0 (iOS9) in some cases.
- // Given we are only comparing two time stamps with equality (!==),
- // we are safe from the resolution differences. If the time stamp is 0
- // we bail-out of preventing the flush, which can affect semantics,
- // such as if an earlier flush removes or adds event listeners that
- // are fired in the subsequent flush. However, this is the same
- // behaviour as we had before this change, so the risks are low.
- if (!isInsideEventHandler && (!enableDeprecatedFlareAPI )) {
- flushDiscreteUpdatesImpl();
+ for (var i = 0; i < dependencies.length; i++) {
+ allNativeEvents.add(dependencies[i]);
}
}
- function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
- batchedUpdatesImpl = _batchedUpdatesImpl;
- discreteUpdatesImpl = _discreteUpdatesImpl;
- flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
- batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
- }
- var DiscreteEvent = 0;
- var UserBlockingEvent = 1;
- var ContinuousEvent = 2;
-
- var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _ReactInternals$Sched = ReactInternals$1.Scheduler,
- unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback,
- unstable_now = _ReactInternals$Sched.unstable_now,
- unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback,
- unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield,
- unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint,
- unstable_getFirstCallbackNode = _ReactInternals$Sched.unstable_getFirstCallbackNode,
- unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority,
- unstable_next = _ReactInternals$Sched.unstable_next,
- unstable_continueExecution = _ReactInternals$Sched.unstable_continueExecution,
- unstable_pauseExecution = _ReactInternals$Sched.unstable_pauseExecution,
- unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel,
- unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority,
- unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority,
- unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority,
- unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority,
- unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority,
- unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate,
- unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting;
+ var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
- // Attributes that aren't in the whitelist are presumed to have this type.
+ // Attributes that aren't in the filter are presumed to have this type.
var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
@@ -976,6 +268,7 @@
}
if (propertyInfo !== null) {
+
switch (propertyInfo.type) {
case BOOLEAN:
return !value;
@@ -997,7 +290,7 @@
return properties.hasOwnProperty(name) ? properties[name] : null;
}
- function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
this.attributeName = attributeName;
this.attributeNamespace = attributeNamespace;
@@ -1005,6 +298,7 @@
this.propertyName = name;
this.type = type;
this.sanitizeURL = sanitizeURL;
+ this.removeEmptyString = removeEmptyString;
} // When adding attributes to this list, be sure to also add them to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.
@@ -1016,11 +310,11 @@
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
-
reservedProps.forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // A few React string attributes have a different name.
// This is a mapping from React prop names to the attribute names.
@@ -1031,6 +325,7 @@
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" HTML attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -1040,6 +335,7 @@
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are "enumerated" SVG attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
@@ -1050,16 +346,18 @@
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML boolean attributes.
['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
- 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
'itemScope'].forEach(function (name) {
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are the few React props that we set as DOM properties
// rather than attributes. These are all booleans.
@@ -1073,6 +371,7 @@
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.
@@ -1084,6 +383,7 @@
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be positive numbers.
@@ -1094,6 +394,7 @@
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
name, // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These are HTML attributes that must be numbers.
@@ -1101,6 +402,7 @@
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
name.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
});
var CAMELIZE = /[\-\:]([a-z])/g;
@@ -1109,7 +411,7 @@
return token[1].toUpperCase();
}; // This is a list of all SVG attributes that need special casing, namespacing,
// or boolean value assignment. Regular attributes that just accept strings
- // and have the same names are omitted, just like in the HTML whitelist.
+ // and have the same names are omitted, just like in the HTML attribute filter.
// Some of these attributes can be hard to find. This list was created by
// scraping the MDN documentation.
@@ -1121,6 +423,7 @@
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
attributeName, null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // String SVG attributes with the xlink namespace.
@@ -1130,7 +433,8 @@
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false);
+ attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
+ false);
}); // String SVG attributes with the xml namespace.
['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
@@ -1139,7 +443,8 @@
].forEach(function (attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false);
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
+ false);
}); // These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.
@@ -1148,25 +453,23 @@
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ false, // sanitizeURL
false);
}); // These attributes accept URLs. These must not allow javascript: URLS.
// These will also need to accept Trusted Types object in the future.
var xlinkHref = 'xlinkHref';
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
- 'xlink:href', 'http://www.w3.org/1999/xlink', true);
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
+ false);
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
attributeName.toLowerCase(), // attributeName
null, // attributeNamespace
+ true, // sanitizeURL
true);
});
- var ReactDebugCurrentFrame = null;
-
- {
- ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- } // A javascript: URL can contain leading C0 control or \u0020 SPACE,
// and any newline or tab are filtered out as if they're not part of the URL.
// https://url.spec.whatwg.org/#url-parsing
// Tab or newline are defined as \r\n\t:
@@ -1177,7 +480,6 @@
/* eslint-disable max-len */
-
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
var didWarn = false;
@@ -1270,6 +572,13 @@
{
if (!isAttributeNameSafe(name)) {
return;
+ } // If the object is an opaque reference ID, it's expected that
+ // the next prop is different than the server value, so just return
+ // expected
+
+
+ if (isOpaqueHydratingObject(expected)) {
+ return expected;
}
if (!node.hasAttribute(name)) {
@@ -1370,56 +679,59 @@
}
}
- var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
- function describeComponentFrame (name, source, ownerName) {
- var sourceInfo = '';
-
- if (source) {
- var path = source.fileName;
- var fileName = path.replace(BEFORE_SLASH_RE, '');
-
- {
- // In DEV, include code for a common special case:
- // prefer "folder/index.js" instead of just "index.js".
- if (/^index\./.test(fileName)) {
- var match = path.match(BEFORE_SLASH_RE);
-
- if (match) {
- var pathBeforeSlash = match[1];
-
- if (pathBeforeSlash) {
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
- fileName = folderName + '/' + fileName;
- }
- }
- }
- }
-
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
- } else if (ownerName) {
- sourceInfo = ' (created by ' + ownerName + ')';
- }
-
- return '\n in ' + (name || 'Unknown') + sourceInfo;
- }
+ var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
+ var _assign = ReactInternals.assign;
+ // ATTENTION
+ // When adding new symbols to this file,
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
+ var REACT_ELEMENT_TYPE = 0xeac7;
+ var REACT_PORTAL_TYPE = 0xeaca;
+ var REACT_FRAGMENT_TYPE = 0xeacb;
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
+ var REACT_PROFILER_TYPE = 0xead2;
+ var REACT_PROVIDER_TYPE = 0xeacd;
+ var REACT_CONTEXT_TYPE = 0xeace;
+ var REACT_FORWARD_REF_TYPE = 0xead0;
+ var REACT_SUSPENSE_TYPE = 0xead1;
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
+ var REACT_MEMO_TYPE = 0xead3;
+ var REACT_LAZY_TYPE = 0xead4;
+ var REACT_BLOCK_TYPE = 0xead9;
+ var REACT_SERVER_BLOCK_TYPE = 0xeada;
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
+ var REACT_SCOPE_TYPE = 0xead7;
+ var REACT_OPAQUE_ID_TYPE = 0xeae0;
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
+ var REACT_OFFSCREEN_TYPE = 0xeae2;
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
+
+ if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor = Symbol.for;
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
+ REACT_MEMO_TYPE = symbolFor('react.memo');
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
+ REACT_BLOCK_TYPE = symbolFor('react.block');
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
+ REACT_SCOPE_TYPE = symbolFor('react.scope');
+ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
+ REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
+ }
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
@@ -1436,38 +748,397 @@
return null;
}
- var Uninitialized = -1;
- var Pending = 0;
- var Resolved = 1;
- var Rejected = 2;
- function refineResolvedLazyComponent(lazyComponent) {
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
+ // Helpers to patch console.logs to avoid logging during side-effect free
+ // replaying on render function. This currently only patches the object
+ // lazily which won't cover if the log function was extracted eagerly.
+ // We could also eagerly patch the method.
+ var disabledDepth = 0;
+ var prevLog;
+ var prevInfo;
+ var prevWarn;
+ var prevError;
+ var prevGroup;
+ var prevGroupCollapsed;
+ var prevGroupEnd;
+
+ function disabledLog() {}
+
+ disabledLog.__reactDisabledLog = true;
+ function disableLogs() {
+ {
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ prevLog = console.log;
+ prevInfo = console.info;
+ prevWarn = console.warn;
+ prevError = console.error;
+ prevGroup = console.group;
+ prevGroupCollapsed = console.groupCollapsed;
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
+
+ var props = {
+ configurable: true,
+ enumerable: true,
+ value: disabledLog,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ info: props,
+ log: props,
+ warn: props,
+ error: props,
+ group: props,
+ groupCollapsed: props,
+ groupEnd: props
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
+
+ disabledDepth++;
+ }
}
- function initializeLazyComponentType(lazyComponent) {
- if (lazyComponent._status === Uninitialized) {
- lazyComponent._status = Pending;
- var ctor = lazyComponent._ctor;
- var thenable = ctor();
- lazyComponent._result = thenable;
- thenable.then(function (moduleObject) {
- if (lazyComponent._status === Pending) {
- var defaultExport = moduleObject.default;
+ function reenableLogs() {
+ {
+ disabledDepth--;
+
+ if (disabledDepth === 0) {
+ /* eslint-disable react-internal/no-production-logging */
+ var props = {
+ configurable: true,
+ enumerable: true,
+ writable: true
+ }; // $FlowFixMe Flow thinks console is immutable.
+
+ Object.defineProperties(console, {
+ log: _assign({}, props, {
+ value: prevLog
+ }),
+ info: _assign({}, props, {
+ value: prevInfo
+ }),
+ warn: _assign({}, props, {
+ value: prevWarn
+ }),
+ error: _assign({}, props, {
+ value: prevError
+ }),
+ group: _assign({}, props, {
+ value: prevGroup
+ }),
+ groupCollapsed: _assign({}, props, {
+ value: prevGroupCollapsed
+ }),
+ groupEnd: _assign({}, props, {
+ value: prevGroupEnd
+ })
+ });
+ /* eslint-enable react-internal/no-production-logging */
+ }
- {
- if (defaultExport === undefined) {
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
- }
+ if (disabledDepth < 0) {
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
+ }
+ }
+ }
+
+ var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
+ var prefix;
+ function describeBuiltInComponentFrame(name, source, ownerFn) {
+ {
+ if (prefix === undefined) {
+ // Extract the VM specific prefix used by each line.
+ try {
+ throw Error();
+ } catch (x) {
+ var match = x.stack.trim().match(/\n( *(at )?)/);
+ prefix = match && match[1] || '';
+ }
+ } // We use the prefix to ensure our stacks line up with native stack frames.
+
+
+ return '\n' + prefix + name;
+ }
+ }
+ var reentry = false;
+ var componentFrameCache;
+
+ {
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
+ componentFrameCache = new PossiblyWeakMap();
+ }
+
+ function describeNativeComponentFrame(fn, construct) {
+ // If something asked for a stack inside a fake render, it should get ignored.
+ if (!fn || reentry) {
+ return '';
+ }
+
+ {
+ var frame = componentFrameCache.get(fn);
+
+ if (frame !== undefined) {
+ return frame;
+ }
+ }
+
+ var control;
+ reentry = true;
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
+
+ Error.prepareStackTrace = undefined;
+ var previousDispatcher;
+
+ {
+ previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
+ // for warnings.
+
+ ReactCurrentDispatcher.current = null;
+ disableLogs();
+ }
+
+ try {
+ // This should throw.
+ if (construct) {
+ // Something should be setting the props in the constructor.
+ var Fake = function () {
+ throw Error();
+ }; // $FlowFixMe
+
+
+ Object.defineProperty(Fake.prototype, 'props', {
+ set: function () {
+ // We use a throwing setter instead of frozen or non-writable props
+ // because that won't throw in a non-strict mode function.
+ throw Error();
+ }
+ });
+
+ if (typeof Reflect === 'object' && Reflect.construct) {
+ // We construct a different control for this case to include any extra
+ // frames added by the construct call.
+ try {
+ Reflect.construct(Fake, []);
+ } catch (x) {
+ control = x;
+ }
+
+ Reflect.construct(fn, [], Fake);
+ } else {
+ try {
+ Fake.call();
+ } catch (x) {
+ control = x;
}
- lazyComponent._status = Resolved;
- lazyComponent._result = defaultExport;
+ fn.call(Fake.prototype);
}
- }, function (error) {
- if (lazyComponent._status === Pending) {
- lazyComponent._status = Rejected;
- lazyComponent._result = error;
+ } else {
+ try {
+ throw Error();
+ } catch (x) {
+ control = x;
+ }
+
+ fn();
+ }
+ } catch (sample) {
+ // This is inlined manually because closure doesn't do it for us.
+ if (sample && control && typeof sample.stack === 'string') {
+ // This extracts the first frame from the sample that isn't also in the control.
+ // Skipping one frame that we assume is the frame that calls the two.
+ var sampleLines = sample.stack.split('\n');
+ var controlLines = control.stack.split('\n');
+ var s = sampleLines.length - 1;
+ var c = controlLines.length - 1;
+
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
+ // We expect at least one stack frame to be shared.
+ // Typically this will be the root most one. However, stack frames may be
+ // cut off due to maximum stack limits. In this case, one maybe cut off
+ // earlier than the other. We assume that the sample is longer or the same
+ // and there for cut off earlier. So we should find the root most frame in
+ // the sample somewhere in the control.
+ c--;
+ }
+
+ for (; s >= 1 && c >= 0; s--, c--) {
+ // Next we find the first one that isn't the same which should be the
+ // frame that called our sample function and the control.
+ if (sampleLines[s] !== controlLines[c]) {
+ // In V8, the first line is describing the message but other VMs don't.
+ // If we're about to return the first line, and the control is also on the same
+ // line, that's a pretty good indicator that our sample threw at same line as
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
+ // This can happen if you passed a class to function component, or non-function.
+ if (s !== 1 || c !== 1) {
+ do {
+ s--;
+ c--; // We may still have similar intermediate frames from the construct call.
+ // The next one that isn't the same should be our match though.
+
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, _frame);
+ }
+ } // Return the line we found.
+
+
+ return _frame;
+ }
+ } while (s >= 1 && c >= 0);
+ }
+
+ break;
+ }
}
- });
+ }
+ } finally {
+ reentry = false;
+
+ {
+ ReactCurrentDispatcher.current = previousDispatcher;
+ reenableLogs();
+ }
+
+ Error.prepareStackTrace = previousPrepareStackTrace;
+ } // Fallback to just using the name if we couldn't make it throw.
+
+
+ var name = fn ? fn.displayName || fn.name : '';
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
+
+ {
+ if (typeof fn === 'function') {
+ componentFrameCache.set(fn, syntheticFrame);
+ }
+ }
+
+ return syntheticFrame;
+ }
+
+ function describeClassComponentFrame(ctor, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(ctor, true);
+ }
+ }
+ function describeFunctionComponentFrame(fn, source, ownerFn) {
+ {
+ return describeNativeComponentFrame(fn, false);
+ }
+ }
+
+ function shouldConstruct(Component) {
+ var prototype = Component.prototype;
+ return !!(prototype && prototype.isReactComponent);
+ }
+
+ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
+
+ if (type == null) {
+ return '';
+ }
+
+ if (typeof type === 'function') {
+ {
+ return describeNativeComponentFrame(type, shouldConstruct(type));
+ }
+ }
+
+ if (typeof type === 'string') {
+ return describeBuiltInComponentFrame(type);
+ }
+
+ switch (type) {
+ case REACT_SUSPENSE_TYPE:
+ return describeBuiltInComponentFrame('Suspense');
+
+ case REACT_SUSPENSE_LIST_TYPE:
+ return describeBuiltInComponentFrame('SuspenseList');
+ }
+
+ if (typeof type === 'object') {
+ switch (type.$$typeof) {
+ case REACT_FORWARD_REF_TYPE:
+ return describeFunctionComponentFrame(type.render);
+
+ case REACT_MEMO_TYPE:
+ // Memo may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
+
+ case REACT_BLOCK_TYPE:
+ return describeFunctionComponentFrame(type._render);
+
+ case REACT_LAZY_TYPE:
+ {
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+
+ try {
+ // Lazy may contain any component type so we recursively resolve it.
+ return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
+ } catch (x) {}
+ }
+ }
+ }
+
+ return '';
+ }
+
+ function describeFiber(fiber) {
+ var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;
+ var source = fiber._debugSource ;
+
+ switch (fiber.tag) {
+ case HostComponent:
+ return describeBuiltInComponentFrame(fiber.type);
+
+ case LazyComponent:
+ return describeBuiltInComponentFrame('Lazy');
+
+ case SuspenseComponent:
+ return describeBuiltInComponentFrame('Suspense');
+
+ case SuspenseListComponent:
+ return describeBuiltInComponentFrame('SuspenseList');
+
+ case FunctionComponent:
+ case IndeterminateComponent:
+ case SimpleMemoComponent:
+ return describeFunctionComponentFrame(fiber.type);
+
+ case ForwardRef:
+ return describeFunctionComponentFrame(fiber.type.render);
+
+ case Block:
+ return describeFunctionComponentFrame(fiber.type._render);
+
+ case ClassComponent:
+ return describeClassComponentFrame(fiber.type);
+
+ default:
+ return '';
+ }
+ }
+
+ function getStackByFiberInDevAndProd(workInProgress) {
+ try {
+ var info = '';
+ var node = workInProgress;
+
+ do {
+ info += describeFiber(node);
+ node = node.return;
+ } while (node);
+
+ return info;
+ } catch (x) {
+ return '\nError generating stack: ' + x.message + '\n' + x.stack;
}
}
@@ -1476,6 +1147,10 @@
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
}
+ function getContextName(type) {
+ return type.displayName || 'Context';
+ }
+
function getComponentName(type) {
if (type == null) {
// Host root, text node or just invalid type.
@@ -1504,7 +1179,7 @@
return 'Portal';
case REACT_PROFILER_TYPE:
- return "Profiler";
+ return 'Profiler';
case REACT_STRICT_MODE_TYPE:
return 'StrictMode';
@@ -1519,10 +1194,12 @@
if (typeof type === 'object') {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
- return 'Context.Consumer';
+ var context = type;
+ return getContextName(context) + '.Consumer';
case REACT_PROVIDER_TYPE:
- return 'Context.Provider';
+ var provider = type;
+ return getContextName(provider._context) + '.Provider';
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, 'ForwardRef');
@@ -1531,18 +1208,19 @@
return getComponentName(type.type);
case REACT_BLOCK_TYPE:
- return getComponentName(type.render);
+ return getComponentName(type._render);
case REACT_LAZY_TYPE:
{
- var thenable = type;
- var resolvedThenable = refineResolvedLazyComponent(thenable);
+ var lazyComponent = type;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
- if (resolvedThenable) {
- return getComponentName(resolvedThenable);
+ try {
+ return getComponentName(init(payload));
+ } catch (x) {
+ return null;
}
-
- break;
}
}
}
@@ -1550,43 +1228,7 @@
return null;
}
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
- function describeFiber(fiber) {
- switch (fiber.tag) {
- case HostRoot:
- case HostPortal:
- case HostText:
- case Fragment:
- case ContextProvider:
- case ContextConsumer:
- return '';
-
- default:
- var owner = fiber._debugOwner;
- var source = fiber._debugSource;
- var name = getComponentName(fiber.type);
- var ownerName = null;
-
- if (owner) {
- ownerName = getComponentName(owner.type);
- }
-
- return describeComponentFrame(name, source, ownerName);
- }
- }
-
- function getStackByFiberInDevAndProd(workInProgress) {
- var info = '';
- var node = workInProgress;
-
- do {
- info += describeFiber(node);
- node = node.return;
- } while (node);
-
- return info;
- }
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
var current = null;
var isRendering = false;
function getCurrentFiberOwnerNameInDevOrNull() {
@@ -1604,6 +1246,7 @@
return null;
}
+
function getCurrentFiberStackInDev() {
{
if (current === null) {
@@ -1615,16 +1258,17 @@
return getStackByFiberInDevAndProd(current);
}
}
+
function resetCurrentFiber() {
{
- ReactDebugCurrentFrame$1.getCurrentStack = null;
+ ReactDebugCurrentFrame.getCurrentStack = null;
current = null;
isRendering = false;
}
}
function setCurrentFiber(fiber) {
{
- ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;
+ ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
current = fiber;
isRendering = false;
}
@@ -1634,6 +1278,11 @@
isRendering = rendering;
}
}
+ function getIsRendering() {
+ {
+ return isRendering;
+ }
+ }
// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
@@ -1656,151 +1305,25 @@
}
}
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
-
- var ReactPropTypesSecret_1 = ReactPropTypesSecret;
-
- var printWarning$1 = function() {};
-
- {
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
- var loggedTypeFailures = {};
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- printWarning$1 = function(text) {
- var message = 'Warning: ' + text;
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
- }
-
- /**
- * Assert that the values match with the type specs.
- * Error messages are memorized and will only be shown once.
- *
- * @param {object} typeSpecs Map of name to a ReactPropType
- * @param {object} values Runtime values that need to be type-checked
- * @param {string} location e.g. "prop", "context", "child context"
- * @param {string} componentName Name of the component for error messages.
- * @param {?Function} getStack Returns the component stack.
- * @private
- */
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
+ var hasReadOnlyValue = {
+ button: true,
+ checkbox: true,
+ image: true,
+ hidden: true,
+ radio: true,
+ reset: true,
+ submit: true
+ };
+ function checkControlledValueProps(tagName, props) {
{
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error;
- // 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') {
- 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] + '`.'
- );
- err.name = 'Invariant Violation';
- throw err;
- }
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
- } catch (ex) {
- error = ex;
- }
- if (error && !(error instanceof Error)) {
- printWarning$1(
- (componentName || 'React class') + ': type specification of ' +
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
- 'You may have forgotten to pass an argument to the type checker ' +
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
- 'shape all require an argument).'
- );
- }
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error.message] = true;
-
- var stack = getStack ? getStack() : '';
-
- printWarning$1(
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
- );
- }
- }
+ if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
+ error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
}
- }
- }
-
- /**
- * Resets warning cache when testing.
- *
- * @private
- */
- checkPropTypes.resetWarningCache = function() {
- {
- loggedTypeFailures = {};
- }
- };
-
- var checkPropTypes_1 = checkPropTypes;
-
- var ReactDebugCurrentFrame$2 = null;
- var ReactControlledValuePropTypes = {
- checkPropTypes: null
- };
-
- {
- ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
- var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
- };
- var propTypes = {
- value: function (props, propName, componentName) {
- if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
-
- return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
- },
- checked: function (props, propName, componentName) {
- if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
- return null;
- }
- return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
+ if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
+ error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
}
- };
- /**
- * Provide a linked `value` attribute for controlled forms. You should not use
- * this outside of the ReactDOM controlled form components.
- */
-
- ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
- checkPropTypes_1(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
- };
+ }
}
function isCheckable(elem) {
@@ -1910,6 +1433,20 @@
return false;
}
+ function getActiveElement(doc) {
+ doc = doc || (typeof document !== 'undefined' ? document : undefined);
+
+ if (typeof doc === 'undefined') {
+ return null;
+ }
+
+ try {
+ return doc.activeElement || doc.body;
+ } catch (e) {
+ return doc.body;
+ }
+ }
+
var didWarnValueDefaultValue = false;
var didWarnCheckedDefaultChecked = false;
var didWarnControlledToUncontrolled = false;
@@ -1952,16 +1489,16 @@
}
function initWrapperState(element, props) {
{
- ReactControlledValuePropTypes.checkPropTypes('input', props);
+ checkControlledValueProps('input', props);
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
- error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
+ error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
didWarnCheckedDefaultChecked = true;
}
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
- error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
+ error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
didWarnValueDefaultValue = true;
}
@@ -1990,13 +1527,13 @@
var controlled = isControlled(props);
if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
- error('A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
+ error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
didWarnUncontrolledToControlled = true;
}
if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
- error('A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
+ error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
didWarnControlledToUncontrolled = true;
}
@@ -2144,7 +1681,7 @@
// mixing React radio buttons with non-React ones.
- var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
+ var otherProps = getFiberCurrentPropsFromNode(otherNode);
if (!otherProps) {
{
@@ -2173,7 +1710,7 @@
function setDefaultValue(node, type, value) {
if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
- type !== 'number' || node.ownerDocument.activeElement !== node) {
+ type !== 'number' || getActiveElement(node.ownerDocument) !== node) {
if (value == null) {
node.defaultValue = toString(node._wrapperState.initialValue);
} else if (node.defaultValue !== toString(value)) {
@@ -2199,7 +1736,7 @@
content += child; // Note: we don't warn about invalid children here.
// Instead, this is done separately below so that
- // it happens during the hydration codepath too.
+ // it happens during the hydration code path too.
});
return content;
}
@@ -2210,7 +1747,7 @@
function validateProps(element, props) {
{
- // This mirrors the codepath above, but runs for hydration too.
+ // This mirrors the code path above, but runs for hydration too.
// Warn about invalid children here so that client and hydration are consistent.
// TODO: this seems like it could cause a DEV-only throw for hydration
// if children contains a non-element object. We should try to avoid that.
@@ -2287,7 +1824,7 @@
function checkSelectPropTypes(props) {
{
- ReactControlledValuePropTypes.checkPropTypes('select', props);
+ checkControlledValueProps('select', props);
for (var i = 0; i < valuePropNames.length; i++) {
var propName = valuePropNames[i];
@@ -2393,7 +1930,7 @@
{
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
- error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
+ error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
didWarnValueDefaultValue$1 = true;
}
@@ -2481,10 +2018,10 @@
var node = element;
{
- ReactControlledValuePropTypes.checkPropTypes('textarea', props);
+ checkControlledValueProps('textarea', props);
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
- error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
+ error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
didWarnValDefaultVal = true;
}
@@ -2696,1704 +2233,6 @@
node.textContent = text;
};
- // Do not use the below two methods directly!
- // Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
- // (It is the only module that is allowed to access these methods.)
- function unsafeCastStringToDOMTopLevelType(topLevelType) {
- return topLevelType;
- }
- function unsafeCastDOMTopLevelTypeToString(topLevelType) {
- return topLevelType;
- }
-
- /**
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
- *
- * @param {string} styleProp
- * @param {string} eventName
- * @returns {object}
- */
-
- function makePrefixMap(styleProp, eventName) {
- var prefixes = {};
- prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
- prefixes['Webkit' + styleProp] = 'webkit' + eventName;
- prefixes['Moz' + styleProp] = 'moz' + eventName;
- return prefixes;
- }
- /**
- * A list of event names to a configurable list of vendor prefixes.
- */
-
-
- var vendorPrefixes = {
- animationend: makePrefixMap('Animation', 'AnimationEnd'),
- animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
- animationstart: makePrefixMap('Animation', 'AnimationStart'),
- transitionend: makePrefixMap('Transition', 'TransitionEnd')
- };
- /**
- * Event names that have already been detected and prefixed (if applicable).
- */
-
- var prefixedEventNames = {};
- /**
- * Element to check for prefixes on.
- */
-
- var style = {};
- /**
- * Bootstrap if a DOM exists.
- */
-
- if (canUseDOM) {
- style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
- // the un-prefixed "animation" and "transition" properties are defined on the
- // style object but the events that fire will still be prefixed, so we need
- // to check if the un-prefixed events are usable, and if not remove them from the map.
-
- if (!('AnimationEvent' in window)) {
- delete vendorPrefixes.animationend.animation;
- delete vendorPrefixes.animationiteration.animation;
- delete vendorPrefixes.animationstart.animation;
- } // Same as above
-
-
- if (!('TransitionEvent' in window)) {
- delete vendorPrefixes.transitionend.transition;
- }
- }
- /**
- * Attempts to determine the correct vendor prefixed event name.
- *
- * @param {string} eventName
- * @returns {string}
- */
-
-
- function getVendorPrefixedEventName(eventName) {
- if (prefixedEventNames[eventName]) {
- return prefixedEventNames[eventName];
- } else if (!vendorPrefixes[eventName]) {
- return eventName;
- }
-
- var prefixMap = vendorPrefixes[eventName];
-
- for (var styleProp in prefixMap) {
- if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
- return prefixedEventNames[eventName] = prefixMap[styleProp];
- }
- }
-
- return eventName;
- }
-
- /**
- * To identify top level events in ReactDOM, we use constants defined by this
- * module. This is the only module that uses the unsafe* methods to express
- * that the constants actually correspond to the browser event names. This lets
- * us save some bundle size by avoiding a top level type -> event name map.
- * The rest of ReactDOM code should import top level types from this file.
- */
-
- var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
- var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
- var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
- var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
- var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
- var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
- var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
- var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
- var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
- var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
- var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
- var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
- var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
- var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
- var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
- var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
- var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
- var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
- var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
- var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
- var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
- var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
- var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
- var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
- var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
- var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
- var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
- var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
- var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
- var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
- var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
- var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
- var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
- var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');
- var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
- var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');
- var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
- var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
- var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
- var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
- var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
- var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
- var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
- var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');
- var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
- var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
- var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
- var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
- var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
- var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
- var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
- var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
- var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
- var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');
- var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');
- var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');
- var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');
- var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');
- var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');
- var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
- var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
- var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');
- var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
- var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
- var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
- var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
- var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
- var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');
- var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
- var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
- var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
- var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
- var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
- var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
- var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
- var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
- var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
- var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
- var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
- var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.
- // Note that events in this list will *not* be listened to at the top level
- // unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
-
- var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];
- function getRawEventName(topLevelType) {
- return unsafeCastDOMTopLevelTypeToString(topLevelType);
- }
-
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // prettier-ignore
-
- var elementListenerMap = new PossiblyWeakMap();
- function getListenerMapForElement(element) {
- var listenerMap = elementListenerMap.get(element);
-
- if (listenerMap === undefined) {
- listenerMap = new Map();
- elementListenerMap.set(element, listenerMap);
- }
-
- return listenerMap;
- }
-
- /**
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
- * instance (key) and the internal representation (value). This allows public
- * methods to accept the user facing instance as an argument and map them back
- * to internal methods.
- *
- * Note that this module is currently shared and assumed to be stateless.
- * If this becomes an actual Map, that will break.
- */
- function get(key) {
- return key._reactInternalFiber;
- }
- function has$1(key) {
- return key._reactInternalFiber !== undefined;
- }
- function set(key, value) {
- key._reactInternalFiber = value;
- }
-
- // Don't change these two values. They're used by React Dev Tools.
- var NoEffect =
- /* */
- 0;
- var PerformedWork =
- /* */
- 1; // You can change the rest (and add more).
-
- var Placement =
- /* */
- 2;
- var Update =
- /* */
- 4;
- var PlacementAndUpdate =
- /* */
- 6;
- var Deletion =
- /* */
- 8;
- var ContentReset =
- /* */
- 16;
- var Callback =
- /* */
- 32;
- var DidCapture =
- /* */
- 64;
- var Ref =
- /* */
- 128;
- var Snapshot =
- /* */
- 256;
- var Passive =
- /* */
- 512;
- var Hydrating =
- /* */
- 1024;
- var HydratingAndUpdate =
- /* */
- 1028; // Passive & Update & Callback & Ref & Snapshot
-
- var LifecycleEffectMask =
- /* */
- 932; // Union of all host effects
-
- var HostEffectMask =
- /* */
- 2047;
- var Incomplete =
- /* */
- 2048;
- var ShouldCapture =
- /* */
- 4096;
-
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
- function getNearestMountedFiber(fiber) {
- var node = fiber;
- var nearestMounted = fiber;
-
- if (!fiber.alternate) {
- // If there is no alternate, this might be a new tree that isn't inserted
- // yet. If it is, then it will have a pending insertion effect on it.
- var nextNode = node;
-
- do {
- node = nextNode;
-
- if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {
- // This is an insertion or in-progress hydration. The nearest possible
- // mounted fiber is the parent but we need to continue to figure out
- // if that one is still mounted.
- nearestMounted = node.return;
- }
-
- nextNode = node.return;
- } while (nextNode);
- } else {
- while (node.return) {
- node = node.return;
- }
- }
-
- if (node.tag === HostRoot) {
- // TODO: Check if this was a nested HostRoot when used with
- // renderContainerIntoSubtree.
- return nearestMounted;
- } // If we didn't hit the root, that means that we're in an disconnected tree
- // that has been unmounted.
-
-
- return null;
- }
- function getSuspenseInstanceFromFiber(fiber) {
- if (fiber.tag === SuspenseComponent) {
- var suspenseState = fiber.memoizedState;
-
- if (suspenseState === null) {
- var current = fiber.alternate;
-
- if (current !== null) {
- suspenseState = current.memoizedState;
- }
- }
-
- if (suspenseState !== null) {
- return suspenseState.dehydrated;
- }
- }
-
- return null;
- }
- function getContainerFromFiber(fiber) {
- return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
- }
- function isFiberMounted(fiber) {
- return getNearestMountedFiber(fiber) === fiber;
- }
- function isMounted(component) {
- {
- var owner = ReactCurrentOwner.current;
-
- if (owner !== null && owner.tag === ClassComponent) {
- var ownerFiber = owner;
- var instance = ownerFiber.stateNode;
-
- if (!instance._warnedAboutRefsInRender) {
- error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
- }
-
- instance._warnedAboutRefsInRender = true;
- }
- }
-
- var fiber = get(component);
-
- if (!fiber) {
- return false;
- }
-
- return getNearestMountedFiber(fiber) === fiber;
- }
-
- function assertIsMounted(fiber) {
- if (!(getNearestMountedFiber(fiber) === fiber)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- function findCurrentFiberUsingSlowPath(fiber) {
- var alternate = fiber.alternate;
-
- if (!alternate) {
- // If there is no alternate, then we only need to check if it is mounted.
- var nearestMounted = getNearestMountedFiber(fiber);
-
- if (!(nearestMounted !== null)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (nearestMounted !== fiber) {
- return null;
- }
-
- return fiber;
- } // If we have two possible branches, we'll walk backwards up to the root
- // to see what path the root points to. On the way we may hit one of the
- // special cases and we'll deal with them.
-
-
- var a = fiber;
- var b = alternate;
-
- while (true) {
- var parentA = a.return;
-
- if (parentA === null) {
- // We're at the root.
- break;
- }
-
- var parentB = parentA.alternate;
-
- if (parentB === null) {
- // There is no alternate. This is an unusual case. Currently, it only
- // happens when a Suspense component is hidden. An extra fragment fiber
- // is inserted in between the Suspense fiber and its children. Skip
- // over this extra fragment fiber and proceed to the next parent.
- var nextParent = parentA.return;
-
- if (nextParent !== null) {
- a = b = nextParent;
- continue;
- } // If there's no parent, we're at the root.
-
-
- break;
- } // If both copies of the parent fiber point to the same child, we can
- // assume that the child is current. This happens when we bailout on low
- // priority: the bailed out fiber's child reuses the current child.
-
-
- if (parentA.child === parentB.child) {
- var child = parentA.child;
-
- while (child) {
- if (child === a) {
- // We've determined that A is the current branch.
- assertIsMounted(parentA);
- return fiber;
- }
-
- if (child === b) {
- // We've determined that B is the current branch.
- assertIsMounted(parentA);
- return alternate;
- }
-
- child = child.sibling;
- } // We should never have an alternate for any mounting node. So the only
- // way this could possibly happen is if this was unmounted, if at all.
-
-
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- if (a.return !== b.return) {
- // The return pointer of A and the return pointer of B point to different
- // fibers. We assume that return pointers never criss-cross, so A must
- // belong to the child set of A.return, and B must belong to the child
- // set of B.return.
- a = parentA;
- b = parentB;
- } else {
- // The return pointers point to the same fiber. We'll have to use the
- // default, slow path: scan the child sets of each parent alternate to see
- // which child belongs to which set.
- //
- // Search parent A's child set
- var didFindChild = false;
- var _child = parentA.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentA;
- b = parentB;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentA;
- a = parentB;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- // Search parent B's child set
- _child = parentB.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentB;
- b = parentA;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentB;
- a = parentA;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- {
- throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
- }
- }
- }
- }
-
- if (!(a.alternate === b)) {
- {
- throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } // If the root is not a host container, we're in a disconnected tree. I.e.
- // unmounted.
-
-
- if (!(a.tag === HostRoot)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (a.stateNode.current === a) {
- // We've determined that A is the current branch.
- return fiber;
- } // Otherwise B has to be current branch.
-
-
- return alternate;
- }
- function findCurrentHostFiber(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
-
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
-
-
- var node = currentParent;
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText) {
- return node;
- } else if (node.child) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return null;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
-
-
- return null;
- }
- function findCurrentHostFiberWithNoPortals(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
-
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
-
-
- var node = currentParent;
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
- return node;
- } else if (node.child && node.tag !== HostPortal) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return null;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
-
-
- return null;
- }
-
- /**
- * Accumulates items that must not be null or undefined into the first one. This
- * is used to conserve memory by avoiding array allocations, and thus sacrifices
- * API cleanness. Since `current` can be null before being passed in and not
- * null after this function, make sure to assign it back to `current`:
- *
- * `a = accumulateInto(a, b);`
- *
- * This API should be sparingly used. Try `accumulate` for something cleaner.
- *
- * @return {*|array<*>} An accumulation of items.
- */
-
- function accumulateInto(current, next) {
- if (!(next != null)) {
- {
- throw Error( "accumulateInto(...): Accumulated items must not be null or undefined." );
- }
- }
-
- if (current == null) {
- return next;
- } // Both are not empty. Warning: Never call x.concat(y) when you are not
- // certain that x is an Array (x could be a string with concat method).
-
-
- if (Array.isArray(current)) {
- if (Array.isArray(next)) {
- current.push.apply(current, next);
- return current;
- }
-
- current.push(next);
- return current;
- }
-
- if (Array.isArray(next)) {
- // A bit too dangerous to mutate `next`.
- return [current].concat(next);
- }
-
- return [current, next];
- }
-
- /**
- * @param {array} arr an "accumulation" of items which is either an Array or
- * a single item. Useful when paired with the `accumulate` module. This is a
- * simple utility that allows us to reason about a collection of items, but
- * handling the case when there is exactly one item (and we do not need to
- * allocate an array).
- * @param {function} cb Callback invoked with each element or a collection.
- * @param {?} [scope] Scope used as `this` in a callback.
- */
- function forEachAccumulated(arr, cb, scope) {
- if (Array.isArray(arr)) {
- arr.forEach(cb, scope);
- } else if (arr) {
- cb.call(scope, arr);
- }
- }
-
- /**
- * Internal queue of events that have accumulated their dispatches and are
- * waiting to have their dispatches executed.
- */
-
- var eventQueue = null;
- /**
- * Dispatches an event and releases it back into the pool, unless persistent.
- *
- * @param {?object} event Synthetic event to be dispatched.
- * @private
- */
-
- var executeDispatchesAndRelease = function (event) {
- if (event) {
- executeDispatchesInOrder(event);
-
- if (!event.isPersistent()) {
- event.constructor.release(event);
- }
- }
- };
-
- var executeDispatchesAndReleaseTopLevel = function (e) {
- return executeDispatchesAndRelease(e);
- };
-
- function runEventsInBatch(events) {
- if (events !== null) {
- eventQueue = accumulateInto(eventQueue, events);
- } // Set `eventQueue` to null before processing it so that we can tell if more
- // events get enqueued while processing.
-
-
- var processingEventQueue = eventQueue;
- eventQueue = null;
-
- if (!processingEventQueue) {
- return;
- }
-
- forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
-
- if (!!eventQueue) {
- {
- throw Error( "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented." );
- }
- } // This would be a good time to rethrow if any of the event handlers threw.
-
-
- rethrowCaughtError();
- }
-
- /**
- * Gets the target node from a native browser event by accounting for
- * inconsistencies in browser DOM APIs.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {DOMEventTarget} Target node.
- */
-
- function getEventTarget(nativeEvent) {
- // Fallback to nativeEvent.srcElement for IE9
- // https://github.com/facebook/react/issues/12506
- var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
-
- if (target.correspondingUseElement) {
- target = target.correspondingUseElement;
- } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
- // @see http://www.quirksmode.org/js/events_properties.html
-
-
- return target.nodeType === TEXT_NODE ? target.parentNode : target;
- }
-
- /**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
-
- function isEventSupported(eventNameSuffix) {
- if (!canUseDOM) {
- return false;
- }
-
- var eventName = 'on' + eventNameSuffix;
- var isSupported = eventName in document;
-
- if (!isSupported) {
- var element = document.createElement('div');
- element.setAttribute(eventName, 'return;');
- isSupported = typeof element[eventName] === 'function';
- }
-
- return isSupported;
- }
-
- /**
- * Summary of `DOMEventPluginSystem` event handling:
- *
- * - Top-level delegation is used to trap most native browser events. This
- * may only occur in the main thread and is the responsibility of
- * ReactDOMEventListener, which is injected and can therefore support
- * pluggable event sources. This is the only work that occurs in the main
- * thread.
- *
- * - We normalize and de-duplicate events to account for browser quirks. This
- * may be done in the worker thread.
- *
- * - Forward these native events (with the associated top-level type used to
- * trap it) to `EventPluginRegistry`, which in turn will ask plugins if they want
- * to extract any synthetic events.
- *
- * - The `EventPluginRegistry` will then process each event by annotating them with
- * "dispatches", a sequence of listeners and IDs that care about that event.
- *
- * - The `EventPluginRegistry` then dispatches the events.
- *
- * Overview of React and the event system:
- *
- * +------------+ .
- * | DOM | .
- * +------------+ .
- * | .
- * v .
- * +------------+ .
- * | ReactEvent | .
- * | Listener | .
- * +------------+ . +-----------+
- * | . +--------+|SimpleEvent|
- * | . | |Plugin |
- * +-----|------+ . v +-----------+
- * | | | . +--------------+ +------------+
- * | +-----------.--->|PluginRegistry| | Event |
- * | | . | | +-----------+ | Propagators|
- * | ReactEvent | . | | |TapEvent | |------------|
- * | Emitter | . | |<---+|Plugin | |other plugin|
- * | | . | | +-----------+ | utilities |
- * | +-----------.--->| | +------------+
- * | | | . +--------------+
- * +-----|------+ . ^ +-----------+
- * | . | |Enter/Leave|
- * + . +-------+|Plugin |
- * +-------------+ . +-----------+
- * | application | .
- * |-------------| .
- * | | .
- * | | .
- * +-------------+ .
- * .
- * React Core . General Purpose Event Plugin System
- */
-
- var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
- var callbackBookkeepingPool = [];
-
- function releaseTopLevelCallbackBookKeeping(instance) {
- instance.topLevelType = null;
- instance.nativeEvent = null;
- instance.targetInst = null;
- instance.ancestors.length = 0;
-
- if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
- callbackBookkeepingPool.push(instance);
- }
- } // Used to store ancestor hierarchy in top level callback
-
-
- function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) {
- if (callbackBookkeepingPool.length) {
- var instance = callbackBookkeepingPool.pop();
- instance.topLevelType = topLevelType;
- instance.eventSystemFlags = eventSystemFlags;
- instance.nativeEvent = nativeEvent;
- instance.targetInst = targetInst;
- return instance;
- }
-
- return {
- topLevelType: topLevelType,
- eventSystemFlags: eventSystemFlags,
- nativeEvent: nativeEvent,
- targetInst: targetInst,
- ancestors: []
- };
- }
- /**
- * Find the deepest React component completely containing the root of the
- * passed-in instance (for use when entire React trees are nested within each
- * other). If React trees are not nested, returns null.
- */
-
-
- function findRootContainerNode(inst) {
- if (inst.tag === HostRoot) {
- return inst.stateNode.containerInfo;
- } // TODO: It may be a good idea to cache this to prevent unnecessary DOM
- // traversal, but caching is difficult to do correctly without using a
- // mutation observer to listen for all DOM changes.
-
-
- while (inst.return) {
- inst = inst.return;
- }
-
- if (inst.tag !== HostRoot) {
- // This can happen if we're in a detached tree.
- return null;
- }
-
- return inst.stateNode.containerInfo;
- }
- /**
- * Allows registered plugins an opportunity to extract events from top-level
- * native browser events.
- *
- * @return {*} An accumulation of synthetic events.
- * @internal
- */
-
-
- function extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var events = null;
-
- for (var i = 0; i < plugins.length; i++) {
- // Not every plugin in the ordering may be loaded at runtime.
- var possiblePlugin = plugins[i];
-
- if (possiblePlugin) {
- var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
-
- if (extractedEvents) {
- events = accumulateInto(events, extractedEvents);
- }
- }
- }
-
- return events;
- }
-
- function runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- runEventsInBatch(events);
- }
-
- function handleTopLevel(bookKeeping) {
- var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components.
- // It's important that we build the array of ancestors before calling any
- // event handlers, because event handlers can modify the DOM, leading to
- // inconsistencies with ReactMount's node cache. See #1105.
-
- var ancestor = targetInst;
-
- do {
- if (!ancestor) {
- var ancestors = bookKeeping.ancestors;
- ancestors.push(ancestor);
- break;
- }
-
- var root = findRootContainerNode(ancestor);
-
- if (!root) {
- break;
- }
-
- var tag = ancestor.tag;
-
- if (tag === HostComponent || tag === HostText) {
- bookKeeping.ancestors.push(ancestor);
- }
-
- ancestor = getClosestInstanceFromNode(root);
- } while (ancestor);
-
- for (var i = 0; i < bookKeeping.ancestors.length; i++) {
- targetInst = bookKeeping.ancestors[i];
- var eventTarget = getEventTarget(bookKeeping.nativeEvent);
- var topLevelType = bookKeeping.topLevelType;
- var nativeEvent = bookKeeping.nativeEvent;
- var eventSystemFlags = bookKeeping.eventSystemFlags; // If this is the first ancestor, we mark it on the system flags
-
- if (i === 0) {
- eventSystemFlags |= IS_FIRST_ANCESTOR;
- }
-
- runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, eventTarget, eventSystemFlags);
- }
- }
-
- function dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {
- var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags);
-
- try {
- // Event queue being processed in the same cycle allows
- // `preventDefault`.
- batchedEventUpdates(handleTopLevel, bookKeeping);
- } finally {
- releaseTopLevelCallbackBookKeeping(bookKeeping);
- }
- }
- /**
- * We listen for bubbled touch events on the document object.
- *
- * Firefox v8.01 (and possibly others) exhibited strange behavior when
- * mounting `onmousemove` events at some node that was not the document
- * element. The symptoms were that if your mouse is not moving over something
- * contained within that mount point (for example on the background) the
- * top-level listeners for `onmousemove` won't be called. However, if you
- * register the `mousemove` on the document object, then it will of course
- * catch all `mousemove`s. This along with iOS quirks, justifies restricting
- * top-level listeners to the document object only, at least for these
- * movement types of events and possibly all events.
- *
- * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
- *
- * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
- * they bubble to document.
- *
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @param {object} mountAt Container where to mount the listener
- */
-
- function legacyListenToEvent(registrationName, mountAt) {
- var listenerMap = getListenerMapForElement(mountAt);
- var dependencies = registrationNameDependencies[registrationName];
-
- for (var i = 0; i < dependencies.length; i++) {
- var dependency = dependencies[i];
- legacyListenToTopLevelEvent(dependency, mountAt, listenerMap);
- }
- }
- function legacyListenToTopLevelEvent(topLevelType, mountAt, listenerMap) {
- if (!listenerMap.has(topLevelType)) {
- switch (topLevelType) {
- case TOP_SCROLL:
- trapCapturedEvent(TOP_SCROLL, mountAt);
- break;
-
- case TOP_FOCUS:
- case TOP_BLUR:
- trapCapturedEvent(TOP_FOCUS, mountAt);
- trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function,
- // but this ensures we mark both as attached rather than just one.
-
- listenerMap.set(TOP_BLUR, null);
- listenerMap.set(TOP_FOCUS, null);
- break;
-
- case TOP_CANCEL:
- case TOP_CLOSE:
- if (isEventSupported(getRawEventName(topLevelType))) {
- trapCapturedEvent(topLevelType, mountAt);
- }
-
- break;
-
- case TOP_INVALID:
- case TOP_SUBMIT:
- case TOP_RESET:
- // We listen to them on the target DOM elements.
- // Some of them bubble so we don't want them to fire twice.
- break;
-
- default:
- // By default, listen on the top level to all non-media events.
- // Media events don't bubble so adding the listener wouldn't do anything.
- var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1;
-
- if (!isMediaEvent) {
- trapBubbledEvent(topLevelType, mountAt);
- }
-
- break;
- }
-
- listenerMap.set(topLevelType, null);
- }
- }
- function isListeningToAllDependencies(registrationName, mountAt) {
- var listenerMap = getListenerMapForElement(mountAt);
- var dependencies = registrationNameDependencies[registrationName];
-
- for (var i = 0; i < dependencies.length; i++) {
- var dependency = dependencies[i];
-
- if (!listenerMap.has(dependency)) {
- return false;
- }
- }
-
- return true;
- }
-
- var attemptUserBlockingHydration;
- function setAttemptUserBlockingHydration(fn) {
- attemptUserBlockingHydration = fn;
- }
- var attemptContinuousHydration;
- function setAttemptContinuousHydration(fn) {
- attemptContinuousHydration = fn;
- }
- var attemptHydrationAtCurrentPriority;
- function setAttemptHydrationAtCurrentPriority(fn) {
- attemptHydrationAtCurrentPriority = fn;
- } // TODO: Upgrade this definition once we're on a newer version of Flow that
- var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
-
- var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
- // if the last target was dehydrated.
-
- var queuedFocus = null;
- var queuedDrag = null;
- var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
-
- var queuedPointers = new Map();
- var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
-
- var queuedExplicitHydrationTargets = [];
- function hasQueuedDiscreteEvents() {
- return queuedDiscreteEvents.length > 0;
- }
- var discreteReplayableEvents = [TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_TOUCH_START, TOP_AUX_CLICK, TOP_DOUBLE_CLICK, TOP_POINTER_CANCEL, TOP_POINTER_DOWN, TOP_POINTER_UP, TOP_DRAG_END, TOP_DRAG_START, TOP_DROP, TOP_COMPOSITION_END, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_INPUT, TOP_TEXT_INPUT, TOP_CLOSE, TOP_CANCEL, TOP_COPY, TOP_CUT, TOP_PASTE, TOP_CLICK, TOP_CHANGE, TOP_CONTEXT_MENU, TOP_RESET, TOP_SUBMIT];
- var continuousReplayableEvents = [TOP_FOCUS, TOP_BLUR, TOP_DRAG_ENTER, TOP_DRAG_LEAVE, TOP_MOUSE_OVER, TOP_MOUSE_OUT, TOP_POINTER_OVER, TOP_POINTER_OUT, TOP_GOT_POINTER_CAPTURE, TOP_LOST_POINTER_CAPTURE];
- function isReplayableDiscreteEvent(eventType) {
- return discreteReplayableEvents.indexOf(eventType) > -1;
- }
-
- function trapReplayableEventForDocument(topLevelType, document, listenerMap) {
- legacyListenToTopLevelEvent(topLevelType, document, listenerMap);
- }
-
- function eagerlyTrapReplayableEvents(container, document) {
- var listenerMapForDoc = getListenerMapForElement(document); // Discrete
-
- discreteReplayableEvents.forEach(function (topLevelType) {
- trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
- }); // Continuous
-
- continuousReplayableEvents.forEach(function (topLevelType) {
- trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
- });
- }
-
- function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- return {
- blockedOn: blockedOn,
- topLevelType: topLevelType,
- eventSystemFlags: eventSystemFlags | IS_REPLAYED,
- nativeEvent: nativeEvent,
- container: container
- };
- }
-
- function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
- queuedDiscreteEvents.push(queuedEvent);
- } // Resets the replaying for this type of continuous event to no event.
-
- function clearIfContinuousEvent(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_FOCUS:
- case TOP_BLUR:
- queuedFocus = null;
- break;
-
- case TOP_DRAG_ENTER:
- case TOP_DRAG_LEAVE:
- queuedDrag = null;
- break;
-
- case TOP_MOUSE_OVER:
- case TOP_MOUSE_OUT:
- queuedMouse = null;
- break;
-
- case TOP_POINTER_OVER:
- case TOP_POINTER_OUT:
- {
- var pointerId = nativeEvent.pointerId;
- queuedPointers.delete(pointerId);
- break;
- }
-
- case TOP_GOT_POINTER_CAPTURE:
- case TOP_LOST_POINTER_CAPTURE:
- {
- var _pointerId = nativeEvent.pointerId;
- queuedPointerCaptures.delete(_pointerId);
- break;
- }
- }
- }
-
- function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
-
- if (blockedOn !== null) {
- var _fiber2 = getInstanceFromNode$1(blockedOn);
-
- if (_fiber2 !== null) {
- // Attempt to increase the priority of this target.
- attemptContinuousHydration(_fiber2);
- }
- }
-
- return queuedEvent;
- } // If we have already queued this exact event, then it's because
- // the different event systems have different DOM event listeners.
- // We can accumulate the flags and store a single event to be
- // replayed.
-
-
- existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
- return existingQueuedEvent;
- }
-
- function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
- // These set relatedTarget to null because the replayed event will be treated as if we
- // moved from outside the window (no target) onto the target once it hydrates.
- // Instead of mutating we could clone the event.
- switch (topLevelType) {
- case TOP_FOCUS:
- {
- var focusEvent = nativeEvent;
- queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, topLevelType, eventSystemFlags, container, focusEvent);
- return true;
- }
-
- case TOP_DRAG_ENTER:
- {
- var dragEvent = nativeEvent;
- queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, topLevelType, eventSystemFlags, container, dragEvent);
- return true;
- }
-
- case TOP_MOUSE_OVER:
- {
- var mouseEvent = nativeEvent;
- queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, topLevelType, eventSystemFlags, container, mouseEvent);
- return true;
- }
-
- case TOP_POINTER_OVER:
- {
- var pointerEvent = nativeEvent;
- var pointerId = pointerEvent.pointerId;
- queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, topLevelType, eventSystemFlags, container, pointerEvent));
- return true;
- }
-
- case TOP_GOT_POINTER_CAPTURE:
- {
- var _pointerEvent = nativeEvent;
- var _pointerId2 = _pointerEvent.pointerId;
- queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, topLevelType, eventSystemFlags, container, _pointerEvent));
- return true;
- }
- }
-
- return false;
- } // Check if this target is unblocked. Returns true if it's unblocked.
-
- function attemptExplicitHydrationTarget(queuedTarget) {
- // TODO: This function shares a lot of logic with attemptToDispatchEvent.
- // Try to unify them. It's a bit tricky since it would require two return
- // values.
- var targetInst = getClosestInstanceFromNode(queuedTarget.target);
-
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
-
- if (nearestMounted !== null) {
- var tag = nearestMounted.tag;
-
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
-
- if (instance !== null) {
- // We're blocked on hydrating this boundary.
- // Increase its priority.
- queuedTarget.blockedOn = instance;
- unstable_runWithPriority(queuedTarget.priority, function () {
- attemptHydrationAtCurrentPriority(nearestMounted);
- });
- return;
- }
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
-
- if (root.hydrate) {
- queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
- // a root other than sync.
-
- return;
- }
- }
- }
- }
-
- queuedTarget.blockedOn = null;
- }
-
- function attemptReplayContinuousQueuedEvent(queuedEvent) {
- if (queuedEvent.blockedOn !== null) {
- return false;
- }
-
- var nextBlockedOn = attemptToDispatchEvent(queuedEvent.topLevelType, queuedEvent.eventSystemFlags, queuedEvent.container, queuedEvent.nativeEvent);
-
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- var _fiber3 = getInstanceFromNode$1(nextBlockedOn);
-
- if (_fiber3 !== null) {
- attemptContinuousHydration(_fiber3);
- }
-
- queuedEvent.blockedOn = nextBlockedOn;
- return false;
- }
-
- return true;
- }
-
- function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
- if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
- map.delete(key);
- }
- }
-
- function replayUnblockedEvents() {
- hasScheduledReplayAttempt = false; // First replay discrete events.
-
- while (queuedDiscreteEvents.length > 0) {
- var nextDiscreteEvent = queuedDiscreteEvents[0];
-
- if (nextDiscreteEvent.blockedOn !== null) {
- // We're still blocked.
- // Increase the priority of this boundary to unblock
- // the next discrete event.
- var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
-
- if (_fiber4 !== null) {
- attemptUserBlockingHydration(_fiber4);
- }
-
- break;
- }
-
- var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);
-
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- nextDiscreteEvent.blockedOn = nextBlockedOn;
- } else {
- // We've successfully replayed the first event. Let's try the next one.
- queuedDiscreteEvents.shift();
- }
- } // Next replay any continuous events.
-
-
- if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
- queuedFocus = null;
- }
-
- if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
- queuedDrag = null;
- }
-
- if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
- queuedMouse = null;
- }
-
- queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
- queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
- }
-
- function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
-
- if (!hasScheduledReplayAttempt) {
- hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
- // now unblocked. This first might not actually be unblocked yet.
- // We could check it early to avoid scheduling an unnecessary callback.
-
- unstable_scheduleCallback(unstable_NormalPriority, replayUnblockedEvents);
- }
- }
- }
-
- function retryIfBlockedOn(unblocked) {
- // Mark anything that was blocked on this as no longer blocked
- // and eligible for a replay.
- if (queuedDiscreteEvents.length > 0) {
- scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
- // worth it because we expect very few discrete events to queue up and once
- // we are actually fully unblocked it will be fast to replay them.
-
- for (var i = 1; i < queuedDiscreteEvents.length; i++) {
- var queuedEvent = queuedDiscreteEvents[i];
-
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
- }
- }
- }
-
- if (queuedFocus !== null) {
- scheduleCallbackIfUnblocked(queuedFocus, unblocked);
- }
-
- if (queuedDrag !== null) {
- scheduleCallbackIfUnblocked(queuedDrag, unblocked);
- }
-
- if (queuedMouse !== null) {
- scheduleCallbackIfUnblocked(queuedMouse, unblocked);
- }
-
- var unblock = function (queuedEvent) {
- return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
- };
-
- queuedPointers.forEach(unblock);
- queuedPointerCaptures.forEach(unblock);
-
- for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
- var queuedTarget = queuedExplicitHydrationTargets[_i];
-
- if (queuedTarget.blockedOn === unblocked) {
- queuedTarget.blockedOn = null;
- }
- }
-
- while (queuedExplicitHydrationTargets.length > 0) {
- var nextExplicitTarget = queuedExplicitHydrationTargets[0];
-
- if (nextExplicitTarget.blockedOn !== null) {
- // We're still blocked.
- break;
- } else {
- attemptExplicitHydrationTarget(nextExplicitTarget);
-
- if (nextExplicitTarget.blockedOn === null) {
- // We're unblocked.
- queuedExplicitHydrationTargets.shift();
- }
- }
- }
- }
-
- function addEventBubbleListener(element, eventType, listener) {
- element.addEventListener(eventType, listener, false);
- }
- function addEventCaptureListener(element, eventType, listener) {
- element.addEventListener(eventType, listener, true);
- }
-
- // do it in two places, which duplicates logic
- // and increases the bundle size, we do it all
- // here once. If we remove or refactor the
- // SimpleEventPlugin, we should also remove or
- // update the below line.
-
- var simpleEventPluginEventTypes = {};
- var topLevelEventsToDispatchConfig = new Map();
- var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
- // the code required to apply the same logic for event prioritization and that of the
- // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
- // duplication (for which there would be quite a bit). For the events that are not needed
- // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
- // array of top level events.
- // Lastly, we ignore prettier so we can keep the formatting sane.
- // prettier-ignore
-
- var discreteEventPairsForSimpleEventPlugin = [TOP_BLUR, 'blur', TOP_CANCEL, 'cancel', TOP_CLICK, 'click', TOP_CLOSE, 'close', TOP_CONTEXT_MENU, 'contextMenu', TOP_COPY, 'copy', TOP_CUT, 'cut', TOP_AUX_CLICK, 'auxClick', TOP_DOUBLE_CLICK, 'doubleClick', TOP_DRAG_END, 'dragEnd', TOP_DRAG_START, 'dragStart', TOP_DROP, 'drop', TOP_FOCUS, 'focus', TOP_INPUT, 'input', TOP_INVALID, 'invalid', TOP_KEY_DOWN, 'keyDown', TOP_KEY_PRESS, 'keyPress', TOP_KEY_UP, 'keyUp', TOP_MOUSE_DOWN, 'mouseDown', TOP_MOUSE_UP, 'mouseUp', TOP_PASTE, 'paste', TOP_PAUSE, 'pause', TOP_PLAY, 'play', TOP_POINTER_CANCEL, 'pointerCancel', TOP_POINTER_DOWN, 'pointerDown', TOP_POINTER_UP, 'pointerUp', TOP_RATE_CHANGE, 'rateChange', TOP_RESET, 'reset', TOP_SEEKED, 'seeked', TOP_SUBMIT, 'submit', TOP_TOUCH_CANCEL, 'touchCancel', TOP_TOUCH_END, 'touchEnd', TOP_TOUCH_START, 'touchStart', TOP_VOLUME_CHANGE, 'volumeChange'];
- var otherDiscreteEvents = [TOP_CHANGE, TOP_SELECTION_CHANGE, TOP_TEXT_INPUT, TOP_COMPOSITION_START, TOP_COMPOSITION_END, TOP_COMPOSITION_UPDATE]; // prettier-ignore
-
- var userBlockingPairsForSimpleEventPlugin = [TOP_DRAG, 'drag', TOP_DRAG_ENTER, 'dragEnter', TOP_DRAG_EXIT, 'dragExit', TOP_DRAG_LEAVE, 'dragLeave', TOP_DRAG_OVER, 'dragOver', TOP_MOUSE_MOVE, 'mouseMove', TOP_MOUSE_OUT, 'mouseOut', TOP_MOUSE_OVER, 'mouseOver', TOP_POINTER_MOVE, 'pointerMove', TOP_POINTER_OUT, 'pointerOut', TOP_POINTER_OVER, 'pointerOver', TOP_SCROLL, 'scroll', TOP_TOGGLE, 'toggle', TOP_TOUCH_MOVE, 'touchMove', TOP_WHEEL, 'wheel']; // prettier-ignore
-
- var continuousPairsForSimpleEventPlugin = [TOP_ABORT, 'abort', TOP_ANIMATION_END, 'animationEnd', TOP_ANIMATION_ITERATION, 'animationIteration', TOP_ANIMATION_START, 'animationStart', TOP_CAN_PLAY, 'canPlay', TOP_CAN_PLAY_THROUGH, 'canPlayThrough', TOP_DURATION_CHANGE, 'durationChange', TOP_EMPTIED, 'emptied', TOP_ENCRYPTED, 'encrypted', TOP_ENDED, 'ended', TOP_ERROR, 'error', TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', TOP_LOAD, 'load', TOP_LOADED_DATA, 'loadedData', TOP_LOADED_METADATA, 'loadedMetadata', TOP_LOAD_START, 'loadStart', TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', TOP_PLAYING, 'playing', TOP_PROGRESS, 'progress', TOP_SEEKING, 'seeking', TOP_STALLED, 'stalled', TOP_SUSPEND, 'suspend', TOP_TIME_UPDATE, 'timeUpdate', TOP_TRANSITION_END, 'transitionEnd', TOP_WAITING, 'waiting'];
- /**
- * Turns
- * ['abort', ...]
- * into
- * eventTypes = {
- * 'abort': {
- * phasedRegistrationNames: {
- * bubbled: 'onAbort',
- * captured: 'onAbortCapture',
- * },
- * dependencies: [TOP_ABORT],
- * },
- * ...
- * };
- * topLevelEventsToDispatchConfig = new Map([
- * [TOP_ABORT, { sameConfig }],
- * ]);
- */
-
- function processSimpleEventPluginPairsByPriority(eventTypes, priority) {
- // As the event types are in pairs of two, we need to iterate
- // through in twos. The events are in pairs of two to save code
- // and improve init perf of processing this array, as it will
- // result in far fewer object allocations and property accesses
- // if we only use three arrays to process all the categories of
- // instead of tuples.
- for (var i = 0; i < eventTypes.length; i += 2) {
- var topEvent = eventTypes[i];
- var event = eventTypes[i + 1];
- var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
- var onEvent = 'on' + capitalizedEvent;
- var config = {
- phasedRegistrationNames: {
- bubbled: onEvent,
- captured: onEvent + 'Capture'
- },
- dependencies: [topEvent],
- eventPriority: priority
- };
- eventPriorities.set(topEvent, priority);
- topLevelEventsToDispatchConfig.set(topEvent, config);
- simpleEventPluginEventTypes[event] = config;
- }
- }
-
- function processTopEventPairsByPriority(eventTypes, priority) {
- for (var i = 0; i < eventTypes.length; i++) {
- eventPriorities.set(eventTypes[i], priority);
- }
- } // SimpleEventPlugin
-
-
- processSimpleEventPluginPairsByPriority(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
- processSimpleEventPluginPairsByPriority(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
- processSimpleEventPluginPairsByPriority(continuousPairsForSimpleEventPlugin, ContinuousEvent); // Not used by SimpleEventPlugin
-
- processTopEventPairsByPriority(otherDiscreteEvents, DiscreteEvent);
- function getEventPriorityForPluginSystem(topLevelType) {
- var priority = eventPriorities.get(topLevelType); // Default to a ContinuousEvent. Note: we might
- // want to warn if we can't detect the priority
- // for the event.
-
- return priority === undefined ? ContinuousEvent : priority;
- }
-
- // Intentionally not named imports because Rollup would use dynamic dispatch for
- var UserBlockingPriority = unstable_UserBlockingPriority,
- runWithPriority = unstable_runWithPriority; // TODO: can we stop exporting these?
-
- var _enabled = true;
- function setEnabled(enabled) {
- _enabled = !!enabled;
- }
- function isEnabled() {
- return _enabled;
- }
- function trapBubbledEvent(topLevelType, element) {
- trapEventForPluginEventSystem(element, topLevelType, false);
- }
- function trapCapturedEvent(topLevelType, element) {
- trapEventForPluginEventSystem(element, topLevelType, true);
- }
-
- function trapEventForPluginEventSystem(container, topLevelType, capture) {
- var listener;
-
- switch (getEventPriorityForPluginSystem(topLevelType)) {
- case DiscreteEvent:
- listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
-
- case UserBlockingEvent:
- listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
-
- case ContinuousEvent:
- default:
- listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
- break;
- }
-
- var rawEventName = getRawEventName(topLevelType);
-
- if (capture) {
- addEventCaptureListener(container, rawEventName, listener);
- } else {
- addEventBubbleListener(container, rawEventName, listener);
- }
- }
-
- function dispatchDiscreteEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
- discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, container, nativeEvent);
- }
-
- function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, container, nativeEvent) {
- runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, container, nativeEvent));
- }
-
- function dispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- if (!_enabled) {
- return;
- }
-
- if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) {
- // If we already have a queue of discrete events, and this is another discrete
- // event, then we can't dispatch it regardless of its target, since they
- // need to dispatch in order.
- queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
- topLevelType, eventSystemFlags, container, nativeEvent);
- return;
- }
-
- var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent);
-
- if (blockedOn === null) {
- // We successfully dispatched this event.
- clearIfContinuousEvent(topLevelType, nativeEvent);
- return;
- }
-
- if (isReplayableDiscreteEvent(topLevelType)) {
- // This this to be replayed later once the target is available.
- queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
- return;
- }
-
- if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent)) {
- return;
- } // We need to clear only if we didn't queue because
- // queueing is accummulative.
-
-
- clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target,
- // in case the event system needs to trace it.
-
- {
- dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null);
- }
- } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
-
- function attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
- // TODO: Warn if _enabled is false.
- var nativeEventTarget = getEventTarget(nativeEvent);
- var targetInst = getClosestInstanceFromNode(nativeEventTarget);
-
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
-
- if (nearestMounted === null) {
- // This tree has been unmounted already. Dispatch without a target.
- targetInst = null;
- } else {
- var tag = nearestMounted.tag;
-
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
-
- if (instance !== null) {
- // Queue the event to be replayed later. Abort dispatching since we
- // don't want this event dispatched twice through the event system.
- // TODO: If this is the first discrete event in the queue. Schedule an increased
- // priority for this boundary.
- return instance;
- } // This shouldn't happen, something went wrong but to avoid blocking
- // the whole system, dispatch the event without a target.
- // TODO: Warn.
-
-
- targetInst = null;
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
-
- if (root.hydrate) {
- // If this happens during a replay something went wrong and it might block
- // the whole system.
- return getContainerFromFiber(nearestMounted);
- }
-
- targetInst = null;
- } else if (nearestMounted !== targetInst) {
- // If we get an event (ex: img onload) before committing that
- // component's mount, ignore it for now (that is, treat it as if it was an
- // event on a non-React tree). We might also consider queueing events and
- // dispatching them after the mount.
- targetInst = null;
- }
- }
- }
-
- {
- dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);
- } // We're not blocked on anything.
-
-
- return null;
- }
-
// List derived from Gecko source code:
// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
var shorthandToLonghand = {
@@ -4782,7 +2621,6 @@
function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
{
-
if (!nextStyles) {
return;
}
@@ -4810,7 +2648,7 @@
}
}
- // For HTML, certain tags should omit their close tag. We keep a whitelist for
+ // For HTML, certain tags should omit their close tag. We keep a list for
// those special-case tags.
var omittedCloseTags = {
area: true,
@@ -4838,11 +2676,6 @@
}, omittedCloseTags);
var HTML = '__html';
- var ReactDebugCurrentFrame$3 = null;
-
- {
- ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
- }
function assertValidProps(tag, props) {
if (!props) {
@@ -4853,7 +2686,7 @@
if (voidElementTags[tag]) {
if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
{
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
}
}
}
@@ -4867,7 +2700,7 @@
if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
{
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
+ throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
}
}
}
@@ -4880,7 +2713,7 @@
if (!(props.style == null || typeof props.style === 'object')) {
{
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
+ throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
}
}
}
@@ -4892,7 +2725,7 @@
switch (tagName) {
// These are reserved SVG and MathML elements.
- // We don't mind this whitelist too much because we expect it to never grow.
+ // We don't mind this list too much because we expect it to never grow.
// The alternative is to track the namespace in a few places which is convoluted.
// https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
case 'annotation-xml':
@@ -4910,7 +2743,7 @@
}
}
- // When adding attributes to the HTML or SVG whitelist, be sure to
+ // When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
@@ -4960,9 +2793,11 @@
dir: 'dir',
disabled: 'disabled',
disablepictureinpicture: 'disablePictureInPicture',
+ disableremoteplayback: 'disableRemotePlayback',
download: 'download',
draggable: 'draggable',
enctype: 'encType',
+ enterkeyhint: 'enterKeyHint',
for: 'htmlFor',
form: 'form',
formmethod: 'formMethod',
@@ -5530,9 +3365,9 @@
}).join(', ');
if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
} else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
+ error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
}
}
}
@@ -5574,7 +3409,7 @@
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
+ validateProperty$1 = function (tagName, name, value, eventRegistry) {
if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
return true;
}
@@ -5589,8 +3424,11 @@
} // We can't rely on the event system being injected on the server.
- if (canUseEventSystem) {
- if (registrationNameModules.hasOwnProperty(name)) {
+ if (eventRegistry != null) {
+ var registrationNameDependencies = eventRegistry.registrationNameDependencies,
+ possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
+
+ if (registrationNameDependencies.hasOwnProperty(name)) {
return true;
}
@@ -5710,12 +3548,12 @@
};
}
- var warnUnknownProperties = function (type, props, canUseEventSystem) {
+ var warnUnknownProperties = function (type, props, eventRegistry) {
{
var unknownProps = [];
for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
+ var isValid = validateProperty$1(type, key, props[key], eventRegistry);
if (!isValid) {
unknownProps.push(key);
@@ -5727,19 +3565,5196 @@
}).join(', ');
if (unknownProps.length === 1) {
- error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
} else if (unknownProps.length > 1) {
- error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
+ error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
}
}
};
- function validateProperties$2(type, props, canUseEventSystem) {
+ function validateProperties$2(type, props, eventRegistry) {
if (isCustomComponent(type, props)) {
return;
}
- warnUnknownProperties(type, props, canUseEventSystem);
+ warnUnknownProperties(type, props, eventRegistry);
+ }
+
+ var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
+ var IS_NON_DELEGATED = 1 << 1;
+ var IS_CAPTURE_PHASE = 1 << 2;
+ var IS_REPLAYED = 1 << 4;
+ // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
+ // we call willDeferLaterForLegacyFBSupport, thus not bailing out
+ // will result in endless cycles like an infinite loop.
+ // We also don't want to defer during event replaying.
+
+ var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;
+
+ /**
+ * Gets the target node from a native browser event by accounting for
+ * inconsistencies in browser DOM APIs.
+ *
+ * @param {object} nativeEvent Native browser event.
+ * @return {DOMEventTarget} Target node.
+ */
+
+ function getEventTarget(nativeEvent) {
+ // Fallback to nativeEvent.srcElement for IE9
+ // https://github.com/facebook/react/issues/12506
+ var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
+
+ if (target.correspondingUseElement) {
+ target = target.correspondingUseElement;
+ } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
+ // @see http://www.quirksmode.org/js/events_properties.html
+
+
+ return target.nodeType === TEXT_NODE ? target.parentNode : target;
+ }
+
+ var restoreImpl = null;
+ var restoreTarget = null;
+ var restoreQueue = null;
+
+ function restoreStateOfTarget(target) {
+ // We perform this translation at the end of the event loop so that we
+ // always receive the correct fiber here
+ var internalInstance = getInstanceFromNode(target);
+
+ if (!internalInstance) {
+ // Unmounted
+ return;
+ }
+
+ if (!(typeof restoreImpl === 'function')) {
+ {
+ throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+
+ var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
+
+ if (stateNode) {
+ var _props = getFiberCurrentPropsFromNode(stateNode);
+
+ restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
+ }
+ }
+
+ function setRestoreImplementation(impl) {
+ restoreImpl = impl;
+ }
+ function enqueueStateRestore(target) {
+ if (restoreTarget) {
+ if (restoreQueue) {
+ restoreQueue.push(target);
+ } else {
+ restoreQueue = [target];
+ }
+ } else {
+ restoreTarget = target;
+ }
+ }
+ function needsStateRestore() {
+ return restoreTarget !== null || restoreQueue !== null;
+ }
+ function restoreStateIfNeeded() {
+ if (!restoreTarget) {
+ return;
+ }
+
+ var target = restoreTarget;
+ var queuedTargets = restoreQueue;
+ restoreTarget = null;
+ restoreQueue = null;
+ restoreStateOfTarget(target);
+
+ if (queuedTargets) {
+ for (var i = 0; i < queuedTargets.length; i++) {
+ restoreStateOfTarget(queuedTargets[i]);
+ }
+ }
+ }
+
+ // the renderer. Such as when we're dispatching events or if third party
+ // libraries need to call batchedUpdates. Eventually, this API will go away when
+ // everything is batched by default. We'll then have a similar API to opt-out of
+ // scheduled work and instead do synchronous work.
+ // Defaults
+
+ var batchedUpdatesImpl = function (fn, bookkeeping) {
+ return fn(bookkeeping);
+ };
+
+ var discreteUpdatesImpl = function (fn, a, b, c, d) {
+ return fn(a, b, c, d);
+ };
+
+ var flushDiscreteUpdatesImpl = function () {};
+
+ var batchedEventUpdatesImpl = batchedUpdatesImpl;
+ var isInsideEventHandler = false;
+ var isBatchingEventUpdates = false;
+
+ function finishEventHandler() {
+ // Here we wait until all updates have propagated, which is important
+ // when using controlled components within layers:
+ // https://github.com/facebook/react/issues/1698
+ // Then we restore state of any controlled component.
+ var controlledComponentsHavePendingUpdates = needsStateRestore();
+
+ if (controlledComponentsHavePendingUpdates) {
+ // If a controlled event was fired, we may need to restore the state of
+ // the DOM node back to the controlled value. This is necessary when React
+ // bails out of the update without touching the DOM.
+ flushDiscreteUpdatesImpl();
+ restoreStateIfNeeded();
+ }
+ }
+
+ function batchedUpdates(fn, bookkeeping) {
+ if (isInsideEventHandler) {
+ // If we are currently inside another batch, we need to wait until it
+ // fully completes before restoring state.
+ return fn(bookkeeping);
+ }
+
+ isInsideEventHandler = true;
+
+ try {
+ return batchedUpdatesImpl(fn, bookkeeping);
+ } finally {
+ isInsideEventHandler = false;
+ finishEventHandler();
+ }
+ }
+ function batchedEventUpdates(fn, a, b) {
+ if (isBatchingEventUpdates) {
+ // If we are currently inside another batch, we need to wait until it
+ // fully completes before restoring state.
+ return fn(a, b);
+ }
+
+ isBatchingEventUpdates = true;
+
+ try {
+ return batchedEventUpdatesImpl(fn, a, b);
+ } finally {
+ isBatchingEventUpdates = false;
+ finishEventHandler();
+ }
+ }
+ function discreteUpdates(fn, a, b, c, d) {
+ var prevIsInsideEventHandler = isInsideEventHandler;
+ isInsideEventHandler = true;
+
+ try {
+ return discreteUpdatesImpl(fn, a, b, c, d);
+ } finally {
+ isInsideEventHandler = prevIsInsideEventHandler;
+
+ if (!isInsideEventHandler) {
+ finishEventHandler();
+ }
+ }
+ }
+ function flushDiscreteUpdatesIfNeeded(timeStamp) {
+ {
+ if (!isInsideEventHandler) {
+ flushDiscreteUpdatesImpl();
+ }
+ }
+ }
+ function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
+ batchedUpdatesImpl = _batchedUpdatesImpl;
+ discreteUpdatesImpl = _discreteUpdatesImpl;
+ flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
+ batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
+ }
+
+ function isInteractive(tag) {
+ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
+ }
+
+ function shouldPreventMouseEvent(name, type, props) {
+ switch (name) {
+ case 'onClick':
+ case 'onClickCapture':
+ case 'onDoubleClick':
+ case 'onDoubleClickCapture':
+ case 'onMouseDown':
+ case 'onMouseDownCapture':
+ case 'onMouseMove':
+ case 'onMouseMoveCapture':
+ case 'onMouseUp':
+ case 'onMouseUpCapture':
+ case 'onMouseEnter':
+ return !!(props.disabled && isInteractive(type));
+
+ default:
+ return false;
+ }
+ }
+ /**
+ * @param {object} inst The instance, which is the source of events.
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
+ * @return {?function} The stored callback.
+ */
+
+
+ function getListener(inst, registrationName) {
+ var stateNode = inst.stateNode;
+
+ if (stateNode === null) {
+ // Work in progress (ex: onload events in incremental mode).
+ return null;
+ }
+
+ var props = getFiberCurrentPropsFromNode(stateNode);
+
+ if (props === null) {
+ // Work in progress.
+ return null;
+ }
+
+ var listener = props[registrationName];
+
+ if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
+ return null;
+ }
+
+ if (!(!listener || typeof listener === 'function')) {
+ {
+ throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
+ }
+ }
+
+ return listener;
+ }
+
+ var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners
+ // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
+
+ if (canUseDOM) {
+ try {
+ var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value
+
+ Object.defineProperty(options, 'passive', {
+ get: function () {
+ passiveBrowserEventsSupported = true;
+ }
+ });
+ window.addEventListener('test', options, options);
+ window.removeEventListener('test', options, options);
+ } catch (e) {
+ passiveBrowserEventsSupported = false;
+ }
+ }
+
+ function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
+
+ try {
+ func.apply(context, funcArgs);
+ } catch (error) {
+ this.onError(error);
+ }
+ }
+
+ var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
+
+ {
+ // In DEV mode, we swap out invokeGuardedCallback for a special version
+ // that plays more nicely with the browser's DevTools. The idea is to preserve
+ // "Pause on exceptions" behavior. Because React wraps all user-provided
+ // functions in invokeGuardedCallback, and the production version of
+ // invokeGuardedCallback uses a try-catch, all user exceptions are treated
+ // like caught exceptions, and the DevTools won't pause unless the developer
+ // takes the extra step of enabling pause on caught exceptions. This is
+ // unintuitive, though, because even though React has caught the error, from
+ // the developer's perspective, the error is uncaught.
+ //
+ // To preserve the expected "Pause on exceptions" behavior, we don't use a
+ // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
+ // DOM node, and call the user-provided callback from inside an event handler
+ // for that fake event. If the callback throws, the error is "captured" using
+ // a global event handler. But because the error happens in a different
+ // event loop context, it does not interrupt the normal program flow.
+ // Effectively, this gives us try-catch behavior without actually using
+ // try-catch. Neat!
+ // Check that the browser supports the APIs we need to implement our special
+ // DEV version of invokeGuardedCallback
+ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
+ var fakeNode = document.createElement('react');
+
+ invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
+ // If document doesn't exist we know for sure we will crash in this method
+ // when we call document.createEvent(). However this can cause confusing
+ // errors: https://github.com/facebookincubator/create-react-app/issues/3482
+ // So we preemptively throw with a better message instead.
+ if (!(typeof document !== 'undefined')) {
+ {
+ throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
+ }
+ }
+
+ var evt = document.createEvent('Event');
+ var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
+ // set this to true at the beginning, then set it to false right after
+ // calling the function. If the function errors, `didError` will never be
+ // set to false. This strategy works even if the browser is flaky and
+ // fails to call our global error handler, because it doesn't rely on
+ // the error event at all.
+
+ var didError = true; // Keeps track of the value of window.event so that we can reset it
+ // during the callback to let user code access window.event in the
+ // browsers that support it.
+
+ var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
+ // dispatching: https://github.com/facebook/react/issues/13688
+
+ var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
+
+ function restoreAfterDispatch() {
+ // We immediately remove the callback from event listeners so that
+ // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
+ // nested call would trigger the fake event handlers of any call higher
+ // in the stack.
+ fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
+ // window.event assignment in both IE <= 10 as they throw an error
+ // "Member not found" in strict mode, and in Firefox which does not
+ // support window.event.
+
+ if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
+ window.event = windowEvent;
+ }
+ } // Create an event handler for our fake event. We will synchronously
+ // dispatch our fake event using `dispatchEvent`. Inside the handler, we
+ // call the user-provided callback.
+
+
+ var funcArgs = Array.prototype.slice.call(arguments, 3);
+
+ function callCallback() {
+ didCall = true;
+ restoreAfterDispatch();
+ func.apply(context, funcArgs);
+ didError = false;
+ } // Create a global error event handler. We use this to capture the value
+ // that was thrown. It's possible that this error handler will fire more
+ // than once; for example, if non-React code also calls `dispatchEvent`
+ // and a handler for that event throws. We should be resilient to most of
+ // those cases. Even if our error event handler fires more than once, the
+ // last error event is always used. If the callback actually does error,
+ // we know that the last error event is the correct one, because it's not
+ // possible for anything else to have happened in between our callback
+ // erroring and the code that follows the `dispatchEvent` call below. If
+ // the callback doesn't error, but the error event was fired, we know to
+ // ignore it because `didError` will be false, as described above.
+
+
+ var error; // Use this to track whether the error event is ever called.
+
+ var didSetError = false;
+ var isCrossOriginError = false;
+
+ function handleWindowError(event) {
+ error = event.error;
+ didSetError = true;
+
+ if (error === null && event.colno === 0 && event.lineno === 0) {
+ isCrossOriginError = true;
+ }
+
+ if (event.defaultPrevented) {
+ // Some other error handler has prevented default.
+ // Browsers silence the error report if this happens.
+ // We'll remember this to later decide whether to log it or not.
+ if (error != null && typeof error === 'object') {
+ try {
+ error._suppressLogging = true;
+ } catch (inner) {// Ignore.
+ }
+ }
+ }
+ } // Create a fake event type.
+
+
+ var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
+
+ window.addEventListener('error', handleWindowError);
+ fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
+ // errors, it will trigger our global error handler.
+
+ evt.initEvent(evtType, false, false);
+ fakeNode.dispatchEvent(evt);
+
+ if (windowEventDescriptor) {
+ Object.defineProperty(window, 'event', windowEventDescriptor);
+ }
+
+ if (didCall && didError) {
+ if (!didSetError) {
+ // The callback errored, but the error event never fired.
+ error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
+ } else if (isCrossOriginError) {
+ error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
+ }
+
+ this.onError(error);
+ } // Remove our event listeners
+
+
+ window.removeEventListener('error', handleWindowError);
+
+ if (!didCall) {
+ // Something went really wrong, and our event was not dispatched.
+ // https://github.com/facebook/react/issues/16734
+ // https://github.com/facebook/react/issues/16585
+ // Fall back to the production implementation.
+ restoreAfterDispatch();
+ return invokeGuardedCallbackProd.apply(this, arguments);
+ }
+ };
+ }
+ }
+
+ var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
+
+ var hasError = false;
+ var caughtError = null; // Used by event system to capture/rethrow the first error.
+
+ var hasRethrowError = false;
+ var rethrowError = null;
+ var reporter = {
+ onError: function (error) {
+ hasError = true;
+ caughtError = error;
+ }
+ };
+ /**
+ * Call a function while guarding against errors that happens within it.
+ * Returns an error if it throws, otherwise null.
+ *
+ * In production, this is implemented using a try-catch. The reason we don't
+ * use a try-catch directly is so that we can swap out a different
+ * implementation in DEV mode.
+ *
+ * @param {String} name of the guard to use for logging or debugging
+ * @param {Function} func The function to invoke
+ * @param {*} context The context to use when calling the function
+ * @param {...*} args Arguments for function
+ */
+
+ function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
+ hasError = false;
+ caughtError = null;
+ invokeGuardedCallbackImpl$1.apply(reporter, arguments);
+ }
+ /**
+ * Same as invokeGuardedCallback, but instead of returning an error, it stores
+ * it in a global so it can be rethrown by `rethrowCaughtError` later.
+ * TODO: See if caughtError and rethrowError can be unified.
+ *
+ * @param {String} name of the guard to use for logging or debugging
+ * @param {Function} func The function to invoke
+ * @param {*} context The context to use when calling the function
+ * @param {...*} args Arguments for function
+ */
+
+ function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
+ invokeGuardedCallback.apply(this, arguments);
+
+ if (hasError) {
+ var error = clearCaughtError();
+
+ if (!hasRethrowError) {
+ hasRethrowError = true;
+ rethrowError = error;
+ }
+ }
+ }
+ /**
+ * During execution of guarded functions we will capture the first error which
+ * we will rethrow to be handled by the top level error handler.
+ */
+
+ function rethrowCaughtError() {
+ if (hasRethrowError) {
+ var error = rethrowError;
+ hasRethrowError = false;
+ rethrowError = null;
+ throw error;
+ }
+ }
+ function hasCaughtError() {
+ return hasError;
+ }
+ function clearCaughtError() {
+ if (hasError) {
+ var error = caughtError;
+ hasError = false;
+ caughtError = null;
+ return error;
+ } else {
+ {
+ {
+ throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+ }
+ }
+
+ var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
+ var _ReactInternals$Sched = ReactInternals$1.Scheduler,
+ unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback,
+ unstable_now = _ReactInternals$Sched.unstable_now,
+ unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback,
+ unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield,
+ unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint,
+ unstable_getFirstCallbackNode = _ReactInternals$Sched.unstable_getFirstCallbackNode,
+ unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority,
+ unstable_next = _ReactInternals$Sched.unstable_next,
+ unstable_continueExecution = _ReactInternals$Sched.unstable_continueExecution,
+ unstable_pauseExecution = _ReactInternals$Sched.unstable_pauseExecution,
+ unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel,
+ unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority,
+ unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority,
+ unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority,
+ unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority,
+ unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority,
+ unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate,
+ unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting;
+
+ /**
+ * `ReactInstanceMap` maintains a mapping from a public facing stateful
+ * instance (key) and the internal representation (value). This allows public
+ * methods to accept the user facing instance as an argument and map them back
+ * to internal methods.
+ *
+ * Note that this module is currently shared and assumed to be stateless.
+ * If this becomes an actual Map, that will break.
+ */
+ function get(key) {
+ return key._reactInternals;
+ }
+ function has(key) {
+ return key._reactInternals !== undefined;
+ }
+ function set(key, value) {
+ key._reactInternals = value;
+ }
+
+ // Don't change these two values. They're used by React Dev Tools.
+ var NoFlags =
+ /* */
+ 0;
+ var PerformedWork =
+ /* */
+ 1; // You can change the rest (and add more).
+
+ var Placement =
+ /* */
+ 2;
+ var Update =
+ /* */
+ 4;
+ var PlacementAndUpdate =
+ /* */
+ 6;
+ var Deletion =
+ /* */
+ 8;
+ var ContentReset =
+ /* */
+ 16;
+ var Callback =
+ /* */
+ 32;
+ var DidCapture =
+ /* */
+ 64;
+ var Ref =
+ /* */
+ 128;
+ var Snapshot =
+ /* */
+ 256;
+ var Passive =
+ /* */
+ 512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.
+
+ var PassiveUnmountPendingDev =
+ /* */
+ 8192;
+ var Hydrating =
+ /* */
+ 1024;
+ var HydratingAndUpdate =
+ /* */
+ 1028; // Passive & Update & Callback & Ref & Snapshot
+
+ var LifecycleEffectMask =
+ /* */
+ 932; // Union of all host effects
+
+ var HostEffectMask =
+ /* */
+ 2047; // These are not really side effects, but we still reuse this field.
+
+ var Incomplete =
+ /* */
+ 2048;
+ var ShouldCapture =
+ /* */
+ 4096;
+ var ForceUpdateForLegacySuspense =
+ /* */
+ 16384; // Static tags describe aspects of a fiber that are not specific to a render,
+
+ var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
+ function getNearestMountedFiber(fiber) {
+ var node = fiber;
+ var nearestMounted = fiber;
+
+ if (!fiber.alternate) {
+ // If there is no alternate, this might be a new tree that isn't inserted
+ // yet. If it is, then it will have a pending insertion effect on it.
+ var nextNode = node;
+
+ do {
+ node = nextNode;
+
+ if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
+ // This is an insertion or in-progress hydration. The nearest possible
+ // mounted fiber is the parent but we need to continue to figure out
+ // if that one is still mounted.
+ nearestMounted = node.return;
+ }
+
+ nextNode = node.return;
+ } while (nextNode);
+ } else {
+ while (node.return) {
+ node = node.return;
+ }
+ }
+
+ if (node.tag === HostRoot) {
+ // TODO: Check if this was a nested HostRoot when used with
+ // renderContainerIntoSubtree.
+ return nearestMounted;
+ } // If we didn't hit the root, that means that we're in an disconnected tree
+ // that has been unmounted.
+
+
+ return null;
+ }
+ function getSuspenseInstanceFromFiber(fiber) {
+ if (fiber.tag === SuspenseComponent) {
+ var suspenseState = fiber.memoizedState;
+
+ if (suspenseState === null) {
+ var current = fiber.alternate;
+
+ if (current !== null) {
+ suspenseState = current.memoizedState;
+ }
+ }
+
+ if (suspenseState !== null) {
+ return suspenseState.dehydrated;
+ }
+ }
+
+ return null;
+ }
+ function getContainerFromFiber(fiber) {
+ return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
+ }
+ function isFiberMounted(fiber) {
+ return getNearestMountedFiber(fiber) === fiber;
+ }
+ function isMounted(component) {
+ {
+ var owner = ReactCurrentOwner.current;
+
+ if (owner !== null && owner.tag === ClassComponent) {
+ var ownerFiber = owner;
+ var instance = ownerFiber.stateNode;
+
+ if (!instance._warnedAboutRefsInRender) {
+ error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
+ }
+
+ instance._warnedAboutRefsInRender = true;
+ }
+ }
+
+ var fiber = get(component);
+
+ if (!fiber) {
+ return false;
+ }
+
+ return getNearestMountedFiber(fiber) === fiber;
+ }
+
+ function assertIsMounted(fiber) {
+ if (!(getNearestMountedFiber(fiber) === fiber)) {
+ {
+ throw Error( "Unable to find node on an unmounted component." );
+ }
+ }
+ }
+
+ function findCurrentFiberUsingSlowPath(fiber) {
+ var alternate = fiber.alternate;
+
+ if (!alternate) {
+ // If there is no alternate, then we only need to check if it is mounted.
+ var nearestMounted = getNearestMountedFiber(fiber);
+
+ if (!(nearestMounted !== null)) {
+ {
+ throw Error( "Unable to find node on an unmounted component." );
+ }
+ }
+
+ if (nearestMounted !== fiber) {
+ return null;
+ }
+
+ return fiber;
+ } // If we have two possible branches, we'll walk backwards up to the root
+ // to see what path the root points to. On the way we may hit one of the
+ // special cases and we'll deal with them.
+
+
+ var a = fiber;
+ var b = alternate;
+
+ while (true) {
+ var parentA = a.return;
+
+ if (parentA === null) {
+ // We're at the root.
+ break;
+ }
+
+ var parentB = parentA.alternate;
+
+ if (parentB === null) {
+ // There is no alternate. This is an unusual case. Currently, it only
+ // happens when a Suspense component is hidden. An extra fragment fiber
+ // is inserted in between the Suspense fiber and its children. Skip
+ // over this extra fragment fiber and proceed to the next parent.
+ var nextParent = parentA.return;
+
+ if (nextParent !== null) {
+ a = b = nextParent;
+ continue;
+ } // If there's no parent, we're at the root.
+
+
+ break;
+ } // If both copies of the parent fiber point to the same child, we can
+ // assume that the child is current. This happens when we bailout on low
+ // priority: the bailed out fiber's child reuses the current child.
+
+
+ if (parentA.child === parentB.child) {
+ var child = parentA.child;
+
+ while (child) {
+ if (child === a) {
+ // We've determined that A is the current branch.
+ assertIsMounted(parentA);
+ return fiber;
+ }
+
+ if (child === b) {
+ // We've determined that B is the current branch.
+ assertIsMounted(parentA);
+ return alternate;
+ }
+
+ child = child.sibling;
+ } // We should never have an alternate for any mounting node. So the only
+ // way this could possibly happen is if this was unmounted, if at all.
+
+
+ {
+ {
+ throw Error( "Unable to find node on an unmounted component." );
+ }
+ }
+ }
+
+ if (a.return !== b.return) {
+ // The return pointer of A and the return pointer of B point to different
+ // fibers. We assume that return pointers never criss-cross, so A must
+ // belong to the child set of A.return, and B must belong to the child
+ // set of B.return.
+ a = parentA;
+ b = parentB;
+ } else {
+ // The return pointers point to the same fiber. We'll have to use the
+ // default, slow path: scan the child sets of each parent alternate to see
+ // which child belongs to which set.
+ //
+ // Search parent A's child set
+ var didFindChild = false;
+ var _child = parentA.child;
+
+ while (_child) {
+ if (_child === a) {
+ didFindChild = true;
+ a = parentA;
+ b = parentB;
+ break;
+ }
+
+ if (_child === b) {
+ didFindChild = true;
+ b = parentA;
+ a = parentB;
+ break;
+ }
+
+ _child = _child.sibling;
+ }
+
+ if (!didFindChild) {
+ // Search parent B's child set
+ _child = parentB.child;
+
+ while (_child) {
+ if (_child === a) {
+ didFindChild = true;
+ a = parentB;
+ b = parentA;
+ break;
+ }
+
+ if (_child === b) {
+ didFindChild = true;
+ b = parentB;
+ a = parentA;
+ break;
+ }
+
+ _child = _child.sibling;
+ }
+
+ if (!didFindChild) {
+ {
+ throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
+ }
+ }
+ }
+ }
+
+ if (!(a.alternate === b)) {
+ {
+ throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+ } // If the root is not a host container, we're in a disconnected tree. I.e.
+ // unmounted.
+
+
+ if (!(a.tag === HostRoot)) {
+ {
+ throw Error( "Unable to find node on an unmounted component." );
+ }
+ }
+
+ if (a.stateNode.current === a) {
+ // We've determined that A is the current branch.
+ return fiber;
+ } // Otherwise B has to be current branch.
+
+
+ return alternate;
+ }
+ function findCurrentHostFiber(parent) {
+ var currentParent = findCurrentFiberUsingSlowPath(parent);
+
+ if (!currentParent) {
+ return null;
+ } // Next we'll drill down this component to find the first HostComponent/Text.
+
+
+ var node = currentParent;
+
+ while (true) {
+ if (node.tag === HostComponent || node.tag === HostText) {
+ return node;
+ } else if (node.child) {
+ node.child.return = node;
+ node = node.child;
+ continue;
+ }
+
+ if (node === currentParent) {
+ return null;
+ }
+
+ while (!node.sibling) {
+ if (!node.return || node.return === currentParent) {
+ return null;
+ }
+
+ node = node.return;
+ }
+
+ node.sibling.return = node.return;
+ node = node.sibling;
+ } // Flow needs the return null here, but ESLint complains about it.
+ // eslint-disable-next-line no-unreachable
+
+
+ return null;
+ }
+ function findCurrentHostFiberWithNoPortals(parent) {
+ var currentParent = findCurrentFiberUsingSlowPath(parent);
+
+ if (!currentParent) {
+ return null;
+ } // Next we'll drill down this component to find the first HostComponent/Text.
+
+
+ var node = currentParent;
+
+ while (true) {
+ if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
+ return node;
+ } else if (node.child && node.tag !== HostPortal) {
+ node.child.return = node;
+ node = node.child;
+ continue;
+ }
+
+ if (node === currentParent) {
+ return null;
+ }
+
+ while (!node.sibling) {
+ if (!node.return || node.return === currentParent) {
+ return null;
+ }
+
+ node = node.return;
+ }
+
+ node.sibling.return = node.return;
+ node = node.sibling;
+ } // Flow needs the return null here, but ESLint complains about it.
+ // eslint-disable-next-line no-unreachable
+
+
+ return null;
+ }
+ function doesFiberContain(parentFiber, childFiber) {
+ var node = childFiber;
+ var parentFiberAlternate = parentFiber.alternate;
+
+ while (node !== null) {
+ if (node === parentFiber || node === parentFiberAlternate) {
+ return true;
+ }
+
+ node = node.return;
+ }
+
+ return false;
+ }
+
+ var attemptUserBlockingHydration;
+ function setAttemptUserBlockingHydration(fn) {
+ attemptUserBlockingHydration = fn;
+ }
+ var attemptContinuousHydration;
+ function setAttemptContinuousHydration(fn) {
+ attemptContinuousHydration = fn;
+ }
+ var attemptHydrationAtCurrentPriority;
+ function setAttemptHydrationAtCurrentPriority(fn) {
+ attemptHydrationAtCurrentPriority = fn;
+ }
+ var attemptHydrationAtPriority;
+ function setAttemptHydrationAtPriority(fn) {
+ attemptHydrationAtPriority = fn;
+ } // TODO: Upgrade this definition once we're on a newer version of Flow that
+ var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
+
+ var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
+ // if the last target was dehydrated.
+
+ var queuedFocus = null;
+ var queuedDrag = null;
+ var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
+
+ var queuedPointers = new Map();
+ var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
+
+ var queuedExplicitHydrationTargets = [];
+ function hasQueuedDiscreteEvents() {
+ return queuedDiscreteEvents.length > 0;
+ }
+ var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
+ 'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
+ function isReplayableDiscreteEvent(eventType) {
+ return discreteReplayableEvents.indexOf(eventType) > -1;
+ }
+
+ function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ return {
+ blockedOn: blockedOn,
+ domEventName: domEventName,
+ eventSystemFlags: eventSystemFlags | IS_REPLAYED,
+ nativeEvent: nativeEvent,
+ targetContainers: [targetContainer]
+ };
+ }
+
+ function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
+ queuedDiscreteEvents.push(queuedEvent);
+ } // Resets the replaying for this type of continuous event to no event.
+
+ function clearIfContinuousEvent(domEventName, nativeEvent) {
+ switch (domEventName) {
+ case 'focusin':
+ case 'focusout':
+ queuedFocus = null;
+ break;
+
+ case 'dragenter':
+ case 'dragleave':
+ queuedDrag = null;
+ break;
+
+ case 'mouseover':
+ case 'mouseout':
+ queuedMouse = null;
+ break;
+
+ case 'pointerover':
+ case 'pointerout':
+ {
+ var pointerId = nativeEvent.pointerId;
+ queuedPointers.delete(pointerId);
+ break;
+ }
+
+ case 'gotpointercapture':
+ case 'lostpointercapture':
+ {
+ var _pointerId = nativeEvent.pointerId;
+ queuedPointerCaptures.delete(_pointerId);
+ break;
+ }
+ }
+ }
+
+ function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
+ var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
+
+ if (blockedOn !== null) {
+ var _fiber2 = getInstanceFromNode(blockedOn);
+
+ if (_fiber2 !== null) {
+ // Attempt to increase the priority of this target.
+ attemptContinuousHydration(_fiber2);
+ }
+ }
+
+ return queuedEvent;
+ } // If we have already queued this exact event, then it's because
+ // the different event systems have different DOM event listeners.
+ // We can accumulate the flags, and the targetContainers, and
+ // store a single event to be replayed.
+
+
+ existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
+ var targetContainers = existingQueuedEvent.targetContainers;
+
+ if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
+ targetContainers.push(targetContainer);
+ }
+
+ return existingQueuedEvent;
+ }
+
+ function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ // These set relatedTarget to null because the replayed event will be treated as if we
+ // moved from outside the window (no target) onto the target once it hydrates.
+ // Instead of mutating we could clone the event.
+ switch (domEventName) {
+ case 'focusin':
+ {
+ var focusEvent = nativeEvent;
+ queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
+ return true;
+ }
+
+ case 'dragenter':
+ {
+ var dragEvent = nativeEvent;
+ queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
+ return true;
+ }
+
+ case 'mouseover':
+ {
+ var mouseEvent = nativeEvent;
+ queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
+ return true;
+ }
+
+ case 'pointerover':
+ {
+ var pointerEvent = nativeEvent;
+ var pointerId = pointerEvent.pointerId;
+ queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
+ return true;
+ }
+
+ case 'gotpointercapture':
+ {
+ var _pointerEvent = nativeEvent;
+ var _pointerId2 = _pointerEvent.pointerId;
+ queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
+ return true;
+ }
+ }
+
+ return false;
+ } // Check if this target is unblocked. Returns true if it's unblocked.
+
+ function attemptExplicitHydrationTarget(queuedTarget) {
+ // TODO: This function shares a lot of logic with attemptToDispatchEvent.
+ // Try to unify them. It's a bit tricky since it would require two return
+ // values.
+ var targetInst = getClosestInstanceFromNode(queuedTarget.target);
+
+ if (targetInst !== null) {
+ var nearestMounted = getNearestMountedFiber(targetInst);
+
+ if (nearestMounted !== null) {
+ var tag = nearestMounted.tag;
+
+ if (tag === SuspenseComponent) {
+ var instance = getSuspenseInstanceFromFiber(nearestMounted);
+
+ if (instance !== null) {
+ // We're blocked on hydrating this boundary.
+ // Increase its priority.
+ queuedTarget.blockedOn = instance;
+ attemptHydrationAtPriority(queuedTarget.lanePriority, function () {
+ unstable_runWithPriority(queuedTarget.priority, function () {
+ attemptHydrationAtCurrentPriority(nearestMounted);
+ });
+ });
+ return;
+ }
+ } else if (tag === HostRoot) {
+ var root = nearestMounted.stateNode;
+
+ if (root.hydrate) {
+ queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
+ // a root other than sync.
+
+ return;
+ }
+ }
+ }
+ }
+
+ queuedTarget.blockedOn = null;
+ }
+
+ function attemptReplayContinuousQueuedEvent(queuedEvent) {
+ if (queuedEvent.blockedOn !== null) {
+ return false;
+ }
+
+ var targetContainers = queuedEvent.targetContainers;
+
+ while (targetContainers.length > 0) {
+ var targetContainer = targetContainers[0];
+ var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);
+
+ if (nextBlockedOn !== null) {
+ // We're still blocked. Try again later.
+ var _fiber3 = getInstanceFromNode(nextBlockedOn);
+
+ if (_fiber3 !== null) {
+ attemptContinuousHydration(_fiber3);
+ }
+
+ queuedEvent.blockedOn = nextBlockedOn;
+ return false;
+ } // This target container was successfully dispatched. Try the next.
+
+
+ targetContainers.shift();
+ }
+
+ return true;
+ }
+
+ function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
+ if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
+ map.delete(key);
+ }
+ }
+
+ function replayUnblockedEvents() {
+ hasScheduledReplayAttempt = false; // First replay discrete events.
+
+ while (queuedDiscreteEvents.length > 0) {
+ var nextDiscreteEvent = queuedDiscreteEvents[0];
+
+ if (nextDiscreteEvent.blockedOn !== null) {
+ // We're still blocked.
+ // Increase the priority of this boundary to unblock
+ // the next discrete event.
+ var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);
+
+ if (_fiber4 !== null) {
+ attemptUserBlockingHydration(_fiber4);
+ }
+
+ break;
+ }
+
+ var targetContainers = nextDiscreteEvent.targetContainers;
+
+ while (targetContainers.length > 0) {
+ var targetContainer = targetContainers[0];
+ var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);
+
+ if (nextBlockedOn !== null) {
+ // We're still blocked. Try again later.
+ nextDiscreteEvent.blockedOn = nextBlockedOn;
+ break;
+ } // This target container was successfully dispatched. Try the next.
+
+
+ targetContainers.shift();
+ }
+
+ if (nextDiscreteEvent.blockedOn === null) {
+ // We've successfully replayed the first event. Let's try the next one.
+ queuedDiscreteEvents.shift();
+ }
+ } // Next replay any continuous events.
+
+
+ if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
+ queuedFocus = null;
+ }
+
+ if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
+ queuedDrag = null;
+ }
+
+ if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
+ queuedMouse = null;
+ }
+
+ queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
+ queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
+ }
+
+ function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
+ if (queuedEvent.blockedOn === unblocked) {
+ queuedEvent.blockedOn = null;
+
+ if (!hasScheduledReplayAttempt) {
+ hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
+ // now unblocked. This first might not actually be unblocked yet.
+ // We could check it early to avoid scheduling an unnecessary callback.
+
+ unstable_scheduleCallback(unstable_NormalPriority, replayUnblockedEvents);
+ }
+ }
+ }
+
+ function retryIfBlockedOn(unblocked) {
+ // Mark anything that was blocked on this as no longer blocked
+ // and eligible for a replay.
+ if (queuedDiscreteEvents.length > 0) {
+ scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
+ // worth it because we expect very few discrete events to queue up and once
+ // we are actually fully unblocked it will be fast to replay them.
+
+ for (var i = 1; i < queuedDiscreteEvents.length; i++) {
+ var queuedEvent = queuedDiscreteEvents[i];
+
+ if (queuedEvent.blockedOn === unblocked) {
+ queuedEvent.blockedOn = null;
+ }
+ }
+ }
+
+ if (queuedFocus !== null) {
+ scheduleCallbackIfUnblocked(queuedFocus, unblocked);
+ }
+
+ if (queuedDrag !== null) {
+ scheduleCallbackIfUnblocked(queuedDrag, unblocked);
+ }
+
+ if (queuedMouse !== null) {
+ scheduleCallbackIfUnblocked(queuedMouse, unblocked);
+ }
+
+ var unblock = function (queuedEvent) {
+ return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
+ };
+
+ queuedPointers.forEach(unblock);
+ queuedPointerCaptures.forEach(unblock);
+
+ for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
+ var queuedTarget = queuedExplicitHydrationTargets[_i];
+
+ if (queuedTarget.blockedOn === unblocked) {
+ queuedTarget.blockedOn = null;
+ }
+ }
+
+ while (queuedExplicitHydrationTargets.length > 0) {
+ var nextExplicitTarget = queuedExplicitHydrationTargets[0];
+
+ if (nextExplicitTarget.blockedOn !== null) {
+ // We're still blocked.
+ break;
+ } else {
+ attemptExplicitHydrationTarget(nextExplicitTarget);
+
+ if (nextExplicitTarget.blockedOn === null) {
+ // We're unblocked.
+ queuedExplicitHydrationTargets.shift();
+ }
+ }
+ }
+ }
+
+ var DiscreteEvent = 0;
+ var UserBlockingEvent = 1;
+ var ContinuousEvent = 2;
+
+ /**
+ * Generate a mapping of standard vendor prefixes using the defined style property and event name.
+ *
+ * @param {string} styleProp
+ * @param {string} eventName
+ * @returns {object}
+ */
+
+ function makePrefixMap(styleProp, eventName) {
+ var prefixes = {};
+ prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
+ prefixes['Webkit' + styleProp] = 'webkit' + eventName;
+ prefixes['Moz' + styleProp] = 'moz' + eventName;
+ return prefixes;
+ }
+ /**
+ * A list of event names to a configurable list of vendor prefixes.
+ */
+
+
+ var vendorPrefixes = {
+ animationend: makePrefixMap('Animation', 'AnimationEnd'),
+ animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
+ animationstart: makePrefixMap('Animation', 'AnimationStart'),
+ transitionend: makePrefixMap('Transition', 'TransitionEnd')
+ };
+ /**
+ * Event names that have already been detected and prefixed (if applicable).
+ */
+
+ var prefixedEventNames = {};
+ /**
+ * Element to check for prefixes on.
+ */
+
+ var style = {};
+ /**
+ * Bootstrap if a DOM exists.
+ */
+
+ if (canUseDOM) {
+ style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
+ // the un-prefixed "animation" and "transition" properties are defined on the
+ // style object but the events that fire will still be prefixed, so we need
+ // to check if the un-prefixed events are usable, and if not remove them from the map.
+
+ if (!('AnimationEvent' in window)) {
+ delete vendorPrefixes.animationend.animation;
+ delete vendorPrefixes.animationiteration.animation;
+ delete vendorPrefixes.animationstart.animation;
+ } // Same as above
+
+
+ if (!('TransitionEvent' in window)) {
+ delete vendorPrefixes.transitionend.transition;
+ }
+ }
+ /**
+ * Attempts to determine the correct vendor prefixed event name.
+ *
+ * @param {string} eventName
+ * @returns {string}
+ */
+
+
+ function getVendorPrefixedEventName(eventName) {
+ if (prefixedEventNames[eventName]) {
+ return prefixedEventNames[eventName];
+ } else if (!vendorPrefixes[eventName]) {
+ return eventName;
+ }
+
+ var prefixMap = vendorPrefixes[eventName];
+
+ for (var styleProp in prefixMap) {
+ if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
+ return prefixedEventNames[eventName] = prefixMap[styleProp];
+ }
+ }
+
+ return eventName;
+ }
+
+ var ANIMATION_END = getVendorPrefixedEventName('animationend');
+ var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
+ var ANIMATION_START = getVendorPrefixedEventName('animationstart');
+ var TRANSITION_END = getVendorPrefixedEventName('transitionend');
+
+ var topLevelEventsToReactNames = new Map();
+ var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
+ // the code required to apply the same logic for event prioritization and that of the
+ // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
+ // duplication (for which there would be quite a bit). For the events that are not needed
+ // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
+ // array of top level events.
+ // Lastly, we ignore prettier so we can keep the formatting sane.
+ // prettier-ignore
+
+ var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!
+ 'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!
+ 'focusout', 'blur', // Careful!
+ 'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange'];
+ var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];
+
+
+ var userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore
+
+ var continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting'];
+ /**
+ * Turns
+ * ['abort', ...]
+ *
+ * into
+ *
+ * topLevelEventsToReactNames = new Map([
+ * ['abort', 'onAbort'],
+ * ]);
+ *
+ * and registers them.
+ */
+
+ function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {
+ // As the event types are in pairs of two, we need to iterate
+ // through in twos. The events are in pairs of two to save code
+ // and improve init perf of processing this array, as it will
+ // result in far fewer object allocations and property accesses
+ // if we only use three arrays to process all the categories of
+ // instead of tuples.
+ for (var i = 0; i < eventTypes.length; i += 2) {
+ var topEvent = eventTypes[i];
+ var event = eventTypes[i + 1];
+ var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
+ var reactName = 'on' + capitalizedEvent;
+ eventPriorities.set(topEvent, priority);
+ topLevelEventsToReactNames.set(topEvent, reactName);
+ registerTwoPhaseEvent(reactName, [topEvent]);
+ }
+ }
+
+ function setEventPriorities(eventTypes, priority) {
+ for (var i = 0; i < eventTypes.length; i++) {
+ eventPriorities.set(eventTypes[i], priority);
+ }
+ }
+
+ function getEventPriorityForPluginSystem(domEventName) {
+ var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might
+ // want to warn if we can't detect the priority
+ // for the event.
+
+ return priority === undefined ? ContinuousEvent : priority;
+ }
+ function registerSimpleEvents() {
+ registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
+ registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
+ registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);
+ setEventPriorities(otherDiscreteEvents, DiscreteEvent);
+ }
+
+ var ReactInternals$2 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
+ var _ReactInternals$Sched$1 = ReactInternals$2.SchedulerTracing,
+ __interactionsRef = _ReactInternals$Sched$1.__interactionsRef,
+ __subscriberRef = _ReactInternals$Sched$1.__subscriberRef,
+ unstable_clear = _ReactInternals$Sched$1.unstable_clear,
+ unstable_getCurrent = _ReactInternals$Sched$1.unstable_getCurrent,
+ unstable_getThreadID = _ReactInternals$Sched$1.unstable_getThreadID,
+ unstable_subscribe = _ReactInternals$Sched$1.unstable_subscribe,
+ unstable_trace = _ReactInternals$Sched$1.unstable_trace,
+ unstable_unsubscribe = _ReactInternals$Sched$1.unstable_unsubscribe,
+ unstable_wrap = _ReactInternals$Sched$1.unstable_wrap;
+
+ var Scheduler_now = unstable_now;
+
+ {
+ // Provide explicit error message when production+profiling bundle of e.g.
+ // react-dom is used with production (non-profiling) bundle of
+ // scheduler/tracing
+ if (!(__interactionsRef != null && __interactionsRef.current != null)) {
+ {
+ throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
+ }
+ }
+ }
+ // ascending numbers so we can compare them like numbers. They start at 90 to
+ // avoid clashing with Scheduler's priorities.
+
+ var ImmediatePriority = 99;
+ var UserBlockingPriority = 98;
+ var NormalPriority = 97;
+ var LowPriority = 96;
+ var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
+
+ var NoPriority = 90;
+ var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
+
+ var SyncLanePriority = 15;
+ var SyncBatchedLanePriority = 14;
+ var InputDiscreteHydrationLanePriority = 13;
+ var InputDiscreteLanePriority = 12;
+ var InputContinuousHydrationLanePriority = 11;
+ var InputContinuousLanePriority = 10;
+ var DefaultHydrationLanePriority = 9;
+ var DefaultLanePriority = 8;
+ var TransitionHydrationPriority = 7;
+ var TransitionPriority = 6;
+ var RetryLanePriority = 5;
+ var SelectiveHydrationLanePriority = 4;
+ var IdleHydrationLanePriority = 3;
+ var IdleLanePriority = 2;
+ var OffscreenLanePriority = 1;
+ var NoLanePriority = 0;
+ var TotalLanes = 31;
+ var NoLanes =
+ /* */
+ 0;
+ var NoLane =
+ /* */
+ 0;
+ var SyncLane =
+ /* */
+ 1;
+ var SyncBatchedLane =
+ /* */
+ 2;
+ var InputDiscreteHydrationLane =
+ /* */
+ 4;
+ var InputDiscreteLanes =
+ /* */
+ 24;
+ var InputContinuousHydrationLane =
+ /* */
+ 32;
+ var InputContinuousLanes =
+ /* */
+ 192;
+ var DefaultHydrationLane =
+ /* */
+ 256;
+ var DefaultLanes =
+ /* */
+ 3584;
+ var TransitionHydrationLane =
+ /* */
+ 4096;
+ var TransitionLanes =
+ /* */
+ 4186112;
+ var RetryLanes =
+ /* */
+ 62914560;
+ var SomeRetryLane =
+ /* */
+ 33554432;
+ var SelectiveHydrationLane =
+ /* */
+ 67108864;
+ var NonIdleLanes =
+ /* */
+ 134217727;
+ var IdleHydrationLane =
+ /* */
+ 134217728;
+ var IdleLanes =
+ /* */
+ 805306368;
+ var OffscreenLane =
+ /* */
+ 1073741824;
+ var NoTimestamp = -1;
+ function setCurrentUpdateLanePriority(newLanePriority) {
+ } // "Registers" used to "return" multiple values
+ // Used by getHighestPriorityLanes and getNextLanes:
+
+ var return_highestLanePriority = DefaultLanePriority;
+
+ function getHighestPriorityLanes(lanes) {
+ if ((SyncLane & lanes) !== NoLanes) {
+ return_highestLanePriority = SyncLanePriority;
+ return SyncLane;
+ }
+
+ if ((SyncBatchedLane & lanes) !== NoLanes) {
+ return_highestLanePriority = SyncBatchedLanePriority;
+ return SyncBatchedLane;
+ }
+
+ if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {
+ return_highestLanePriority = InputDiscreteHydrationLanePriority;
+ return InputDiscreteHydrationLane;
+ }
+
+ var inputDiscreteLanes = InputDiscreteLanes & lanes;
+
+ if (inputDiscreteLanes !== NoLanes) {
+ return_highestLanePriority = InputDiscreteLanePriority;
+ return inputDiscreteLanes;
+ }
+
+ if ((lanes & InputContinuousHydrationLane) !== NoLanes) {
+ return_highestLanePriority = InputContinuousHydrationLanePriority;
+ return InputContinuousHydrationLane;
+ }
+
+ var inputContinuousLanes = InputContinuousLanes & lanes;
+
+ if (inputContinuousLanes !== NoLanes) {
+ return_highestLanePriority = InputContinuousLanePriority;
+ return inputContinuousLanes;
+ }
+
+ if ((lanes & DefaultHydrationLane) !== NoLanes) {
+ return_highestLanePriority = DefaultHydrationLanePriority;
+ return DefaultHydrationLane;
+ }
+
+ var defaultLanes = DefaultLanes & lanes;
+
+ if (defaultLanes !== NoLanes) {
+ return_highestLanePriority = DefaultLanePriority;
+ return defaultLanes;
+ }
+
+ if ((lanes & TransitionHydrationLane) !== NoLanes) {
+ return_highestLanePriority = TransitionHydrationPriority;
+ return TransitionHydrationLane;
+ }
+
+ var transitionLanes = TransitionLanes & lanes;
+
+ if (transitionLanes !== NoLanes) {
+ return_highestLanePriority = TransitionPriority;
+ return transitionLanes;
+ }
+
+ var retryLanes = RetryLanes & lanes;
+
+ if (retryLanes !== NoLanes) {
+ return_highestLanePriority = RetryLanePriority;
+ return retryLanes;
+ }
+
+ if (lanes & SelectiveHydrationLane) {
+ return_highestLanePriority = SelectiveHydrationLanePriority;
+ return SelectiveHydrationLane;
+ }
+
+ if ((lanes & IdleHydrationLane) !== NoLanes) {
+ return_highestLanePriority = IdleHydrationLanePriority;
+ return IdleHydrationLane;
+ }
+
+ var idleLanes = IdleLanes & lanes;
+
+ if (idleLanes !== NoLanes) {
+ return_highestLanePriority = IdleLanePriority;
+ return idleLanes;
+ }
+
+ if ((OffscreenLane & lanes) !== NoLanes) {
+ return_highestLanePriority = OffscreenLanePriority;
+ return OffscreenLane;
+ }
+
+ {
+ error('Should have found matching lanes. This is a bug in React.');
+ } // This shouldn't be reachable, but as a fallback, return the entire bitmask.
+
+
+ return_highestLanePriority = DefaultLanePriority;
+ return lanes;
+ }
+
+ function schedulerPriorityToLanePriority(schedulerPriorityLevel) {
+ switch (schedulerPriorityLevel) {
+ case ImmediatePriority:
+ return SyncLanePriority;
+
+ case UserBlockingPriority:
+ return InputContinuousLanePriority;
+
+ case NormalPriority:
+ case LowPriority:
+ // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
+ return DefaultLanePriority;
+
+ case IdlePriority:
+ return IdleLanePriority;
+
+ default:
+ return NoLanePriority;
+ }
+ }
+ function lanePriorityToSchedulerPriority(lanePriority) {
+ switch (lanePriority) {
+ case SyncLanePriority:
+ case SyncBatchedLanePriority:
+ return ImmediatePriority;
+
+ case InputDiscreteHydrationLanePriority:
+ case InputDiscreteLanePriority:
+ case InputContinuousHydrationLanePriority:
+ case InputContinuousLanePriority:
+ return UserBlockingPriority;
+
+ case DefaultHydrationLanePriority:
+ case DefaultLanePriority:
+ case TransitionHydrationPriority:
+ case TransitionPriority:
+ case SelectiveHydrationLanePriority:
+ case RetryLanePriority:
+ return NormalPriority;
+
+ case IdleHydrationLanePriority:
+ case IdleLanePriority:
+ case OffscreenLanePriority:
+ return IdlePriority;
+
+ case NoLanePriority:
+ return NoPriority;
+
+ default:
+ {
+ {
+ throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
+ }
+ }
+
+ }
+ }
+ function getNextLanes(root, wipLanes) {
+ // Early bailout if there's no pending work left.
+ var pendingLanes = root.pendingLanes;
+
+ if (pendingLanes === NoLanes) {
+ return_highestLanePriority = NoLanePriority;
+ return NoLanes;
+ }
+
+ var nextLanes = NoLanes;
+ var nextLanePriority = NoLanePriority;
+ var expiredLanes = root.expiredLanes;
+ var suspendedLanes = root.suspendedLanes;
+ var pingedLanes = root.pingedLanes; // Check if any work has expired.
+
+ if (expiredLanes !== NoLanes) {
+ nextLanes = expiredLanes;
+ nextLanePriority = return_highestLanePriority = SyncLanePriority;
+ } else {
+ // Do not work on any idle work until all the non-idle work has finished,
+ // even if the work is suspended.
+ var nonIdlePendingLanes = pendingLanes & NonIdleLanes;
+
+ if (nonIdlePendingLanes !== NoLanes) {
+ var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;
+
+ if (nonIdleUnblockedLanes !== NoLanes) {
+ nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
+ nextLanePriority = return_highestLanePriority;
+ } else {
+ var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;
+
+ if (nonIdlePingedLanes !== NoLanes) {
+ nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
+ nextLanePriority = return_highestLanePriority;
+ }
+ }
+ } else {
+ // The only remaining work is Idle.
+ var unblockedLanes = pendingLanes & ~suspendedLanes;
+
+ if (unblockedLanes !== NoLanes) {
+ nextLanes = getHighestPriorityLanes(unblockedLanes);
+ nextLanePriority = return_highestLanePriority;
+ } else {
+ if (pingedLanes !== NoLanes) {
+ nextLanes = getHighestPriorityLanes(pingedLanes);
+ nextLanePriority = return_highestLanePriority;
+ }
+ }
+ }
+ }
+
+ if (nextLanes === NoLanes) {
+ // This should only be reachable if we're suspended
+ // TODO: Consider warning in this path if a fallback timer is not scheduled.
+ return NoLanes;
+ } // If there are higher priority lanes, we'll include them even if they
+ // are suspended.
+
+
+ nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt
+ // it and we'll lose our progress. We should only do this if the new lanes are
+ // higher priority.
+
+ if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
+ // bother waiting until the root is complete.
+ (wipLanes & suspendedLanes) === NoLanes) {
+ getHighestPriorityLanes(wipLanes);
+ var wipLanePriority = return_highestLanePriority;
+
+ if (nextLanePriority <= wipLanePriority) {
+ return wipLanes;
+ } else {
+ return_highestLanePriority = nextLanePriority;
+ }
+ } // Check for entangled lanes and add them to the batch.
+ //
+ // A lane is said to be entangled with another when it's not allowed to render
+ // in a batch that does not also include the other lane. Typically we do this
+ // when multiple updates have the same source, and we only want to respond to
+ // the most recent event from that source.
+ //
+ // Note that we apply entanglements *after* checking for partial work above.
+ // This means that if a lane is entangled during an interleaved event while
+ // it's already rendering, we won't interrupt it. This is intentional, since
+ // entanglement is usually "best effort": we'll try our best to render the
+ // lanes in the same batch, but it's not worth throwing out partially
+ // completed work in order to do it.
+ //
+ // For those exceptions where entanglement is semantically important, like
+ // useMutableSource, we should ensure that there is no partial work at the
+ // time we apply the entanglement.
+
+
+ var entangledLanes = root.entangledLanes;
+
+ if (entangledLanes !== NoLanes) {
+ var entanglements = root.entanglements;
+ var lanes = nextLanes & entangledLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ nextLanes |= entanglements[index];
+ lanes &= ~lane;
+ }
+ }
+
+ return nextLanes;
+ }
+ function getMostRecentEventTime(root, lanes) {
+ var eventTimes = root.eventTimes;
+ var mostRecentEventTime = NoTimestamp;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ var eventTime = eventTimes[index];
+
+ if (eventTime > mostRecentEventTime) {
+ mostRecentEventTime = eventTime;
+ }
+
+ lanes &= ~lane;
+ }
+
+ return mostRecentEventTime;
+ }
+
+ function computeExpirationTime(lane, currentTime) {
+ // TODO: Expiration heuristic is constant per lane, so could use a map.
+ getHighestPriorityLanes(lane);
+ var priority = return_highestLanePriority;
+
+ if (priority >= InputContinuousLanePriority) {
+ // User interactions should expire slightly more quickly.
+ //
+ // NOTE: This is set to the corresponding constant as in Scheduler.js. When
+ // we made it larger, a product metric in www regressed, suggesting there's
+ // a user interaction that's being starved by a series of synchronous
+ // updates. If that theory is correct, the proper solution is to fix the
+ // starvation. However, this scenario supports the idea that expiration
+ // times are an important safeguard when starvation does happen.
+ //
+ // Also note that, in the case of user input specifically, this will soon no
+ // longer be an issue because we plan to make user input synchronous by
+ // default (until you enter `startTransition`, of course.)
+ //
+ // If weren't planning to make these updates synchronous soon anyway, I
+ // would probably make this number a configurable parameter.
+ return currentTime + 250;
+ } else if (priority >= TransitionPriority) {
+ return currentTime + 5000;
+ } else {
+ // Anything idle priority or lower should never expire.
+ return NoTimestamp;
+ }
+ }
+
+ function markStarvedLanesAsExpired(root, currentTime) {
+ // TODO: This gets called every time we yield. We can optimize by storing
+ // the earliest expiration time on the root. Then use that to quickly bail out
+ // of this function.
+ var pendingLanes = root.pendingLanes;
+ var suspendedLanes = root.suspendedLanes;
+ var pingedLanes = root.pingedLanes;
+ var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
+ // expiration time. If so, we'll assume the update is being starved and mark
+ // it as expired to force it to finish.
+
+ var lanes = pendingLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ var expirationTime = expirationTimes[index];
+
+ if (expirationTime === NoTimestamp) {
+ // Found a pending lane with no expiration time. If it's not suspended, or
+ // if it's pinged, assume it's CPU-bound. Compute a new expiration time
+ // using the current time.
+ if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
+ // Assumes timestamps are monotonically increasing.
+ expirationTimes[index] = computeExpirationTime(lane, currentTime);
+ }
+ } else if (expirationTime <= currentTime) {
+ // This lane expired
+ root.expiredLanes |= lane;
+ }
+
+ lanes &= ~lane;
+ }
+ } // This returns the highest priority pending lanes regardless of whether they
+ function getLanesToRetrySynchronouslyOnError(root) {
+ var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
+
+ if (everythingButOffscreen !== NoLanes) {
+ return everythingButOffscreen;
+ }
+
+ if (everythingButOffscreen & OffscreenLane) {
+ return OffscreenLane;
+ }
+
+ return NoLanes;
+ }
+ function returnNextLanesPriority() {
+ return return_highestLanePriority;
+ }
+ function includesNonIdleWork(lanes) {
+ return (lanes & NonIdleLanes) !== NoLanes;
+ }
+ function includesOnlyRetries(lanes) {
+ return (lanes & RetryLanes) === lanes;
+ }
+ function includesOnlyTransitions(lanes) {
+ return (lanes & TransitionLanes) === lanes;
+ } // To ensure consistency across multiple updates in the same event, this should
+ // be a pure function, so that it always returns the same lane for given inputs.
+
+ function findUpdateLane(lanePriority, wipLanes) {
+ switch (lanePriority) {
+ case NoLanePriority:
+ break;
+
+ case SyncLanePriority:
+ return SyncLane;
+
+ case SyncBatchedLanePriority:
+ return SyncBatchedLane;
+
+ case InputDiscreteLanePriority:
+ {
+ var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);
+
+ if (_lane === NoLane) {
+ // Shift to the next priority level
+ return findUpdateLane(InputContinuousLanePriority, wipLanes);
+ }
+
+ return _lane;
+ }
+
+ case InputContinuousLanePriority:
+ {
+ var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);
+
+ if (_lane2 === NoLane) {
+ // Shift to the next priority level
+ return findUpdateLane(DefaultLanePriority, wipLanes);
+ }
+
+ return _lane2;
+ }
+
+ case DefaultLanePriority:
+ {
+ var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);
+
+ if (_lane3 === NoLane) {
+ // If all the default lanes are already being worked on, look for a
+ // lane in the transition range.
+ _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);
+
+ if (_lane3 === NoLane) {
+ // All the transition lanes are taken, too. This should be very
+ // rare, but as a last resort, pick a default lane. This will have
+ // the effect of interrupting the current work-in-progress render.
+ _lane3 = pickArbitraryLane(DefaultLanes);
+ }
+ }
+
+ return _lane3;
+ }
+
+ case TransitionPriority: // Should be handled by findTransitionLane instead
+
+ case RetryLanePriority:
+ // Should be handled by findRetryLane instead
+ break;
+
+ case IdleLanePriority:
+ var lane = pickArbitraryLane(IdleLanes & ~wipLanes);
+
+ if (lane === NoLane) {
+ lane = pickArbitraryLane(IdleLanes);
+ }
+
+ return lane;
+ }
+
+ {
+ {
+ throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
+ }
+ }
+ } // To ensure consistency across multiple updates in the same event, this should
+ // be pure function, so that it always returns the same lane for given inputs.
+
+ function findTransitionLane(wipLanes, pendingLanes) {
+ // First look for lanes that are completely unclaimed, i.e. have no
+ // pending work.
+ var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);
+
+ if (lane === NoLane) {
+ // If all lanes have pending work, look for a lane that isn't currently
+ // being worked on.
+ lane = pickArbitraryLane(TransitionLanes & ~wipLanes);
+
+ if (lane === NoLane) {
+ // If everything is being worked on, pick any lane. This has the
+ // effect of interrupting the current work-in-progress.
+ lane = pickArbitraryLane(TransitionLanes);
+ }
+ }
+
+ return lane;
+ } // To ensure consistency across multiple updates in the same event, this should
+ // be pure function, so that it always returns the same lane for given inputs.
+
+ function findRetryLane(wipLanes) {
+ // This is a fork of `findUpdateLane` designed specifically for Suspense
+ // "retries" — a special update that attempts to flip a Suspense boundary
+ // from its placeholder state to its primary/resolved state.
+ var lane = pickArbitraryLane(RetryLanes & ~wipLanes);
+
+ if (lane === NoLane) {
+ lane = pickArbitraryLane(RetryLanes);
+ }
+
+ return lane;
+ }
+
+ function getHighestPriorityLane(lanes) {
+ return lanes & -lanes;
+ }
+
+ function getLowestPriorityLane(lanes) {
+ // This finds the most significant non-zero bit.
+ var index = 31 - clz32(lanes);
+ return index < 0 ? NoLanes : 1 << index;
+ }
+
+ function getEqualOrHigherPriorityLanes(lanes) {
+ return (getLowestPriorityLane(lanes) << 1) - 1;
+ }
+
+ function pickArbitraryLane(lanes) {
+ // This wrapper function gets inlined. Only exists so to communicate that it
+ // doesn't matter which bit is selected; you can pick any bit without
+ // affecting the algorithms where its used. Here I'm using
+ // getHighestPriorityLane because it requires the fewest operations.
+ return getHighestPriorityLane(lanes);
+ }
+
+ function pickArbitraryLaneIndex(lanes) {
+ return 31 - clz32(lanes);
+ }
+
+ function laneToIndex(lane) {
+ return pickArbitraryLaneIndex(lane);
+ }
+
+ function includesSomeLane(a, b) {
+ return (a & b) !== NoLanes;
+ }
+ function isSubsetOfLanes(set, subset) {
+ return (set & subset) === subset;
+ }
+ function mergeLanes(a, b) {
+ return a | b;
+ }
+ function removeLanes(set, subset) {
+ return set & ~subset;
+ } // Seems redundant, but it changes the type from a single lane (used for
+ // updates) to a group of lanes (used for flushing work).
+
+ function laneToLanes(lane) {
+ return lane;
+ }
+ function higherPriorityLane(a, b) {
+ // This works because the bit ranges decrease in priority as you go left.
+ return a !== NoLane && a < b ? a : b;
+ }
+ function createLaneMap(initial) {
+ // Intentionally pushing one by one.
+ // https://v8.dev/blog/elements-kinds#avoid-creating-holes
+ var laneMap = [];
+
+ for (var i = 0; i < TotalLanes; i++) {
+ laneMap.push(initial);
+ }
+
+ return laneMap;
+ }
+ function markRootUpdated(root, updateLane, eventTime) {
+ root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But
+ // it's not practical to try every single possible combination. We need a
+ // heuristic to decide which lanes to attempt to render, and in which batches.
+ // For now, we use the same heuristic as in the old ExpirationTimes model:
+ // retry any lane at equal or lower priority, but don't try updates at higher
+ // priority without also including the lower priority updates. This works well
+ // when considering updates across different priority levels, but isn't
+ // sufficient for updates within the same priority, since we want to treat
+ // those updates as parallel.
+ // Unsuspend any update at equal or lower priority.
+
+ var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111
+
+ root.suspendedLanes &= higherPriorityLanes;
+ root.pingedLanes &= higherPriorityLanes;
+ var eventTimes = root.eventTimes;
+ var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
+ // recent event, and we assume time is monotonically increasing.
+
+ eventTimes[index] = eventTime;
+ }
+ function markRootSuspended(root, suspendedLanes) {
+ root.suspendedLanes |= suspendedLanes;
+ root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.
+
+ var expirationTimes = root.expirationTimes;
+ var lanes = suspendedLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ expirationTimes[index] = NoTimestamp;
+ lanes &= ~lane;
+ }
+ }
+ function markRootPinged(root, pingedLanes, eventTime) {
+ root.pingedLanes |= root.suspendedLanes & pingedLanes;
+ }
+ function markDiscreteUpdatesExpired(root) {
+ root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;
+ }
+ function hasDiscreteLanes(lanes) {
+ return (lanes & InputDiscreteLanes) !== NoLanes;
+ }
+ function markRootMutableRead(root, updateLane) {
+ root.mutableReadLanes |= updateLane & root.pendingLanes;
+ }
+ function markRootFinished(root, remainingLanes) {
+ var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
+ root.pendingLanes = remainingLanes; // Let's try everything again
+
+ root.suspendedLanes = 0;
+ root.pingedLanes = 0;
+ root.expiredLanes &= remainingLanes;
+ root.mutableReadLanes &= remainingLanes;
+ root.entangledLanes &= remainingLanes;
+ var entanglements = root.entanglements;
+ var eventTimes = root.eventTimes;
+ var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work
+
+ var lanes = noLongerPendingLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ entanglements[index] = NoLanes;
+ eventTimes[index] = NoTimestamp;
+ expirationTimes[index] = NoTimestamp;
+ lanes &= ~lane;
+ }
+ }
+ function markRootEntangled(root, entangledLanes) {
+ root.entangledLanes |= entangledLanes;
+ var entanglements = root.entanglements;
+ var lanes = entangledLanes;
+
+ while (lanes > 0) {
+ var index = pickArbitraryLaneIndex(lanes);
+ var lane = 1 << index;
+ entanglements[index] |= entangledLanes;
+ lanes &= ~lane;
+ }
+ }
+ var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.
+ // Based on:
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
+
+ var log = Math.log;
+ var LN2 = Math.LN2;
+
+ function clz32Fallback(lanes) {
+ if (lanes === 0) {
+ return 32;
+ }
+
+ return 31 - (log(lanes) / LN2 | 0) | 0;
+ }
+
+ // Intentionally not named imports because Rollup would use dynamic dispatch for
+ var UserBlockingPriority$1 = unstable_UserBlockingPriority,
+ runWithPriority = unstable_runWithPriority; // TODO: can we stop exporting these?
+
+ var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
+ // We'd like to remove this but it's not clear if this is safe.
+
+ function setEnabled(enabled) {
+ _enabled = !!enabled;
+ }
+ function isEnabled() {
+ return _enabled;
+ }
+ function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
+ var eventPriority = getEventPriorityForPluginSystem(domEventName);
+ var listenerWrapper;
+
+ switch (eventPriority) {
+ case DiscreteEvent:
+ listenerWrapper = dispatchDiscreteEvent;
+ break;
+
+ case UserBlockingEvent:
+ listenerWrapper = dispatchUserBlockingUpdate;
+ break;
+
+ case ContinuousEvent:
+ default:
+ listenerWrapper = dispatchEvent;
+ break;
+ }
+
+ return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
+ }
+
+ function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
+ {
+ flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
+ }
+
+ discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);
+ }
+
+ function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {
+ {
+ runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));
+ }
+ }
+
+ function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ if (!_enabled) {
+ return;
+ }
+
+ var allowReplay = true;
+
+ {
+ // TODO: replaying capture phase events is currently broken
+ // because we used to do it during top-level native bubble handlers
+ // but now we use different bubble and capture handlers.
+ // In eager mode, we attach capture listeners early, so we need
+ // to filter them out until we fix the logic to handle them correctly.
+ // This could've been outside the flag but I put it inside to reduce risk.
+ allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;
+ }
+
+ if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {
+ // If we already have a queue of discrete events, and this is another discrete
+ // event, then we can't dispatch it regardless of its target, since they
+ // need to dispatch in order.
+ queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
+ domEventName, eventSystemFlags, targetContainer, nativeEvent);
+ return;
+ }
+
+ var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
+
+ if (blockedOn === null) {
+ // We successfully dispatched this event.
+ if (allowReplay) {
+ clearIfContinuousEvent(domEventName, nativeEvent);
+ }
+
+ return;
+ }
+
+ if (allowReplay) {
+ if (isReplayableDiscreteEvent(domEventName)) {
+ // This this to be replayed later once the target is available.
+ queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
+ return;
+ }
+
+ if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
+ return;
+ } // We need to clear only if we didn't queue because
+ // queueing is accummulative.
+
+
+ clearIfContinuousEvent(domEventName, nativeEvent);
+ } // This is not replayable so we'll invoke it but without a target,
+ // in case the event system needs to trace it.
+
+
+ dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
+ } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
+
+ function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
+ // TODO: Warn if _enabled is false.
+ var nativeEventTarget = getEventTarget(nativeEvent);
+ var targetInst = getClosestInstanceFromNode(nativeEventTarget);
+
+ if (targetInst !== null) {
+ var nearestMounted = getNearestMountedFiber(targetInst);
+
+ if (nearestMounted === null) {
+ // This tree has been unmounted already. Dispatch without a target.
+ targetInst = null;
+ } else {
+ var tag = nearestMounted.tag;
+
+ if (tag === SuspenseComponent) {
+ var instance = getSuspenseInstanceFromFiber(nearestMounted);
+
+ if (instance !== null) {
+ // Queue the event to be replayed later. Abort dispatching since we
+ // don't want this event dispatched twice through the event system.
+ // TODO: If this is the first discrete event in the queue. Schedule an increased
+ // priority for this boundary.
+ return instance;
+ } // This shouldn't happen, something went wrong but to avoid blocking
+ // the whole system, dispatch the event without a target.
+ // TODO: Warn.
+
+
+ targetInst = null;
+ } else if (tag === HostRoot) {
+ var root = nearestMounted.stateNode;
+
+ if (root.hydrate) {
+ // If this happens during a replay something went wrong and it might block
+ // the whole system.
+ return getContainerFromFiber(nearestMounted);
+ }
+
+ targetInst = null;
+ } else if (nearestMounted !== targetInst) {
+ // If we get an event (ex: img onload) before committing that
+ // component's mount, ignore it for now (that is, treat it as if it was an
+ // event on a non-React tree). We might also consider queueing events and
+ // dispatching them after the mount.
+ targetInst = null;
+ }
+ }
+ }
+
+ dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.
+
+ return null;
+ }
+
+ function addEventBubbleListener(target, eventType, listener) {
+ target.addEventListener(eventType, listener, false);
+ return listener;
+ }
+ function addEventCaptureListener(target, eventType, listener) {
+ target.addEventListener(eventType, listener, true);
+ return listener;
+ }
+ function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
+ target.addEventListener(eventType, listener, {
+ capture: true,
+ passive: passive
+ });
+ return listener;
+ }
+ function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
+ target.addEventListener(eventType, listener, {
+ passive: passive
+ });
+ return listener;
+ }
+
+ /**
+ * These variables store information about text content of a target node,
+ * allowing comparison of content before and after a given event.
+ *
+ * Identify the node where selection currently begins, then observe
+ * both its text content and its current position in the DOM. Since the
+ * browser may natively replace the target node during composition, we can
+ * use its position to find its replacement.
+ *
+ *
+ */
+ var root = null;
+ var startText = null;
+ var fallbackText = null;
+ function initialize(nativeEventTarget) {
+ root = nativeEventTarget;
+ startText = getText();
+ return true;
+ }
+ function reset() {
+ root = null;
+ startText = null;
+ fallbackText = null;
+ }
+ function getData() {
+ if (fallbackText) {
+ return fallbackText;
+ }
+
+ var start;
+ var startValue = startText;
+ var startLength = startValue.length;
+ var end;
+ var endValue = getText();
+ var endLength = endValue.length;
+
+ for (start = 0; start < startLength; start++) {
+ if (startValue[start] !== endValue[start]) {
+ break;
+ }
+ }
+
+ var minEnd = startLength - start;
+
+ for (end = 1; end <= minEnd; end++) {
+ if (startValue[startLength - end] !== endValue[endLength - end]) {
+ break;
+ }
+ }
+
+ var sliceTail = end > 1 ? 1 - end : undefined;
+ fallbackText = endValue.slice(start, sliceTail);
+ return fallbackText;
+ }
+ function getText() {
+ if ('value' in root) {
+ return root.value;
+ }
+
+ return root.textContent;
+ }
+
+ /**
+ * `charCode` represents the actual "character code" and is safe to use with
+ * `String.fromCharCode`. As such, only keys that correspond to printable
+ * characters produce a valid `charCode`, the only exception to this is Enter.
+ * The Tab-key is considered non-printable and does not have a `charCode`,
+ * presumably because it does not produce a tab-character in browsers.
+ *
+ * @param {object} nativeEvent Native browser event.
+ * @return {number} Normalized `charCode` property.
+ */
+ function getEventCharCode(nativeEvent) {
+ var charCode;
+ var keyCode = nativeEvent.keyCode;
+
+ if ('charCode' in nativeEvent) {
+ charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
+
+ if (charCode === 0 && keyCode === 13) {
+ charCode = 13;
+ }
+ } else {
+ // IE8 does not implement `charCode`, but `keyCode` has the correct value.
+ charCode = keyCode;
+ } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
+ // report Enter as charCode 10 when ctrl is pressed.
+
+
+ if (charCode === 10) {
+ charCode = 13;
+ } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
+ // Must not discard the (non-)printable Enter-key.
+
+
+ if (charCode >= 32 || charCode === 13) {
+ return charCode;
+ }
+
+ return 0;
+ }
+
+ function functionThatReturnsTrue() {
+ return true;
+ }
+
+ function functionThatReturnsFalse() {
+ return false;
+ } // This is intentionally a factory so that we have different returned constructors.
+ // If we had a single constructor, it would be megamorphic and engines would deopt.
+
+
+ function createSyntheticEvent(Interface) {
+ /**
+ * Synthetic events are dispatched by event plugins, typically in response to a
+ * top-level event delegation handler.
+ *
+ * These systems should generally use pooling to reduce the frequency of garbage
+ * collection. The system should check `isPersistent` to determine whether the
+ * event should be released into the pool after being dispatched. Users that
+ * need a persisted event should invoke `persist`.
+ *
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
+ * DOM interface; custom application-specific events can also subclass this.
+ */
+ function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
+ this._reactName = reactName;
+ this._targetInst = targetInst;
+ this.type = reactEventType;
+ this.nativeEvent = nativeEvent;
+ this.target = nativeEventTarget;
+ this.currentTarget = null;
+
+ for (var _propName in Interface) {
+ if (!Interface.hasOwnProperty(_propName)) {
+ continue;
+ }
+
+ var normalize = Interface[_propName];
+
+ if (normalize) {
+ this[_propName] = normalize(nativeEvent);
+ } else {
+ this[_propName] = nativeEvent[_propName];
+ }
+ }
+
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
+
+ if (defaultPrevented) {
+ this.isDefaultPrevented = functionThatReturnsTrue;
+ } else {
+ this.isDefaultPrevented = functionThatReturnsFalse;
+ }
+
+ this.isPropagationStopped = functionThatReturnsFalse;
+ return this;
+ }
+
+ _assign(SyntheticBaseEvent.prototype, {
+ preventDefault: function () {
+ this.defaultPrevented = true;
+ var event = this.nativeEvent;
+
+ if (!event) {
+ return;
+ }
+
+ if (event.preventDefault) {
+ event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
+ } else if (typeof event.returnValue !== 'unknown') {
+ event.returnValue = false;
+ }
+
+ this.isDefaultPrevented = functionThatReturnsTrue;
+ },
+ stopPropagation: function () {
+ var event = this.nativeEvent;
+
+ if (!event) {
+ return;
+ }
+
+ if (event.stopPropagation) {
+ event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
+ } else if (typeof event.cancelBubble !== 'unknown') {
+ // The ChangeEventPlugin registers a "propertychange" event for
+ // IE. This event does not support bubbling or cancelling, and
+ // any references to cancelBubble throw "Member not found". A
+ // typeof check of "unknown" circumvents this issue (and is also
+ // IE specific).
+ event.cancelBubble = true;
+ }
+
+ this.isPropagationStopped = functionThatReturnsTrue;
+ },
+
+ /**
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
+ * them back into the pool. This allows a way to hold onto a reference that
+ * won't be added back into the pool.
+ */
+ persist: function () {// Modern event system doesn't use pooling.
+ },
+
+ /**
+ * Checks if this event should be released back into the pool.
+ *
+ * @return {boolean} True if this should not be released, false otherwise.
+ */
+ isPersistent: functionThatReturnsTrue
+ });
+
+ return SyntheticBaseEvent;
+ }
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+
+ var EventInterface = {
+ eventPhase: 0,
+ bubbles: 0,
+ cancelable: 0,
+ timeStamp: function (event) {
+ return event.timeStamp || Date.now();
+ },
+ defaultPrevented: 0,
+ isTrusted: 0
+ };
+ var SyntheticEvent = createSyntheticEvent(EventInterface);
+
+ var UIEventInterface = _assign({}, EventInterface, {
+ view: 0,
+ detail: 0
+ });
+
+ var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
+ var lastMovementX;
+ var lastMovementY;
+ var lastMouseEvent;
+
+ function updateMouseMovementPolyfillState(event) {
+ if (event !== lastMouseEvent) {
+ if (lastMouseEvent && event.type === 'mousemove') {
+ lastMovementX = event.screenX - lastMouseEvent.screenX;
+ lastMovementY = event.screenY - lastMouseEvent.screenY;
+ } else {
+ lastMovementX = 0;
+ lastMovementY = 0;
+ }
+
+ lastMouseEvent = event;
+ }
+ }
+ /**
+ * @interface MouseEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+
+ var MouseEventInterface = _assign({}, UIEventInterface, {
+ screenX: 0,
+ screenY: 0,
+ clientX: 0,
+ clientY: 0,
+ pageX: 0,
+ pageY: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ getModifierState: getEventModifierState,
+ button: 0,
+ buttons: 0,
+ relatedTarget: function (event) {
+ if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
+ return event.relatedTarget;
+ },
+ movementX: function (event) {
+ if ('movementX' in event) {
+ return event.movementX;
+ }
+
+ updateMouseMovementPolyfillState(event);
+ return lastMovementX;
+ },
+ movementY: function (event) {
+ if ('movementY' in event) {
+ return event.movementY;
+ } // Don't need to call updateMouseMovementPolyfillState() here
+ // because it's guaranteed to have already run when movementX
+ // was copied.
+
+
+ return lastMovementY;
+ }
+ });
+
+ var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
+ /**
+ * @interface DragEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+ var DragEventInterface = _assign({}, MouseEventInterface, {
+ dataTransfer: 0
+ });
+
+ var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
+ /**
+ * @interface FocusEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+ var FocusEventInterface = _assign({}, UIEventInterface, {
+ relatedTarget: 0
+ });
+
+ var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
+ */
+
+ var AnimationEventInterface = _assign({}, EventInterface, {
+ animationName: 0,
+ elapsedTime: 0,
+ pseudoElement: 0
+ });
+
+ var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/clipboard-apis/
+ */
+
+ var ClipboardEventInterface = _assign({}, EventInterface, {
+ clipboardData: function (event) {
+ return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
+ }
+ });
+
+ var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
+ */
+
+ var CompositionEventInterface = _assign({}, EventInterface, {
+ data: 0
+ });
+
+ var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
+ * /#events-inputevents
+ */
+ // Happens to share the same list for now.
+
+ var SyntheticInputEvent = SyntheticCompositionEvent;
+ /**
+ * Normalization of deprecated HTML5 `key` values
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
+ */
+
+ var normalizeKey = {
+ Esc: 'Escape',
+ Spacebar: ' ',
+ Left: 'ArrowLeft',
+ Up: 'ArrowUp',
+ Right: 'ArrowRight',
+ Down: 'ArrowDown',
+ Del: 'Delete',
+ Win: 'OS',
+ Menu: 'ContextMenu',
+ Apps: 'ContextMenu',
+ Scroll: 'ScrollLock',
+ MozPrintableKey: 'Unidentified'
+ };
+ /**
+ * Translation from legacy `keyCode` to HTML5 `key`
+ * Only special keys supported, all others depend on keyboard layout or browser
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
+ */
+
+ var translateToKey = {
+ '8': 'Backspace',
+ '9': 'Tab',
+ '12': 'Clear',
+ '13': 'Enter',
+ '16': 'Shift',
+ '17': 'Control',
+ '18': 'Alt',
+ '19': 'Pause',
+ '20': 'CapsLock',
+ '27': 'Escape',
+ '32': ' ',
+ '33': 'PageUp',
+ '34': 'PageDown',
+ '35': 'End',
+ '36': 'Home',
+ '37': 'ArrowLeft',
+ '38': 'ArrowUp',
+ '39': 'ArrowRight',
+ '40': 'ArrowDown',
+ '45': 'Insert',
+ '46': 'Delete',
+ '112': 'F1',
+ '113': 'F2',
+ '114': 'F3',
+ '115': 'F4',
+ '116': 'F5',
+ '117': 'F6',
+ '118': 'F7',
+ '119': 'F8',
+ '120': 'F9',
+ '121': 'F10',
+ '122': 'F11',
+ '123': 'F12',
+ '144': 'NumLock',
+ '145': 'ScrollLock',
+ '224': 'Meta'
+ };
+ /**
+ * @param {object} nativeEvent Native browser event.
+ * @return {string} Normalized `key` property.
+ */
+
+ function getEventKey(nativeEvent) {
+ if (nativeEvent.key) {
+ // Normalize inconsistent values reported by browsers due to
+ // implementations of a working draft specification.
+ // FireFox implements `key` but returns `MozPrintableKey` for all
+ // printable characters (normalized to `Unidentified`), ignore it.
+ var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
+
+ if (key !== 'Unidentified') {
+ return key;
+ }
+ } // Browser does not implement `key`, polyfill as much of it as we can.
+
+
+ if (nativeEvent.type === 'keypress') {
+ var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
+ // thus be captured by `keypress`, no other non-printable key should.
+
+ return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
+ }
+
+ if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
+ // While user keyboard layout determines the actual meaning of each
+ // `keyCode` value, almost all function keys have a universal value.
+ return translateToKey[nativeEvent.keyCode] || 'Unidentified';
+ }
+
+ return '';
+ }
+ /**
+ * Translation from modifier key to the associated property in the event.
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
+ */
+
+
+ var modifierKeyToProp = {
+ Alt: 'altKey',
+ Control: 'ctrlKey',
+ Meta: 'metaKey',
+ Shift: 'shiftKey'
+ }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
+ // getModifierState. If getModifierState is not supported, we map it to a set of
+ // modifier keys exposed by the event. In this case, Lock-keys are not supported.
+
+ function modifierStateGetter(keyArg) {
+ var syntheticEvent = this;
+ var nativeEvent = syntheticEvent.nativeEvent;
+
+ if (nativeEvent.getModifierState) {
+ return nativeEvent.getModifierState(keyArg);
+ }
+
+ var keyProp = modifierKeyToProp[keyArg];
+ return keyProp ? !!nativeEvent[keyProp] : false;
+ }
+
+ function getEventModifierState(nativeEvent) {
+ return modifierStateGetter;
+ }
+ /**
+ * @interface KeyboardEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+
+ var KeyboardEventInterface = _assign({}, UIEventInterface, {
+ key: getEventKey,
+ code: 0,
+ location: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ repeat: 0,
+ locale: 0,
+ getModifierState: getEventModifierState,
+ // Legacy Interface
+ charCode: function (event) {
+ // `charCode` is the result of a KeyPress event and represents the value of
+ // the actual printable character.
+ // KeyPress is deprecated, but its replacement is not yet final and not
+ // implemented in any major browser. Only KeyPress has charCode.
+ if (event.type === 'keypress') {
+ return getEventCharCode(event);
+ }
+
+ return 0;
+ },
+ keyCode: function (event) {
+ // `keyCode` is the result of a KeyDown/Up event and represents the value of
+ // physical keyboard key.
+ // The actual meaning of the value depends on the users' keyboard layout
+ // which cannot be detected. Assuming that it is a US keyboard layout
+ // provides a surprisingly accurate mapping for US and European users.
+ // Due to this, it is left to the user to implement at this time.
+ if (event.type === 'keydown' || event.type === 'keyup') {
+ return event.keyCode;
+ }
+
+ return 0;
+ },
+ which: function (event) {
+ // `which` is an alias for either `keyCode` or `charCode` depending on the
+ // type of the event.
+ if (event.type === 'keypress') {
+ return getEventCharCode(event);
+ }
+
+ if (event.type === 'keydown' || event.type === 'keyup') {
+ return event.keyCode;
+ }
+
+ return 0;
+ }
+ });
+
+ var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
+ /**
+ * @interface PointerEvent
+ * @see http://www.w3.org/TR/pointerevents/
+ */
+
+ var PointerEventInterface = _assign({}, MouseEventInterface, {
+ pointerId: 0,
+ width: 0,
+ height: 0,
+ pressure: 0,
+ tangentialPressure: 0,
+ tiltX: 0,
+ tiltY: 0,
+ twist: 0,
+ pointerType: 0,
+ isPrimary: 0
+ });
+
+ var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
+ /**
+ * @interface TouchEvent
+ * @see http://www.w3.org/TR/touch-events/
+ */
+
+ var TouchEventInterface = _assign({}, UIEventInterface, {
+ touches: 0,
+ targetTouches: 0,
+ changedTouches: 0,
+ altKey: 0,
+ metaKey: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ getModifierState: getEventModifierState
+ });
+
+ var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
+ /**
+ * @interface Event
+ * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
+ */
+
+ var TransitionEventInterface = _assign({}, EventInterface, {
+ propertyName: 0,
+ elapsedTime: 0,
+ pseudoElement: 0
+ });
+
+ var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
+ /**
+ * @interface WheelEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+
+ var WheelEventInterface = _assign({}, MouseEventInterface, {
+ deltaX: function (event) {
+ return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
+ 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
+ },
+ deltaY: function (event) {
+ return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
+ 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
+ 'wheelDelta' in event ? -event.wheelDelta : 0;
+ },
+ deltaZ: 0,
+ // Browsers without "deltaMode" is reporting in raw wheel delta where one
+ // notch on the scroll is always +/- 120, roughly equivalent to pixels.
+ // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
+ // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
+ deltaMode: 0
+ });
+
+ var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
+
+ var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
+
+ var START_KEYCODE = 229;
+ var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
+ var documentMode = null;
+
+ if (canUseDOM && 'documentMode' in document) {
+ documentMode = document.documentMode;
+ } // Webkit offers a very useful `textInput` event that can be used to
+ // directly represent `beforeInput`. The IE `textinput` event is not as
+ // useful, so we don't use it.
+
+
+ var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
+ // by the native compositionend event may be incorrect. Japanese ideographic
+ // spaces, for instance (\u3000) are not recorded correctly.
+
+ var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
+ var SPACEBAR_CODE = 32;
+ var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
+
+ function registerEvents() {
+ registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
+ registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
+ registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
+ registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
+ } // Track whether we've ever handled a keypress on the space key.
+
+
+ var hasSpaceKeypress = false;
+ /**
+ * Return whether a native keypress event is assumed to be a command.
+ * This is required because Firefox fires `keypress` events for key commands
+ * (cut, copy, select-all, etc.) even though no character is inserted.
+ */
+
+ function isKeypressCommand(nativeEvent) {
+ return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
+ !(nativeEvent.ctrlKey && nativeEvent.altKey);
+ }
+ /**
+ * Translate native top level events into event types.
+ */
+
+
+ function getCompositionEventType(domEventName) {
+ switch (domEventName) {
+ case 'compositionstart':
+ return 'onCompositionStart';
+
+ case 'compositionend':
+ return 'onCompositionEnd';
+
+ case 'compositionupdate':
+ return 'onCompositionUpdate';
+ }
+ }
+ /**
+ * Does our fallback best-guess model think this event signifies that
+ * composition has begun?
+ */
+
+
+ function isFallbackCompositionStart(domEventName, nativeEvent) {
+ return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
+ }
+ /**
+ * Does our fallback mode think that this event is the end of composition?
+ */
+
+
+ function isFallbackCompositionEnd(domEventName, nativeEvent) {
+ switch (domEventName) {
+ case 'keyup':
+ // Command keys insert or clear IME input.
+ return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
+
+ case 'keydown':
+ // Expect IME keyCode on each keydown. If we get any other
+ // code we must have exited earlier.
+ return nativeEvent.keyCode !== START_KEYCODE;
+
+ case 'keypress':
+ case 'mousedown':
+ case 'focusout':
+ // Events are not possible without cancelling IME.
+ return true;
+
+ default:
+ return false;
+ }
+ }
+ /**
+ * Google Input Tools provides composition data via a CustomEvent,
+ * with the `data` property populated in the `detail` object. If this
+ * is available on the event object, use it. If not, this is a plain
+ * composition event and we have nothing special to extract.
+ *
+ * @param {object} nativeEvent
+ * @return {?string}
+ */
+
+
+ function getDataFromCustomEvent(nativeEvent) {
+ var detail = nativeEvent.detail;
+
+ if (typeof detail === 'object' && 'data' in detail) {
+ return detail.data;
+ }
+
+ return null;
+ }
+ /**
+ * Check if a composition event was triggered by Korean IME.
+ * Our fallback mode does not work well with IE's Korean IME,
+ * so just use native composition events when Korean IME is used.
+ * Although CompositionEvent.locale property is deprecated,
+ * it is available in IE, where our fallback mode is enabled.
+ *
+ * @param {object} nativeEvent
+ * @return {boolean}
+ */
+
+
+ function isUsingKoreanIME(nativeEvent) {
+ return nativeEvent.locale === 'ko';
+ } // Track the current IME composition status, if any.
+
+
+ var isComposing = false;
+ /**
+ * @return {?object} A SyntheticCompositionEvent.
+ */
+
+ function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
+ var eventType;
+ var fallbackData;
+
+ if (canUseCompositionEvent) {
+ eventType = getCompositionEventType(domEventName);
+ } else if (!isComposing) {
+ if (isFallbackCompositionStart(domEventName, nativeEvent)) {
+ eventType = 'onCompositionStart';
+ }
+ } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
+ eventType = 'onCompositionEnd';
+ }
+
+ if (!eventType) {
+ return null;
+ }
+
+ if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
+ // The current composition is stored statically and must not be
+ // overwritten while composition continues.
+ if (!isComposing && eventType === 'onCompositionStart') {
+ isComposing = initialize(nativeEventTarget);
+ } else if (eventType === 'onCompositionEnd') {
+ if (isComposing) {
+ fallbackData = getData();
+ }
+ }
+ }
+
+ var listeners = accumulateTwoPhaseListeners(targetInst, eventType);
+
+ if (listeners.length > 0) {
+ var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+
+ if (fallbackData) {
+ // Inject data generated from fallback path into the synthetic event.
+ // This matches the property of native CompositionEventInterface.
+ event.data = fallbackData;
+ } else {
+ var customData = getDataFromCustomEvent(nativeEvent);
+
+ if (customData !== null) {
+ event.data = customData;
+ }
+ }
+ }
+ }
+
+ function getNativeBeforeInputChars(domEventName, nativeEvent) {
+ switch (domEventName) {
+ case 'compositionend':
+ return getDataFromCustomEvent(nativeEvent);
+
+ case 'keypress':
+ /**
+ * If native `textInput` events are available, our goal is to make
+ * use of them. However, there is a special case: the spacebar key.
+ * In Webkit, preventing default on a spacebar `textInput` event
+ * cancels character insertion, but it *also* causes the browser
+ * to fall back to its default spacebar behavior of scrolling the
+ * page.
+ *
+ * Tracking at:
+ * https://code.google.com/p/chromium/issues/detail?id=355103
+ *
+ * To avoid this issue, use the keypress event as if no `textInput`
+ * event is available.
+ */
+ var which = nativeEvent.which;
+
+ if (which !== SPACEBAR_CODE) {
+ return null;
+ }
+
+ hasSpaceKeypress = true;
+ return SPACEBAR_CHAR;
+
+ case 'textInput':
+ // Record the characters to be added to the DOM.
+ var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
+ // it at the keypress level and bail immediately. Android Chrome
+ // doesn't give us keycodes, so we need to ignore it.
+
+ if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
+ return null;
+ }
+
+ return chars;
+
+ default:
+ // For other native event types, do nothing.
+ return null;
+ }
+ }
+ /**
+ * For browsers that do not provide the `textInput` event, extract the
+ * appropriate string to use for SyntheticInputEvent.
+ */
+
+
+ function getFallbackBeforeInputChars(domEventName, nativeEvent) {
+ // If we are currently composing (IME) and using a fallback to do so,
+ // try to extract the composed characters from the fallback object.
+ // If composition event is available, we extract a string only at
+ // compositionevent, otherwise extract it at fallback events.
+ if (isComposing) {
+ if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
+ var chars = getData();
+ reset();
+ isComposing = false;
+ return chars;
+ }
+
+ return null;
+ }
+
+ switch (domEventName) {
+ case 'paste':
+ // If a paste event occurs after a keypress, throw out the input
+ // chars. Paste events should not lead to BeforeInput events.
+ return null;
+
+ case 'keypress':
+ /**
+ * As of v27, Firefox may fire keypress events even when no character
+ * will be inserted. A few possibilities:
+ *
+ * - `which` is `0`. Arrow keys, Esc key, etc.
+ *
+ * - `which` is the pressed key code, but no char is available.
+ * Ex: 'AltGr + d` in Polish. There is no modified character for
+ * this key combination and no character is inserted into the
+ * document, but FF fires the keypress for char code `100` anyway.
+ * No `input` event will occur.
+ *
+ * - `which` is the pressed key code, but a command combination is
+ * being used. Ex: `Cmd+C`. No character is inserted, and no
+ * `input` event will occur.
+ */
+ if (!isKeypressCommand(nativeEvent)) {
+ // IE fires the `keypress` event when a user types an emoji via
+ // Touch keyboard of Windows. In such a case, the `char` property
+ // holds an emoji character like `\uD83D\uDE0A`. Because its length
+ // is 2, the property `which` does not represent an emoji correctly.
+ // In such a case, we directly return the `char` property instead of
+ // using `which`.
+ if (nativeEvent.char && nativeEvent.char.length > 1) {
+ return nativeEvent.char;
+ } else if (nativeEvent.which) {
+ return String.fromCharCode(nativeEvent.which);
+ }
+ }
+
+ return null;
+
+ case 'compositionend':
+ return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
+
+ default:
+ return null;
+ }
+ }
+ /**
+ * Extract a SyntheticInputEvent for `beforeInput`, based on either native
+ * `textInput` or fallback behavior.
+ *
+ * @return {?object} A SyntheticInputEvent.
+ */
+
+
+ function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
+ var chars;
+
+ if (canUseTextInputEvent) {
+ chars = getNativeBeforeInputChars(domEventName, nativeEvent);
+ } else {
+ chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
+ } // If no characters are being inserted, no BeforeInput event should
+ // be fired.
+
+
+ if (!chars) {
+ return null;
+ }
+
+ var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');
+
+ if (listeners.length > 0) {
+ var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+ event.data = chars;
+ }
+ }
+ /**
+ * Create an `onBeforeInput` event to match
+ * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
+ *
+ * This event plugin is based on the native `textInput` event
+ * available in Chrome, Safari, Opera, and IE. This event fires after
+ * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
+ *
+ * `beforeInput` is spec'd but not implemented in any browsers, and
+ * the `input` event does not provide any useful information about what has
+ * actually been added, contrary to the spec. Thus, `textInput` is the best
+ * available event to identify the characters that have actually been inserted
+ * into the target node.
+ *
+ * This plugin is also responsible for emitting `composition` events, thus
+ * allowing us to share composition fallback code for both `beforeInput` and
+ * `composition` event types.
+ */
+
+
+ function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ }
+
+ /**
+ * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
+ */
+ var supportedInputTypes = {
+ color: true,
+ date: true,
+ datetime: true,
+ 'datetime-local': true,
+ email: true,
+ month: true,
+ number: true,
+ password: true,
+ range: true,
+ search: true,
+ tel: true,
+ text: true,
+ time: true,
+ url: true,
+ week: true
+ };
+
+ function isTextInputElement(elem) {
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
+
+ if (nodeName === 'input') {
+ return !!supportedInputTypes[elem.type];
+ }
+
+ if (nodeName === 'textarea') {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if an event is supported in the current execution environment.
+ *
+ * NOTE: This will not work correctly for non-generic events such as `change`,
+ * `reset`, `load`, `error`, and `select`.
+ *
+ * Borrows from Modernizr.
+ *
+ * @param {string} eventNameSuffix Event name, e.g. "click".
+ * @return {boolean} True if the event is supported.
+ * @internal
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
+ */
+
+ function isEventSupported(eventNameSuffix) {
+ if (!canUseDOM) {
+ return false;
+ }
+
+ var eventName = 'on' + eventNameSuffix;
+ var isSupported = (eventName in document);
+
+ if (!isSupported) {
+ var element = document.createElement('div');
+ element.setAttribute(eventName, 'return;');
+ isSupported = typeof element[eventName] === 'function';
+ }
+
+ return isSupported;
+ }
+
+ function registerEvents$1() {
+ registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
+ }
+
+ function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
+ // Flag this event loop as needing state restore.
+ enqueueStateRestore(target);
+ var listeners = accumulateTwoPhaseListeners(inst, 'onChange');
+
+ if (listeners.length > 0) {
+ var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+ }
+ }
+ /**
+ * For IE shims
+ */
+
+
+ var activeElement = null;
+ var activeElementInst = null;
+ /**
+ * SECTION: handle `change` event
+ */
+
+ function shouldUseChangeEvent(elem) {
+ var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
+ return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
+ }
+
+ function manualDispatchChangeEvent(nativeEvent) {
+ var dispatchQueue = [];
+ createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
+ // other events and have it go through ReactBrowserEventEmitter. Since it
+ // doesn't, we manually listen for the events and so we have to enqueue and
+ // process the abstract event manually.
+ //
+ // Batching is necessary here in order to ensure that all event handlers run
+ // before the next rerender (including event handlers attached to ancestor
+ // elements instead of directly on the input). Without this, controlled
+ // components don't work properly in conjunction with event bubbling because
+ // the component is rerendered and the value reverted before all the event
+ // handlers can run. See https://github.com/facebook/react/issues/708.
+
+ batchedUpdates(runEventInBatch, dispatchQueue);
+ }
+
+ function runEventInBatch(dispatchQueue) {
+ processDispatchQueue(dispatchQueue, 0);
+ }
+
+ function getInstIfValueChanged(targetInst) {
+ var targetNode = getNodeFromInstance(targetInst);
+
+ if (updateValueIfChanged(targetNode)) {
+ return targetInst;
+ }
+ }
+
+ function getTargetInstForChangeEvent(domEventName, targetInst) {
+ if (domEventName === 'change') {
+ return targetInst;
+ }
+ }
+ /**
+ * SECTION: handle `input` event
+ */
+
+
+ var isInputEventSupported = false;
+
+ if (canUseDOM) {
+ // IE9 claims to support the input event but fails to trigger it when
+ // deleting text, so we ignore its input events.
+ isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
+ }
+ /**
+ * (For IE <=9) Starts tracking propertychange events on the passed-in element
+ * and override the value property so that we can distinguish user events from
+ * value changes in JS.
+ */
+
+
+ function startWatchingForValueChange(target, targetInst) {
+ activeElement = target;
+ activeElementInst = targetInst;
+ activeElement.attachEvent('onpropertychange', handlePropertyChange);
+ }
+ /**
+ * (For IE <=9) Removes the event listeners from the currently-tracked element,
+ * if any exists.
+ */
+
+
+ function stopWatchingForValueChange() {
+ if (!activeElement) {
+ return;
+ }
+
+ activeElement.detachEvent('onpropertychange', handlePropertyChange);
+ activeElement = null;
+ activeElementInst = null;
+ }
+ /**
+ * (For IE <=9) Handles a propertychange event, sending a `change` event if
+ * the value of the active element has changed.
+ */
+
+
+ function handlePropertyChange(nativeEvent) {
+ if (nativeEvent.propertyName !== 'value') {
+ return;
+ }
+
+ if (getInstIfValueChanged(activeElementInst)) {
+ manualDispatchChangeEvent(nativeEvent);
+ }
+ }
+
+ function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
+ if (domEventName === 'focusin') {
+ // In IE9, propertychange fires for most input events but is buggy and
+ // doesn't fire when text is deleted, but conveniently, selectionchange
+ // appears to fire in all of the remaining cases so we catch those and
+ // forward the event if the value has changed
+ // In either case, we don't want to call the event handler if the value
+ // is changed from JS so we redefine a setter for `.value` that updates
+ // our activeElementValue variable, allowing us to ignore those changes
+ //
+ // stopWatching() should be a noop here but we call it just in case we
+ // missed a blur event somehow.
+ stopWatchingForValueChange();
+ startWatchingForValueChange(target, targetInst);
+ } else if (domEventName === 'focusout') {
+ stopWatchingForValueChange();
+ }
+ } // For IE8 and IE9.
+
+
+ function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
+ if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
+ // On the selectionchange event, the target is just document which isn't
+ // helpful for us so just check activeElement instead.
+ //
+ // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
+ // propertychange on the first input event after setting `value` from a
+ // script and fires only keydown, keypress, keyup. Catching keyup usually
+ // gets it and catching keydown lets us fire an event for the first
+ // keystroke if user does a key repeat (it'll be a little delayed: right
+ // before the second keystroke). Other input methods (e.g., paste) seem to
+ // fire selectionchange normally.
+ return getInstIfValueChanged(activeElementInst);
+ }
+ }
+ /**
+ * SECTION: handle `click` event
+ */
+
+
+ function shouldUseClickEvent(elem) {
+ // Use the `click` event to detect changes to checkbox and radio inputs.
+ // This approach works across all browsers, whereas `change` does not fire
+ // until `blur` in IE8.
+ var nodeName = elem.nodeName;
+ return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
+ }
+
+ function getTargetInstForClickEvent(domEventName, targetInst) {
+ if (domEventName === 'click') {
+ return getInstIfValueChanged(targetInst);
+ }
+ }
+
+ function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
+ if (domEventName === 'input' || domEventName === 'change') {
+ return getInstIfValueChanged(targetInst);
+ }
+ }
+
+ function handleControlledInputBlur(node) {
+ var state = node._wrapperState;
+
+ if (!state || !state.controlled || node.type !== 'number') {
+ return;
+ }
+
+ {
+ // If controlled, assign the value attribute to the current value on blur
+ setDefaultValue(node, 'number', node.value);
+ }
+ }
+ /**
+ * This plugin creates an `onChange` event that normalizes change events
+ * across form elements. This event fires at a time when it's possible to
+ * change the element's value without seeing a flicker.
+ *
+ * Supported elements are:
+ * - input (see `isTextInputElement`)
+ * - textarea
+ * - select
+ */
+
+
+ function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
+ var getTargetInstFunc, handleEventFunc;
+
+ if (shouldUseChangeEvent(targetNode)) {
+ getTargetInstFunc = getTargetInstForChangeEvent;
+ } else if (isTextInputElement(targetNode)) {
+ if (isInputEventSupported) {
+ getTargetInstFunc = getTargetInstForInputOrChangeEvent;
+ } else {
+ getTargetInstFunc = getTargetInstForInputEventPolyfill;
+ handleEventFunc = handleEventsForInputEventPolyfill;
+ }
+ } else if (shouldUseClickEvent(targetNode)) {
+ getTargetInstFunc = getTargetInstForClickEvent;
+ }
+
+ if (getTargetInstFunc) {
+ var inst = getTargetInstFunc(domEventName, targetInst);
+
+ if (inst) {
+ createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
+ return;
+ }
+ }
+
+ if (handleEventFunc) {
+ handleEventFunc(domEventName, targetNode, targetInst);
+ } // When blurring, set the value attribute for number inputs
+
+
+ if (domEventName === 'focusout') {
+ handleControlledInputBlur(targetNode);
+ }
+ }
+
+ function registerEvents$2() {
+ registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
+ registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
+ registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
+ registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
+ }
+ /**
+ * For almost every interaction we care about, there will be both a top-level
+ * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
+ * we do not extract duplicate events. However, moving the mouse into the
+ * browser from outside will not fire a `mouseout` event. In this case, we use
+ * the `mouseover` top-level event.
+ */
+
+
+ function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
+ var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';
+
+ if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {
+ // If this is an over event with a target, we might have already dispatched
+ // the event in the out event of the other target. If this is replayed,
+ // then it's because we couldn't dispatch against this target previously
+ // so we have to do it now instead.
+ var related = nativeEvent.relatedTarget || nativeEvent.fromElement;
+
+ if (related) {
+ // If the related node is managed by React, we can assume that we have
+ // already dispatched the corresponding events during its mouseout.
+ if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
+ return;
+ }
+ }
+ }
+
+ if (!isOutEvent && !isOverEvent) {
+ // Must not be a mouse or pointer in or out - ignoring.
+ return;
+ }
+
+ var win; // TODO: why is this nullable in the types but we read from it?
+
+ if (nativeEventTarget.window === nativeEventTarget) {
+ // `nativeEventTarget` is probably a window object.
+ win = nativeEventTarget;
+ } else {
+ // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
+ var doc = nativeEventTarget.ownerDocument;
+
+ if (doc) {
+ win = doc.defaultView || doc.parentWindow;
+ } else {
+ win = window;
+ }
+ }
+
+ var from;
+ var to;
+
+ if (isOutEvent) {
+ var _related = nativeEvent.relatedTarget || nativeEvent.toElement;
+
+ from = targetInst;
+ to = _related ? getClosestInstanceFromNode(_related) : null;
+
+ if (to !== null) {
+ var nearestMounted = getNearestMountedFiber(to);
+
+ if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
+ to = null;
+ }
+ }
+ } else {
+ // Moving to a node from outside the window.
+ from = null;
+ to = targetInst;
+ }
+
+ if (from === to) {
+ // Nothing pertains to our managed components.
+ return;
+ }
+
+ var SyntheticEventCtor = SyntheticMouseEvent;
+ var leaveEventType = 'onMouseLeave';
+ var enterEventType = 'onMouseEnter';
+ var eventTypePrefix = 'mouse';
+
+ if (domEventName === 'pointerout' || domEventName === 'pointerover') {
+ SyntheticEventCtor = SyntheticPointerEvent;
+ leaveEventType = 'onPointerLeave';
+ enterEventType = 'onPointerEnter';
+ eventTypePrefix = 'pointer';
+ }
+
+ var fromNode = from == null ? win : getNodeFromInstance(from);
+ var toNode = to == null ? win : getNodeFromInstance(to);
+ var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
+ leave.target = fromNode;
+ leave.relatedTarget = toNode;
+ var enter = null; // We should only process this nativeEvent if we are processing
+ // the first ancestor. Next time, we will ignore the event.
+
+ var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);
+
+ if (nativeTargetInst === targetInst) {
+ var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
+ enterEvent.target = toNode;
+ enterEvent.relatedTarget = fromNode;
+ enter = enterEvent;
+ }
+
+ accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
+ }
+
+ /**
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+ */
+ function is(x, y) {
+ return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
+ ;
+ }
+
+ var objectIs = typeof Object.is === 'function' ? Object.is : is;
+
+ var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
+ /**
+ * Performs equality by iterating through keys on an object and returning false
+ * when any key has values which are not strictly equal between the arguments.
+ * Returns true when the values of all keys are strictly equal.
+ */
+
+ function shallowEqual(objA, objB) {
+ if (objectIs(objA, objB)) {
+ return true;
+ }
+
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
+ return false;
+ }
+
+ var keysA = Object.keys(objA);
+ var keysB = Object.keys(objB);
+
+ if (keysA.length !== keysB.length) {
+ return false;
+ } // Test for A's keys different from B.
+
+
+ for (var i = 0; i < keysA.length; i++) {
+ if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Given any node return the first leaf node without children.
+ *
+ * @param {DOMElement|DOMTextNode} node
+ * @return {DOMElement|DOMTextNode}
+ */
+
+ function getLeafNode(node) {
+ while (node && node.firstChild) {
+ node = node.firstChild;
+ }
+
+ return node;
+ }
+ /**
+ * Get the next sibling within a container. This will walk up the
+ * DOM if a node's siblings have been exhausted.
+ *
+ * @param {DOMElement|DOMTextNode} node
+ * @return {?DOMElement|DOMTextNode}
+ */
+
+
+ function getSiblingNode(node) {
+ while (node) {
+ if (node.nextSibling) {
+ return node.nextSibling;
+ }
+
+ node = node.parentNode;
+ }
+ }
+ /**
+ * Get object describing the nodes which contain characters at offset.
+ *
+ * @param {DOMElement|DOMTextNode} root
+ * @param {number} offset
+ * @return {?object}
+ */
+
+
+ function getNodeForCharacterOffset(root, offset) {
+ var node = getLeafNode(root);
+ var nodeStart = 0;
+ var nodeEnd = 0;
+
+ while (node) {
+ if (node.nodeType === TEXT_NODE) {
+ nodeEnd = nodeStart + node.textContent.length;
+
+ if (nodeStart <= offset && nodeEnd >= offset) {
+ return {
+ node: node,
+ offset: offset - nodeStart
+ };
+ }
+
+ nodeStart = nodeEnd;
+ }
+
+ node = getLeafNode(getSiblingNode(node));
+ }
+ }
+
+ /**
+ * @param {DOMElement} outerNode
+ * @return {?object}
+ */
+
+ function getOffsets(outerNode) {
+ var ownerDocument = outerNode.ownerDocument;
+ var win = ownerDocument && ownerDocument.defaultView || window;
+ var selection = win.getSelection && win.getSelection();
+
+ if (!selection || selection.rangeCount === 0) {
+ return null;
+ }
+
+ var anchorNode = selection.anchorNode,
+ anchorOffset = selection.anchorOffset,
+ focusNode = selection.focusNode,
+ focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
+ // up/down buttons on an <input type="number">. Anonymous divs do not seem to
+ // expose properties, triggering a "Permission denied error" if any of its
+ // properties are accessed. The only seemingly possible way to avoid erroring
+ // is to access a property that typically works for non-anonymous divs and
+ // catch any error that may otherwise arise. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
+
+ try {
+ /* eslint-disable no-unused-expressions */
+ anchorNode.nodeType;
+ focusNode.nodeType;
+ /* eslint-enable no-unused-expressions */
+ } catch (e) {
+ return null;
+ }
+
+ return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
+ }
+ /**
+ * Returns {start, end} where `start` is the character/codepoint index of
+ * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
+ * `end` is the index of (focusNode, focusOffset).
+ *
+ * Returns null if you pass in garbage input but we should probably just crash.
+ *
+ * Exported only for testing.
+ */
+
+ function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
+ var length = 0;
+ var start = -1;
+ var end = -1;
+ var indexWithinAnchor = 0;
+ var indexWithinFocus = 0;
+ var node = outerNode;
+ var parentNode = null;
+
+ outer: while (true) {
+ var next = null;
+
+ while (true) {
+ if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
+ start = length + anchorOffset;
+ }
+
+ if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
+ end = length + focusOffset;
+ }
+
+ if (node.nodeType === TEXT_NODE) {
+ length += node.nodeValue.length;
+ }
+
+ if ((next = node.firstChild) === null) {
+ break;
+ } // Moving from `node` to its first child `next`.
+
+
+ parentNode = node;
+ node = next;
+ }
+
+ while (true) {
+ if (node === outerNode) {
+ // If `outerNode` has children, this is always the second time visiting
+ // it. If it has no children, this is still the first loop, and the only
+ // valid selection is anchorNode and focusNode both equal to this node
+ // and both offsets 0, in which case we will have handled above.
+ break outer;
+ }
+
+ if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
+ start = length;
+ }
+
+ if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
+ end = length;
+ }
+
+ if ((next = node.nextSibling) !== null) {
+ break;
+ }
+
+ node = parentNode;
+ parentNode = node.parentNode;
+ } // Moving from `node` to its next sibling `next`.
+
+
+ node = next;
+ }
+
+ if (start === -1 || end === -1) {
+ // This should never happen. (Would happen if the anchor/focus nodes aren't
+ // actually inside the passed-in node.)
+ return null;
+ }
+
+ return {
+ start: start,
+ end: end
+ };
+ }
+ /**
+ * In modern non-IE browsers, we can support both forward and backward
+ * selections.
+ *
+ * Note: IE10+ supports the Selection object, but it does not support
+ * the `extend` method, which means that even in modern IE, it's not possible
+ * to programmatically create a backward selection. Thus, for all IE
+ * versions, we use the old IE API to create our selections.
+ *
+ * @param {DOMElement|DOMTextNode} node
+ * @param {object} offsets
+ */
+
+ function setOffsets(node, offsets) {
+ var doc = node.ownerDocument || document;
+ var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
+ // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
+ // fails when pasting 100+ items)
+
+ if (!win.getSelection) {
+ return;
+ }
+
+ var selection = win.getSelection();
+ var length = node.textContent.length;
+ var start = Math.min(offsets.start, length);
+ var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
+ // Flip backward selections, so we can set with a single range.
+
+ if (!selection.extend && start > end) {
+ var temp = end;
+ end = start;
+ start = temp;
+ }
+
+ var startMarker = getNodeForCharacterOffset(node, start);
+ var endMarker = getNodeForCharacterOffset(node, end);
+
+ if (startMarker && endMarker) {
+ if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
+ return;
+ }
+
+ var range = doc.createRange();
+ range.setStart(startMarker.node, startMarker.offset);
+ selection.removeAllRanges();
+
+ if (start > end) {
+ selection.addRange(range);
+ selection.extend(endMarker.node, endMarker.offset);
+ } else {
+ range.setEnd(endMarker.node, endMarker.offset);
+ selection.addRange(range);
+ }
+ }
+ }
+
+ function isTextNode(node) {
+ return node && node.nodeType === TEXT_NODE;
+ }
+
+ function containsNode(outerNode, innerNode) {
+ if (!outerNode || !innerNode) {
+ return false;
+ } else if (outerNode === innerNode) {
+ return true;
+ } else if (isTextNode(outerNode)) {
+ return false;
+ } else if (isTextNode(innerNode)) {
+ return containsNode(outerNode, innerNode.parentNode);
+ } else if ('contains' in outerNode) {
+ return outerNode.contains(innerNode);
+ } else if (outerNode.compareDocumentPosition) {
+ return !!(outerNode.compareDocumentPosition(innerNode) & 16);
+ } else {
+ return false;
+ }
+ }
+
+ function isInDocument(node) {
+ return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
+ }
+
+ function isSameOriginFrame(iframe) {
+ try {
+ // Accessing the contentDocument of a HTMLIframeElement can cause the browser
+ // to throw, e.g. if it has a cross-origin src attribute.
+ // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
+ // iframe.contentDocument.defaultView;
+ // A safety way is to access one of the cross origin properties: Window or Location
+ // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
+ // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
+ return typeof iframe.contentWindow.location.href === 'string';
+ } catch (err) {
+ return false;
+ }
+ }
+
+ function getActiveElementDeep() {
+ var win = window;
+ var element = getActiveElement();
+
+ while (element instanceof win.HTMLIFrameElement) {
+ if (isSameOriginFrame(element)) {
+ win = element.contentWindow;
+ } else {
+ return element;
+ }
+
+ element = getActiveElement(win.document);
+ }
+
+ return element;
+ }
+ /**
+ * @ReactInputSelection: React input selection module. Based on Selection.js,
+ * but modified to be suitable for react and has a couple of bug fixes (doesn't
+ * assume buttons have range selections allowed).
+ * Input selection module for React.
+ */
+
+ /**
+ * @hasSelectionCapabilities: we get the element types that support selection
+ * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
+ * and `selectionEnd` rows.
+ */
+
+
+ function hasSelectionCapabilities(elem) {
+ var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
+ return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
+ }
+ function getSelectionInformation() {
+ var focusedElem = getActiveElementDeep();
+ return {
+ focusedElem: focusedElem,
+ selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
+ };
+ }
+ /**
+ * @restoreSelection: If any selection information was potentially lost,
+ * restore it. This is useful when performing operations that could remove dom
+ * nodes and place them back in, resulting in focus being lost.
+ */
+
+ function restoreSelection(priorSelectionInformation) {
+ var curFocusedElem = getActiveElementDeep();
+ var priorFocusedElem = priorSelectionInformation.focusedElem;
+ var priorSelectionRange = priorSelectionInformation.selectionRange;
+
+ if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
+ if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
+ setSelection(priorFocusedElem, priorSelectionRange);
+ } // Focusing a node can change the scroll position, which is undesirable
+
+
+ var ancestors = [];
+ var ancestor = priorFocusedElem;
+
+ while (ancestor = ancestor.parentNode) {
+ if (ancestor.nodeType === ELEMENT_NODE) {
+ ancestors.push({
+ element: ancestor,
+ left: ancestor.scrollLeft,
+ top: ancestor.scrollTop
+ });
+ }
+ }
+
+ if (typeof priorFocusedElem.focus === 'function') {
+ priorFocusedElem.focus();
+ }
+
+ for (var i = 0; i < ancestors.length; i++) {
+ var info = ancestors[i];
+ info.element.scrollLeft = info.left;
+ info.element.scrollTop = info.top;
+ }
+ }
+ }
+ /**
+ * @getSelection: Gets the selection bounds of a focused textarea, input or
+ * contentEditable node.
+ * -@input: Look up selection bounds of this input
+ * -@return {start: selectionStart, end: selectionEnd}
+ */
+
+ function getSelection(input) {
+ var selection;
+
+ if ('selectionStart' in input) {
+ // Modern browser with input or textarea.
+ selection = {
+ start: input.selectionStart,
+ end: input.selectionEnd
+ };
+ } else {
+ // Content editable or old IE textarea.
+ selection = getOffsets(input);
+ }
+
+ return selection || {
+ start: 0,
+ end: 0
+ };
+ }
+ /**
+ * @setSelection: Sets the selection bounds of a textarea or input and focuses
+ * the input.
+ * -@input Set selection bounds of this input or textarea
+ * -@offsets Object of same form that is returned from get*
+ */
+
+ function setSelection(input, offsets) {
+ var start = offsets.start;
+ var end = offsets.end;
+
+ if (end === undefined) {
+ end = start;
+ }
+
+ if ('selectionStart' in input) {
+ input.selectionStart = start;
+ input.selectionEnd = Math.min(end, input.value.length);
+ } else {
+ setOffsets(input, offsets);
+ }
+ }
+
+ var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
+
+ function registerEvents$3() {
+ registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
+ }
+
+ var activeElement$1 = null;
+ var activeElementInst$1 = null;
+ var lastSelection = null;
+ var mouseDown = false;
+ /**
+ * Get an object which is a unique representation of the current selection.
+ *
+ * The return value will not be consistent across nodes or browsers, but
+ * two identical selections on the same node will return identical objects.
+ */
+
+ function getSelection$1(node) {
+ if ('selectionStart' in node && hasSelectionCapabilities(node)) {
+ return {
+ start: node.selectionStart,
+ end: node.selectionEnd
+ };
+ } else {
+ var win = node.ownerDocument && node.ownerDocument.defaultView || window;
+ var selection = win.getSelection();
+ return {
+ anchorNode: selection.anchorNode,
+ anchorOffset: selection.anchorOffset,
+ focusNode: selection.focusNode,
+ focusOffset: selection.focusOffset
+ };
+ }
+ }
+ /**
+ * Get document associated with the event target.
+ */
+
+
+ function getEventTargetDocument(eventTarget) {
+ return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
+ }
+ /**
+ * Poll selection to see whether it's changed.
+ *
+ * @param {object} nativeEvent
+ * @param {object} nativeEventTarget
+ * @return {?SyntheticEvent}
+ */
+
+
+ function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
+ // Ensure we have the right element, and that the user is not dragging a
+ // selection (this matches native `select` event behavior). In HTML5, select
+ // fires only on input and textarea thus if there's no focused element we
+ // won't dispatch.
+ var doc = getEventTargetDocument(nativeEventTarget);
+
+ if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
+ return;
+ } // Only fire when selection has actually changed.
+
+
+ var currentSelection = getSelection$1(activeElement$1);
+
+ if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
+ lastSelection = currentSelection;
+ var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');
+
+ if (listeners.length > 0) {
+ var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+ event.target = activeElement$1;
+ }
+ }
+ }
+ /**
+ * This plugin creates an `onSelect` event that normalizes select events
+ * across form elements.
+ *
+ * Supported elements are:
+ * - input (see `isTextInputElement`)
+ * - textarea
+ * - contentEditable
+ *
+ * This differs from native browser implementations in the following ways:
+ * - Fires on contentEditable fields as well as inputs.
+ * - Fires for collapsed selection.
+ * - Fires after user input.
+ */
+
+
+ function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+
+ var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
+
+ switch (domEventName) {
+ // Track the input node that has focus.
+ case 'focusin':
+ if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
+ activeElement$1 = targetNode;
+ activeElementInst$1 = targetInst;
+ lastSelection = null;
+ }
+
+ break;
+
+ case 'focusout':
+ activeElement$1 = null;
+ activeElementInst$1 = null;
+ lastSelection = null;
+ break;
+ // Don't fire the event while the user is dragging. This matches the
+ // semantics of the native select event.
+
+ case 'mousedown':
+ mouseDown = true;
+ break;
+
+ case 'contextmenu':
+ case 'mouseup':
+ case 'dragend':
+ mouseDown = false;
+ constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
+ break;
+ // Chrome and IE fire non-standard event when selection is changed (and
+ // sometimes when it hasn't). IE's event fires out of order with respect
+ // to key and input events on deletion, so we discard it.
+ //
+ // Firefox doesn't support selectionchange, so check selection status
+ // after each key entry. The selection changes after keydown and before
+ // keyup, but we check on keydown as well in the case of holding down a
+ // key, when multiple keydown events are fired but only one keyup is.
+ // This is also our approach for IE handling, for the reason above.
+
+ case 'selectionchange':
+ if (skipSelectionChangeEvent) {
+ break;
+ }
+
+ // falls through
+
+ case 'keydown':
+ case 'keyup':
+ constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
+ }
+ }
+
+ function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ var reactName = topLevelEventsToReactNames.get(domEventName);
+
+ if (reactName === undefined) {
+ return;
+ }
+
+ var SyntheticEventCtor = SyntheticEvent;
+ var reactEventType = domEventName;
+
+ switch (domEventName) {
+ case 'keypress':
+ // Firefox creates a keypress event for function keys too. This removes
+ // the unwanted keypress events. Enter is however both printable and
+ // non-printable. One would expect Tab to be as well (but it isn't).
+ if (getEventCharCode(nativeEvent) === 0) {
+ return;
+ }
+
+ /* falls through */
+
+ case 'keydown':
+ case 'keyup':
+ SyntheticEventCtor = SyntheticKeyboardEvent;
+ break;
+
+ case 'focusin':
+ reactEventType = 'focus';
+ SyntheticEventCtor = SyntheticFocusEvent;
+ break;
+
+ case 'focusout':
+ reactEventType = 'blur';
+ SyntheticEventCtor = SyntheticFocusEvent;
+ break;
+
+ case 'beforeblur':
+ case 'afterblur':
+ SyntheticEventCtor = SyntheticFocusEvent;
+ break;
+
+ case 'click':
+ // Firefox creates a click event on right mouse clicks. This removes the
+ // unwanted click events.
+ if (nativeEvent.button === 2) {
+ return;
+ }
+
+ /* falls through */
+
+ case 'auxclick':
+ case 'dblclick':
+ case 'mousedown':
+ case 'mousemove':
+ case 'mouseup': // TODO: Disabled elements should not respond to mouse events
+
+ /* falls through */
+
+ case 'mouseout':
+ case 'mouseover':
+ case 'contextmenu':
+ SyntheticEventCtor = SyntheticMouseEvent;
+ break;
+
+ case 'drag':
+ case 'dragend':
+ case 'dragenter':
+ case 'dragexit':
+ case 'dragleave':
+ case 'dragover':
+ case 'dragstart':
+ case 'drop':
+ SyntheticEventCtor = SyntheticDragEvent;
+ break;
+
+ case 'touchcancel':
+ case 'touchend':
+ case 'touchmove':
+ case 'touchstart':
+ SyntheticEventCtor = SyntheticTouchEvent;
+ break;
+
+ case ANIMATION_END:
+ case ANIMATION_ITERATION:
+ case ANIMATION_START:
+ SyntheticEventCtor = SyntheticAnimationEvent;
+ break;
+
+ case TRANSITION_END:
+ SyntheticEventCtor = SyntheticTransitionEvent;
+ break;
+
+ case 'scroll':
+ SyntheticEventCtor = SyntheticUIEvent;
+ break;
+
+ case 'wheel':
+ SyntheticEventCtor = SyntheticWheelEvent;
+ break;
+
+ case 'copy':
+ case 'cut':
+ case 'paste':
+ SyntheticEventCtor = SyntheticClipboardEvent;
+ break;
+
+ case 'gotpointercapture':
+ case 'lostpointercapture':
+ case 'pointercancel':
+ case 'pointerdown':
+ case 'pointermove':
+ case 'pointerout':
+ case 'pointerover':
+ case 'pointerup':
+ SyntheticEventCtor = SyntheticPointerEvent;
+ break;
+ }
+
+ var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
+
+ {
+ // Some events don't bubble in the browser.
+ // In the past, React has always bubbled them, but this can be surprising.
+ // We're going to try aligning closer to the browser behavior by not bubbling
+ // them in React either. We'll start by not bubbling onScroll, and then expand.
+ var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
+ // nonDelegatedEvents list in DOMPluginEventSystem.
+ // Then we can remove this special list.
+ // This is a breaking change that can wait until React 18.
+ domEventName === 'scroll';
+
+ var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);
+
+ if (_listeners.length > 0) {
+ // Intentionally create event lazily.
+ var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);
+
+ dispatchQueue.push({
+ event: _event,
+ listeners: _listeners
+ });
+ }
+ }
+ }
+
+ // TODO: remove top-level side effect.
+ registerSimpleEvents();
+ registerEvents$2();
+ registerEvents$1();
+ registerEvents$3();
+ registerEvents();
+
+ function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
+ // TODO: we should remove the concept of a "SimpleEventPlugin".
+ // This is the basic functionality of the event system. All
+ // the other plugins are essentially polyfills. So the plugin
+ // should probably be inlined somewhere and have its logic
+ // be core the to event system. This would potentially allow
+ // us to ship builds of React without the polyfilled plugins below.
+ extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
+ var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
+ // event's native "bubble" phase, which means that we're
+ // not in the capture phase. That's because we emulate
+ // the capture phase here still. This is a trade-off,
+ // because in an ideal world we would not emulate and use
+ // the phases properly, like we do with the SimpleEvent
+ // plugin. However, the plugins below either expect
+ // emulation (EnterLeave) or use state localized to that
+ // plugin (BeforeInput, Change, Select). The state in
+ // these modules complicates things, as you'll essentially
+ // get the case where the capture phase event might change
+ // state, only for the following bubble event to come in
+ // later and not trigger anything as the state now
+ // invalidates the heuristics of the event plugin. We
+ // could alter all these plugins to work in such ways, but
+ // that might cause other unknown side-effects that we
+ // can't forsee right now.
+
+ if (shouldProcessPolyfillPlugins) {
+ extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
+ extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
+ }
+ } // List of events that need to be individually attached to media elements.
+
+
+ var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
+ // set them on the actual target element itself. This is primarily
+ // because these events do not consistently bubble in the DOM.
+
+ var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));
+
+ function executeDispatch(event, listener, currentTarget) {
+ var type = event.type || 'unknown-event';
+ event.currentTarget = currentTarget;
+ invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
+ event.currentTarget = null;
+ }
+
+ function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
+ var previousInstance;
+
+ if (inCapturePhase) {
+ for (var i = dispatchListeners.length - 1; i >= 0; i--) {
+ var _dispatchListeners$i = dispatchListeners[i],
+ instance = _dispatchListeners$i.instance,
+ currentTarget = _dispatchListeners$i.currentTarget,
+ listener = _dispatchListeners$i.listener;
+
+ if (instance !== previousInstance && event.isPropagationStopped()) {
+ return;
+ }
+
+ executeDispatch(event, listener, currentTarget);
+ previousInstance = instance;
+ }
+ } else {
+ for (var _i = 0; _i < dispatchListeners.length; _i++) {
+ var _dispatchListeners$_i = dispatchListeners[_i],
+ _instance = _dispatchListeners$_i.instance,
+ _currentTarget = _dispatchListeners$_i.currentTarget,
+ _listener = _dispatchListeners$_i.listener;
+
+ if (_instance !== previousInstance && event.isPropagationStopped()) {
+ return;
+ }
+
+ executeDispatch(event, _listener, _currentTarget);
+ previousInstance = _instance;
+ }
+ }
+ }
+
+ function processDispatchQueue(dispatchQueue, eventSystemFlags) {
+ var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
+
+ for (var i = 0; i < dispatchQueue.length; i++) {
+ var _dispatchQueue$i = dispatchQueue[i],
+ event = _dispatchQueue$i.event,
+ listeners = _dispatchQueue$i.listeners;
+ processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.
+ } // This would be a good time to rethrow if any of the event handlers threw.
+
+
+ rethrowCaughtError();
+ }
+
+ function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
+ var nativeEventTarget = getEventTarget(nativeEvent);
+ var dispatchQueue = [];
+ extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
+ processDispatchQueue(dispatchQueue, eventSystemFlags);
+ }
+
+ function listenToNonDelegatedEvent(domEventName, targetElement) {
+ var isCapturePhaseListener = false;
+ var listenerSet = getEventListenerSet(targetElement);
+ var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
+
+ if (!listenerSet.has(listenerSetKey)) {
+ addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
+ listenerSet.add(listenerSetKey);
+ }
+ }
+ var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
+ function listenToAllSupportedEvents(rootContainerElement) {
+ {
+ if (rootContainerElement[listeningMarker]) {
+ // Performance optimization: don't iterate through events
+ // for the same portal container or root node more than once.
+ // TODO: once we remove the flag, we may be able to also
+ // remove some of the bookkeeping maps used for laziness.
+ return;
+ }
+
+ rootContainerElement[listeningMarker] = true;
+ allNativeEvents.forEach(function (domEventName) {
+ if (!nonDelegatedEvents.has(domEventName)) {
+ listenToNativeEvent(domEventName, false, rootContainerElement, null);
+ }
+
+ listenToNativeEvent(domEventName, true, rootContainerElement, null);
+ });
+ }
+ }
+ function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {
+ var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
+ var target = rootContainerElement; // selectionchange needs to be attached to the document
+ // otherwise it won't capture incoming events that are only
+ // triggered on the document directly.
+
+ if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {
+ target = rootContainerElement.ownerDocument;
+ } // If the event can be delegated (or is capture phase), we can
+ // register it to the root container. Otherwise, we should
+ // register the event to the target element and mark it as
+ // a non-delegated event.
+
+
+ if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {
+ // For all non-delegated events, apart from scroll, we attach
+ // their event listeners to the respective elements that their
+ // events fire on. That means we can skip this step, as event
+ // listener has already been added previously. However, we
+ // special case the scroll event because the reality is that any
+ // element can scroll.
+ // TODO: ideally, we'd eventually apply the same logic to all
+ // events from the nonDelegatedEvents list. Then we can remove
+ // this special case and use the same logic for all events.
+ if (domEventName !== 'scroll') {
+ return;
+ }
+
+ eventSystemFlags |= IS_NON_DELEGATED;
+ target = targetElement;
+ }
+
+ var listenerSet = getEventListenerSet(target);
+ var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then
+ // we need to trap an event listener onto the target.
+
+ if (!listenerSet.has(listenerSetKey)) {
+ if (isCapturePhaseListener) {
+ eventSystemFlags |= IS_CAPTURE_PHASE;
+ }
+
+ addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
+ listenerSet.add(listenerSetKey);
+ }
+ }
+
+ function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
+ var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
+ // active and not passive.
+
+ var isPassiveListener = undefined;
+
+ if (passiveBrowserEventsSupported) {
+ // Browsers introduced an intervention, making these events
+ // passive by default on document. React doesn't bind them
+ // to document anymore, but changing this now would undo
+ // the performance wins from the change. So we emulate
+ // the existing behavior manually on the roots now.
+ // https://github.com/facebook/react/issues/19651
+ if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
+ isPassiveListener = true;
+ }
+ }
+
+ targetContainer = targetContainer;
+ var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we
+
+
+ if (isCapturePhaseListener) {
+ if (isPassiveListener !== undefined) {
+ unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
+ } else {
+ unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
+ }
+ } else {
+ if (isPassiveListener !== undefined) {
+ unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
+ } else {
+ unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
+ }
+ }
+ }
+
+ function isMatchingRootContainer(grandContainer, targetContainer) {
+ return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
+ }
+
+ function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
+ var ancestorInst = targetInst;
+
+ if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
+ var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we
+
+ if (targetInst !== null) {
+ // The below logic attempts to work out if we need to change
+ // the target fiber to a different ancestor. We had similar logic
+ // in the legacy event system, except the big difference between
+ // systems is that the modern event system now has an event listener
+ // attached to each React Root and React Portal Root. Together,
+ // the DOM nodes representing these roots are the "rootContainer".
+ // To figure out which ancestor instance we should use, we traverse
+ // up the fiber tree from the target instance and attempt to find
+ // root boundaries that match that of our current "rootContainer".
+ // If we find that "rootContainer", we find the parent fiber
+ // sub-tree for that root and make that our ancestor instance.
+ var node = targetInst;
+
+ mainLoop: while (true) {
+ if (node === null) {
+ return;
+ }
+
+ var nodeTag = node.tag;
+
+ if (nodeTag === HostRoot || nodeTag === HostPortal) {
+ var container = node.stateNode.containerInfo;
+
+ if (isMatchingRootContainer(container, targetContainerNode)) {
+ break;
+ }
+
+ if (nodeTag === HostPortal) {
+ // The target is a portal, but it's not the rootContainer we're looking for.
+ // Normally portals handle their own events all the way down to the root.
+ // So we should be able to stop now. However, we don't know if this portal
+ // was part of *our* root.
+ var grandNode = node.return;
+
+ while (grandNode !== null) {
+ var grandTag = grandNode.tag;
+
+ if (grandTag === HostRoot || grandTag === HostPortal) {
+ var grandContainer = grandNode.stateNode.containerInfo;
+
+ if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
+ // This is the rootContainer we're looking for and we found it as
+ // a parent of the Portal. That means we can ignore it because the
+ // Portal will bubble through to us.
+ return;
+ }
+ }
+
+ grandNode = grandNode.return;
+ }
+ } // Now we need to find it's corresponding host fiber in the other
+ // tree. To do this we can use getClosestInstanceFromNode, but we
+ // need to validate that the fiber is a host instance, otherwise
+ // we need to traverse up through the DOM till we find the correct
+ // node that is from the other tree.
+
+
+ while (container !== null) {
+ var parentNode = getClosestInstanceFromNode(container);
+
+ if (parentNode === null) {
+ return;
+ }
+
+ var parentTag = parentNode.tag;
+
+ if (parentTag === HostComponent || parentTag === HostText) {
+ node = ancestorInst = parentNode;
+ continue mainLoop;
+ }
+
+ container = container.parentNode;
+ }
+ }
+
+ node = node.return;
+ }
+ }
+ }
+
+ batchedEventUpdates(function () {
+ return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
+ });
+ }
+
+ function createDispatchListener(instance, listener, currentTarget) {
+ return {
+ instance: instance,
+ listener: listener,
+ currentTarget: currentTarget
+ };
+ }
+
+ function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {
+ var captureName = reactName !== null ? reactName + 'Capture' : null;
+ var reactEventName = inCapturePhase ? captureName : reactName;
+ var listeners = [];
+ var instance = targetFiber;
+ var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.
+
+ while (instance !== null) {
+ var _instance2 = instance,
+ stateNode = _instance2.stateNode,
+ tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)
+
+ if (tag === HostComponent && stateNode !== null) {
+ lastHostComponent = stateNode; // createEventHandle listeners
+
+
+ if (reactEventName !== null) {
+ var listener = getListener(instance, reactEventName);
+
+ if (listener != null) {
+ listeners.push(createDispatchListener(instance, listener, lastHostComponent));
+ }
+ }
+ } // If we are only accumulating events for the target, then we don't
+ // continue to propagate through the React fiber tree to find other
+ // listeners.
+
+
+ if (accumulateTargetOnly) {
+ break;
+ }
+
+ instance = instance.return;
+ }
+
+ return listeners;
+ } // We should only use this function for:
+ // - BeforeInputEventPlugin
+ // - ChangeEventPlugin
+ // - SelectEventPlugin
+ // This is because we only process these plugins
+ // in the bubble phase, so we need to accumulate two
+ // phase event listeners (via emulation).
+
+ function accumulateTwoPhaseListeners(targetFiber, reactName) {
+ var captureName = reactName + 'Capture';
+ var listeners = [];
+ var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.
+
+ while (instance !== null) {
+ var _instance3 = instance,
+ stateNode = _instance3.stateNode,
+ tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)
+
+ if (tag === HostComponent && stateNode !== null) {
+ var currentTarget = stateNode;
+ var captureListener = getListener(instance, captureName);
+
+ if (captureListener != null) {
+ listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
+ }
+
+ var bubbleListener = getListener(instance, reactName);
+
+ if (bubbleListener != null) {
+ listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
+ }
+ }
+
+ instance = instance.return;
+ }
+
+ return listeners;
+ }
+
+ function getParent(inst) {
+ if (inst === null) {
+ return null;
+ }
+
+ do {
+ inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
+ // That is depending on if we want nested subtrees (layers) to bubble
+ // events to their parent. We could also go through parentNode on the
+ // host node but that wouldn't work for React Native and doesn't let us
+ // do the portal feature.
+ } while (inst && inst.tag !== HostComponent);
+
+ if (inst) {
+ return inst;
+ }
+
+ return null;
+ }
+ /**
+ * Return the lowest common ancestor of A and B, or null if they are in
+ * different trees.
+ */
+
+
+ function getLowestCommonAncestor(instA, instB) {
+ var nodeA = instA;
+ var nodeB = instB;
+ var depthA = 0;
+
+ for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
+ depthA++;
+ }
+
+ var depthB = 0;
+
+ for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
+ depthB++;
+ } // If A is deeper, crawl up.
+
+
+ while (depthA - depthB > 0) {
+ nodeA = getParent(nodeA);
+ depthA--;
+ } // If B is deeper, crawl up.
+
+
+ while (depthB - depthA > 0) {
+ nodeB = getParent(nodeB);
+ depthB--;
+ } // Walk in lockstep until we find a match.
+
+
+ var depth = depthA;
+
+ while (depth--) {
+ if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
+ return nodeA;
+ }
+
+ nodeA = getParent(nodeA);
+ nodeB = getParent(nodeB);
+ }
+
+ return null;
+ }
+
+ function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
+ var registrationName = event._reactName;
+ var listeners = [];
+ var instance = target;
+
+ while (instance !== null) {
+ if (instance === common) {
+ break;
+ }
+
+ var _instance4 = instance,
+ alternate = _instance4.alternate,
+ stateNode = _instance4.stateNode,
+ tag = _instance4.tag;
+
+ if (alternate !== null && alternate === common) {
+ break;
+ }
+
+ if (tag === HostComponent && stateNode !== null) {
+ var currentTarget = stateNode;
+
+ if (inCapturePhase) {
+ var captureListener = getListener(instance, registrationName);
+
+ if (captureListener != null) {
+ listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
+ }
+ } else if (!inCapturePhase) {
+ var bubbleListener = getListener(instance, registrationName);
+
+ if (bubbleListener != null) {
+ listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
+ }
+ }
+ }
+
+ instance = instance.return;
+ }
+
+ if (listeners.length !== 0) {
+ dispatchQueue.push({
+ event: event,
+ listeners: listeners
+ });
+ }
+ } // We should only use this function for:
+ // - EnterLeaveEventPlugin
+ // This is because we only process this plugin
+ // in the bubble phase, so we need to accumulate two
+ // phase event listeners.
+
+
+ function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
+ var common = from && to ? getLowestCommonAncestor(from, to) : null;
+
+ if (from !== null) {
+ accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
+ }
+
+ if (to !== null && enterEvent !== null) {
+ accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
+ }
+ }
+ function getListenerSetKey(domEventName, capture) {
+ return domEventName + "__" + (capture ? 'capture' : 'bubble');
}
var didWarnInvalidHydration = false;
@@ -5764,11 +8779,6 @@
{
warnedUnknownTags = {
- // Chrome is the only major browser not shipping <time>. But as of July
- // 2017 it intends to ship it due to widespread usage. We intentionally
- // *don't* warn for <time> even if it's unrecognized by Chrome because
- // it soon will be, and many apps have been using it anyway.
- time: true,
// There are working polyfills for <dialog>. Let people use it.
dialog: true,
// Electron ships a custom <webview> tag to display external web content in
@@ -5782,9 +8792,10 @@
validatePropertiesInDevelopment = function (type, props) {
validateProperties(type, props);
validateProperties$1(type, props);
- validateProperties$2(type, props,
- /* canUseEventSystem */
- true);
+ validateProperties$2(type, props, {
+ registrationNameDependencies: registrationNameDependencies,
+ possibleRegistrationNames: possibleRegistrationNames
+ });
}; // IE 11 parses & normalizes the style attribute as opposed to other
// browsers. It adds spaces and sorts the properties in some
// non-alphabetical order. Handling that would require sorting CSS
@@ -5878,12 +8889,6 @@
};
}
- function ensureListeningTo(rootContainerElement, registrationName) {
- var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;
- var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;
- legacyListenToEvent(registrationName, doc);
- }
-
function getOwnerDocumentFromRootContainer(rootContainerElement) {
return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
}
@@ -5895,7 +8900,7 @@
// non-interactive elements, which means delegated click listeners do not
// fire. The workaround for this bug involves attaching an empty click
// listener on the target node.
- // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
+ // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
// Just set it using the onclick property so that we don't have to manage any
// bookkeeping for it. Not sure if we need to clear it when the listener is
// removed.
@@ -5942,13 +8947,15 @@
} else if (typeof nextProp === 'number') {
setTextContent(domElement, '' + nextProp);
}
- } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
+ } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
- ensureListeningTo(rootContainerElement, propKey);
+ if (propKey === 'onScroll') {
+ listenToNonDelegatedEvent('scroll', domElement);
+ }
}
} else if (nextProp != null) {
setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
@@ -6068,54 +9075,63 @@
var props;
switch (tag) {
+ case 'dialog':
+ listenToNonDelegatedEvent('cancel', domElement);
+ listenToNonDelegatedEvent('close', domElement);
+ props = rawProps;
+ break;
+
case 'iframe':
case 'object':
case 'embed':
- trapBubbledEvent(TOP_LOAD, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the load event.
+ listenToNonDelegatedEvent('load', domElement);
props = rawProps;
break;
case 'video':
case 'audio':
- // Create listener for each media event
+ // We listen to these events in case to ensure emulated bubble
+ // listeners still fire for all the media events.
for (var i = 0; i < mediaEventTypes.length; i++) {
- trapBubbledEvent(mediaEventTypes[i], domElement);
+ listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
}
props = rawProps;
break;
case 'source':
- trapBubbledEvent(TOP_ERROR, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the error event.
+ listenToNonDelegatedEvent('error', domElement);
props = rawProps;
break;
case 'img':
case 'image':
case 'link':
- trapBubbledEvent(TOP_ERROR, domElement);
- trapBubbledEvent(TOP_LOAD, domElement);
- props = rawProps;
- break;
-
- case 'form':
- trapBubbledEvent(TOP_RESET, domElement);
- trapBubbledEvent(TOP_SUBMIT, domElement);
+ // We listen to these events in case to ensure emulated bubble
+ // listeners still fire for error and load events.
+ listenToNonDelegatedEvent('error', domElement);
+ listenToNonDelegatedEvent('load', domElement);
props = rawProps;
break;
case 'details':
- trapBubbledEvent(TOP_TOGGLE, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the toggle event.
+ listenToNonDelegatedEvent('toggle', domElement);
props = rawProps;
break;
case 'input':
initWrapperState(domElement, rawProps);
- props = getHostProps(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
case 'option':
@@ -6125,20 +9141,20 @@
case 'select':
initWrapperState$1(domElement, rawProps);
- props = getHostProps$2(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
case 'textarea':
initWrapperState$2(domElement, rawProps);
- props = getHostProps$3(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
default:
@@ -6249,7 +9265,7 @@
styleUpdates[styleName] = '';
}
}
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
+ } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
// This is a special case. If any listener updates we need to ensure
// that the "current" fiber pointer gets updated so we need a commit
// to update this element.
@@ -6258,7 +9274,7 @@
}
} else {
// For all other deleted properties we add it to the queue. We use
- // the whitelist in the commit phase instead.
+ // the allowed property list in the commit phase instead.
(updatePayload = updatePayload || []).push(propKey, null);
}
}
@@ -6324,17 +9340,19 @@
}
}
} else if (propKey === CHILDREN) {
- if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
+ if (typeof nextProp === 'string' || typeof nextProp === 'number') {
(updatePayload = updatePayload || []).push(propKey, '' + nextProp);
}
- } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
+ } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
// We eagerly listen to this even though we haven't committed yet.
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
- ensureListeningTo(rootContainerElement, propKey);
+ if (propKey === 'onScroll') {
+ listenToNonDelegatedEvent('scroll', domElement);
+ }
}
if (!updatePayload && lastProp !== nextProp) {
@@ -6343,9 +9361,14 @@
// to update this element.
updatePayload = [];
}
+ } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {
+ // If we encounter useOpaqueReference's opaque object, this means we are hydrating.
+ // In this case, call the opaque object's toString function which generates a new client
+ // ID so client and server IDs match and throws to rerender.
+ nextProp.toString();
} else {
// For any other property we always add it to the queue and then we
- // filter it out using the whitelist during the commit.
+ // filter it out using the allowed property list during the commit.
(updatePayload = updatePayload || []).push(propKey, nextProp);
}
}
@@ -6419,47 +9442,56 @@
switch (tag) {
+ case 'dialog':
+ listenToNonDelegatedEvent('cancel', domElement);
+ listenToNonDelegatedEvent('close', domElement);
+ break;
+
case 'iframe':
case 'object':
case 'embed':
- trapBubbledEvent(TOP_LOAD, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the load event.
+ listenToNonDelegatedEvent('load', domElement);
break;
case 'video':
case 'audio':
- // Create listener for each media event
+ // We listen to these events in case to ensure emulated bubble
+ // listeners still fire for all the media events.
for (var i = 0; i < mediaEventTypes.length; i++) {
- trapBubbledEvent(mediaEventTypes[i], domElement);
+ listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
}
break;
case 'source':
- trapBubbledEvent(TOP_ERROR, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the error event.
+ listenToNonDelegatedEvent('error', domElement);
break;
case 'img':
case 'image':
case 'link':
- trapBubbledEvent(TOP_ERROR, domElement);
- trapBubbledEvent(TOP_LOAD, domElement);
- break;
-
- case 'form':
- trapBubbledEvent(TOP_RESET, domElement);
- trapBubbledEvent(TOP_SUBMIT, domElement);
+ // We listen to these events in case to ensure emulated bubble
+ // listeners still fire for error and load events.
+ listenToNonDelegatedEvent('error', domElement);
+ listenToNonDelegatedEvent('load', domElement);
break;
case 'details':
- trapBubbledEvent(TOP_TOGGLE, domElement);
+ // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the toggle event.
+ listenToNonDelegatedEvent('toggle', domElement);
break;
case 'input':
- initWrapperState(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
case 'option':
@@ -6467,19 +9499,19 @@
break;
case 'select':
- initWrapperState$1(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
case 'textarea':
- initWrapperState$2(domElement, rawProps);
- trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
- // to onChange. Even if there is no listener.
+ initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
+ // listeners still fire for the invalid event.
+
+ listenToNonDelegatedEvent('invalid', domElement);
- ensureListeningTo(rootContainerElement, 'onChange');
break;
}
@@ -6493,7 +9525,7 @@
var name = attributes[_i].name.toLowerCase();
switch (name) {
- // Built-in SSR attribute is whitelisted
+ // Built-in SSR attribute is allowed
case 'data-reactroot':
break;
// Controlled attributes are not validated
@@ -6552,13 +9584,15 @@
updatePayload = [CHILDREN, '' + nextProp];
}
}
- } else if (registrationNameModules.hasOwnProperty(propKey)) {
+ } else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if ( typeof nextProp !== 'function') {
warnForInvalidEventListener(propKey, nextProp);
}
- ensureListeningTo(rootContainerElement, propKey);
+ if (propKey === 'onScroll') {
+ listenToNonDelegatedEvent('scroll', domElement);
+ }
}
} else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
typeof isCustomComponentTag === 'boolean') {
@@ -6566,15 +9600,18 @@
var serverValue = void 0;
var propertyInfo = getPropertyInfo(propKey);
- if (suppressHydrationWarning) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
+ if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
// TODO: Only ignore them on controlled tags.
propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
var serverHTML = domElement.innerHTML;
var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
- var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');
- if (expectedHTML !== serverHTML) {
- warnForPropDifference(propKey, serverHTML, expectedHTML);
+ if (nextHtml != null) {
+ var expectedHTML = normalizeHTML(domElement, nextHtml);
+
+ if (expectedHTML !== serverHTML) {
+ warnForPropDifference(propKey, serverHTML, expectedHTML);
+ }
}
} else if (propKey === STYLE) {
// $FlowFixMe - Should be inferred as not undefined.
@@ -6761,435 +9798,6 @@
}
}
- function getActiveElement(doc) {
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
-
- if (typeof doc === 'undefined') {
- return null;
- }
-
- try {
- return doc.activeElement || doc.body;
- } catch (e) {
- return doc.body;
- }
- }
-
- /**
- * Given any node return the first leaf node without children.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {DOMElement|DOMTextNode}
- */
-
- function getLeafNode(node) {
- while (node && node.firstChild) {
- node = node.firstChild;
- }
-
- return node;
- }
- /**
- * Get the next sibling within a container. This will walk up the
- * DOM if a node's siblings have been exhausted.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {?DOMElement|DOMTextNode}
- */
-
-
- function getSiblingNode(node) {
- while (node) {
- if (node.nextSibling) {
- return node.nextSibling;
- }
-
- node = node.parentNode;
- }
- }
- /**
- * Get object describing the nodes which contain characters at offset.
- *
- * @param {DOMElement|DOMTextNode} root
- * @param {number} offset
- * @return {?object}
- */
-
-
- function getNodeForCharacterOffset(root, offset) {
- var node = getLeafNode(root);
- var nodeStart = 0;
- var nodeEnd = 0;
-
- while (node) {
- if (node.nodeType === TEXT_NODE) {
- nodeEnd = nodeStart + node.textContent.length;
-
- if (nodeStart <= offset && nodeEnd >= offset) {
- return {
- node: node,
- offset: offset - nodeStart
- };
- }
-
- nodeStart = nodeEnd;
- }
-
- node = getLeafNode(getSiblingNode(node));
- }
- }
-
- /**
- * @param {DOMElement} outerNode
- * @return {?object}
- */
-
- function getOffsets(outerNode) {
- var ownerDocument = outerNode.ownerDocument;
- var win = ownerDocument && ownerDocument.defaultView || window;
- var selection = win.getSelection && win.getSelection();
-
- if (!selection || selection.rangeCount === 0) {
- return null;
- }
-
- var anchorNode = selection.anchorNode,
- anchorOffset = selection.anchorOffset,
- focusNode = selection.focusNode,
- focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
- // up/down buttons on an <input type="number">. Anonymous divs do not seem to
- // expose properties, triggering a "Permission denied error" if any of its
- // properties are accessed. The only seemingly possible way to avoid erroring
- // is to access a property that typically works for non-anonymous divs and
- // catch any error that may otherwise arise. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
-
- try {
- /* eslint-disable no-unused-expressions */
- anchorNode.nodeType;
- focusNode.nodeType;
- /* eslint-enable no-unused-expressions */
- } catch (e) {
- return null;
- }
-
- return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
- }
- /**
- * Returns {start, end} where `start` is the character/codepoint index of
- * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
- * `end` is the index of (focusNode, focusOffset).
- *
- * Returns null if you pass in garbage input but we should probably just crash.
- *
- * Exported only for testing.
- */
-
- function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
- var length = 0;
- var start = -1;
- var end = -1;
- var indexWithinAnchor = 0;
- var indexWithinFocus = 0;
- var node = outerNode;
- var parentNode = null;
-
- outer: while (true) {
- var next = null;
-
- while (true) {
- if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
- start = length + anchorOffset;
- }
-
- if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
- end = length + focusOffset;
- }
-
- if (node.nodeType === TEXT_NODE) {
- length += node.nodeValue.length;
- }
-
- if ((next = node.firstChild) === null) {
- break;
- } // Moving from `node` to its first child `next`.
-
-
- parentNode = node;
- node = next;
- }
-
- while (true) {
- if (node === outerNode) {
- // If `outerNode` has children, this is always the second time visiting
- // it. If it has no children, this is still the first loop, and the only
- // valid selection is anchorNode and focusNode both equal to this node
- // and both offsets 0, in which case we will have handled above.
- break outer;
- }
-
- if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
- start = length;
- }
-
- if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
- end = length;
- }
-
- if ((next = node.nextSibling) !== null) {
- break;
- }
-
- node = parentNode;
- parentNode = node.parentNode;
- } // Moving from `node` to its next sibling `next`.
-
-
- node = next;
- }
-
- if (start === -1 || end === -1) {
- // This should never happen. (Would happen if the anchor/focus nodes aren't
- // actually inside the passed-in node.)
- return null;
- }
-
- return {
- start: start,
- end: end
- };
- }
- /**
- * In modern non-IE browsers, we can support both forward and backward
- * selections.
- *
- * Note: IE10+ supports the Selection object, but it does not support
- * the `extend` method, which means that even in modern IE, it's not possible
- * to programmatically create a backward selection. Thus, for all IE
- * versions, we use the old IE API to create our selections.
- *
- * @param {DOMElement|DOMTextNode} node
- * @param {object} offsets
- */
-
- function setOffsets(node, offsets) {
- var doc = node.ownerDocument || document;
- var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
- // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
- // fails when pasting 100+ items)
-
- if (!win.getSelection) {
- return;
- }
-
- var selection = win.getSelection();
- var length = node.textContent.length;
- var start = Math.min(offsets.start, length);
- var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
- // Flip backward selections, so we can set with a single range.
-
- if (!selection.extend && start > end) {
- var temp = end;
- end = start;
- start = temp;
- }
-
- var startMarker = getNodeForCharacterOffset(node, start);
- var endMarker = getNodeForCharacterOffset(node, end);
-
- if (startMarker && endMarker) {
- if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
- return;
- }
-
- var range = doc.createRange();
- range.setStart(startMarker.node, startMarker.offset);
- selection.removeAllRanges();
-
- if (start > end) {
- selection.addRange(range);
- selection.extend(endMarker.node, endMarker.offset);
- } else {
- range.setEnd(endMarker.node, endMarker.offset);
- selection.addRange(range);
- }
- }
- }
-
- function isTextNode(node) {
- return node && node.nodeType === TEXT_NODE;
- }
-
- function containsNode(outerNode, innerNode) {
- if (!outerNode || !innerNode) {
- return false;
- } else if (outerNode === innerNode) {
- return true;
- } else if (isTextNode(outerNode)) {
- return false;
- } else if (isTextNode(innerNode)) {
- return containsNode(outerNode, innerNode.parentNode);
- } else if ('contains' in outerNode) {
- return outerNode.contains(innerNode);
- } else if (outerNode.compareDocumentPosition) {
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
- } else {
- return false;
- }
- }
-
- function isInDocument(node) {
- return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
- }
-
- function isSameOriginFrame(iframe) {
- try {
- // Accessing the contentDocument of a HTMLIframeElement can cause the browser
- // to throw, e.g. if it has a cross-origin src attribute.
- // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
- // iframe.contentDocument.defaultView;
- // A safety way is to access one of the cross origin properties: Window or Location
- // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
- // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
- return typeof iframe.contentWindow.location.href === 'string';
- } catch (err) {
- return false;
- }
- }
-
- function getActiveElementDeep() {
- var win = window;
- var element = getActiveElement();
-
- while (element instanceof win.HTMLIFrameElement) {
- if (isSameOriginFrame(element)) {
- win = element.contentWindow;
- } else {
- return element;
- }
-
- element = getActiveElement(win.document);
- }
-
- return element;
- }
- /**
- * @ReactInputSelection: React input selection module. Based on Selection.js,
- * but modified to be suitable for react and has a couple of bug fixes (doesn't
- * assume buttons have range selections allowed).
- * Input selection module for React.
- */
-
- /**
- * @hasSelectionCapabilities: we get the element types that support selection
- * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
- * and `selectionEnd` rows.
- */
-
-
- function hasSelectionCapabilities(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
- }
- function getSelectionInformation() {
- var focusedElem = getActiveElementDeep();
- return {
- // Used by Flare
- activeElementDetached: null,
- focusedElem: focusedElem,
- selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
- };
- }
- /**
- * @restoreSelection: If any selection information was potentially lost,
- * restore it. This is useful when performing operations that could remove dom
- * nodes and place them back in, resulting in focus being lost.
- */
-
- function restoreSelection(priorSelectionInformation) {
- var curFocusedElem = getActiveElementDeep();
- var priorFocusedElem = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
-
- if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
- if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
- setSelection(priorFocusedElem, priorSelectionRange);
- } // Focusing a node can change the scroll position, which is undesirable
-
-
- var ancestors = [];
- var ancestor = priorFocusedElem;
-
- while (ancestor = ancestor.parentNode) {
- if (ancestor.nodeType === ELEMENT_NODE) {
- ancestors.push({
- element: ancestor,
- left: ancestor.scrollLeft,
- top: ancestor.scrollTop
- });
- }
- }
-
- if (typeof priorFocusedElem.focus === 'function') {
- priorFocusedElem.focus();
- }
-
- for (var i = 0; i < ancestors.length; i++) {
- var info = ancestors[i];
- info.element.scrollLeft = info.left;
- info.element.scrollTop = info.top;
- }
- }
- }
- /**
- * @getSelection: Gets the selection bounds of a focused textarea, input or
- * contentEditable node.
- * -@input: Look up selection bounds of this input
- * -@return {start: selectionStart, end: selectionEnd}
- */
-
- function getSelection(input) {
- var selection;
-
- if ('selectionStart' in input) {
- // Modern browser with input or textarea.
- selection = {
- start: input.selectionStart,
- end: input.selectionEnd
- };
- } else {
- // Content editable or old IE textarea.
- selection = getOffsets(input);
- }
-
- return selection || {
- start: 0,
- end: 0
- };
- }
- /**
- * @setSelection: Sets the selection bounds of a textarea or input and focuses
- * the input.
- * -@input Set selection bounds of this input or textarea
- * -@offsets Object of same form that is returned from get*
- */
-
- function setSelection(input, offsets) {
- var start = offsets.start,
- end = offsets.end;
-
- if (end === undefined) {
- end = start;
- }
-
- if ('selectionStart' in input) {
- input.selectionStart = start;
- input.selectionEnd = Math.min(end, input.value.length);
- } else {
- setOffsets(input, offsets);
- }
- }
-
var validateDOMNesting = function () {};
var updatedAncestorInfo = function () {};
@@ -7472,8 +10080,7 @@
}
var ancestorTag = invalidParentOrAncestor.tag;
- var addendum = getCurrentFiberStackInDev();
- var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;
+ var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;
if (didWarn$1[warnKey]) {
return;
@@ -7584,13 +10191,15 @@
function prepareForCommit(containerInfo) {
eventsEnabled = isEnabled();
selectionInformation = getSelectionInformation();
+ var activeInstance = null;
+
setEnabled(false);
+ return activeInstance;
}
function resetAfterCommit(containerInfo) {
restoreSelection(selectionInformation);
setEnabled(eventsEnabled);
eventsEnabled = null;
-
selectionInformation = null;
}
function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
@@ -7633,14 +10242,11 @@
}
}
- return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
+ return diffProperties(domElement, type, oldProps, newProps);
}
function shouldSetTextContent(type, props) {
return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
}
- function shouldDeprioritizeSubtree(type, props) {
- return !!props.hidden;
- }
function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
{
var hostContextDev = hostContext;
@@ -7720,6 +10326,7 @@
container.insertBefore(child, beforeChild);
}
}
+
function removeChild(parentInstance, child) {
parentInstance.removeChild(child);
}
@@ -7730,11 +10337,9 @@
container.removeChild(child);
}
}
-
function hideInstance(instance) {
+ // TODO: Does this work for all element types? What about MathML? Should we
// pass host context to this method?
-
-
instance = instance;
var style = instance.style;
@@ -7755,6 +10360,17 @@
}
function unhideTextInstance(textInstance, text) {
textInstance.nodeValue = text;
+ }
+ function clearContainer(container) {
+ if (container.nodeType === ELEMENT_NODE) {
+ container.textContent = '';
+ } else if (container.nodeType === DOCUMENT_NODE) {
+ var body = container.body;
+
+ if (body != null) {
+ body.textContent = '';
+ }
+ }
} // -------------------
function canHydrateInstance(instance, type, props) {
if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
@@ -7811,7 +10427,7 @@
parentNamespace = hostContextDev.namespace;
}
- return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
+ return diffHydratedProperties(instance, type, props, parentNamespace);
}
function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
precacheFiberNode(internalInstanceHandle, textInstance);
@@ -7934,11 +10550,41 @@
function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
}
+ var clientId = 0;
+ function makeClientIdInDEV(warnOnAccessInDEV) {
+ var id = 'r:' + (clientId++).toString(36);
+ return {
+ toString: function () {
+ warnOnAccessInDEV();
+ return id;
+ },
+ valueOf: function () {
+ warnOnAccessInDEV();
+ return id;
+ }
+ };
+ }
+ function isOpaqueHydratingObject(value) {
+ return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;
+ }
+ function makeOpaqueHydratingObject(attemptToReadValue) {
+ return {
+ $$typeof: REACT_OPAQUE_ID_TYPE,
+ toString: attemptToReadValue,
+ valueOf: attemptToReadValue
+ };
+ }
+ function preparePortalMount(portalInstance) {
+ {
+ listenToAllSupportedEvents(portalInstance);
+ }
+ }
var randomKey = Math.random().toString(36).slice(2);
- var internalInstanceKey = '__reactInternalInstance$' + randomKey;
- var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
- var internalContainerInstanceKey = '__reactContainere$' + randomKey;
+ var internalInstanceKey = '__reactFiber$' + randomKey;
+ var internalPropsKey = '__reactProps$' + randomKey;
+ var internalContainerInstanceKey = '__reactContainer$' + randomKey;
+ var internalEventHandlersKey = '__reactEvents$' + randomKey;
function precacheFiberNode(hostInst, node) {
node[internalInstanceKey] = hostInst;
}
@@ -8041,7 +10687,7 @@
* instance, or null if the node was not rendered by this React.
*/
- function getInstanceFromNode$1(node) {
+ function getInstanceFromNode(node) {
var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
if (inst) {
@@ -8059,7 +10705,7 @@
* DOM node.
*/
- function getNodeFromInstance$1(inst) {
+ function getNodeFromInstance(inst) {
if (inst.tag === HostComponent || inst.tag === HostText) {
// In Fiber this, is just the state node right now. We assume it will be
// a host component or host text.
@@ -8074,2670 +10720,82 @@
}
}
}
- function getFiberCurrentPropsFromNode$1(node) {
- return node[internalEventHandlersKey] || null;
+ function getFiberCurrentPropsFromNode(node) {
+ return node[internalPropsKey] || null;
}
function updateFiberProps(node, props) {
- node[internalEventHandlersKey] = props;
+ node[internalPropsKey] = props;
}
+ function getEventListenerSet(node) {
+ var elementListenerSet = node[internalEventHandlersKey];
- function getParent(inst) {
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
-
- if (inst) {
- return inst;
+ if (elementListenerSet === undefined) {
+ elementListenerSet = node[internalEventHandlersKey] = new Set();
}
- return null;
+ return elementListenerSet;
}
- /**
- * Return the lowest common ancestor of A and B, or null if they are in
- * different trees.
- */
-
-
- function getLowestCommonAncestor(instA, instB) {
- var depthA = 0;
-
- for (var tempA = instA; tempA; tempA = getParent(tempA)) {
- depthA++;
- }
-
- var depthB = 0;
-
- for (var tempB = instB; tempB; tempB = getParent(tempB)) {
- depthB++;
- } // If A is deeper, crawl up.
-
-
- while (depthA - depthB > 0) {
- instA = getParent(instA);
- depthA--;
- } // If B is deeper, crawl up.
-
-
- while (depthB - depthA > 0) {
- instB = getParent(instB);
- depthB--;
- } // Walk in lockstep until we find a match.
-
-
- var depth = depthA;
-
- while (depth--) {
- if (instA === instB || instA === instB.alternate) {
- return instA;
- }
-
- instA = getParent(instA);
- instB = getParent(instB);
- }
-
- return null;
- }
- /**
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
- */
-
- function traverseTwoPhase(inst, fn, arg) {
- var path = [];
-
- while (inst) {
- path.push(inst);
- inst = getParent(inst);
- }
-
- var i;
-
- for (i = path.length; i-- > 0;) {
- fn(path[i], 'captured', arg);
- }
-
- for (i = 0; i < path.length; i++) {
- fn(path[i], 'bubbled', arg);
- }
- }
- /**
- * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
- * should would receive a `mouseEnter` or `mouseLeave` event.
- *
- * Does not invoke the callback on the nearest common ancestor because nothing
- * "entered" or "left" that element.
- */
-
- function traverseEnterLeave(from, to, fn, argFrom, argTo) {
- var common = from && to ? getLowestCommonAncestor(from, to) : null;
- var pathFrom = [];
-
- while (true) {
- if (!from) {
- break;
- }
-
- if (from === common) {
- break;
- }
-
- var alternate = from.alternate;
-
- if (alternate !== null && alternate === common) {
- break;
- }
-
- pathFrom.push(from);
- from = getParent(from);
- }
-
- var pathTo = [];
-
- while (true) {
- if (!to) {
- break;
- }
-
- if (to === common) {
- break;
- }
-
- var _alternate = to.alternate;
-
- if (_alternate !== null && _alternate === common) {
- break;
- }
-
- pathTo.push(to);
- to = getParent(to);
- }
-
- for (var i = 0; i < pathFrom.length; i++) {
- fn(pathFrom[i], 'bubbled', argFrom);
- }
-
- for (var _i = pathTo.length; _i-- > 0;) {
- fn(pathTo[_i], 'captured', argTo);
- }
- }
-
- function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
- }
-
- function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
-
- default:
- return false;
- }
- }
- /**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
-
-
- function getListener(inst, registrationName) {
- var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
- // live here; needs to be moved to a better place soon
-
- var stateNode = inst.stateNode;
-
- if (!stateNode) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
-
- var props = getFiberCurrentPropsFromNode(stateNode);
-
- if (!props) {
- // Work in progress.
- return null;
- }
-
- listener = props[registrationName];
-
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
-
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
-
- return listener;
- }
-
- /**
- * Some event types have a notion of different registration names for different
- * "phases" of propagation. This finds listeners by a given phase.
- */
- function listenerAtPhase(inst, event, propagationPhase) {
- var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
- return getListener(inst, registrationName);
- }
- /**
- * A small set of propagation patterns, each of which will accept a small amount
- * of information, and generate a set of "dispatch ready event objects" - which
- * are sets of events that have already been annotated with a set of dispatched
- * listener functions/ids. The API is designed this way to discourage these
- * propagation strategies from actually executing the dispatches, since we
- * always want to collect the entire set of dispatches before executing even a
- * single one.
- */
-
- /**
- * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
- * here, allows us to not have to bind or create functions for each event.
- * Mutating the event's members allows us to not have to create a wrapping
- * "dispatch" object that pairs the event with the listener.
- */
-
-
- function accumulateDirectionalDispatches(inst, phase, event) {
- {
- if (!inst) {
- error('Dispatching inst must not be null');
- }
- }
-
- var listener = listenerAtPhase(inst, event, phase);
-
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
- }
- /**
- * Collect dispatches (must be entirely collected before dispatching - see unit
- * tests). Lazily allocate the array to conserve memory. We must loop through
- * each event and perform the traversal for each one. We cannot perform a
- * single traversal for the entire collection of events because each event may
- * have a different target.
- */
-
-
- function accumulateTwoPhaseDispatchesSingle(event) {
- if (event && event.dispatchConfig.phasedRegistrationNames) {
- traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
- }
- }
- /**
- * Accumulates without regard to direction, does not look for phased
- * registration names. Same as `accumulateDirectDispatchesSingle` but without
- * requiring that the `dispatchMarker` be the same as the dispatched ID.
- */
-
-
- function accumulateDispatches(inst, ignoredDirection, event) {
- if (inst && event && event.dispatchConfig.registrationName) {
- var registrationName = event.dispatchConfig.registrationName;
- var listener = getListener(inst, registrationName);
-
- if (listener) {
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
- }
- }
- }
- /**
- * Accumulates dispatches on an `SyntheticEvent`, but only for the
- * `dispatchMarker`.
- * @param {SyntheticEvent} event
- */
-
-
- function accumulateDirectDispatchesSingle(event) {
- if (event && event.dispatchConfig.registrationName) {
- accumulateDispatches(event._targetInst, null, event);
- }
- }
-
- function accumulateTwoPhaseDispatches(events) {
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
- }
- function accumulateEnterLeaveDispatches(leave, enter, from, to) {
- traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
- }
- function accumulateDirectDispatches(events) {
- forEachAccumulated(events, accumulateDirectDispatchesSingle);
- }
-
- /**
- * These variables store information about text content of a target node,
- * allowing comparison of content before and after a given event.
- *
- * Identify the node where selection currently begins, then observe
- * both its text content and its current position in the DOM. Since the
- * browser may natively replace the target node during composition, we can
- * use its position to find its replacement.
- *
- *
- */
- var root = null;
- var startText = null;
- var fallbackText = null;
- function initialize(nativeEventTarget) {
- root = nativeEventTarget;
- startText = getText();
- return true;
- }
- function reset() {
- root = null;
- startText = null;
- fallbackText = null;
- }
- function getData() {
- if (fallbackText) {
- return fallbackText;
- }
-
- var start;
- var startValue = startText;
- var startLength = startValue.length;
- var end;
- var endValue = getText();
- var endLength = endValue.length;
-
- for (start = 0; start < startLength; start++) {
- if (startValue[start] !== endValue[start]) {
- break;
- }
- }
-
- var minEnd = startLength - start;
-
- for (end = 1; end <= minEnd; end++) {
- if (startValue[startLength - end] !== endValue[endLength - end]) {
- break;
- }
- }
-
- var sliceTail = end > 1 ? 1 - end : undefined;
- fallbackText = endValue.slice(start, sliceTail);
- return fallbackText;
- }
- function getText() {
- if ('value' in root) {
- return root.value;
- }
-
- return root.textContent;
- }
-
- var EVENT_POOL_SIZE = 10;
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var EventInterface = {
- type: null,
- target: null,
- // currentTarget is set when dispatching; no use in copying it here
- currentTarget: function () {
- return null;
- },
- eventPhase: null,
- bubbles: null,
- cancelable: null,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: null,
- isTrusted: null
- };
-
- function functionThatReturnsTrue() {
- return true;
- }
-
- function functionThatReturnsFalse() {
- return false;
- }
- /**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- *
- * @param {object} dispatchConfig Configuration used to dispatch this event.
- * @param {*} targetInst Marker identifying the event target.
- * @param {object} nativeEvent Native browser event.
- * @param {DOMEventTarget} nativeEventTarget Target node.
- */
+ var loggedTypeFailures = {};
+ var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
- function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
+ function setCurrentlyValidatingElement(element) {
{
- // these have a getter/setter for warnings
- delete this.nativeEvent;
- delete this.preventDefault;
- delete this.stopPropagation;
- delete this.isDefaultPrevented;
- delete this.isPropagationStopped;
- }
-
- this.dispatchConfig = dispatchConfig;
- this._targetInst = targetInst;
- this.nativeEvent = nativeEvent;
- var Interface = this.constructor.Interface;
-
- for (var propName in Interface) {
- if (!Interface.hasOwnProperty(propName)) {
- continue;
- }
-
- {
- delete this[propName]; // this has a getter/setter for warnings
- }
-
- var normalize = Interface[propName];
-
- if (normalize) {
- this[propName] = normalize(nativeEvent);
+ if (element) {
+ var owner = element._owner;
+ var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
+ ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
- if (propName === 'target') {
- this.target = nativeEventTarget;
- } else {
- this[propName] = nativeEvent[propName];
- }
- }
- }
-
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
-
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
-
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
- }
-
- _assign(SyntheticEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.preventDefault) {
- event.preventDefault();
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
-
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.stopPropagation) {
- event.stopPropagation();
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
-
- this.isPropagationStopped = functionThatReturnsTrue;
- },
-
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {
- this.isPersistent = functionThatReturnsTrue;
- },
-
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsFalse,
-
- /**
- * `PooledClass` looks for `destructor` on each instance it releases.
- */
- destructor: function () {
- var Interface = this.constructor.Interface;
-
- for (var propName in Interface) {
- {
- Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
- }
- }
-
- this.dispatchConfig = null;
- this._targetInst = null;
- this.nativeEvent = null;
- this.isDefaultPrevented = functionThatReturnsFalse;
- this.isPropagationStopped = functionThatReturnsFalse;
- this._dispatchListeners = null;
- this._dispatchInstances = null;
-
- {
- Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
- Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
- Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
- Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
- Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
- }
- }
- });
-
- SyntheticEvent.Interface = EventInterface;
- /**
- * Helper to reduce boilerplate when creating subclasses.
- */
-
- SyntheticEvent.extend = function (Interface) {
- var Super = this;
-
- var E = function () {};
-
- E.prototype = Super.prototype;
- var prototype = new E();
-
- function Class() {
- return Super.apply(this, arguments);
- }
-
- _assign(prototype, Class.prototype);
-
- Class.prototype = prototype;
- Class.prototype.constructor = Class;
- Class.Interface = _assign({}, Super.Interface, Interface);
- Class.extend = Super.extend;
- addEventPoolingTo(Class);
- return Class;
- };
-
- addEventPoolingTo(SyntheticEvent);
- /**
- * Helper to nullify syntheticEvent instance properties when destructing
- *
- * @param {String} propName
- * @param {?object} getVal
- * @return {object} defineProperty object
- */
-
- function getPooledWarningPropertyDefinition(propName, getVal) {
- var isFunction = typeof getVal === 'function';
- return {
- configurable: true,
- set: set,
- get: get
- };
-
- function set(val) {
- var action = isFunction ? 'setting the method' : 'setting the property';
- warn(action, 'This is effectively a no-op');
- return val;
- }
-
- function get() {
- var action = isFunction ? 'accessing the method' : 'accessing the property';
- var result = isFunction ? 'This is a no-op function' : 'This is set to null';
- warn(action, result);
- return getVal;
- }
-
- function warn(action, result) {
- {
- error("This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
- }
- }
- }
-
- function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
- var EventConstructor = this;
-
- if (EventConstructor.eventPool.length) {
- var instance = EventConstructor.eventPool.pop();
- EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
- return instance;
- }
-
- return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
- }
-
- function releasePooledEvent(event) {
- var EventConstructor = this;
-
- if (!(event instanceof EventConstructor)) {
- {
- throw Error( "Trying to release an event instance into a pool of a different type." );
- }
- }
-
- event.destructor();
-
- if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
- EventConstructor.eventPool.push(event);
- }
- }
-
- function addEventPoolingTo(EventConstructor) {
- EventConstructor.eventPool = [];
- EventConstructor.getPooled = getPooledEvent;
- EventConstructor.release = releasePooledEvent;
- }
-
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
- */
-
- var SyntheticCompositionEvent = SyntheticEvent.extend({
- data: null
- });
-
- /**
- * @interface Event
- * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
- * /#events-inputevents
- */
-
- var SyntheticInputEvent = SyntheticEvent.extend({
- data: null
- });
-
- var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
-
- var START_KEYCODE = 229;
- var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
- var documentMode = null;
-
- if (canUseDOM && 'documentMode' in document) {
- documentMode = document.documentMode;
- } // Webkit offers a very useful `textInput` event that can be used to
- // directly represent `beforeInput`. The IE `textinput` event is not as
- // useful, so we don't use it.
-
-
- var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
- // by the native compositionend event may be incorrect. Japanese ideographic
- // spaces, for instance (\u3000) are not recorded correctly.
-
- var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
- var SPACEBAR_CODE = 32;
- var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names.
-
- var eventTypes = {
- beforeInput: {
- phasedRegistrationNames: {
- bubbled: 'onBeforeInput',
- captured: 'onBeforeInputCapture'
- },
- dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]
- },
- compositionEnd: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionEnd',
- captured: 'onCompositionEndCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- },
- compositionStart: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionStart',
- captured: 'onCompositionStartCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- },
- compositionUpdate: {
- phasedRegistrationNames: {
- bubbled: 'onCompositionUpdate',
- captured: 'onCompositionUpdateCapture'
- },
- dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
- }
- }; // Track whether we've ever handled a keypress on the space key.
-
- var hasSpaceKeypress = false;
- /**
- * Return whether a native keypress event is assumed to be a command.
- * This is required because Firefox fires `keypress` events for key commands
- * (cut, copy, select-all, etc.) even though no character is inserted.
- */
-
- function isKeypressCommand(nativeEvent) {
- return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
- !(nativeEvent.ctrlKey && nativeEvent.altKey);
- }
- /**
- * Translate native top level events into event types.
- *
- * @param {string} topLevelType
- * @return {object}
- */
-
-
- function getCompositionEventType(topLevelType) {
- switch (topLevelType) {
- case TOP_COMPOSITION_START:
- return eventTypes.compositionStart;
-
- case TOP_COMPOSITION_END:
- return eventTypes.compositionEnd;
-
- case TOP_COMPOSITION_UPDATE:
- return eventTypes.compositionUpdate;
- }
- }
- /**
- * Does our fallback best-guess model think this event signifies that
- * composition has begun?
- *
- * @param {string} topLevelType
- * @param {object} nativeEvent
- * @return {boolean}
- */
-
-
- function isFallbackCompositionStart(topLevelType, nativeEvent) {
- return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;
- }
- /**
- * Does our fallback mode think that this event is the end of composition?
- *
- * @param {string} topLevelType
- * @param {object} nativeEvent
- * @return {boolean}
- */
-
-
- function isFallbackCompositionEnd(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_KEY_UP:
- // Command keys insert or clear IME input.
- return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
-
- case TOP_KEY_DOWN:
- // Expect IME keyCode on each keydown. If we get any other
- // code we must have exited earlier.
- return nativeEvent.keyCode !== START_KEYCODE;
-
- case TOP_KEY_PRESS:
- case TOP_MOUSE_DOWN:
- case TOP_BLUR:
- // Events are not possible without cancelling IME.
- return true;
-
- default:
- return false;
- }
- }
- /**
- * Google Input Tools provides composition data via a CustomEvent,
- * with the `data` property populated in the `detail` object. If this
- * is available on the event object, use it. If not, this is a plain
- * composition event and we have nothing special to extract.
- *
- * @param {object} nativeEvent
- * @return {?string}
- */
-
-
- function getDataFromCustomEvent(nativeEvent) {
- var detail = nativeEvent.detail;
-
- if (typeof detail === 'object' && 'data' in detail) {
- return detail.data;
- }
-
- return null;
- }
- /**
- * Check if a composition event was triggered by Korean IME.
- * Our fallback mode does not work well with IE's Korean IME,
- * so just use native composition events when Korean IME is used.
- * Although CompositionEvent.locale property is deprecated,
- * it is available in IE, where our fallback mode is enabled.
- *
- * @param {object} nativeEvent
- * @return {boolean}
- */
-
-
- function isUsingKoreanIME(nativeEvent) {
- return nativeEvent.locale === 'ko';
- } // Track the current IME composition status, if any.
-
-
- var isComposing = false;
- /**
- * @return {?object} A SyntheticCompositionEvent.
- */
-
- function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
- var eventType;
- var fallbackData;
-
- if (canUseCompositionEvent) {
- eventType = getCompositionEventType(topLevelType);
- } else if (!isComposing) {
- if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
- eventType = eventTypes.compositionStart;
- }
- } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
- eventType = eventTypes.compositionEnd;
- }
-
- if (!eventType) {
- return null;
- }
-
- if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
- // The current composition is stored statically and must not be
- // overwritten while composition continues.
- if (!isComposing && eventType === eventTypes.compositionStart) {
- isComposing = initialize(nativeEventTarget);
- } else if (eventType === eventTypes.compositionEnd) {
- if (isComposing) {
- fallbackData = getData();
- }
- }
- }
-
- var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
-
- if (fallbackData) {
- // Inject data generated from fallback path into the synthetic event.
- // This matches the property of native CompositionEventInterface.
- event.data = fallbackData;
- } else {
- var customData = getDataFromCustomEvent(nativeEvent);
-
- if (customData !== null) {
- event.data = customData;
- }
- }
-
- accumulateTwoPhaseDispatches(event);
- return event;
- }
- /**
- * @param {TopLevelType} topLevelType Number from `TopLevelType`.
- * @param {object} nativeEvent Native browser event.
- * @return {?string} The string corresponding to this `beforeInput` event.
- */
-
-
- function getNativeBeforeInputChars(topLevelType, nativeEvent) {
- switch (topLevelType) {
- case TOP_COMPOSITION_END:
- return getDataFromCustomEvent(nativeEvent);
-
- case TOP_KEY_PRESS:
- /**
- * If native `textInput` events are available, our goal is to make
- * use of them. However, there is a special case: the spacebar key.
- * In Webkit, preventing default on a spacebar `textInput` event
- * cancels character insertion, but it *also* causes the browser
- * to fall back to its default spacebar behavior of scrolling the
- * page.
- *
- * Tracking at:
- * https://code.google.com/p/chromium/issues/detail?id=355103
- *
- * To avoid this issue, use the keypress event as if no `textInput`
- * event is available.
- */
- var which = nativeEvent.which;
-
- if (which !== SPACEBAR_CODE) {
- return null;
- }
-
- hasSpaceKeypress = true;
- return SPACEBAR_CHAR;
-
- case TOP_TEXT_INPUT:
- // Record the characters to be added to the DOM.
- var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
- // it at the keypress level and bail immediately. Android Chrome
- // doesn't give us keycodes, so we need to ignore it.
-
- if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
- return null;
- }
-
- return chars;
-
- default:
- // For other native event types, do nothing.
- return null;
- }
- }
- /**
- * For browsers that do not provide the `textInput` event, extract the
- * appropriate string to use for SyntheticInputEvent.
- *
- * @param {number} topLevelType Number from `TopLevelEventTypes`.
- * @param {object} nativeEvent Native browser event.
- * @return {?string} The fallback string for this `beforeInput` event.
- */
-
-
- function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
- // If we are currently composing (IME) and using a fallback to do so,
- // try to extract the composed characters from the fallback object.
- // If composition event is available, we extract a string only at
- // compositionevent, otherwise extract it at fallback events.
- if (isComposing) {
- if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
- var chars = getData();
- reset();
- isComposing = false;
- return chars;
- }
-
- return null;
- }
-
- switch (topLevelType) {
- case TOP_PASTE:
- // If a paste event occurs after a keypress, throw out the input
- // chars. Paste events should not lead to BeforeInput events.
- return null;
-
- case TOP_KEY_PRESS:
- /**
- * As of v27, Firefox may fire keypress events even when no character
- * will be inserted. A few possibilities:
- *
- * - `which` is `0`. Arrow keys, Esc key, etc.
- *
- * - `which` is the pressed key code, but no char is available.
- * Ex: 'AltGr + d` in Polish. There is no modified character for
- * this key combination and no character is inserted into the
- * document, but FF fires the keypress for char code `100` anyway.
- * No `input` event will occur.
- *
- * - `which` is the pressed key code, but a command combination is
- * being used. Ex: `Cmd+C`. No character is inserted, and no
- * `input` event will occur.
- */
- if (!isKeypressCommand(nativeEvent)) {
- // IE fires the `keypress` event when a user types an emoji via
- // Touch keyboard of Windows. In such a case, the `char` property
- // holds an emoji character like `\uD83D\uDE0A`. Because its length
- // is 2, the property `which` does not represent an emoji correctly.
- // In such a case, we directly return the `char` property instead of
- // using `which`.
- if (nativeEvent.char && nativeEvent.char.length > 1) {
- return nativeEvent.char;
- } else if (nativeEvent.which) {
- return String.fromCharCode(nativeEvent.which);
- }
- }
-
- return null;
-
- case TOP_COMPOSITION_END:
- return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
-
- default:
- return null;
- }
- }
- /**
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
- * `textInput` or fallback behavior.
- *
- * @return {?object} A SyntheticInputEvent.
- */
-
-
- function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
- var chars;
-
- if (canUseTextInputEvent) {
- chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
- } else {
- chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
- } // If no characters are being inserted, no BeforeInput event should
- // be fired.
-
-
- if (!chars) {
- return null;
- }
-
- var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
- event.data = chars;
- accumulateTwoPhaseDispatches(event);
- return event;
- }
- /**
- * Create an `onBeforeInput` event to match
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
- *
- * This event plugin is based on the native `textInput` event
- * available in Chrome, Safari, Opera, and IE. This event fires after
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
- *
- * `beforeInput` is spec'd but not implemented in any browsers, and
- * the `input` event does not provide any useful information about what has
- * actually been added, contrary to the spec. Thus, `textInput` is the best
- * available event to identify the characters that have actually been inserted
- * into the target node.
- *
- * This plugin is also responsible for emitting `composition` events, thus
- * allowing us to share composition fallback code for both `beforeInput` and
- * `composition` event types.
- */
-
-
- var BeforeInputEventPlugin = {
- eventTypes: eventTypes,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
- var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
-
- if (composition === null) {
- return beforeInput;
+ ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
-
- if (beforeInput === null) {
- return composition;
- }
-
- return [composition, beforeInput];
}
- };
-
- /**
- * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
- */
- var supportedInputTypes = {
- color: true,
- date: true,
- datetime: true,
- 'datetime-local': true,
- email: true,
- month: true,
- number: true,
- password: true,
- range: true,
- search: true,
- tel: true,
- text: true,
- time: true,
- url: true,
- week: true
- };
-
- function isTextInputElement(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
-
- if (nodeName === 'input') {
- return !!supportedInputTypes[elem.type];
- }
-
- if (nodeName === 'textarea') {
- return true;
- }
-
- return false;
- }
-
- var eventTypes$1 = {
- change: {
- phasedRegistrationNames: {
- bubbled: 'onChange',
- captured: 'onChangeCapture'
- },
- dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]
- }
- };
-
- function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
- var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
- event.type = 'change'; // Flag this event loop as needing state restore.
-
- enqueueStateRestore(target);
- accumulateTwoPhaseDispatches(event);
- return event;
- }
- /**
- * For IE shims
- */
-
-
- var activeElement = null;
- var activeElementInst = null;
- /**
- * SECTION: handle `change` event
- */
-
- function shouldUseChangeEvent(elem) {
- var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
- }
-
- function manualDispatchChangeEvent(nativeEvent) {
- var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
- // other events and have it go through ReactBrowserEventEmitter. Since it
- // doesn't, we manually listen for the events and so we have to enqueue and
- // process the abstract event manually.
- //
- // Batching is necessary here in order to ensure that all event handlers run
- // before the next rerender (including event handlers attached to ancestor
- // elements instead of directly on the input). Without this, controlled
- // components don't work properly in conjunction with event bubbling because
- // the component is rerendered and the value reverted before all the event
- // handlers can run. See https://github.com/facebook/react/issues/708.
-
- batchedUpdates(runEventInBatch, event);
- }
-
- function runEventInBatch(event) {
- runEventsInBatch(event);
}
- function getInstIfValueChanged(targetInst) {
- var targetNode = getNodeFromInstance$1(targetInst);
-
- if (updateValueIfChanged(targetNode)) {
- return targetInst;
- }
- }
-
- function getTargetInstForChangeEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_CHANGE) {
- return targetInst;
- }
- }
- /**
- * SECTION: handle `input` event
- */
-
-
- var isInputEventSupported = false;
-
- if (canUseDOM) {
- // IE9 claims to support the input event but fails to trigger it when
- // deleting text, so we ignore its input events.
- isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
- }
- /**
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
- * and override the value property so that we can distinguish user events from
- * value changes in JS.
- */
-
-
- function startWatchingForValueChange(target, targetInst) {
- activeElement = target;
- activeElementInst = targetInst;
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
- }
- /**
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
- * if any exists.
- */
-
-
- function stopWatchingForValueChange() {
- if (!activeElement) {
- return;
- }
-
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
- activeElement = null;
- activeElementInst = null;
- }
- /**
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
- * the value of the active element has changed.
- */
-
-
- function handlePropertyChange(nativeEvent) {
- if (nativeEvent.propertyName !== 'value') {
- return;
- }
-
- if (getInstIfValueChanged(activeElementInst)) {
- manualDispatchChangeEvent(nativeEvent);
- }
- }
-
- function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
- if (topLevelType === TOP_FOCUS) {
- // In IE9, propertychange fires for most input events but is buggy and
- // doesn't fire when text is deleted, but conveniently, selectionchange
- // appears to fire in all of the remaining cases so we catch those and
- // forward the event if the value has changed
- // In either case, we don't want to call the event handler if the value
- // is changed from JS so we redefine a setter for `.value` that updates
- // our activeElementValue variable, allowing us to ignore those changes
- //
- // stopWatching() should be a noop here but we call it just in case we
- // missed a blur event somehow.
- stopWatchingForValueChange();
- startWatchingForValueChange(target, targetInst);
- } else if (topLevelType === TOP_BLUR) {
- stopWatchingForValueChange();
- }
- } // For IE8 and IE9.
-
-
- function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
- if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {
- // On the selectionchange event, the target is just document which isn't
- // helpful for us so just check activeElement instead.
- //
- // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
- // propertychange on the first input event after setting `value` from a
- // script and fires only keydown, keypress, keyup. Catching keyup usually
- // gets it and catching keydown lets us fire an event for the first
- // keystroke if user does a key repeat (it'll be a little delayed: right
- // before the second keystroke). Other input methods (e.g., paste) seem to
- // fire selectionchange normally.
- return getInstIfValueChanged(activeElementInst);
- }
- }
- /**
- * SECTION: handle `click` event
- */
-
-
- function shouldUseClickEvent(elem) {
- // Use the `click` event to detect changes to checkbox and radio inputs.
- // This approach works across all browsers, whereas `change` does not fire
- // until `blur` in IE8.
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
- }
-
- function getTargetInstForClickEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_CLICK) {
- return getInstIfValueChanged(targetInst);
- }
- }
-
- function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
- if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {
- return getInstIfValueChanged(targetInst);
- }
- }
-
- function handleControlledInputBlur(node) {
- var state = node._wrapperState;
-
- if (!state || !state.controlled || node.type !== 'number') {
- return;
- }
-
+ function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
- // If controlled, assign the value attribute to the current value on blur
- setDefaultValue(node, 'number', node.value);
- }
- }
- /**
- * This plugin creates an `onChange` event that normalizes change events
- * across form elements. This event fires at a time when it's possible to
- * change the element's value without seeing a flicker.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - select
- */
-
-
- var ChangeEventPlugin = {
- eventTypes: eventTypes$1,
- _isInputEventSupported: isInputEventSupported,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
- var getTargetInstFunc, handleEventFunc;
-
- if (shouldUseChangeEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForChangeEvent;
- } else if (isTextInputElement(targetNode)) {
- if (isInputEventSupported) {
- getTargetInstFunc = getTargetInstForInputOrChangeEvent;
- } else {
- getTargetInstFunc = getTargetInstForInputEventPolyfill;
- handleEventFunc = handleEventsForInputEventPolyfill;
- }
- } else if (shouldUseClickEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForClickEvent;
- }
-
- if (getTargetInstFunc) {
- var inst = getTargetInstFunc(topLevelType, targetInst);
-
- if (inst) {
- var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
- return event;
- }
- }
-
- if (handleEventFunc) {
- handleEventFunc(topLevelType, targetNode, targetInst);
- } // When blurring, set the value attribute for number inputs
-
-
- if (topLevelType === TOP_BLUR) {
- handleControlledInputBlur(targetNode);
- }
- }
- };
-
- var SyntheticUIEvent = SyntheticEvent.extend({
- view: null,
- detail: null
- });
-
- /**
- * Translation from modifier key to the associated property in the event.
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
- */
- var modifierKeyToProp = {
- Alt: 'altKey',
- Control: 'ctrlKey',
- Meta: 'metaKey',
- Shift: 'shiftKey'
- }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
- // getModifierState. If getModifierState is not supported, we map it to a set of
- // modifier keys exposed by the event. In this case, Lock-keys are not supported.
-
- function modifierStateGetter(keyArg) {
- var syntheticEvent = this;
- var nativeEvent = syntheticEvent.nativeEvent;
-
- if (nativeEvent.getModifierState) {
- return nativeEvent.getModifierState(keyArg);
- }
-
- var keyProp = modifierKeyToProp[keyArg];
- return keyProp ? !!nativeEvent[keyProp] : false;
- }
-
- function getEventModifierState(nativeEvent) {
- return modifierStateGetter;
- }
-
- var previousScreenX = 0;
- var previousScreenY = 0; // Use flags to signal movementX/Y has already been set
-
- var isMovementXSet = false;
- var isMovementYSet = false;
- /**
- * @interface MouseEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var SyntheticMouseEvent = SyntheticUIEvent.extend({
- screenX: null,
- screenY: null,
- clientX: null,
- clientY: null,
- pageX: null,
- pageY: null,
- ctrlKey: null,
- shiftKey: null,
- altKey: null,
- metaKey: null,
- getModifierState: getEventModifierState,
- button: null,
- buttons: null,
- relatedTarget: function (event) {
- return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
- },
- movementX: function (event) {
- if ('movementX' in event) {
- return event.movementX;
- }
-
- var screenX = previousScreenX;
- previousScreenX = event.screenX;
-
- if (!isMovementXSet) {
- isMovementXSet = true;
- return 0;
- }
-
- return event.type === 'mousemove' ? event.screenX - screenX : 0;
- },
- movementY: function (event) {
- if ('movementY' in event) {
- return event.movementY;
- }
-
- var screenY = previousScreenY;
- previousScreenY = event.screenY;
-
- if (!isMovementYSet) {
- isMovementYSet = true;
- return 0;
- }
-
- return event.type === 'mousemove' ? event.screenY - screenY : 0;
- }
- });
-
- /**
- * @interface PointerEvent
- * @see http://www.w3.org/TR/pointerevents/
- */
+ // $FlowFixMe This is okay but Flow doesn't know it.
+ var has = Function.call.bind(Object.prototype.hasOwnProperty);
- var SyntheticPointerEvent = SyntheticMouseEvent.extend({
- pointerId: null,
- width: null,
- height: null,
- pressure: null,
- tangentialPressure: null,
- tiltX: null,
- tiltY: null,
- twist: null,
- pointerType: null,
- isPrimary: null
- });
-
- var eventTypes$2 = {
- mouseEnter: {
- registrationName: 'onMouseEnter',
- dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
- },
- mouseLeave: {
- registrationName: 'onMouseLeave',
- dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
- },
- pointerEnter: {
- registrationName: 'onPointerEnter',
- dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
- },
- pointerLeave: {
- registrationName: 'onPointerLeave',
- dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
- }
- };
- var EnterLeaveEventPlugin = {
- eventTypes: eventTypes$2,
-
- /**
- * For almost every interaction we care about, there will be both a top-level
- * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
- * we do not extract duplicate events. However, moving the mouse into the
- * browser from outside will not fire a `mouseout` event. In this case, we use
- * the `mouseover` top-level event.
- */
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
- var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;
-
- if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0 && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
- // If this is an over event with a target, then we've already dispatched
- // the event in the out event of the other target. If this is replayed,
- // then it's because we couldn't dispatch against this target previously
- // so we have to do it now instead.
- return null;
- }
-
- if (!isOutEvent && !isOverEvent) {
- // Must not be a mouse or pointer in or out - ignoring.
- return null;
- }
-
- var win;
-
- if (nativeEventTarget.window === nativeEventTarget) {
- // `nativeEventTarget` is probably a window object.
- win = nativeEventTarget;
- } else {
- // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
- var doc = nativeEventTarget.ownerDocument;
-
- if (doc) {
- win = doc.defaultView || doc.parentWindow;
- } else {
- win = window;
- }
- }
-
- var from;
- var to;
-
- if (isOutEvent) {
- from = targetInst;
- var related = nativeEvent.relatedTarget || nativeEvent.toElement;
- to = related ? getClosestInstanceFromNode(related) : null;
-
- if (to !== null) {
- var nearestMounted = getNearestMountedFiber(to);
-
- if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
- to = null;
- }
- }
- } else {
- // Moving to a node from outside the window.
- from = null;
- to = targetInst;
- }
-
- if (from === to) {
- // Nothing pertains to our managed components.
- return null;
- }
-
- var eventInterface, leaveEventType, enterEventType, eventTypePrefix;
-
- if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {
- eventInterface = SyntheticMouseEvent;
- leaveEventType = eventTypes$2.mouseLeave;
- enterEventType = eventTypes$2.mouseEnter;
- eventTypePrefix = 'mouse';
- } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {
- eventInterface = SyntheticPointerEvent;
- leaveEventType = eventTypes$2.pointerLeave;
- enterEventType = eventTypes$2.pointerEnter;
- eventTypePrefix = 'pointer';
- }
-
- var fromNode = from == null ? win : getNodeFromInstance$1(from);
- var toNode = to == null ? win : getNodeFromInstance$1(to);
- var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);
- leave.type = eventTypePrefix + 'leave';
- leave.target = fromNode;
- leave.relatedTarget = toNode;
- var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);
- enter.type = eventTypePrefix + 'enter';
- enter.target = toNode;
- enter.relatedTarget = fromNode;
- accumulateEnterLeaveDispatches(leave, enter, from, to); // If we are not processing the first ancestor, then we
- // should not process the same nativeEvent again, as we
- // will have already processed it in the first ancestor.
-
- if ((eventSystemFlags & IS_FIRST_ANCESTOR) === 0) {
- return [leave];
- }
-
- return [leave, enter];
- }
- };
-
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
- ;
- }
-
- var objectIs = typeof Object.is === 'function' ? Object.is : is;
-
- var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
- /**
- * Performs equality by iterating through keys on an object and returning false
- * when any key has values which are not strictly equal between the arguments.
- * Returns true when the values of all keys are strictly equal.
- */
-
- function shallowEqual(objA, objB) {
- if (objectIs(objA, objB)) {
- return true;
- }
-
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
-
- var keysA = Object.keys(objA);
- var keysB = Object.keys(objB);
-
- if (keysA.length !== keysB.length) {
- return false;
- } // Test for A's keys different from B.
-
-
- for (var i = 0; i < keysA.length; i++) {
- if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
- return false;
- }
- }
-
- return true;
- }
-
- var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
- var eventTypes$3 = {
- select: {
- phasedRegistrationNames: {
- bubbled: 'onSelect',
- captured: 'onSelectCapture'
- },
- dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
- }
- };
- var activeElement$1 = null;
- var activeElementInst$1 = null;
- var lastSelection = null;
- var mouseDown = false;
- /**
- * Get an object which is a unique representation of the current selection.
- *
- * The return value will not be consistent across nodes or browsers, but
- * two identical selections on the same node will return identical objects.
- *
- * @param {DOMElement} node
- * @return {object}
- */
-
- function getSelection$1(node) {
- if ('selectionStart' in node && hasSelectionCapabilities(node)) {
- return {
- start: node.selectionStart,
- end: node.selectionEnd
- };
- } else {
- var win = node.ownerDocument && node.ownerDocument.defaultView || window;
- var selection = win.getSelection();
- return {
- anchorNode: selection.anchorNode,
- anchorOffset: selection.anchorOffset,
- focusNode: selection.focusNode,
- focusOffset: selection.focusOffset
- };
- }
- }
- /**
- * Get document associated with the event target.
- *
- * @param {object} nativeEventTarget
- * @return {Document}
- */
-
-
- function getEventTargetDocument(eventTarget) {
- return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
- }
- /**
- * Poll selection to see whether it's changed.
- *
- * @param {object} nativeEvent
- * @param {object} nativeEventTarget
- * @return {?SyntheticEvent}
- */
-
-
- function constructSelectEvent(nativeEvent, nativeEventTarget) {
- // Ensure we have the right element, and that the user is not dragging a
- // selection (this matches native `select` event behavior). In HTML5, select
- // fires only on input and textarea thus if there's no focused element we
- // won't dispatch.
- var doc = getEventTargetDocument(nativeEventTarget);
-
- if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
- return null;
- } // Only fire when selection has actually changed.
-
-
- var currentSelection = getSelection$1(activeElement$1);
-
- if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
- lastSelection = currentSelection;
- var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
- syntheticEvent.type = 'select';
- syntheticEvent.target = activeElement$1;
- accumulateTwoPhaseDispatches(syntheticEvent);
- return syntheticEvent;
- }
-
- return null;
- }
- /**
- * This plugin creates an `onSelect` event that normalizes select events
- * across form elements.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - contentEditable
- *
- * This differs from native browser implementations in the following ways:
- * - Fires on contentEditable fields as well as inputs.
- * - Fires for collapsed selection.
- * - Fires after user input.
- */
-
-
- var SelectEventPlugin = {
- eventTypes: eventTypes$3,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, container) {
- var containerOrDoc = container || getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do
- // not extract events. See #3639.
-
- if (!containerOrDoc || !isListeningToAllDependencies('onSelect', containerOrDoc)) {
- return null;
- }
+ 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.
- var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
+ 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') {
+ 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;
+ }
- switch (topLevelType) {
- // Track the input node that has focus.
- case TOP_FOCUS:
- if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
- activeElement$1 = targetNode;
- activeElementInst$1 = targetInst;
- lastSelection = null;
+ error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
+ } catch (ex) {
+ error$1 = ex;
}
- break;
+ if (error$1 && !(error$1 instanceof Error)) {
+ setCurrentlyValidatingElement(element);
- case TOP_BLUR:
- activeElement$1 = null;
- activeElementInst$1 = null;
- lastSelection = null;
- break;
- // Don't fire the event while the user is dragging. This matches the
- // semantics of the native select event.
+ 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);
- case TOP_MOUSE_DOWN:
- mouseDown = true;
- break;
-
- case TOP_CONTEXT_MENU:
- case TOP_MOUSE_UP:
- case TOP_DRAG_END:
- mouseDown = false;
- return constructSelectEvent(nativeEvent, nativeEventTarget);
- // Chrome and IE fire non-standard event when selection is changed (and
- // sometimes when it hasn't). IE's event fires out of order with respect
- // to key and input events on deletion, so we discard it.
- //
- // Firefox doesn't support selectionchange, so check selection status
- // after each key entry. The selection changes after keydown and before
- // keyup, but we check on keydown as well in the case of holding down a
- // key, when multiple keydown events are fired but only one keyup is.
- // This is also our approach for IE handling, for the reason above.
-
- case TOP_SELECTION_CHANGE:
- if (skipSelectionChangeEvent) {
- break;
+ setCurrentlyValidatingElement(null);
}
- // falls through
-
- case TOP_KEY_DOWN:
- case TOP_KEY_UP:
- return constructSelectEvent(nativeEvent, nativeEventTarget);
- }
-
- return null;
- }
- };
-
- /**
- * @interface Event
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
- */
-
- var SyntheticAnimationEvent = SyntheticEvent.extend({
- animationName: null,
- elapsedTime: null,
- pseudoElement: null
- });
-
- /**
- * @interface Event
- * @see http://www.w3.org/TR/clipboard-apis/
- */
-
- var SyntheticClipboardEvent = SyntheticEvent.extend({
- clipboardData: function (event) {
- return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
- }
- });
-
- /**
- * @interface FocusEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var SyntheticFocusEvent = SyntheticUIEvent.extend({
- relatedTarget: null
- });
-
- /**
- * `charCode` represents the actual "character code" and is safe to use with
- * `String.fromCharCode`. As such, only keys that correspond to printable
- * characters produce a valid `charCode`, the only exception to this is Enter.
- * The Tab-key is considered non-printable and does not have a `charCode`,
- * presumably because it does not produce a tab-character in browsers.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {number} Normalized `charCode` property.
- */
- function getEventCharCode(nativeEvent) {
- var charCode;
- var keyCode = nativeEvent.keyCode;
-
- if ('charCode' in nativeEvent) {
- charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
-
- if (charCode === 0 && keyCode === 13) {
- charCode = 13;
- }
- } else {
- // IE8 does not implement `charCode`, but `keyCode` has the correct value.
- charCode = keyCode;
- } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
- // report Enter as charCode 10 when ctrl is pressed.
-
-
- if (charCode === 10) {
- charCode = 13;
- } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
- // Must not discard the (non-)printable Enter-key.
-
-
- if (charCode >= 32 || charCode === 13) {
- return charCode;
- }
-
- return 0;
- }
-
- /**
- * Normalization of deprecated HTML5 `key` values
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
- var normalizeKey = {
- Esc: 'Escape',
- Spacebar: ' ',
- Left: 'ArrowLeft',
- Up: 'ArrowUp',
- Right: 'ArrowRight',
- Down: 'ArrowDown',
- Del: 'Delete',
- Win: 'OS',
- Menu: 'ContextMenu',
- Apps: 'ContextMenu',
- Scroll: 'ScrollLock',
- MozPrintableKey: 'Unidentified'
- };
- /**
- * Translation from legacy `keyCode` to HTML5 `key`
- * Only special keys supported, all others depend on keyboard layout or browser
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
- var translateToKey = {
- '8': 'Backspace',
- '9': 'Tab',
- '12': 'Clear',
- '13': 'Enter',
- '16': 'Shift',
- '17': 'Control',
- '18': 'Alt',
- '19': 'Pause',
- '20': 'CapsLock',
- '27': 'Escape',
- '32': ' ',
- '33': 'PageUp',
- '34': 'PageDown',
- '35': 'End',
- '36': 'Home',
- '37': 'ArrowLeft',
- '38': 'ArrowUp',
- '39': 'ArrowRight',
- '40': 'ArrowDown',
- '45': 'Insert',
- '46': 'Delete',
- '112': 'F1',
- '113': 'F2',
- '114': 'F3',
- '115': 'F4',
- '116': 'F5',
- '117': 'F6',
- '118': 'F7',
- '119': 'F8',
- '120': 'F9',
- '121': 'F10',
- '122': 'F11',
- '123': 'F12',
- '144': 'NumLock',
- '145': 'ScrollLock',
- '224': 'Meta'
- };
- /**
- * @param {object} nativeEvent Native browser event.
- * @return {string} Normalized `key` property.
- */
-
- function getEventKey(nativeEvent) {
- if (nativeEvent.key) {
- // Normalize inconsistent values reported by browsers due to
- // implementations of a working draft specification.
- // FireFox implements `key` but returns `MozPrintableKey` for all
- // printable characters (normalized to `Unidentified`), ignore it.
- var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
-
- if (key !== 'Unidentified') {
- return key;
- }
- } // Browser does not implement `key`, polyfill as much of it as we can.
-
-
- if (nativeEvent.type === 'keypress') {
- var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
- // thus be captured by `keypress`, no other non-printable key should.
-
- return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
- }
-
- if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
- // While user keyboard layout determines the actual meaning of each
- // `keyCode` value, almost all function keys have a universal value.
- return translateToKey[nativeEvent.keyCode] || 'Unidentified';
- }
-
- return '';
- }
-
- /**
- * @interface KeyboardEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var SyntheticKeyboardEvent = SyntheticUIEvent.extend({
- key: getEventKey,
- location: null,
- ctrlKey: null,
- shiftKey: null,
- altKey: null,
- metaKey: null,
- repeat: null,
- locale: null,
- getModifierState: getEventModifierState,
- // Legacy Interface
- charCode: function (event) {
- // `charCode` is the result of a KeyPress event and represents the value of
- // the actual printable character.
- // KeyPress is deprecated, but its replacement is not yet final and not
- // implemented in any major browser. Only KeyPress has charCode.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- return 0;
- },
- keyCode: function (event) {
- // `keyCode` is the result of a KeyDown/Up event and represents the value of
- // physical keyboard key.
- // The actual meaning of the value depends on the users' keyboard layout
- // which cannot be detected. Assuming that it is a US keyboard layout
- // provides a surprisingly accurate mapping for US and European users.
- // Due to this, it is left to the user to implement at this time.
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- },
- which: function (event) {
- // `which` is an alias for either `keyCode` or `charCode` depending on the
- // type of the event.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- }
- });
-
- /**
- * @interface DragEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var SyntheticDragEvent = SyntheticMouseEvent.extend({
- dataTransfer: null
- });
-
- /**
- * @interface TouchEvent
- * @see http://www.w3.org/TR/touch-events/
- */
-
- var SyntheticTouchEvent = SyntheticUIEvent.extend({
- touches: null,
- targetTouches: null,
- changedTouches: null,
- altKey: null,
- metaKey: null,
- ctrlKey: null,
- shiftKey: null,
- getModifierState: getEventModifierState
- });
-
- /**
- * @interface Event
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
- */
-
- var SyntheticTransitionEvent = SyntheticEvent.extend({
- propertyName: null,
- elapsedTime: null,
- pseudoElement: null
- });
-
- /**
- * @interface WheelEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var SyntheticWheelEvent = SyntheticMouseEvent.extend({
- deltaX: function (event) {
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
- },
- deltaY: function (event) {
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
- 'wheelDelta' in event ? -event.wheelDelta : 0;
- },
- deltaZ: null,
- // Browsers without "deltaMode" is reporting in raw wheel delta where one
- // notch on the scroll is always +/- 120, roughly equivalent to pixels.
- // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
- // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
- deltaMode: null
- });
-
- var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];
- var SimpleEventPlugin = {
- // simpleEventPluginEventTypes gets populated from
- // the DOMEventProperties module.
- eventTypes: simpleEventPluginEventTypes,
- extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
- var dispatchConfig = topLevelEventsToDispatchConfig.get(topLevelType);
-
- if (!dispatchConfig) {
- return null;
- }
-
- var EventConstructor;
-
- switch (topLevelType) {
- case TOP_KEY_PRESS:
- // Firefox creates a keypress event for function keys too. This removes
- // the unwanted keypress events. Enter is however both printable and
- // non-printable. One would expect Tab to be as well (but it isn't).
- if (getEventCharCode(nativeEvent) === 0) {
- return null;
- }
-
- /* falls through */
-
- case TOP_KEY_DOWN:
- case TOP_KEY_UP:
- EventConstructor = SyntheticKeyboardEvent;
- break;
+ if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error$1.message] = true;
+ setCurrentlyValidatingElement(element);
- case TOP_BLUR:
- case TOP_FOCUS:
- EventConstructor = SyntheticFocusEvent;
- break;
+ error('Failed %s type: %s', location, error$1.message);
- case TOP_CLICK:
- // Firefox creates a click event on right mouse clicks. This removes the
- // unwanted click events.
- if (nativeEvent.button === 2) {
- return null;
+ setCurrentlyValidatingElement(null);
}
-
- /* falls through */
-
- case TOP_AUX_CLICK:
- case TOP_DOUBLE_CLICK:
- case TOP_MOUSE_DOWN:
- case TOP_MOUSE_MOVE:
- case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events
-
- /* falls through */
-
- case TOP_MOUSE_OUT:
- case TOP_MOUSE_OVER:
- case TOP_CONTEXT_MENU:
- EventConstructor = SyntheticMouseEvent;
- break;
-
- case TOP_DRAG:
- case TOP_DRAG_END:
- case TOP_DRAG_ENTER:
- case TOP_DRAG_EXIT:
- case TOP_DRAG_LEAVE:
- case TOP_DRAG_OVER:
- case TOP_DRAG_START:
- case TOP_DROP:
- EventConstructor = SyntheticDragEvent;
- break;
-
- case TOP_TOUCH_CANCEL:
- case TOP_TOUCH_END:
- case TOP_TOUCH_MOVE:
- case TOP_TOUCH_START:
- EventConstructor = SyntheticTouchEvent;
- break;
-
- case TOP_ANIMATION_END:
- case TOP_ANIMATION_ITERATION:
- case TOP_ANIMATION_START:
- EventConstructor = SyntheticAnimationEvent;
- break;
-
- case TOP_TRANSITION_END:
- EventConstructor = SyntheticTransitionEvent;
- break;
-
- case TOP_SCROLL:
- EventConstructor = SyntheticUIEvent;
- break;
-
- case TOP_WHEEL:
- EventConstructor = SyntheticWheelEvent;
- break;
-
- case TOP_COPY:
- case TOP_CUT:
- case TOP_PASTE:
- EventConstructor = SyntheticClipboardEvent;
- break;
-
- case TOP_GOT_POINTER_CAPTURE:
- case TOP_LOST_POINTER_CAPTURE:
- case TOP_POINTER_CANCEL:
- case TOP_POINTER_DOWN:
- case TOP_POINTER_MOVE:
- case TOP_POINTER_OUT:
- case TOP_POINTER_OVER:
- case TOP_POINTER_UP:
- EventConstructor = SyntheticPointerEvent;
- break;
-
- default:
- {
- if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
- error('SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
- }
- } // HTML Events
- // @see http://www.w3.org/TR/html5/index.html#events-0
-
-
- EventConstructor = SyntheticEvent;
- break;
- }
-
- var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
- accumulateTwoPhaseDispatches(event);
- return event;
- }
- };
-
- /**
- * Specifies a deterministic ordering of `EventPlugin`s. A convenient way to
- * reason about plugins, without having to package every one of them. This
- * is better than having plugins be ordered in the same order that they
- * are injected because that ordering would be influenced by the packaging order.
- * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
- * preventing default on events is convenient in `SimpleEventPlugin` handlers.
- */
-
- var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
- /**
- * Inject modules for resolving DOM hierarchy and plugin ordering.
- */
-
- injectEventPluginOrder(DOMEventPluginOrder);
- setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
- /**
- * Some important event plugins included by default (without having to require
- * them).
- */
-
- injectEventPluginsByName({
- SimpleEventPlugin: SimpleEventPlugin,
- EnterLeaveEventPlugin: EnterLeaveEventPlugin,
- ChangeEventPlugin: ChangeEventPlugin,
- SelectEventPlugin: SelectEventPlugin,
- BeforeInputEventPlugin: BeforeInputEventPlugin
- });
-
- // Prefix measurements so that it's possible to filter them.
- // Longer prefixes are hard to read in DevTools.
- var reactEmoji = "\u269B";
- var warningEmoji = "\u26D4";
- var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause.
- // TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
-
- var currentFiber = null; // If we're in the middle of user code, which fiber and method is it?
- // Reusing `currentFiber` would be confusing for this because user code fiber
- // can change during commit phase too, but we don't need to unwind it (since
- // lifecycles in the commit phase don't resemble a tree).
-
- var currentPhase = null;
- var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem,
- // so we will keep track of it, and include it in the report.
- // Track commits caused by cascading updates.
-
- var isCommitting = false;
- var hasScheduledUpdateInCurrentCommit = false;
- var hasScheduledUpdateInCurrentPhase = false;
- var commitCountInCurrentWorkLoop = 0;
- var effectCountInCurrentCommit = 0;
- // to avoid stretch the commit phase with measurement overhead.
-
- var labelsInCurrentCommit = new Set();
-
- var formatMarkName = function (markName) {
- return reactEmoji + " " + markName;
- };
-
- var formatLabel = function (label, warning) {
- var prefix = warning ? warningEmoji + " " : reactEmoji + " ";
- var suffix = warning ? " Warning: " + warning : '';
- return "" + prefix + label + suffix;
- };
-
- var beginMark = function (markName) {
- performance.mark(formatMarkName(markName));
- };
-
- var clearMark = function (markName) {
- performance.clearMarks(formatMarkName(markName));
- };
-
- var endMark = function (label, markName, warning) {
- var formattedMarkName = formatMarkName(markName);
- var formattedLabel = formatLabel(label, warning);
-
- try {
- performance.measure(formattedLabel, formattedMarkName);
- } catch (err) {} // If previous mark was missing for some reason, this will throw.
- // This could only happen if React crashed in an unexpected place earlier.
- // Don't pile on with more errors.
- // Clear marks immediately to avoid growing buffer.
-
-
- performance.clearMarks(formattedMarkName);
- performance.clearMeasures(formattedLabel);
- };
-
- var getFiberMarkName = function (label, debugID) {
- return label + " (#" + debugID + ")";
- };
-
- var getFiberLabel = function (componentName, isMounted, phase) {
- if (phase === null) {
- // These are composite component total time measurements.
- return componentName + " [" + (isMounted ? 'update' : 'mount') + "]";
- } else {
- // Composite component methods.
- return componentName + "." + phase;
- }
- };
-
- var beginFiberMark = function (fiber, phase) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
-
- if (isCommitting && labelsInCurrentCommit.has(label)) {
- // During the commit phase, we don't show duplicate labels because
- // there is a fixed overhead for every measurement, and we don't
- // want to stretch the commit phase beyond necessary.
- return false;
- }
-
- labelsInCurrentCommit.add(label);
- var markName = getFiberMarkName(label, debugID);
- beginMark(markName);
- return true;
- };
-
- var clearFiberMark = function (fiber, phase) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
- var markName = getFiberMarkName(label, debugID);
- clearMark(markName);
- };
-
- var endFiberMark = function (fiber, phase, warning) {
- var componentName = getComponentName(fiber.type) || 'Unknown';
- var debugID = fiber._debugID;
- var isMounted = fiber.alternate !== null;
- var label = getFiberLabel(componentName, isMounted, phase);
- var markName = getFiberMarkName(label, debugID);
- endMark(label, markName, warning);
- };
-
- var shouldIgnoreFiber = function (fiber) {
- // Host components should be skipped in the timeline.
- // We could check typeof fiber.type, but does this work with RN?
- switch (fiber.tag) {
- case HostRoot:
- case HostComponent:
- case HostText:
- case HostPortal:
- case Fragment:
- case ContextProvider:
- case ContextConsumer:
- case Mode:
- return true;
-
- default:
- return false;
- }
- };
-
- var clearPendingPhaseMeasurement = function () {
- if (currentPhase !== null && currentPhaseFiber !== null) {
- clearFiberMark(currentPhaseFiber, currentPhase);
- }
-
- currentPhaseFiber = null;
- currentPhase = null;
- hasScheduledUpdateInCurrentPhase = false;
- };
-
- var pauseTimers = function () {
- // Stops all currently active measurements so that they can be resumed
- // if we continue in a later deferred loop from the same unit of work.
- var fiber = currentFiber;
-
- while (fiber) {
- if (fiber._debugIsCurrentlyTiming) {
- endFiberMark(fiber, null, null);
- }
-
- fiber = fiber.return;
- }
- };
-
- var resumeTimersRecursively = function (fiber) {
- if (fiber.return !== null) {
- resumeTimersRecursively(fiber.return);
- }
-
- if (fiber._debugIsCurrentlyTiming) {
- beginFiberMark(fiber, null);
- }
- };
-
- var resumeTimers = function () {
- // Resumes all measurements that were active during the last deferred loop.
- if (currentFiber !== null) {
- resumeTimersRecursively(currentFiber);
- }
- };
-
- function recordEffect() {
- {
- effectCountInCurrentCommit++;
- }
- }
- function recordScheduleUpdate() {
- {
- if (isCommitting) {
- hasScheduledUpdateInCurrentCommit = true;
- }
-
- if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
- hasScheduledUpdateInCurrentPhase = true;
- }
- }
- }
- function startWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, this is the fiber to unwind from.
-
-
- currentFiber = fiber;
-
- if (!beginFiberMark(fiber, null)) {
- return;
- }
-
- fiber._debugIsCurrentlyTiming = true;
- }
- }
- function cancelWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // Remember we shouldn't complete measurement for this fiber.
- // Otherwise flamechart will be deep even for small updates.
-
-
- fiber._debugIsCurrentlyTiming = false;
- clearFiberMark(fiber, null);
- }
- }
- function stopWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, its parent is the fiber to unwind from.
-
-
- currentFiber = fiber.return;
-
- if (!fiber._debugIsCurrentlyTiming) {
- return;
- }
-
- fiber._debugIsCurrentlyTiming = false;
- endFiberMark(fiber, null, null);
- }
- }
- function stopFailedWorkTimer(fiber) {
- {
- if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
- return;
- } // If we pause, its parent is the fiber to unwind from.
-
-
- currentFiber = fiber.return;
-
- if (!fiber._debugIsCurrentlyTiming) {
- return;
- }
-
- fiber._debugIsCurrentlyTiming = false;
- var warning = fiber.tag === SuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';
- endFiberMark(fiber, null, warning);
- }
- }
- function startPhaseTimer(fiber, phase) {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- clearPendingPhaseMeasurement();
-
- if (!beginFiberMark(fiber, phase)) {
- return;
- }
-
- currentPhaseFiber = fiber;
- currentPhase = phase;
- }
- }
- function stopPhaseTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- if (currentPhase !== null && currentPhaseFiber !== null) {
- var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
- endFiberMark(currentPhaseFiber, currentPhase, warning);
- }
-
- currentPhase = null;
- currentPhaseFiber = null;
- }
- }
- function startWorkLoopTimer(nextUnitOfWork) {
- {
- currentFiber = nextUnitOfWork;
-
- if (!supportsUserTiming) {
- return;
- }
-
- commitCountInCurrentWorkLoop = 0; // This is top level call.
- // Any other measurements are performed within.
-
- beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop.
-
- resumeTimers();
- }
- }
- function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var warning = null;
-
- if (interruptedBy !== null) {
- if (interruptedBy.tag === HostRoot) {
- warning = 'A top-level update interrupted the previous render';
- } else {
- var componentName = getComponentName(interruptedBy.type) || 'Unknown';
- warning = "An update to " + componentName + " interrupted the previous render";
}
- } else if (commitCountInCurrentWorkLoop > 1) {
- warning = 'There were cascading updates';
- }
-
- commitCountInCurrentWorkLoop = 0;
- var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop.
-
- pauseTimers();
- endMark(label, '(React Tree Reconciliation)', warning);
- }
- }
- function startCommitTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- isCommitting = true;
- hasScheduledUpdateInCurrentCommit = false;
- labelsInCurrentCommit.clear();
- beginMark('(Committing Changes)');
- }
- }
- function stopCommitTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var warning = null;
-
- if (hasScheduledUpdateInCurrentCommit) {
- warning = 'Lifecycle hook scheduled a cascading update';
- } else if (commitCountInCurrentWorkLoop > 0) {
- warning = 'Caused by a cascading update in earlier commit';
- }
-
- hasScheduledUpdateInCurrentCommit = false;
- commitCountInCurrentWorkLoop++;
- isCommitting = false;
- labelsInCurrentCommit.clear();
- endMark('(Committing Changes)', '(Committing Changes)', warning);
- }
- }
- function startCommitSnapshotEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
}
-
- effectCountInCurrentCommit = 0;
- beginMark('(Committing Snapshot Effects)');
- }
- }
- function stopCommitSnapshotEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Committing Snapshot Effects: " + count + " Total)", '(Committing Snapshot Effects)', null);
- }
- }
- function startCommitHostEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- effectCountInCurrentCommit = 0;
- beginMark('(Committing Host Effects)');
- }
- }
- function stopCommitHostEffectsTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Committing Host Effects: " + count + " Total)", '(Committing Host Effects)', null);
- }
- }
- function startCommitLifeCyclesTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- effectCountInCurrentCommit = 0;
- beginMark('(Calling Lifecycle Methods)');
- }
- }
- function stopCommitLifeCyclesTimer() {
- {
- if (!supportsUserTiming) {
- return;
- }
-
- var count = effectCountInCurrentCommit;
- effectCountInCurrentCommit = 0;
- endMark("(Calling Lifecycle Methods: " + count + " Total)", '(Calling Lifecycle Methods)', null);
}
}
@@ -10861,7 +10919,7 @@
{
var name = getComponentName(type) || 'Unknown';
- checkPropTypes_1(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
+ checkPropTypes(contextTypes, context, 'context', name);
} // Cache unmasked context so we can avoid recreating masked context unless necessary.
// Context is created before the class component is instantiated so check for instance.
@@ -10934,10 +10992,7 @@
return parentContext;
}
- var childContext;
- startPhaseTimer(fiber, 'getChildContext');
- childContext = instance.getChildContext();
- stopPhaseTimer();
+ var childContext = instance.getChildContext();
for (var contextKey in childContext) {
if (!(contextKey in childContextTypes)) {
@@ -10949,15 +11004,10 @@
{
var name = getComponentName(type) || 'Unknown';
- checkPropTypes_1(childContextTypes, childContext, 'child context', name, // In practice, there is one case in which we won't get a stack. It's when
- // somebody calls unstable_renderSubtreeIntoContainer() and we process
- // context from the parent component instance. The stack will be missing
- // because it's outside of the reconciliation, and so the pointer has not
- // been set. This is rare and doesn't matter. We'll also remove that API.
- getCurrentFiberStackInDev);
+ checkPropTypes(childContextTypes, childContext, 'child context', name);
}
- return _assign({}, parentContext, {}, childContext);
+ return _assign({}, parentContext, childContext);
}
}
@@ -11051,24 +11101,106 @@
var BlockingRoot = 1;
var ConcurrentRoot = 2;
- var ReactInternals$2 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _ReactInternals$Sched$1 = ReactInternals$2.SchedulerTracing,
- __interactionsRef = _ReactInternals$Sched$1.__interactionsRef,
- __subscriberRef = _ReactInternals$Sched$1.__subscriberRef,
- unstable_clear = _ReactInternals$Sched$1.unstable_clear,
- unstable_getCurrent = _ReactInternals$Sched$1.unstable_getCurrent,
- unstable_getThreadID = _ReactInternals$Sched$1.unstable_getThreadID,
- unstable_subscribe = _ReactInternals$Sched$1.unstable_subscribe,
- unstable_trace = _ReactInternals$Sched$1.unstable_trace,
- unstable_unsubscribe = _ReactInternals$Sched$1.unstable_unsubscribe,
- unstable_wrap = _ReactInternals$Sched$1.unstable_wrap;
+ var rendererID = null;
+ var injectedHook = null;
+ var hasLoggedError = false;
+ var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
+ function injectInternals(internals) {
+ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
+ // No DevTools
+ return false;
+ }
+
+ var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+
+ if (hook.isDisabled) {
+ // This isn't a real property on the hook, but it can be set to opt out
+ // of DevTools integration and associated warnings and logs.
+ // https://github.com/facebook/react/issues/3877
+ return true;
+ }
+
+ if (!hook.supportsFiber) {
+ {
+ error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
+ } // DevTools exists, even though it doesn't support Fiber.
+
+
+ return true;
+ }
+
+ try {
+ rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
+
+ injectedHook = hook;
+ } catch (err) {
+ // Catch all errors because it is unsafe to throw during initialization.
+ {
+ error('React instrumentation encountered an error: %s.', err);
+ }
+ } // DevTools exists
+
+
+ return true;
+ }
+ function onScheduleRoot(root, children) {
+ {
+ if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
+ try {
+ injectedHook.onScheduleFiberRoot(rendererID, root, children);
+ } catch (err) {
+ if ( !hasLoggedError) {
+ hasLoggedError = true;
+
+ error('React instrumentation encountered an error: %s', err);
+ }
+ }
+ }
+ }
+ }
+ function onCommitRoot(root, priorityLevel) {
+ if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
+ try {
+ var didError = (root.current.flags & DidCapture) === DidCapture;
+
+ if (enableProfilerTimer) {
+ injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
+ } else {
+ injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
+ }
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error('React instrumentation encountered an error: %s', err);
+ }
+ }
+ }
+ }
+ }
+ function onCommitUnmount(fiber) {
+ if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
+ try {
+ injectedHook.onCommitFiberUnmount(rendererID, fiber);
+ } catch (err) {
+ {
+ if (!hasLoggedError) {
+ hasLoggedError = true;
+
+ error('React instrumentation encountered an error: %s', err);
+ }
+ }
+ }
+ }
+ }
var Scheduler_runWithPriority = unstable_runWithPriority,
Scheduler_scheduleCallback = unstable_scheduleCallback,
Scheduler_cancelCallback = unstable_cancelCallback,
Scheduler_shouldYield = unstable_shouldYield,
Scheduler_requestPaint = unstable_requestPaint,
- Scheduler_now = unstable_now,
+ Scheduler_now$1 = unstable_now,
Scheduler_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel,
Scheduler_ImmediatePriority = unstable_ImmediatePriority,
Scheduler_UserBlockingPriority = unstable_UserBlockingPriority,
@@ -11082,7 +11214,7 @@
// scheduler/tracing
if (!(__interactionsRef != null && __interactionsRef.current != null)) {
{
- throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" );
+ throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
}
}
}
@@ -11091,20 +11223,20 @@
// ascending numbers so we can compare them like numbers. They start at 90 to
// avoid clashing with Scheduler's priorities.
- var ImmediatePriority = 99;
- var UserBlockingPriority$1 = 98;
- var NormalPriority = 97;
- var LowPriority = 96;
- var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
+ var ImmediatePriority$1 = 99;
+ var UserBlockingPriority$2 = 98;
+ var NormalPriority$1 = 97;
+ var LowPriority$1 = 96;
+ var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.
- var NoPriority = 90;
+ var NoPriority$1 = 90;
var shouldYield = Scheduler_shouldYield;
var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
var syncQueue = null;
var immediateQueueCallbackNode = null;
var isFlushingSyncQueue = false;
- var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
+ var initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
// This will be the case for modern browsers that support `performance.now`. In
// older browsers, Scheduler falls back to `Date.now`, which returns a Unix
// timestamp. In that case, subtract the module initialization time to simulate
@@ -11112,25 +11244,25 @@
// within 32 bits.
// TODO: Consider lifting this into Scheduler.
- var now = initialTimeMs < 10000 ? Scheduler_now : function () {
- return Scheduler_now() - initialTimeMs;
+ var now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {
+ return Scheduler_now$1() - initialTimeMs$1;
};
function getCurrentPriorityLevel() {
switch (Scheduler_getCurrentPriorityLevel()) {
case Scheduler_ImmediatePriority:
- return ImmediatePriority;
+ return ImmediatePriority$1;
case Scheduler_UserBlockingPriority:
- return UserBlockingPriority$1;
+ return UserBlockingPriority$2;
case Scheduler_NormalPriority:
- return NormalPriority;
+ return NormalPriority$1;
case Scheduler_LowPriority:
- return LowPriority;
+ return LowPriority$1;
case Scheduler_IdlePriority:
- return IdlePriority;
+ return IdlePriority$1;
default:
{
@@ -11144,19 +11276,19 @@
function reactPriorityToSchedulerPriority(reactPriorityLevel) {
switch (reactPriorityLevel) {
- case ImmediatePriority:
+ case ImmediatePriority$1:
return Scheduler_ImmediatePriority;
- case UserBlockingPriority$1:
+ case UserBlockingPriority$2:
return Scheduler_UserBlockingPriority;
- case NormalPriority:
+ case NormalPriority$1:
return Scheduler_NormalPriority;
- case LowPriority:
+ case LowPriority$1:
return Scheduler_LowPriority;
- case IdlePriority:
+ case IdlePriority$1:
return Scheduler_IdlePriority;
default:
@@ -11213,34 +11345,39 @@
isFlushingSyncQueue = true;
var i = 0;
- try {
- var _isSync = true;
- var queue = syncQueue;
- runWithPriority$1(ImmediatePriority, function () {
- for (; i < queue.length; i++) {
- var callback = queue[i];
-
- do {
- callback = callback(_isSync);
- } while (callback !== null);
- }
- });
- syncQueue = null;
- } catch (error) {
- // If something throws, leave the remaining callbacks on the queue.
- if (syncQueue !== null) {
- syncQueue = syncQueue.slice(i + 1);
- } // Resume flushing in the next tick
+ {
+ try {
+ var _isSync2 = true;
+ var _queue = syncQueue;
+ runWithPriority$1(ImmediatePriority$1, function () {
+ for (; i < _queue.length; i++) {
+ var callback = _queue[i];
+
+ do {
+ callback = callback(_isSync2);
+ } while (callback !== null);
+ }
+ });
+ syncQueue = null;
+ } catch (error) {
+ // If something throws, leave the remaining callbacks on the queue.
+ if (syncQueue !== null) {
+ syncQueue = syncQueue.slice(i + 1);
+ } // Resume flushing in the next tick
- Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
- throw error;
- } finally {
- isFlushingSyncQueue = false;
+ Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
+ throw error;
+ } finally {
+ isFlushingSyncQueue = false;
+ }
}
}
}
+ // TODO: this is special because it gets imported during build.
+ var ReactVersion = '17.0.2';
+
var NoMode = 0;
var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
// tag instead
@@ -11248,101 +11385,12 @@
var BlockingMode = 2;
var ConcurrentMode = 4;
var ProfileMode = 8;
+ var DebugTracingMode = 16;
- // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
- // Math.pow(2, 30) - 1
- // 0b111111111111111111111111111111
- var MAX_SIGNED_31_BIT_INT = 1073741823;
-
- var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that
- // Never work can be committed in an inconsistent state without tearing the UI.
- // The main example is offscreen content, like a hidden subtree. So one possible
- // name is Offscreen. However, it also includes dehydrated Suspense boundaries,
- // which are inconsistent in the sense that they haven't finished yet, but
- // aren't visibly inconsistent because the server rendered HTML matches what the
- // hydrated tree would look like.
-
- var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in
- // order to be consistent.
-
- var Idle = 2; // Continuous Hydration is slightly higher than Idle and is used to increase
- // priority of hover targets.
-
- var ContinuousHydration = 3;
- var Sync = MAX_SIGNED_31_BIT_INT;
- var Batched = Sync - 1;
- var UNIT_SIZE = 10;
- var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms.
-
- function msToExpirationTime(ms) {
- // Always subtract from the offset so that we don't clash with the magic number for NoWork.
- return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);
- }
- function expirationTimeToMs(expirationTime) {
- return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;
- }
-
- function ceiling(num, precision) {
- return ((num / precision | 0) + 1) * precision;
- }
-
- function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
- return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
- } // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update
- // the names to reflect.
-
-
- var LOW_PRIORITY_EXPIRATION = 5000;
- var LOW_PRIORITY_BATCH_SIZE = 250;
- function computeAsyncExpiration(currentTime) {
- return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
- }
- function computeSuspenseExpiration(currentTime, timeoutMs) {
- // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time?
- return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE);
- } // We intentionally set a higher expiration time for interactive updates in
- // dev than in production.
- //
- // If the main thread is being blocked so long that you hit the expiration,
- // it's a problem that could be solved with better scheduling.
- //
- // People will be more likely to notice this and fix it with the long
- // expiration time in development.
- //
- // In production we opt for better UX at the risk of masking scheduling
- // problems, by expiring fast.
-
- var HIGH_PRIORITY_EXPIRATION = 500 ;
- var HIGH_PRIORITY_BATCH_SIZE = 100;
- function computeInteractiveExpiration(currentTime) {
- return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
- }
- function inferPriorityFromExpirationTime(currentTime, expirationTime) {
- if (expirationTime === Sync) {
- return ImmediatePriority;
- }
-
- if (expirationTime === Never || expirationTime === Idle) {
- return IdlePriority;
- }
-
- var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);
-
- if (msUntil <= 0) {
- return ImmediatePriority;
- }
-
- if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {
- return UserBlockingPriority$1;
- }
-
- if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {
- return NormalPriority;
- } // TODO: Handle LowPriority
- // Assume anything lower has idle priority
-
-
- return IdlePriority;
+ var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
+ var NoTransition = 0;
+ function requestCurrentTransition() {
+ return ReactCurrentBatchConfig.transition;
}
var ReactStrictModeWarnings = {
@@ -11485,37 +11533,37 @@
if (UNSAFE_componentWillMountUniqueNames.size > 0) {
var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
- error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
+ error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
}
if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
- error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
+ error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
}
if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
- error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
+ error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
}
if (componentWillMountUniqueNames.size > 0) {
var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
- warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
+ warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
}
if (componentWillReceivePropsUniqueNames.size > 0) {
var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
- warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
+ warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
}
if (componentWillUpdateUniqueNames.size > 0) {
var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
- warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
+ warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
}
};
@@ -11562,9 +11610,14 @@
didWarnAboutLegacyContext.add(fiber.type);
});
var sortedNames = setToSortedString(uniqueNames);
- var firstComponentStack = getStackByFiberInDevAndProd(firstFiber);
- error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + '%s', sortedNames, firstComponentStack);
+ try {
+ setCurrentFiber(firstFiber);
+
+ error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);
+ } finally {
+ resetCurrentFiber();
+ }
});
};
@@ -11579,402 +11632,6 @@
};
}
- var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
-
- var failedBoundaries = null;
- var setRefreshHandler = function (handler) {
- {
- resolveFamily = handler;
- }
- };
- function resolveFunctionForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
-
- var family = resolveFamily(type);
-
- if (family === undefined) {
- return type;
- } // Use the latest known implementation.
-
-
- return family.current;
- }
- }
- function resolveClassForHotReloading(type) {
- // No implementation differences.
- return resolveFunctionForHotReloading(type);
- }
- function resolveForwardRefForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
-
- var family = resolveFamily(type);
-
- if (family === undefined) {
- // Check if we're dealing with a real forwardRef. Don't want to crash early.
- if (type !== null && type !== undefined && typeof type.render === 'function') {
- // ForwardRef is special because its resolved .type is an object,
- // but it's possible that we only have its inner render function in the map.
- // If that inner render function is different, we'll build a new forwardRef type.
- var currentRender = resolveFunctionForHotReloading(type.render);
-
- if (type.render !== currentRender) {
- var syntheticType = {
- $$typeof: REACT_FORWARD_REF_TYPE,
- render: currentRender
- };
-
- if (type.displayName !== undefined) {
- syntheticType.displayName = type.displayName;
- }
-
- return syntheticType;
- }
- }
-
- return type;
- } // Use the latest known implementation.
-
-
- return family.current;
- }
- }
- function isCompatibleFamilyForHotReloading(fiber, element) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return false;
- }
-
- var prevType = fiber.elementType;
- var nextType = element.type; // If we got here, we know types aren't === equal.
-
- var needsCompareFamilies = false;
- var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
-
- switch (fiber.tag) {
- case ClassComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case FunctionComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- // We don't know the inner type yet.
- // We're going to assume that the lazy inner type is stable,
- // and so it is sufficient to avoid reconciling it away.
- // We're not going to unwrap or actually use the new lazy type.
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case ForwardRef:
- {
- if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case MemoComponent:
- case SimpleMemoComponent:
- {
- if ($$typeofNextType === REACT_MEMO_TYPE) {
- // TODO: if it was but can no longer be simple,
- // we shouldn't set this.
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- default:
- return false;
- } // Check if both types have a family and it's the same one.
-
-
- if (needsCompareFamilies) {
- // Note: memo() and forwardRef() we'll compare outer rather than inner type.
- // This means both of them need to be registered to preserve state.
- // If we unwrapped and compared the inner types for wrappers instead,
- // then we would risk falsely saying two separate memo(Foo)
- // calls are equivalent because they wrap the same Foo function.
- var prevFamily = resolveFamily(prevType);
-
- if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
- return true;
- }
- }
-
- return false;
- }
- }
- function markFailedErrorBoundaryForHotReloading(fiber) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
-
- if (typeof WeakSet !== 'function') {
- return;
- }
-
- if (failedBoundaries === null) {
- failedBoundaries = new WeakSet();
- }
-
- failedBoundaries.add(fiber);
- }
- }
- var scheduleRefresh = function (root, update) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
-
- var staleFamilies = update.staleFamilies,
- updatedFamilies = update.updatedFamilies;
- flushPassiveEffects();
- flushSync(function () {
- scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
- });
- }
- };
- var scheduleRoot = function (root, element) {
- {
- if (root.context !== emptyContextObject) {
- // Super edge case: root has a legacy _renderSubtree context
- // but we don't know the parentComponent so we can't pass it.
- // Just ignore. We'll delete this with _renderSubtree code path later.
- return;
- }
-
- flushPassiveEffects();
- syncUpdates(function () {
- updateContainer(element, root, null, null);
- });
- }
- };
-
- function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
- {
- var alternate = fiber.alternate,
- child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
-
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
-
- case ForwardRef:
- candidateType = type.render;
- break;
- }
-
- if (resolveFamily === null) {
- throw new Error('Expected resolveFamily to be set during hot reload.');
- }
-
- var needsRender = false;
- var needsRemount = false;
-
- if (candidateType !== null) {
- var family = resolveFamily(candidateType);
-
- if (family !== undefined) {
- if (staleFamilies.has(family)) {
- needsRemount = true;
- } else if (updatedFamilies.has(family)) {
- if (tag === ClassComponent) {
- needsRemount = true;
- } else {
- needsRender = true;
- }
- }
- }
- }
-
- if (failedBoundaries !== null) {
- if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
- needsRemount = true;
- }
- }
-
- if (needsRemount) {
- fiber._debugNeedsRemount = true;
- }
-
- if (needsRemount || needsRender) {
- scheduleWork(fiber, Sync);
- }
-
- if (child !== null && !needsRemount) {
- scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
- }
-
- if (sibling !== null) {
- scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
- }
- }
- }
-
- var findHostInstancesForRefresh = function (root, families) {
- {
- var hostInstances = new Set();
- var types = new Set(families.map(function (family) {
- return family.current;
- }));
- findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
- return hostInstances;
- }
- };
-
- function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
- {
- var child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
-
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
-
- case ForwardRef:
- candidateType = type.render;
- break;
- }
-
- var didMatch = false;
-
- if (candidateType !== null) {
- if (types.has(candidateType)) {
- didMatch = true;
- }
- }
-
- if (didMatch) {
- // We have a match. This only drills down to the closest host components.
- // There's no need to search deeper because for the purpose of giving
- // visual feedback, "flashing" outermost parent rectangles is sufficient.
- findHostInstancesForFiberShallowly(fiber, hostInstances);
- } else {
- // If there's no match, maybe there will be one further down in the child tree.
- if (child !== null) {
- findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
- }
- }
-
- if (sibling !== null) {
- findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
- }
- }
- }
-
- function findHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
-
- if (foundHostInstances) {
- return;
- } // If we didn't find any host children, fallback to closest host parent.
-
-
- var node = fiber;
-
- while (true) {
- switch (node.tag) {
- case HostComponent:
- hostInstances.add(node.stateNode);
- return;
-
- case HostPortal:
- hostInstances.add(node.stateNode.containerInfo);
- return;
-
- case HostRoot:
- hostInstances.add(node.stateNode.containerInfo);
- return;
- }
-
- if (node.return === null) {
- throw new Error('Expected to reach root first.');
- }
-
- node = node.return;
- }
- }
- }
-
- function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var node = fiber;
- var foundHostInstances = false;
-
- while (true) {
- if (node.tag === HostComponent) {
- // We got a match.
- foundHostInstances = true;
- hostInstances.add(node.stateNode); // There may still be more, so keep searching.
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === fiber) {
- return foundHostInstances;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === fiber) {
- return foundHostInstances;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-
- return false;
- }
-
function resolveDefaultProps(Component, baseProps) {
if (Component && Component.defaultProps) {
// Resolve default props. Taken from ReactElement
@@ -11993,15 +11650,11 @@
return baseProps;
}
- function readLazyComponentType(lazyComponent) {
- initializeLazyComponentType(lazyComponent);
- if (lazyComponent._status !== Resolved) {
- throw lazyComponent._result;
- }
-
- return lazyComponent._result;
- }
+ // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
+ // Math.pow(2, 30) - 1
+ // 0b111111111111111111111111111111
+ var MAX_SIGNED_31_BIT_INT = 1073741823;
var valueCursor = createCursor(null);
var rendererSigil;
@@ -12077,22 +11730,21 @@
return changedBits | 0;
}
}
- function scheduleWorkOnParentPath(parent, renderExpirationTime) {
- // Update the child expiration time of all the ancestors, including
- // the alternates.
+ function scheduleWorkOnParentPath(parent, renderLanes) {
+ // Update the child lanes of all the ancestors, including the alternates.
var node = parent;
while (node !== null) {
var alternate = node.alternate;
- if (node.childExpirationTime < renderExpirationTime) {
- node.childExpirationTime = renderExpirationTime;
+ if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
+ node.childLanes = mergeLanes(node.childLanes, renderLanes);
- if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
- alternate.childExpirationTime = renderExpirationTime;
+ if (alternate !== null) {
+ alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
}
- } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
- alternate.childExpirationTime = renderExpirationTime;
+ } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
+ alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
} else {
// Neither alternate was updated, which means the rest of the
// ancestor path already has sufficient priority.
@@ -12102,7 +11754,7 @@
node = node.return;
}
}
- function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
+ function propagateContextChange(workInProgress, context, changedBits, renderLanes) {
var fiber = workInProgress.child;
if (fiber !== null) {
@@ -12125,7 +11777,7 @@
// Match! Schedule an update on this fiber.
if (fiber.tag === ClassComponent) {
// Schedule a force update on the work-in-progress.
- var update = createUpdate(renderExpirationTime, null);
+ var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));
update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
// update to the current fiber, too, which means it will persist even if
// this render is thrown away. Since it's a race condition, not sure it's
@@ -12134,24 +11786,18 @@
enqueueUpdate(fiber, update);
}
- if (fiber.expirationTime < renderExpirationTime) {
- fiber.expirationTime = renderExpirationTime;
- }
-
+ fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
var alternate = fiber.alternate;
- if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
- alternate.expirationTime = renderExpirationTime;
+ if (alternate !== null) {
+ alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
}
- scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too.
+ scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.
- if (list.expirationTime < renderExpirationTime) {
- list.expirationTime = renderExpirationTime;
- } // Since we already found a match, we can stop traversing the
+ list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the
// dependency list.
-
break;
}
@@ -12196,7 +11842,7 @@
fiber = nextFiber;
}
}
- function prepareToReadContext(workInProgress, renderExpirationTime) {
+ function prepareToReadContext(workInProgress, renderLanes) {
currentlyRenderingFiber = workInProgress;
lastContextDependency = null;
lastContextWithAllBitsObserved = null;
@@ -12206,7 +11852,7 @@
var firstContext = dependencies.firstContext;
if (firstContext !== null) {
- if (dependencies.expirationTime >= renderExpirationTime) {
+ if (includesSomeLane(dependencies.lanes, renderLanes)) {
// Context list has a pending update. Mark that this fiber performed work.
markWorkInProgressReceivedUpdate();
} // Reset the work-in-progress list
@@ -12252,7 +11898,7 @@
lastContextDependency = contextItem;
currentlyRenderingFiber.dependencies = {
- expirationTime: NoWork,
+ lanes: NoLanes,
firstContext: contextItem,
responders: null
};
@@ -12284,7 +11930,8 @@
function initializeUpdateQueue(fiber) {
var queue = {
baseState: fiber.memoizedState,
- baseQueue: null,
+ firstBaseUpdate: null,
+ lastBaseUpdate: null,
shared: {
pending: null
},
@@ -12300,28 +11947,23 @@
if (queue === currentQueue) {
var clone = {
baseState: currentQueue.baseState,
- baseQueue: currentQueue.baseQueue,
+ firstBaseUpdate: currentQueue.firstBaseUpdate,
+ lastBaseUpdate: currentQueue.lastBaseUpdate,
shared: currentQueue.shared,
effects: currentQueue.effects
};
workInProgress.updateQueue = clone;
}
}
- function createUpdate(expirationTime, suspenseConfig) {
+ function createUpdate(eventTime, lane) {
var update = {
- expirationTime: expirationTime,
- suspenseConfig: suspenseConfig,
+ eventTime: eventTime,
+ lane: lane,
tag: UpdateState,
payload: null,
callback: null,
next: null
};
- update.next = update;
-
- {
- update.priority = getCurrentPriorityLevel();
- }
-
return update;
}
function enqueueUpdate(fiber, update) {
@@ -12353,26 +11995,86 @@
}
}
}
- function enqueueCapturedUpdate(workInProgress, update) {
+ function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
+ // Captured updates are updates that are thrown by a child during the render
+ // phase. They should be discarded if the render is aborted. Therefore,
+ // we should only put them on the work-in-progress queue, not the current one.
+ var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.
+
var current = workInProgress.alternate;
if (current !== null) {
- // Ensure the work-in-progress queue is a clone
- cloneUpdateQueue(current, workInProgress);
- } // Captured updates go only on the work-in-progress queue.
+ var currentQueue = current.updateQueue;
+
+ if (queue === currentQueue) {
+ // The work-in-progress queue is the same as current. This happens when
+ // we bail out on a parent fiber that then captures an error thrown by
+ // a child. Since we want to append the update only to the work-in
+ // -progress queue, we need to clone the updates. We usually clone during
+ // processUpdateQueue, but that didn't happen in this case because we
+ // skipped over the parent when we bailed out.
+ var newFirst = null;
+ var newLast = null;
+ var firstBaseUpdate = queue.firstBaseUpdate;
+
+ if (firstBaseUpdate !== null) {
+ // Loop through the updates and clone them.
+ var update = firstBaseUpdate;
+
+ do {
+ var clone = {
+ eventTime: update.eventTime,
+ lane: update.lane,
+ tag: update.tag,
+ payload: update.payload,
+ callback: update.callback,
+ next: null
+ };
+ if (newLast === null) {
+ newFirst = newLast = clone;
+ } else {
+ newLast.next = clone;
+ newLast = clone;
+ }
- var queue = workInProgress.updateQueue; // Append the update to the end of the list.
+ update = update.next;
+ } while (update !== null); // Append the captured update the end of the cloned list.
- var last = queue.baseQueue;
- if (last === null) {
- queue.baseQueue = update.next = update;
- update.next = update;
+ if (newLast === null) {
+ newFirst = newLast = capturedUpdate;
+ } else {
+ newLast.next = capturedUpdate;
+ newLast = capturedUpdate;
+ }
+ } else {
+ // There are no base updates.
+ newFirst = newLast = capturedUpdate;
+ }
+
+ queue = {
+ baseState: currentQueue.baseState,
+ firstBaseUpdate: newFirst,
+ lastBaseUpdate: newLast,
+ shared: currentQueue.shared,
+ effects: currentQueue.effects
+ };
+ workInProgress.updateQueue = queue;
+ return;
+ }
+ } // Append the update to the end of the list.
+
+
+ var lastBaseUpdate = queue.lastBaseUpdate;
+
+ if (lastBaseUpdate === null) {
+ queue.firstBaseUpdate = capturedUpdate;
} else {
- update.next = last.next;
- last.next = update;
+ lastBaseUpdate.next = capturedUpdate;
}
+
+ queue.lastBaseUpdate = capturedUpdate;
}
function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
@@ -12385,15 +12087,21 @@
// Updater function
{
enterDisallowedContextReadInDEV();
-
- if ( workInProgress.mode & StrictMode) {
- payload.call(instance, prevState, nextProps);
- }
}
var nextState = payload.call(instance, prevState, nextProps);
{
+ if ( workInProgress.mode & StrictMode) {
+ disableLogs();
+
+ try {
+ payload.call(instance, prevState, nextProps);
+ } finally {
+ reenableLogs();
+ }
+ }
+
exitDisallowedContextReadInDEV();
}
@@ -12406,7 +12114,7 @@
case CaptureUpdate:
{
- workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
+ workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
}
// Intentional fallthrough
@@ -12419,15 +12127,21 @@
// Updater function
{
enterDisallowedContextReadInDEV();
-
- if ( workInProgress.mode & StrictMode) {
- _payload.call(instance, prevState, nextProps);
- }
}
partialState = _payload.call(instance, prevState, nextProps);
{
+ if ( workInProgress.mode & StrictMode) {
+ disableLogs();
+
+ try {
+ _payload.call(instance, prevState, nextProps);
+ } finally {
+ reenableLogs();
+ }
+ }
+
exitDisallowedContextReadInDEV();
}
} else {
@@ -12454,150 +12168,159 @@
return prevState;
}
- function processUpdateQueue(workInProgress, props, instance, renderExpirationTime) {
+ function processUpdateQueue(workInProgress, props, instance, renderLanes) {
// This is always non-null on a ClassComponent or HostRoot
var queue = workInProgress.updateQueue;
hasForceUpdate = false;
{
currentlyProcessingQueue = queue.shared;
- } // The last rebase update that is NOT part of the base state.
-
+ }
- var baseQueue = queue.baseQueue; // The last pending update that hasn't been processed yet.
+ var firstBaseUpdate = queue.firstBaseUpdate;
+ var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.
var pendingQueue = queue.shared.pending;
if (pendingQueue !== null) {
- // We have new updates that haven't been processed yet.
- // We'll add them to the base queue.
- if (baseQueue !== null) {
- // Merge the pending queue and the base queue.
- var baseFirst = baseQueue.next;
- var pendingFirst = pendingQueue.next;
- baseQueue.next = pendingFirst;
- pendingQueue.next = baseFirst;
+ queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
+ // and last so that it's non-circular.
+
+ var lastPendingUpdate = pendingQueue;
+ var firstPendingUpdate = lastPendingUpdate.next;
+ lastPendingUpdate.next = null; // Append pending updates to base queue
+
+ if (lastBaseUpdate === null) {
+ firstBaseUpdate = firstPendingUpdate;
+ } else {
+ lastBaseUpdate.next = firstPendingUpdate;
}
- baseQueue = pendingQueue;
- queue.shared.pending = null; // TODO: Pass `current` as argument
+ lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
+ // we need to transfer the updates to that queue, too. Because the base
+ // queue is a singly-linked list with no cycles, we can append to both
+ // lists and take advantage of structural sharing.
+ // TODO: Pass `current` as argument
var current = workInProgress.alternate;
if (current !== null) {
+ // This is always non-null on a ClassComponent or HostRoot
var currentQueue = current.updateQueue;
+ var currentLastBaseUpdate = currentQueue.lastBaseUpdate;
- if (currentQueue !== null) {
- currentQueue.baseQueue = pendingQueue;
+ if (currentLastBaseUpdate !== lastBaseUpdate) {
+ if (currentLastBaseUpdate === null) {
+ currentQueue.firstBaseUpdate = firstPendingUpdate;
+ } else {
+ currentLastBaseUpdate.next = firstPendingUpdate;
+ }
+
+ currentQueue.lastBaseUpdate = lastPendingUpdate;
}
}
} // These values may change as we process the queue.
- if (baseQueue !== null) {
- var first = baseQueue.next; // Iterate through the list of updates to compute the result.
+ if (firstBaseUpdate !== null) {
+ // Iterate through the list of updates to compute the result.
+ var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
+ // from the original lanes.
- var newState = queue.baseState;
- var newExpirationTime = NoWork;
+ var newLanes = NoLanes;
var newBaseState = null;
- var newBaseQueueFirst = null;
- var newBaseQueueLast = null;
+ var newFirstBaseUpdate = null;
+ var newLastBaseUpdate = null;
+ var update = firstBaseUpdate;
- if (first !== null) {
- var update = first;
+ do {
+ var updateLane = update.lane;
+ var updateEventTime = update.eventTime;
- do {
- var updateExpirationTime = update.expirationTime;
+ if (!isSubsetOfLanes(renderLanes, updateLane)) {
+ // Priority is insufficient. Skip this update. If this is the first
+ // skipped update, the previous update/state is the new base
+ // update/state.
+ var clone = {
+ eventTime: updateEventTime,
+ lane: updateLane,
+ tag: update.tag,
+ payload: update.payload,
+ callback: update.callback,
+ next: null
+ };
- if (updateExpirationTime < renderExpirationTime) {
- // Priority is insufficient. Skip this update. If this is the first
- // skipped update, the previous update/state is the new base
- // update/state.
- var clone = {
- expirationTime: update.expirationTime,
- suspenseConfig: update.suspenseConfig,
+ if (newLastBaseUpdate === null) {
+ newFirstBaseUpdate = newLastBaseUpdate = clone;
+ newBaseState = newState;
+ } else {
+ newLastBaseUpdate = newLastBaseUpdate.next = clone;
+ } // Update the remaining priority in the queue.
+
+
+ newLanes = mergeLanes(newLanes, updateLane);
+ } else {
+ // This update does have sufficient priority.
+ if (newLastBaseUpdate !== null) {
+ var _clone = {
+ eventTime: updateEventTime,
+ // This update is going to be committed so we never want uncommit
+ // it. Using NoLane works because 0 is a subset of all bitmasks, so
+ // this will never be skipped by the check above.
+ lane: NoLane,
tag: update.tag,
payload: update.payload,
callback: update.callback,
next: null
};
+ newLastBaseUpdate = newLastBaseUpdate.next = _clone;
+ } // Process this update.
- if (newBaseQueueLast === null) {
- newBaseQueueFirst = newBaseQueueLast = clone;
- newBaseState = newState;
- } else {
- newBaseQueueLast = newBaseQueueLast.next = clone;
- } // Update the remaining priority in the queue.
+ newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
+ var callback = update.callback;
- if (updateExpirationTime > newExpirationTime) {
- newExpirationTime = updateExpirationTime;
- }
- } else {
- // This update does have sufficient priority.
- if (newBaseQueueLast !== null) {
- var _clone = {
- expirationTime: Sync,
- // This update is going to be committed so we never want uncommit it.
- suspenseConfig: update.suspenseConfig,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
- newBaseQueueLast = newBaseQueueLast.next = _clone;
- } // Mark the event time of this update as relevant to this render pass.
- // TODO: This should ideally use the true event time of this update rather than
- // its priority which is a derived and not reverseable value.
- // TODO: We should skip this update if it was already committed but currently
- // we have no way of detecting the difference between a committed and suspended
- // update here.
-
-
- markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.
-
- newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
- var callback = update.callback;
-
- if (callback !== null) {
- workInProgress.effectTag |= Callback;
- var effects = queue.effects;
-
- if (effects === null) {
- queue.effects = [update];
- } else {
- effects.push(update);
- }
+ if (callback !== null) {
+ workInProgress.flags |= Callback;
+ var effects = queue.effects;
+
+ if (effects === null) {
+ queue.effects = [update];
+ } else {
+ effects.push(update);
}
}
+ }
- update = update.next;
+ update = update.next;
- if (update === null || update === first) {
- pendingQueue = queue.shared.pending;
+ if (update === null) {
+ pendingQueue = queue.shared.pending;
- if (pendingQueue === null) {
- break;
- } else {
- // An update was scheduled from inside a reducer. Add the new
- // pending updates to the end of the list and keep processing.
- update = baseQueue.next = pendingQueue.next;
- pendingQueue.next = first;
- queue.baseQueue = baseQueue = pendingQueue;
- queue.shared.pending = null;
- }
+ if (pendingQueue === null) {
+ break;
+ } else {
+ // An update was scheduled from inside a reducer. Add the new
+ // pending updates to the end of the list and keep processing.
+ var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
+ // unravel them when transferring them to the base queue.
+
+ var _firstPendingUpdate = _lastPendingUpdate.next;
+ _lastPendingUpdate.next = null;
+ update = _firstPendingUpdate;
+ queue.lastBaseUpdate = _lastPendingUpdate;
+ queue.shared.pending = null;
}
- } while (true);
- }
+ }
+ } while (true);
- if (newBaseQueueLast === null) {
+ if (newLastBaseUpdate === null) {
newBaseState = newState;
- } else {
- newBaseQueueLast.next = newBaseQueueFirst;
}
queue.baseState = newBaseState;
- queue.baseQueue = newBaseQueueLast; // Set the remaining expiration time to be whatever is remaining in the queue.
+ queue.firstBaseUpdate = newFirstBaseUpdate;
+ queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.
// This should be fine because the only two other things that contribute to
// expiration time are props and context. We're already in the middle of the
// begin phase by the time we start processing the queue, so we've already
@@ -12605,8 +12328,8 @@
// shouldComponentUpdate is tricky; but we'll have to account for
// that regardless.
- markUnprocessedUpdateTime(newExpirationTime);
- workInProgress.expirationTime = newExpirationTime;
+ markSkippedUpdateLanes(newLanes);
+ workInProgress.lanes = newLanes;
workInProgress.memoizedState = newState;
}
@@ -12649,11 +12372,6 @@
}
}
- var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
- function requestCurrentSuspenseConfig() {
- return ReactCurrentBatchConfig.suspense;
- }
-
var fakeInternalInstance = {};
var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
// We'll use it to determine whether we need to initialize legacy refs.
@@ -12686,7 +12404,7 @@
return;
}
- var key = callerName + "_" + callback;
+ var key = callerName + '_' + callback;
if (!didWarnOnInvalidCallback.has(key)) {
didWarnOnInvalidCallback.add(key);
@@ -12730,8 +12448,14 @@
{
if ( workInProgress.mode & StrictMode) {
- // Invoke the function an extra time to help detect side-effects.
- getDerivedStateFromProps(nextProps, prevState);
+ disableLogs();
+
+ try {
+ // Invoke the function an extra time to help detect side-effects.
+ getDerivedStateFromProps(nextProps, prevState);
+ } finally {
+ reenableLogs();
+ }
}
}
@@ -12746,7 +12470,7 @@
workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
// base state.
- if (workInProgress.expirationTime === NoWork) {
+ if (workInProgress.lanes === NoLanes) {
// Queue is always non-null for classes
var updateQueue = workInProgress.updateQueue;
updateQueue.baseState = memoizedState;
@@ -12756,10 +12480,9 @@
isMounted: isMounted,
enqueueSetState: function (inst, payload, callback) {
var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
+ var update = createUpdate(eventTime, lane);
update.payload = payload;
if (callback !== undefined && callback !== null) {
@@ -12771,14 +12494,13 @@
}
enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
},
enqueueReplaceState: function (inst, payload, callback) {
var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
+ var update = createUpdate(eventTime, lane);
update.tag = ReplaceState;
update.payload = payload;
@@ -12791,14 +12513,13 @@
}
enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
},
enqueueForceUpdate: function (inst, callback) {
var fiber = get(inst);
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
- var update = createUpdate(expirationTime, suspenseConfig);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
+ var update = createUpdate(eventTime, lane);
update.tag = ForceUpdate;
if (callback !== undefined && callback !== null) {
@@ -12810,7 +12531,7 @@
}
enqueueUpdate(fiber, update);
- scheduleWork(fiber, expirationTime);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
}
};
@@ -12820,14 +12541,18 @@
if (typeof instance.shouldComponentUpdate === 'function') {
{
if ( workInProgress.mode & StrictMode) {
- // Invoke the function an extra time to help detect side-effects.
- instance.shouldComponentUpdate(newProps, newState, nextContext);
+ disableLogs();
+
+ try {
+ // Invoke the function an extra time to help detect side-effects.
+ instance.shouldComponentUpdate(newProps, newState, nextContext);
+ } finally {
+ reenableLogs();
+ }
}
}
- startPhaseTimer(workInProgress, 'shouldComponentUpdate');
var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
- stopPhaseTimer();
{
if (shouldUpdate === undefined) {
@@ -13008,7 +12733,13 @@
{
if ( workInProgress.mode & StrictMode) {
- new ctor(props, context); // eslint-disable-line no-new
+ disableLogs();
+
+ try {
+ new ctor(props, context); // eslint-disable-line no-new
+ } finally {
+ reenableLogs();
+ }
}
}
@@ -13061,7 +12792,7 @@
if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
- error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
+ error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
}
}
}
@@ -13077,7 +12808,6 @@
}
function callComponentWillMount(workInProgress, instance) {
- startPhaseTimer(workInProgress, 'componentWillMount');
var oldState = instance.state;
if (typeof instance.componentWillMount === 'function') {
@@ -13088,8 +12818,6 @@
instance.UNSAFE_componentWillMount();
}
- stopPhaseTimer();
-
if (oldState !== instance.state) {
{
error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
@@ -13101,7 +12829,6 @@
function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
var oldState = instance.state;
- startPhaseTimer(workInProgress, 'componentWillReceiveProps');
if (typeof instance.componentWillReceiveProps === 'function') {
instance.componentWillReceiveProps(newProps, nextContext);
@@ -13111,8 +12838,6 @@
instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
}
- stopPhaseTimer();
-
if (instance.state !== oldState) {
{
var componentName = getComponentName(workInProgress.type) || 'Component';
@@ -13129,7 +12854,7 @@
} // Invokes the mount life-cycles on a previously never rendered instance.
- function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
+ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
{
checkClassInstance(workInProgress, ctor, newProps);
}
@@ -13168,7 +12893,7 @@
}
}
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
@@ -13183,16 +12908,16 @@
callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
// process them now.
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
}
if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
}
- function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
+ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
var oldProps = workInProgress.memoizedProps;
instance.props = oldProps;
@@ -13223,14 +12948,14 @@
resetHasForceUpdateBeforeProcessing();
var oldState = workInProgress.memoizedState;
var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
newState = workInProgress.memoizedState;
if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
return false;
@@ -13247,8 +12972,6 @@
// In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
- startPhaseTimer(workInProgress, 'componentWillMount');
-
if (typeof instance.componentWillMount === 'function') {
instance.componentWillMount();
}
@@ -13256,18 +12979,16 @@
if (typeof instance.UNSAFE_componentWillMount === 'function') {
instance.UNSAFE_componentWillMount();
}
-
- stopPhaseTimer();
}
if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
} else {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidMount === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
} // If shouldComponentUpdate returned false, we should still update the
// memoized state to indicate that this work can be reused.
@@ -13285,11 +13006,13 @@
} // Invokes the update life-cycles and returns false if it shouldn't rerender.
- function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
+ function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {
var instance = workInProgress.stateNode;
cloneUpdateQueue(current, workInProgress);
- var oldProps = workInProgress.memoizedProps;
- instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);
+ var unresolvedOldProps = workInProgress.memoizedProps;
+ var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
+ instance.props = oldProps;
+ var unresolvedNewProps = workInProgress.pendingProps;
var oldContext = instance.context;
var contextType = ctor.contextType;
var nextContext = emptyContextObject;
@@ -13309,7 +13032,7 @@
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
- if (oldProps !== newProps || oldContext !== nextContext) {
+ if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
}
}
@@ -13317,21 +13040,21 @@
resetHasForceUpdateBeforeProcessing();
var oldState = workInProgress.memoizedState;
var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
+ processUpdateQueue(workInProgress, newProps, instance, renderLanes);
newState = workInProgress.memoizedState;
- if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
+ if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Update;
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
+ workInProgress.flags |= Update;
}
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Snapshot;
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
+ workInProgress.flags |= Snapshot;
}
}
@@ -13349,8 +13072,6 @@
// In order to support react-lifecycles-compat polyfilled components,
// Unsafe lifecycles should not be invoked for components using the new APIs.
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
- startPhaseTimer(workInProgress, 'componentWillUpdate');
-
if (typeof instance.componentWillUpdate === 'function') {
instance.componentWillUpdate(newProps, newState, nextContext);
}
@@ -13358,29 +13079,27 @@
if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
}
-
- stopPhaseTimer();
}
if (typeof instance.componentDidUpdate === 'function') {
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- workInProgress.effectTag |= Snapshot;
+ workInProgress.flags |= Snapshot;
}
} else {
// If an update was already in progress, we should schedule an Update
// effect even though we're bailing out, so that cWU/cDU are called.
if (typeof instance.componentDidUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Update;
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
+ workInProgress.flags |= Update;
}
}
if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.effectTag |= Snapshot;
+ if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
+ workInProgress.flags |= Snapshot;
}
} // If shouldComponentUpdate returned false, we should still update the
// memoized props/state to indicate that this work can be reused.
@@ -13404,7 +13123,7 @@
var ownerHasKeyUseWarning;
var ownerHasFunctionTypeWarning;
- var warnForMissingKey = function (child) {};
+ var warnForMissingKey = function (child, returnFiber) {};
{
didWarnAboutMaps = false;
@@ -13419,7 +13138,7 @@
ownerHasKeyUseWarning = {};
ownerHasFunctionTypeWarning = {};
- warnForMissingKey = function (child) {
+ warnForMissingKey = function (child, returnFiber) {
if (child === null || typeof child !== 'object') {
return;
}
@@ -13435,15 +13154,15 @@
}
child._store.validated = true;
- var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
+ var componentName = getComponentName(returnFiber.type) || 'Component';
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
+ if (ownerHasKeyUseWarning[componentName]) {
return;
}
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
+ ownerHasKeyUseWarning[componentName] = true;
- error('Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
+ error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
};
}
@@ -13464,7 +13183,7 @@
if (!didWarnAboutStringRefs[componentName]) {
{
- error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref%s', mixedRef, getStackByFiberInDevAndProd(returnFiber));
+ error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);
}
didWarnAboutStringRefs[componentName] = true;
@@ -13481,7 +13200,7 @@
if (!(ownerFiber.tag === ClassComponent)) {
{
- throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref" );
+ throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref" );
}
}
@@ -13526,7 +13245,7 @@
if (!element._owner) {
{
- throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information." );
+ throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." );
}
}
}
@@ -13537,33 +13256,27 @@
function throwOnInvalidObjectType(returnFiber, newChild) {
if (returnFiber.type !== 'textarea') {
- var addendum = '';
-
- {
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
- }
-
{
{
- throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + ")." + addendum );
+ throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + "). If you meant to render a collection of children, use an array instead." );
}
}
}
}
- function warnOnFunctionType() {
+ function warnOnFunctionType(returnFiber) {
{
- var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();
+ var componentName = getComponentName(returnFiber.type) || 'Component';
- if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
+ if (ownerHasFunctionTypeWarning[componentName]) {
return;
}
- ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;
+ ownerHasFunctionTypeWarning[componentName] = true;
error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
}
- } // This wrapper function exists because I expect to clone the code in each path
+ } // We avoid inlining this to avoid potential deopts from using try/catch.
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
@@ -13591,7 +13304,7 @@
}
childToDelete.nextEffect = null;
- childToDelete.effectTag = Deletion;
+ childToDelete.flags = Deletion;
}
function deleteRemainingChildren(returnFiber, currentFirstChild) {
@@ -13656,7 +13369,7 @@
if (oldIndex < lastPlacedIndex) {
// This is a move.
- newFiber.effectTag = Placement;
+ newFiber.flags = Placement;
return lastPlacedIndex;
} else {
// This item can stay in place.
@@ -13664,7 +13377,7 @@
}
} else {
// This is an insertion.
- newFiber.effectTag = Placement;
+ newFiber.flags = Placement;
return lastPlacedIndex;
}
}
@@ -13673,16 +13386,16 @@
// This is simpler for the single child case. We only need to do a
// placement for inserting new children.
if (shouldTrackSideEffects && newFiber.alternate === null) {
- newFiber.effectTag = Placement;
+ newFiber.flags = Placement;
}
return newFiber;
}
- function updateTextNode(returnFiber, current, textContent, expirationTime) {
+ function updateTextNode(returnFiber, current, textContent, lanes) {
if (current === null || current.tag !== HostText) {
// Insert
- var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
+ var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
@@ -13693,7 +13406,7 @@
}
}
- function updateElement(returnFiber, current, element, expirationTime) {
+ function updateElement(returnFiber, current, element, lanes) {
if (current !== null) {
if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
isCompatibleFamilyForHotReloading(current, element) )) {
@@ -13712,16 +13425,16 @@
} // Insert
- var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
+ var created = createFiberFromElement(element, returnFiber.mode, lanes);
created.ref = coerceRef(returnFiber, current, element);
created.return = returnFiber;
return created;
}
- function updatePortal(returnFiber, current, portal, expirationTime) {
+ function updatePortal(returnFiber, current, portal, lanes) {
if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
// Insert
- var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
+ var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
@@ -13732,10 +13445,10 @@
}
}
- function updateFragment(returnFiber, current, fragment, expirationTime, key) {
+ function updateFragment(returnFiber, current, fragment, lanes, key) {
if (current === null || current.tag !== Fragment) {
// Insert
- var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
+ var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
created.return = returnFiber;
return created;
} else {
@@ -13746,12 +13459,12 @@
}
}
- function createChild(returnFiber, newChild, expirationTime) {
+ function createChild(returnFiber, newChild, lanes) {
if (typeof newChild === 'string' || typeof newChild === 'number') {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
// node.
- var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
+ var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
@@ -13760,7 +13473,7 @@
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
{
- var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);
+ var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);
_created.ref = coerceRef(returnFiber, null, newChild);
_created.return = returnFiber;
@@ -13769,7 +13482,7 @@
case REACT_PORTAL_TYPE:
{
- var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
+ var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);
_created2.return = returnFiber;
return _created2;
@@ -13777,7 +13490,7 @@
}
if (isArray$1(newChild) || getIteratorFn(newChild)) {
- var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);
+ var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);
_created3.return = returnFiber;
return _created3;
@@ -13788,14 +13501,14 @@
{
if (typeof newChild === 'function') {
- warnOnFunctionType();
+ warnOnFunctionType(returnFiber);
}
}
return null;
}
- function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
+ function updateSlot(returnFiber, oldFiber, newChild, lanes) {
// Update the fiber if the keys match, otherwise return null.
var key = oldFiber !== null ? oldFiber.key : null;
@@ -13807,7 +13520,7 @@
return null;
}
- return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
+ return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);
}
if (typeof newChild === 'object' && newChild !== null) {
@@ -13816,10 +13529,10 @@
{
if (newChild.key === key) {
if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
+ return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);
}
- return updateElement(returnFiber, oldFiber, newChild, expirationTime);
+ return updateElement(returnFiber, oldFiber, newChild, lanes);
} else {
return null;
}
@@ -13828,7 +13541,7 @@
case REACT_PORTAL_TYPE:
{
if (newChild.key === key) {
- return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
+ return updatePortal(returnFiber, oldFiber, newChild, lanes);
} else {
return null;
}
@@ -13840,7 +13553,7 @@
return null;
}
- return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
+ return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
}
throwOnInvalidObjectType(returnFiber, newChild);
@@ -13848,19 +13561,19 @@
{
if (typeof newChild === 'function') {
- warnOnFunctionType();
+ warnOnFunctionType(returnFiber);
}
}
return null;
}
- function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
+ function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
if (typeof newChild === 'string' || typeof newChild === 'number') {
// Text nodes don't have keys, so we neither have to check the old nor
// new node for the key. If both are text nodes, they match.
var matchedFiber = existingChildren.get(newIdx) || null;
- return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
+ return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);
}
if (typeof newChild === 'object' && newChild !== null) {
@@ -13870,24 +13583,25 @@
var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
+ return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);
}
- return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
+ return updateElement(returnFiber, _matchedFiber, newChild, lanes);
}
case REACT_PORTAL_TYPE:
{
var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
- return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
+ return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
}
+
}
if (isArray$1(newChild) || getIteratorFn(newChild)) {
var _matchedFiber3 = existingChildren.get(newIdx) || null;
- return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
+ return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
}
throwOnInvalidObjectType(returnFiber, newChild);
@@ -13895,7 +13609,7 @@
{
if (typeof newChild === 'function') {
- warnOnFunctionType();
+ warnOnFunctionType(returnFiber);
}
}
@@ -13906,7 +13620,7 @@
*/
- function warnOnInvalidKey(child, knownKeys) {
+ function warnOnInvalidKey(child, knownKeys, returnFiber) {
{
if (typeof child !== 'object' || child === null) {
return knownKeys;
@@ -13915,7 +13629,7 @@
switch (child.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
- warnForMissingKey(child);
+ warnForMissingKey(child, returnFiber);
var key = child.key;
if (typeof key !== 'string') {
@@ -13942,7 +13656,7 @@
return knownKeys;
}
- function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
+ function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
// This algorithm can't optimize by searching from both ends since we
// don't have backpointers on fibers. I'm trying to see how far we can get
// with that model. If it ends up not being worth the tradeoffs, we can
@@ -13964,7 +13678,7 @@
for (var i = 0; i < newChildren.length; i++) {
var child = newChildren[i];
- knownKeys = warnOnInvalidKey(child, knownKeys);
+ knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}
@@ -13983,7 +13697,7 @@
nextOldFiber = oldFiber.sibling;
}
- var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
+ var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
if (newFiber === null) {
// TODO: This breaks on empty slots like null children. That's
@@ -14032,7 +13746,7 @@
// If we don't have any more existing children we can choose a fast path
// since the rest will all be insertions.
for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
+ var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);
if (_newFiber === null) {
continue;
@@ -14057,7 +13771,7 @@
var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
+ var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);
if (_newFiber2 !== null) {
if (shouldTrackSideEffects) {
@@ -14093,7 +13807,7 @@
return resultingFirstChild;
}
- function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
+ function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
// This is the same implementation as reconcileChildrenArray(),
// but using the iterator instead.
var iteratorFn = getIteratorFn(newChildrenIterable);
@@ -14119,7 +13833,7 @@
if (newChildrenIterable.entries === iteratorFn) {
if (!didWarnAboutMaps) {
- error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');
+ error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
}
didWarnAboutMaps = true;
@@ -14136,7 +13850,7 @@
for (; !_step.done; _step = _newChildren.next()) {
var child = _step.value;
- knownKeys = warnOnInvalidKey(child, knownKeys);
+ knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}
}
@@ -14165,7 +13879,7 @@
nextOldFiber = oldFiber.sibling;
}
- var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
+ var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
if (newFiber === null) {
// TODO: This breaks on empty slots like null children. That's
@@ -14214,7 +13928,7 @@
// If we don't have any more existing children we can choose a fast path
// since the rest will all be insertions.
for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
+ var _newFiber3 = createChild(returnFiber, step.value, lanes);
if (_newFiber3 === null) {
continue;
@@ -14239,7 +13953,7 @@
var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
+ var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);
if (_newFiber4 !== null) {
if (shouldTrackSideEffects) {
@@ -14275,7 +13989,7 @@
return resultingFirstChild;
}
- function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
+ function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
// There's no need to check for keys on text nodes since we don't have a
// way to define them.
if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
@@ -14290,12 +14004,12 @@
deleteRemainingChildren(returnFiber, currentFirstChild);
- var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
+ var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
- function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
+ function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
var key = element.key;
var child = currentFirstChild;
@@ -14361,11 +14075,11 @@
}
if (element.type === REACT_FRAGMENT_TYPE) {
- var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
+ var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
created.return = returnFiber;
return created;
} else {
- var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);
+ var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);
_created4.ref = coerceRef(returnFiber, currentFirstChild, element);
_created4.return = returnFiber;
@@ -14373,7 +14087,7 @@
}
}
- function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
+ function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
var key = portal.key;
var child = currentFirstChild;
@@ -14397,7 +14111,7 @@
child = child.sibling;
}
- var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
+ var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} // This API will tag the children with the side-effect of the reconciliation
@@ -14405,7 +14119,7 @@
// children and the parent.
- function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
+ function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
// This function is not recursive.
// If the top level item is an array, we treat it as a set of children,
// not as a fragment. Nested arrays on the other hand will be treated as
@@ -14425,23 +14139,24 @@
if (isObject) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
- return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
+ return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));
case REACT_PORTAL_TYPE:
- return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
+ return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
+
}
}
if (typeof newChild === 'string' || typeof newChild === 'number') {
- return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
+ return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
}
if (isArray$1(newChild)) {
- return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
+ return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
}
if (getIteratorFn(newChild)) {
- return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
+ return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
}
if (isObject) {
@@ -14450,7 +14165,7 @@
{
if (typeof newChild === 'function') {
- warnOnFunctionType();
+ warnOnFunctionType(returnFiber);
}
}
@@ -14474,13 +14189,14 @@
// functions and classes
// eslint-disable-next-lined no-fallthrough
+ case Block:
case FunctionComponent:
+ case ForwardRef:
+ case SimpleMemoComponent:
{
- var Component = returnFiber.type;
-
{
{
- throw Error( (Component.displayName || Component.name || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
+ throw Error( (getComponentName(returnFiber.type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
}
}
}
@@ -14521,11 +14237,11 @@
newChild.sibling = null;
} // Reset a workInProgress child set to prepare it for a second pass.
- function resetChildFibers(workInProgress, renderExpirationTime) {
+ function resetChildFibers(workInProgress, lanes) {
var child = workInProgress.child;
while (child !== null) {
- resetWorkInProgress(child, renderExpirationTime);
+ resetWorkInProgress(child, lanes);
child = child.sibling;
}
}
@@ -14695,7 +14411,7 @@
} else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
// keep track of whether it suspended or not.
node.memoizedProps.revealOrder !== undefined) {
- var didSuspend = (node.effectTag & DidCapture) !== NoEffect;
+ var didSuspend = (node.flags & DidCapture) !== NoFlags;
if (didSuspend) {
return node;
@@ -14725,18 +14441,9 @@
return null;
}
- function createDeprecatedResponderListener(responder, props) {
- var eventResponderListener = {
- responder: responder,
- props: props
- };
-
- {
- Object.freeze(eventResponderListener);
- }
-
- return eventResponderListener;
- }
+ var NoFlags$1 =
+ /* */
+ 0; // Represents whether effect should fire.
var HasEffect =
/* */
@@ -14749,16 +14456,381 @@
/* */
4;
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
+ // This may have been an insertion or a hydration.
+
+ var hydrationParentFiber = null;
+ var nextHydratableInstance = null;
+ var isHydrating = false;
+
+ function enterHydrationState(fiber) {
+
+ var parentInstance = fiber.stateNode.containerInfo;
+ nextHydratableInstance = getFirstHydratableChild(parentInstance);
+ hydrationParentFiber = fiber;
+ isHydrating = true;
+ return true;
+ }
+
+ function deleteHydratableInstance(returnFiber, instance) {
+ {
+ switch (returnFiber.tag) {
+ case HostRoot:
+ didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
+ break;
+
+ case HostComponent:
+ didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
+ break;
+ }
+ }
+
+ var childToDelete = createFiberFromHostInstanceForDeletion();
+ childToDelete.stateNode = instance;
+ childToDelete.return = returnFiber;
+ childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
+ // these children are not part of the reconciliation list of children.
+ // Even if we abort and rereconcile the children, that will try to hydrate
+ // again and the nodes are still in the host tree so these will be
+ // recreated.
+
+ if (returnFiber.lastEffect !== null) {
+ returnFiber.lastEffect.nextEffect = childToDelete;
+ returnFiber.lastEffect = childToDelete;
+ } else {
+ returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
+ }
+ }
+
+ function insertNonHydratedInstance(returnFiber, fiber) {
+ fiber.flags = fiber.flags & ~Hydrating | Placement;
+
+ {
+ switch (returnFiber.tag) {
+ case HostRoot:
+ {
+ var parentContainer = returnFiber.stateNode.containerInfo;
+
+ switch (fiber.tag) {
+ case HostComponent:
+ var type = fiber.type;
+ var props = fiber.pendingProps;
+ didNotFindHydratableContainerInstance(parentContainer, type);
+ break;
+
+ case HostText:
+ var text = fiber.pendingProps;
+ didNotFindHydratableContainerTextInstance(parentContainer, text);
+ break;
+ }
+
+ break;
+ }
+
+ case HostComponent:
+ {
+ var parentType = returnFiber.type;
+ var parentProps = returnFiber.memoizedProps;
+ var parentInstance = returnFiber.stateNode;
+
+ switch (fiber.tag) {
+ case HostComponent:
+ var _type = fiber.type;
+ var _props = fiber.pendingProps;
+ didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
+ break;
+
+ case HostText:
+ var _text = fiber.pendingProps;
+ didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
+ break;
+
+ case SuspenseComponent:
+ didNotFindHydratableSuspenseInstance(parentType, parentProps);
+ break;
+ }
+
+ break;
+ }
+
+ default:
+ return;
+ }
+ }
+ }
+
+ function tryHydrate(fiber, nextInstance) {
+ switch (fiber.tag) {
+ case HostComponent:
+ {
+ var type = fiber.type;
+ var props = fiber.pendingProps;
+ var instance = canHydrateInstance(nextInstance, type);
+
+ if (instance !== null) {
+ fiber.stateNode = instance;
+ return true;
+ }
+
+ return false;
+ }
+
+ case HostText:
+ {
+ var text = fiber.pendingProps;
+ var textInstance = canHydrateTextInstance(nextInstance, text);
+
+ if (textInstance !== null) {
+ fiber.stateNode = textInstance;
+ return true;
+ }
+
+ return false;
+ }
+
+ case SuspenseComponent:
+ {
+
+ return false;
+ }
+
+ default:
+ return false;
+ }
+ }
+
+ function tryToClaimNextHydratableInstance(fiber) {
+ if (!isHydrating) {
+ return;
+ }
+
+ var nextInstance = nextHydratableInstance;
+
+ if (!nextInstance) {
+ // Nothing to hydrate. Make it an insertion.
+ insertNonHydratedInstance(hydrationParentFiber, fiber);
+ isHydrating = false;
+ hydrationParentFiber = fiber;
+ return;
+ }
+
+ var firstAttemptedInstance = nextInstance;
+
+ if (!tryHydrate(fiber, nextInstance)) {
+ // If we can't hydrate this instance let's try the next one.
+ // We use this as a heuristic. It's based on intuition and not data so it
+ // might be flawed or unnecessary.
+ nextInstance = getNextHydratableSibling(firstAttemptedInstance);
+
+ if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
+ // Nothing to hydrate. Make it an insertion.
+ insertNonHydratedInstance(hydrationParentFiber, fiber);
+ isHydrating = false;
+ hydrationParentFiber = fiber;
+ return;
+ } // We matched the next one, we'll now assume that the first one was
+ // superfluous and we'll delete it. Since we can't eagerly delete it
+ // we'll have to schedule a deletion. To do that, this node needs a dummy
+ // fiber associated with it.
+
+
+ deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
+ }
+
+ hydrationParentFiber = fiber;
+ nextHydratableInstance = getFirstHydratableChild(nextInstance);
+ }
+
+ function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
+
+ var instance = fiber.stateNode;
+ var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
+
+ fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
+ // is a new ref we mark this as an update.
+
+ if (updatePayload !== null) {
+ return true;
+ }
+
+ return false;
+ }
+
+ function prepareToHydrateHostTextInstance(fiber) {
+
+ var textInstance = fiber.stateNode;
+ var textContent = fiber.memoizedProps;
+ var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
+
+ {
+ if (shouldUpdate) {
+ // We assume that prepareToHydrateHostTextInstance is called in a context where the
+ // hydration parent is the parent host component of this host text.
+ var returnFiber = hydrationParentFiber;
+
+ if (returnFiber !== null) {
+ switch (returnFiber.tag) {
+ case HostRoot:
+ {
+ var parentContainer = returnFiber.stateNode.containerInfo;
+ didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
+ break;
+ }
+
+ case HostComponent:
+ {
+ var parentType = returnFiber.type;
+ var parentProps = returnFiber.memoizedProps;
+ var parentInstance = returnFiber.stateNode;
+ didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return shouldUpdate;
+ }
+
+ function skipPastDehydratedSuspenseInstance(fiber) {
+
+ var suspenseState = fiber.memoizedState;
+ var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
+
+ if (!suspenseInstance) {
+ {
+ throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+
+ return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
+ }
+
+ function popToNextHostParent(fiber) {
+ var parent = fiber.return;
+
+ while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
+ parent = parent.return;
+ }
+
+ hydrationParentFiber = parent;
+ }
+
+ function popHydrationState(fiber) {
+
+ if (fiber !== hydrationParentFiber) {
+ // We're deeper than the current hydration context, inside an inserted
+ // tree.
+ return false;
+ }
+
+ if (!isHydrating) {
+ // If we're not currently hydrating but we're in a hydration context, then
+ // we were an insertion and now need to pop up reenter hydration of our
+ // siblings.
+ popToNextHostParent(fiber);
+ isHydrating = true;
+ return false;
+ }
+
+ var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
+ // We only do this deeper than head and body since they tend to have random
+ // other nodes in them. We also ignore components with pure text content in
+ // side of them.
+ // TODO: Better heuristic.
+
+ if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
+ var nextInstance = nextHydratableInstance;
+
+ while (nextInstance) {
+ deleteHydratableInstance(fiber, nextInstance);
+ nextInstance = getNextHydratableSibling(nextInstance);
+ }
+ }
+
+ popToNextHostParent(fiber);
+
+ if (fiber.tag === SuspenseComponent) {
+ nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
+ } else {
+ nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
+ }
+
+ return true;
+ }
+
+ function resetHydrationState() {
+
+ hydrationParentFiber = null;
+ nextHydratableInstance = null;
+ isHydrating = false;
+ }
+
+ function getIsHydrating() {
+ return isHydrating;
+ }
+
+ // and should be reset before starting a new render.
+ // This tracks which mutable sources need to be reset after a render.
+
+ var workInProgressSources = [];
+ var rendererSigil$1;
+
+ {
+ // Used to detect multiple renderers using the same mutable source.
+ rendererSigil$1 = {};
+ }
+
+ function markSourceAsDirty(mutableSource) {
+ workInProgressSources.push(mutableSource);
+ }
+ function resetWorkInProgressVersions() {
+ for (var i = 0; i < workInProgressSources.length; i++) {
+ var mutableSource = workInProgressSources[i];
+
+ {
+ mutableSource._workInProgressVersionPrimary = null;
+ }
+ }
+
+ workInProgressSources.length = 0;
+ }
+ function getWorkInProgressVersion(mutableSource) {
+ {
+ return mutableSource._workInProgressVersionPrimary;
+ }
+ }
+ function setWorkInProgressVersion(mutableSource, version) {
+ {
+ mutableSource._workInProgressVersionPrimary = version;
+ }
+
+ workInProgressSources.push(mutableSource);
+ }
+ function warnAboutMultipleRenderersDEV(mutableSource) {
+ {
+ {
+ if (mutableSource._currentPrimaryRenderer == null) {
+ mutableSource._currentPrimaryRenderer = rendererSigil$1;
+ } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {
+ error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');
+ }
+ }
+ }
+ } // Eager reads the version of a mutable source and stores it on the root.
+
+ var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
var didWarnAboutMismatchedHooksForComponent;
+ var didWarnAboutUseOpaqueIdentifier;
{
+ didWarnAboutUseOpaqueIdentifier = {};
didWarnAboutMismatchedHooksForComponent = new Set();
}
// These are set right before calling the component.
- var renderExpirationTime = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from
+ var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
@@ -14772,7 +14844,12 @@
// finished evaluating this component. This is an optimization so we know
// whether we need to clear render phase updates after a throw.
- var didScheduleRenderPhaseUpdate = false;
+ var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This
+ // gets reset after each attempt.
+ // TODO: Maybe there's some way to consolidate this with
+ // `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.
+
+ var didScheduleRenderPhaseUpdateDuringThisPass = false;
var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook
var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
@@ -14847,7 +14924,7 @@
table += row;
}
- error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
+ error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
}
}
}
@@ -14856,7 +14933,7 @@
function throwInvalidHookError() {
{
{
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
+ throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
}
}
}
@@ -14896,8 +14973,8 @@
return true;
}
- function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderExpirationTime) {
- renderExpirationTime = nextRenderExpirationTime;
+ function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
+ renderLanes = nextRenderLanes;
currentlyRenderingFiber$1 = workInProgress;
{
@@ -14909,7 +14986,7 @@
workInProgress.memoizedState = null;
workInProgress.updateQueue = null;
- workInProgress.expirationTime = NoWork; // The following should have already been reset
+ workInProgress.lanes = NoLanes; // The following should have already been reset
// currentHook = null;
// workInProgressHook = null;
// didScheduleRenderPhaseUpdate = false;
@@ -14922,28 +14999,28 @@
{
if (current !== null && current.memoizedState !== null) {
- ReactCurrentDispatcher.current = HooksDispatcherOnUpdateInDEV;
+ ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
} else if (hookTypesDev !== null) {
// This dispatcher handles an edge case where a component is updating,
// but no stateful hooks have been used.
// We want to match the production code behavior (which will use HooksDispatcherOnMount),
// but with the extra DEV validation to ensure hooks ordering hasn't changed.
// This dispatcher does that.
- ReactCurrentDispatcher.current = HooksDispatcherOnMountWithHookTypesInDEV;
+ ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
} else {
- ReactCurrentDispatcher.current = HooksDispatcherOnMountInDEV;
+ ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
}
}
var children = Component(props, secondArg); // Check if there was a render phase update
- if (workInProgress.expirationTime === renderExpirationTime) {
+ if (didScheduleRenderPhaseUpdateDuringThisPass) {
// Keep rendering in a loop for as long as render phase updates continue to
// be scheduled. Use a counter to prevent infinite loops.
var numberOfReRenders = 0;
do {
- workInProgress.expirationTime = NoWork;
+ didScheduleRenderPhaseUpdateDuringThisPass = false;
if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
{
@@ -14969,14 +15046,14 @@
hookTypesUpdateIndexDev = -1;
}
- ReactCurrentDispatcher.current = HooksDispatcherOnRerenderInDEV ;
+ ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;
children = Component(props, secondArg);
- } while (workInProgress.expirationTime === renderExpirationTime);
+ } while (didScheduleRenderPhaseUpdateDuringThisPass);
} // We can assume the previous dispatcher is always this one, since we set it
// at the beginning of the render phase and there's no re-entrancy.
- ReactCurrentDispatcher.current = ContextOnlyDispatcher;
+ ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
{
workInProgress._debugHookTypes = hookTypesDev;
@@ -14985,7 +15062,7 @@
var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
- renderExpirationTime = NoWork;
+ renderLanes = NoLanes;
currentlyRenderingFiber$1 = null;
currentHook = null;
workInProgressHook = null;
@@ -15006,18 +15083,15 @@
return children;
}
- function bailoutHooks(current, workInProgress, expirationTime) {
+ function bailoutHooks(current, workInProgress, lanes) {
workInProgress.updateQueue = current.updateQueue;
- workInProgress.effectTag &= ~(Passive | Update);
-
- if (current.expirationTime <= expirationTime) {
- current.expirationTime = NoWork;
- }
+ workInProgress.flags &= ~(Passive | Update);
+ current.lanes = removeLanes(current.lanes, lanes);
}
function resetHooksAfterThrow() {
// We can assume the previous dispatcher is always this one, since we set it
// at the beginning of the render phase and there's no re-entrancy.
- ReactCurrentDispatcher.current = ContextOnlyDispatcher;
+ ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
if (didScheduleRenderPhaseUpdate) {
// There were render phase updates. These are only valid for this render
@@ -15039,9 +15113,11 @@
hook = hook.next;
}
+
+ didScheduleRenderPhaseUpdate = false;
}
- renderExpirationTime = NoWork;
+ renderLanes = NoLanes;
currentlyRenderingFiber$1 = null;
currentHook = null;
workInProgressHook = null;
@@ -15050,9 +15126,10 @@
hookTypesDev = null;
hookTypesUpdateIndexDev = -1;
currentHookNameInDev = null;
+ isUpdatingOpaqueValueInRenderPhase = false;
}
- didScheduleRenderPhaseUpdate = false;
+ didScheduleRenderPhaseUpdateDuringThisPass = false;
}
function mountWorkInProgressHook() {
@@ -15197,6 +15274,14 @@
pendingQueue.next = baseFirst;
}
+ {
+ if (current.baseQueue !== baseQueue) {
+ // Internal invariant that should never happen, but feasibly could in
+ // the future if we implement resuming, or some form of that.
+ error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');
+ }
+ }
+
current.baseQueue = baseQueue = pendingQueue;
queue.pending = null;
}
@@ -15211,15 +15296,14 @@
var update = first;
do {
- var updateExpirationTime = update.expirationTime;
+ var updateLane = update.lane;
- if (updateExpirationTime < renderExpirationTime) {
+ if (!isSubsetOfLanes(renderLanes, updateLane)) {
// Priority is insufficient. Skip this update. If this is the first
// skipped update, the previous update/state is the new base
// update/state.
var clone = {
- expirationTime: update.expirationTime,
- suspenseConfig: update.suspenseConfig,
+ lane: updateLane,
action: update.action,
eagerReducer: update.eagerReducer,
eagerState: update.eagerState,
@@ -15232,34 +15316,28 @@
} else {
newBaseQueueLast = newBaseQueueLast.next = clone;
} // Update the remaining priority in the queue.
+ // TODO: Don't need to accumulate this. Instead, we can remove
+ // renderLanes from the original lanes.
- if (updateExpirationTime > currentlyRenderingFiber$1.expirationTime) {
- currentlyRenderingFiber$1.expirationTime = updateExpirationTime;
- markUnprocessedUpdateTime(updateExpirationTime);
- }
+ currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
+ markSkippedUpdateLanes(updateLane);
} else {
// This update does have sufficient priority.
if (newBaseQueueLast !== null) {
var _clone = {
- expirationTime: Sync,
- // This update is going to be committed so we never want uncommit it.
- suspenseConfig: update.suspenseConfig,
+ // This update is going to be committed so we never want uncommit
+ // it. Using NoLane works because 0 is a subset of all bitmasks, so
+ // this will never be skipped by the check above.
+ lane: NoLane,
action: update.action,
eagerReducer: update.eagerReducer,
eagerState: update.eagerState,
next: null
};
newBaseQueueLast = newBaseQueueLast.next = _clone;
- } // Mark the event time of this update as relevant to this render pass.
- // TODO: This should ideally use the true event time of this update rather than
- // its priority which is a derived and not reverseable value.
- // TODO: We should skip this update if it was already committed but currently
- // we have no way of detecting the difference between a committed and suspended
- // update here.
-
+ } // Process this update.
- markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.
if (update.eagerReducer === reducer) {
// If this update was processed eagerly, and its reducer matches the
@@ -15349,6 +15427,227 @@
return [newState, dispatch];
}
+ function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
+ {
+ warnAboutMultipleRenderersDEV(source);
+ }
+
+ var getVersion = source._getVersion;
+ var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?
+
+ var isSafeToReadFromSource = false; // Check the version first.
+ // If this render has already been started with a specific version,
+ // we can use it alone to determine if we can safely read from the source.
+
+ var currentRenderVersion = getWorkInProgressVersion(source);
+
+ if (currentRenderVersion !== null) {
+ // It's safe to read if the store hasn't been mutated since the last time
+ // we read something.
+ isSafeToReadFromSource = currentRenderVersion === version;
+ } else {
+ // If there's no version, then this is the first time we've read from the
+ // source during the current render pass, so we need to do a bit more work.
+ // What we need to determine is if there are any hooks that already
+ // subscribed to the source, and if so, whether there are any pending
+ // mutations that haven't been synchronized yet.
+ //
+ // If there are no pending mutations, then `root.mutableReadLanes` will be
+ // empty, and we know we can safely read.
+ //
+ // If there *are* pending mutations, we may still be able to safely read
+ // if the currently rendering lanes are inclusive of the pending mutation
+ // lanes, since that guarantees that the value we're about to read from
+ // the source is consistent with the values that we read during the most
+ // recent mutation.
+ isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);
+
+ if (isSafeToReadFromSource) {
+ // If it's safe to read from this source during the current render,
+ // store the version in case other components read from it.
+ // A changed version number will let those components know to throw and restart the render.
+ setWorkInProgressVersion(source, version);
+ }
+ }
+
+ if (isSafeToReadFromSource) {
+ var snapshot = getSnapshot(source._source);
+
+ {
+ if (typeof snapshot === 'function') {
+ error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
+ }
+ }
+
+ return snapshot;
+ } else {
+ // This handles the special case of a mutable source being shared between renderers.
+ // In that case, if the source is mutated between the first and second renderer,
+ // The second renderer don't know that it needs to reset the WIP version during unwind,
+ // (because the hook only marks sources as dirty if it's written to their WIP version).
+ // That would cause this tear check to throw again and eventually be visible to the user.
+ // We can avoid this infinite loop by explicitly marking the source as dirty.
+ //
+ // This can lead to tearing in the first renderer when it resumes,
+ // but there's nothing we can do about that (short of throwing here and refusing to continue the render).
+ markSourceAsDirty(source);
+
+ {
+ {
+ throw Error( "Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue." );
+ }
+ }
+ }
+ }
+
+ function useMutableSource(hook, source, getSnapshot, subscribe) {
+ var root = getWorkInProgressRoot();
+
+ if (!(root !== null)) {
+ {
+ throw Error( "Expected a work-in-progress root. This is a bug in React. Please file an issue." );
+ }
+ }
+
+ var getVersion = source._getVersion;
+ var version = getVersion(source._source);
+ var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
+
+ var _dispatcher$useState = dispatcher.useState(function () {
+ return readFromUnsubcribedMutableSource(root, source, getSnapshot);
+ }),
+ currentSnapshot = _dispatcher$useState[0],
+ setSnapshot = _dispatcher$useState[1];
+
+ var snapshot = currentSnapshot; // Grab a handle to the state hook as well.
+ // We use it to clear the pending update queue if we have a new source.
+
+ var stateHook = workInProgressHook;
+ var memoizedState = hook.memoizedState;
+ var refs = memoizedState.refs;
+ var prevGetSnapshot = refs.getSnapshot;
+ var prevSource = memoizedState.source;
+ var prevSubscribe = memoizedState.subscribe;
+ var fiber = currentlyRenderingFiber$1;
+ hook.memoizedState = {
+ refs: refs,
+ source: source,
+ subscribe: subscribe
+ }; // Sync the values needed by our subscription handler after each commit.
+
+ dispatcher.useEffect(function () {
+ refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,
+ // but this hook recreates the queue in certain cases to avoid updates from stale sources.
+ // handleChange() below needs to reference the dispatch function without re-subscribing,
+ // so we use a ref to ensure that it always has the latest version.
+
+ refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.
+
+ var maybeNewVersion = getVersion(source._source);
+
+ if (!objectIs(version, maybeNewVersion)) {
+ var maybeNewSnapshot = getSnapshot(source._source);
+
+ {
+ if (typeof maybeNewSnapshot === 'function') {
+ error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
+ }
+ }
+
+ if (!objectIs(snapshot, maybeNewSnapshot)) {
+ setSnapshot(maybeNewSnapshot);
+ var lane = requestUpdateLane(fiber);
+ markRootMutableRead(root, lane);
+ } // If the source mutated between render and now,
+ // there may be state updates already scheduled from the old source.
+ // Entangle the updates so that they render in the same batch.
+
+
+ markRootEntangled(root, root.mutableReadLanes);
+ }
+ }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.
+
+ dispatcher.useEffect(function () {
+ var handleChange = function () {
+ var latestGetSnapshot = refs.getSnapshot;
+ var latestSetSnapshot = refs.setSnapshot;
+
+ try {
+ latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.
+
+ var lane = requestUpdateLane(fiber);
+ markRootMutableRead(root, lane);
+ } catch (error) {
+ // A selector might throw after a source mutation.
+ // e.g. it might try to read from a part of the store that no longer exists.
+ // In this case we should still schedule an update with React.
+ // Worst case the selector will throw again and then an error boundary will handle it.
+ latestSetSnapshot(function () {
+ throw error;
+ });
+ }
+ };
+
+ var unsubscribe = subscribe(source._source, handleChange);
+
+ {
+ if (typeof unsubscribe !== 'function') {
+ error('Mutable source subscribe function must return an unsubscribe function.');
+ }
+ }
+
+ return unsubscribe;
+ }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.
+ //
+ // If either the source or the subscription have changed we can't can't trust the update queue.
+ // Maybe the source changed in a way that the old subscription ignored but the new one depends on.
+ //
+ // If the getSnapshot function changed, we also shouldn't rely on the update queue.
+ // It's possible that the underlying source was mutated between the when the last "change" event fired,
+ // and when the current render (with the new getSnapshot function) is processed.
+ //
+ // In both cases, we need to throw away pending updates (since they are no longer relevant)
+ // and treat reading from the source as we do in the mount case.
+
+ if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {
+ // Create a new queue and setState method,
+ // So if there are interleaved updates, they get pushed to the older queue.
+ // When this becomes current, the previous queue and dispatch method will be discarded,
+ // including any interleaving updates that occur.
+ var newQueue = {
+ pending: null,
+ dispatch: null,
+ lastRenderedReducer: basicStateReducer,
+ lastRenderedState: snapshot
+ };
+ newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);
+ stateHook.queue = newQueue;
+ stateHook.baseQueue = null;
+ snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
+ stateHook.memoizedState = stateHook.baseState = snapshot;
+ }
+
+ return snapshot;
+ }
+
+ function mountMutableSource(source, getSnapshot, subscribe) {
+ var hook = mountWorkInProgressHook();
+ hook.memoizedState = {
+ refs: {
+ getSnapshot: getSnapshot,
+ setSnapshot: null
+ },
+ source: source,
+ subscribe: subscribe
+ };
+ return useMutableSource(hook, source, getSnapshot, subscribe);
+ }
+
+ function updateMutableSource(source, getSnapshot, subscribe) {
+ var hook = updateWorkInProgressHook();
+ return useMutableSource(hook, source, getSnapshot, subscribe);
+ }
+
function mountState(initialState) {
var hook = mountWorkInProgressHook();
@@ -15426,14 +15725,14 @@
return hook.memoizedState;
}
- function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
+ function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
var hook = mountWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
- currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
- hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, undefined, nextDeps);
+ currentlyRenderingFiber$1.flags |= fiberFlags;
+ hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);
}
- function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
+ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
var hook = updateWorkInProgressHook();
var nextDeps = deps === undefined ? null : deps;
var destroy = undefined;
@@ -15446,14 +15745,14 @@
var prevDeps = prevEffect.deps;
if (areHookInputsEqual(nextDeps, prevDeps)) {
- pushEffect(hookEffectTag, create, destroy, nextDeps);
+ pushEffect(hookFlags, create, destroy, nextDeps);
return;
}
}
}
- currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
- hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, destroy, nextDeps);
+ currentlyRenderingFiber$1.flags |= fiberFlags;
+ hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);
}
function mountEffect(create, deps) {
@@ -15600,105 +15899,189 @@
return nextValue;
}
- function mountDeferredValue(value, config) {
+ function mountDeferredValue(value) {
var _mountState = mountState(value),
prevValue = _mountState[0],
setValue = _mountState[1];
mountEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
+ var prevTransition = ReactCurrentBatchConfig$1.transition;
+ ReactCurrentBatchConfig$1.transition = 1;
try {
setValue(value);
} finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
+ ReactCurrentBatchConfig$1.transition = prevTransition;
}
- }, [value, config]);
+ }, [value]);
return prevValue;
}
- function updateDeferredValue(value, config) {
+ function updateDeferredValue(value) {
var _updateState = updateState(),
prevValue = _updateState[0],
setValue = _updateState[1];
updateEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
+ var prevTransition = ReactCurrentBatchConfig$1.transition;
+ ReactCurrentBatchConfig$1.transition = 1;
try {
setValue(value);
} finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
+ ReactCurrentBatchConfig$1.transition = prevTransition;
}
- }, [value, config]);
+ }, [value]);
return prevValue;
}
- function rerenderDeferredValue(value, config) {
+ function rerenderDeferredValue(value) {
var _rerenderState = rerenderState(),
prevValue = _rerenderState[0],
setValue = _rerenderState[1];
updateEffect(function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
+ var prevTransition = ReactCurrentBatchConfig$1.transition;
+ ReactCurrentBatchConfig$1.transition = 1;
try {
setValue(value);
} finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
+ ReactCurrentBatchConfig$1.transition = prevTransition;
}
- }, [value, config]);
+ }, [value]);
return prevValue;
}
- function startTransition(setPending, config, callback) {
+ function startTransition(setPending, callback) {
var priorityLevel = getCurrentPriorityLevel();
- runWithPriority$1(priorityLevel < UserBlockingPriority$1 ? UserBlockingPriority$1 : priorityLevel, function () {
- setPending(true);
- });
- runWithPriority$1(priorityLevel > NormalPriority ? NormalPriority : priorityLevel, function () {
- var previousConfig = ReactCurrentBatchConfig$1.suspense;
- ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;
- try {
- setPending(false);
- callback();
- } finally {
- ReactCurrentBatchConfig$1.suspense = previousConfig;
- }
- });
+ {
+ runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {
+ setPending(true);
+ });
+ runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {
+ var prevTransition = ReactCurrentBatchConfig$1.transition;
+ ReactCurrentBatchConfig$1.transition = 1;
+
+ try {
+ setPending(false);
+ callback();
+ } finally {
+ ReactCurrentBatchConfig$1.transition = prevTransition;
+ }
+ });
+ }
}
- function mountTransition(config) {
+ function mountTransition() {
var _mountState2 = mountState(false),
isPending = _mountState2[0],
- setPending = _mountState2[1];
+ setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`
+ // never changes.
+
- var start = mountCallback(startTransition.bind(null, setPending, config), [setPending, config]);
+ var start = startTransition.bind(null, setPending);
+ mountRef(start);
return [start, isPending];
}
- function updateTransition(config) {
+ function updateTransition() {
var _updateState2 = updateState(),
- isPending = _updateState2[0],
- setPending = _updateState2[1];
+ isPending = _updateState2[0];
- var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
+ var startRef = updateRef();
+ var start = startRef.current;
return [start, isPending];
}
- function rerenderTransition(config) {
+ function rerenderTransition() {
var _rerenderState2 = rerenderState(),
- isPending = _rerenderState2[0],
- setPending = _rerenderState2[1];
+ isPending = _rerenderState2[0];
- var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
+ var startRef = updateRef();
+ var start = startRef.current;
return [start, isPending];
}
+ var isUpdatingOpaqueValueInRenderPhase = false;
+ function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
+ {
+ return isUpdatingOpaqueValueInRenderPhase;
+ }
+ }
+
+ function warnOnOpaqueIdentifierAccessInDEV(fiber) {
+ {
+ // TODO: Should warn in effects and callbacks, too
+ var name = getComponentName(fiber.type) || 'Unknown';
+
+ if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {
+ error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');
+
+ didWarnAboutUseOpaqueIdentifier[name] = true;
+ }
+ }
+ }
+
+ function mountOpaqueIdentifier() {
+ var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;
+
+ if (getIsHydrating()) {
+ var didUpgrade = false;
+ var fiber = currentlyRenderingFiber$1;
+
+ var readValue = function () {
+ if (!didUpgrade) {
+ // Only upgrade once. This works even inside the render phase because
+ // the update is added to a shared queue, which outlasts the
+ // in-progress render.
+ didUpgrade = true;
+
+ {
+ isUpdatingOpaqueValueInRenderPhase = true;
+ setId(makeId());
+ isUpdatingOpaqueValueInRenderPhase = false;
+ warnOnOpaqueIdentifierAccessInDEV(fiber);
+ }
+ }
+
+ {
+ {
+ throw Error( "The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly." );
+ }
+ }
+ };
+
+ var id = makeOpaqueHydratingObject(readValue);
+ var setId = mountState(id)[1];
+
+ if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {
+ currentlyRenderingFiber$1.flags |= Update | Passive;
+ pushEffect(HasEffect | Passive$1, function () {
+ setId(makeId());
+ }, undefined, null);
+ }
+
+ return id;
+ } else {
+ var _id = makeId();
+
+ mountState(_id);
+ return _id;
+ }
+ }
+
+ function updateOpaqueIdentifier() {
+ var id = updateState()[0];
+ return id;
+ }
+
+ function rerenderOpaqueIdentifier() {
+ var id = rerenderState()[0];
+ return id;
+ }
+
function dispatchAction(fiber, queue, action) {
{
if (typeof arguments[3] === 'function') {
@@ -15706,22 +16089,15 @@
}
}
- var currentTime = requestCurrentTimeForUpdate();
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
var update = {
- expirationTime: expirationTime,
- suspenseConfig: suspenseConfig,
+ lane: lane,
action: action,
eagerReducer: null,
eagerState: null,
next: null
- };
-
- {
- update.priority = getCurrentPriorityLevel();
- } // Append the update to the end of the list.
-
+ }; // Append the update to the end of the list.
var pending = queue.pending;
@@ -15740,11 +16116,9 @@
// This is a render phase update. Stash it in a lazily-created map of
// queue -> linked list of updates. After this render pass, we'll restart
// and apply the stashed updates on top of the work-in-progress hook.
- didScheduleRenderPhaseUpdate = true;
- update.expirationTime = renderExpirationTime;
- currentlyRenderingFiber$1.expirationTime = renderExpirationTime;
+ didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
} else {
- if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {
+ if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
// The queue is currently empty, which means we can eagerly compute the
// next state before entering the render phase. If the new state is the
// same as the current state, we may be able to bail out entirely.
@@ -15754,8 +16128,8 @@
var prevDispatcher;
{
- prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
}
try {
@@ -15778,7 +16152,7 @@
} catch (error) {// Suppress the error. It will throw again in the render phase.
} finally {
{
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
}
}
@@ -15792,7 +16166,7 @@
}
}
- scheduleWork(fiber, expirationTime);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
}
}
@@ -15808,9 +16182,11 @@
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
- useResponder: throwInvalidHookError,
useDeferredValue: throwInvalidHookError,
- useTransition: throwInvalidHookError
+ useTransition: throwInvalidHookError,
+ useMutableSource: throwInvalidHookError,
+ useOpaqueIdentifier: throwInvalidHookError,
+ unstable_isNewReconciler: enableNewReconciler
};
var HooksDispatcherOnMountInDEV = null;
var HooksDispatcherOnMountWithHookTypesInDEV = null;
@@ -15826,7 +16202,7 @@
};
var warnInvalidHookAccess = function () {
- error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
+ error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
};
HooksDispatcherOnMountInDEV = {
@@ -15866,25 +16242,25 @@
currentHookNameInDev = 'useMemo';
mountHookTypesDev();
checkDepsAreArrayDev(deps);
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -15895,13 +16271,13 @@
useState: function (initialState) {
currentHookNameInDev = 'useState';
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -15909,21 +16285,27 @@
mountHookTypesDev();
return mountDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- mountHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
+ useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
mountHookTypesDev();
- return mountDeferredValue(value, config);
+ return mountDeferredValue(value);
},
- useTransition: function (config) {
+ useTransition: function () {
currentHookNameInDev = 'useTransition';
mountHookTypesDev();
- return mountTransition(config);
- }
+ return mountTransition();
+ },
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
+ mountHookTypesDev();
+ return mountMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ mountHookTypesDev();
+ return mountOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnMountWithHookTypesInDEV = {
readContext: function (context, observedBits) {
@@ -15957,25 +16339,25 @@
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -15986,13 +16368,13 @@
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16000,21 +16382,27 @@
updateHookTypesDev();
return mountDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
+ useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
- return mountDeferredValue(value, config);
+ return mountDeferredValue(value);
},
- useTransition: function (config) {
+ useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
- return mountTransition(config);
- }
+ return mountTransition();
+ },
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
+ updateHookTypesDev();
+ return mountMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ updateHookTypesDev();
+ return mountOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnUpdateInDEV = {
readContext: function (context, observedBits) {
@@ -16048,25 +16436,25 @@
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16077,13 +16465,13 @@
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16091,21 +16479,27 @@
updateHookTypesDev();
return updateDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
+ useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
- return updateDeferredValue(value, config);
+ return updateDeferredValue(value);
},
- useTransition: function (config) {
+ useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
- return updateTransition(config);
- }
+ return updateTransition();
+ },
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
+ updateHookTypesDev();
+ return updateMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ updateHookTypesDev();
+ return updateOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnRerenderInDEV = {
readContext: function (context, observedBits) {
@@ -16139,25 +16533,25 @@
useMemo: function (create, deps) {
currentHookNameInDev = 'useMemo';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return updateMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return rerenderReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16168,13 +16562,13 @@
useState: function (initialState) {
currentHookNameInDev = 'useState';
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return rerenderState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16182,21 +16576,27 @@
updateHookTypesDev();
return updateDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
- updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
- },
- useDeferredValue: function (value, config) {
+ useDeferredValue: function (value) {
currentHookNameInDev = 'useDeferredValue';
updateHookTypesDev();
- return rerenderDeferredValue(value, config);
+ return rerenderDeferredValue(value);
},
- useTransition: function (config) {
+ useTransition: function () {
currentHookNameInDev = 'useTransition';
updateHookTypesDev();
- return rerenderTransition(config);
- }
+ return rerenderTransition();
+ },
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
+ updateHookTypesDev();
+ return updateMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ updateHookTypesDev();
+ return rerenderOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnMountInDEV = {
readContext: function (context, observedBits) {
@@ -16237,26 +16637,26 @@
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16269,13 +16669,13 @@
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16284,24 +16684,31 @@
mountHookTypesDev();
return mountDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
+ useDeferredValue: function (value) {
+ currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
mountHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
+ return mountDeferredValue(value);
},
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
+ useTransition: function () {
+ currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
mountHookTypesDev();
- return mountDeferredValue(value, config);
+ return mountTransition();
},
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
mountHookTypesDev();
- return mountTransition(config);
- }
+ return mountMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ warnInvalidHookAccess();
+ mountHookTypesDev();
+ return mountOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnUpdateInDEV = {
readContext: function (context, observedBits) {
@@ -16342,26 +16749,26 @@
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16374,13 +16781,13 @@
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16389,24 +16796,31 @@
updateHookTypesDev();
return updateDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
+ useDeferredValue: function (value) {
+ currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
+ return updateDeferredValue(value);
},
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
+ useTransition: function () {
+ currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
updateHookTypesDev();
- return updateDeferredValue(value, config);
+ return updateTransition();
},
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
updateHookTypesDev();
- return updateTransition(config);
- }
+ return updateMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ warnInvalidHookAccess();
+ updateHookTypesDev();
+ return updateOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnRerenderInDEV = {
readContext: function (context, observedBits) {
@@ -16447,26 +16861,26 @@
currentHookNameInDev = 'useMemo';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function (reducer, initialArg, init) {
currentHookNameInDev = 'useReducer';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return rerenderReducer(reducer, initialArg, init);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function (initialValue) {
@@ -16479,13 +16893,13 @@
currentHookNameInDev = 'useState';
warnInvalidHookAccess();
updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher.current;
- ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
+ var prevDispatcher = ReactCurrentDispatcher$1.current;
+ ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return rerenderState(initialState);
} finally {
- ReactCurrentDispatcher.current = prevDispatcher;
+ ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function (value, formatterFn) {
@@ -16494,24 +16908,31 @@
updateHookTypesDev();
return updateDebugValue();
},
- useResponder: function (responder, props) {
- currentHookNameInDev = 'useResponder';
+ useDeferredValue: function (value) {
+ currentHookNameInDev = 'useDeferredValue';
warnInvalidHookAccess();
updateHookTypesDev();
- return createDeprecatedResponderListener(responder, props);
+ return rerenderDeferredValue(value);
},
- useDeferredValue: function (value, config) {
- currentHookNameInDev = 'useDeferredValue';
+ useTransition: function () {
+ currentHookNameInDev = 'useTransition';
warnInvalidHookAccess();
updateHookTypesDev();
- return rerenderDeferredValue(value, config);
+ return rerenderTransition();
},
- useTransition: function (config) {
- currentHookNameInDev = 'useTransition';
+ useMutableSource: function (source, getSnapshot, subscribe) {
+ currentHookNameInDev = 'useMutableSource';
warnInvalidHookAccess();
updateHookTypesDev();
- return rerenderTransition(config);
- }
+ return updateMutableSource(source, getSnapshot, subscribe);
+ },
+ useOpaqueIdentifier: function () {
+ currentHookNameInDev = 'useOpaqueIdentifier';
+ warnInvalidHookAccess();
+ updateHookTypesDev();
+ return rerenderOpaqueIdentifier();
+ },
+ unstable_isNewReconciler: enableNewReconciler
};
}
@@ -16556,314 +16977,16 @@
}
}
- // This may have been an insertion or a hydration.
-
- var hydrationParentFiber = null;
- var nextHydratableInstance = null;
- var isHydrating = false;
-
- function enterHydrationState(fiber) {
+ function transferActualDuration(fiber) {
+ // Transfer time spent rendering these children so we don't lose it
+ // after we rerender. This is used as a helper in special cases
+ // where we should count the work of multiple passes.
+ var child = fiber.child;
- var parentInstance = fiber.stateNode.containerInfo;
- nextHydratableInstance = getFirstHydratableChild(parentInstance);
- hydrationParentFiber = fiber;
- isHydrating = true;
- return true;
- }
-
- function deleteHydratableInstance(returnFiber, instance) {
- {
- switch (returnFiber.tag) {
- case HostRoot:
- didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
- break;
-
- case HostComponent:
- didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
- break;
- }
- }
-
- var childToDelete = createFiberFromHostInstanceForDeletion();
- childToDelete.stateNode = instance;
- childToDelete.return = returnFiber;
- childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
- // these children are not part of the reconciliation list of children.
- // Even if we abort and rereconcile the children, that will try to hydrate
- // again and the nodes are still in the host tree so these will be
- // recreated.
-
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = childToDelete;
- returnFiber.lastEffect = childToDelete;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
- }
- }
-
- function insertNonHydratedInstance(returnFiber, fiber) {
- fiber.effectTag = fiber.effectTag & ~Hydrating | Placement;
-
- {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
-
- switch (fiber.tag) {
- case HostComponent:
- var type = fiber.type;
- var props = fiber.pendingProps;
- didNotFindHydratableContainerInstance(parentContainer, type);
- break;
-
- case HostText:
- var text = fiber.pendingProps;
- didNotFindHydratableContainerTextInstance(parentContainer, text);
- break;
- }
-
- break;
- }
-
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
-
- switch (fiber.tag) {
- case HostComponent:
- var _type = fiber.type;
- var _props = fiber.pendingProps;
- didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
- break;
-
- case HostText:
- var _text = fiber.pendingProps;
- didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
- break;
-
- case SuspenseComponent:
- didNotFindHydratableSuspenseInstance(parentType, parentProps);
- break;
- }
-
- break;
- }
-
- default:
- return;
- }
- }
- }
-
- function tryHydrate(fiber, nextInstance) {
- switch (fiber.tag) {
- case HostComponent:
- {
- var type = fiber.type;
- var props = fiber.pendingProps;
- var instance = canHydrateInstance(nextInstance, type);
-
- if (instance !== null) {
- fiber.stateNode = instance;
- return true;
- }
-
- return false;
- }
-
- case HostText:
- {
- var text = fiber.pendingProps;
- var textInstance = canHydrateTextInstance(nextInstance, text);
-
- if (textInstance !== null) {
- fiber.stateNode = textInstance;
- return true;
- }
-
- return false;
- }
-
- case SuspenseComponent:
- {
-
- return false;
- }
-
- default:
- return false;
- }
- }
-
- function tryToClaimNextHydratableInstance(fiber) {
- if (!isHydrating) {
- return;
- }
-
- var nextInstance = nextHydratableInstance;
-
- if (!nextInstance) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- }
-
- var firstAttemptedInstance = nextInstance;
-
- if (!tryHydrate(fiber, nextInstance)) {
- // If we can't hydrate this instance let's try the next one.
- // We use this as a heuristic. It's based on intuition and not data so it
- // might be flawed or unnecessary.
- nextInstance = getNextHydratableSibling(firstAttemptedInstance);
-
- if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- } // We matched the next one, we'll now assume that the first one was
- // superfluous and we'll delete it. Since we can't eagerly delete it
- // we'll have to schedule a deletion. To do that, this node needs a dummy
- // fiber associated with it.
-
-
- deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
- }
-
- hydrationParentFiber = fiber;
- nextHydratableInstance = getFirstHydratableChild(nextInstance);
- }
-
- function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
-
- var instance = fiber.stateNode;
- var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
-
- fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
- // is a new ref we mark this as an update.
-
- if (updatePayload !== null) {
- return true;
- }
-
- return false;
- }
-
- function prepareToHydrateHostTextInstance(fiber) {
-
- var textInstance = fiber.stateNode;
- var textContent = fiber.memoizedProps;
- var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
-
- {
- if (shouldUpdate) {
- // We assume that prepareToHydrateHostTextInstance is called in a context where the
- // hydration parent is the parent host component of this host text.
- var returnFiber = hydrationParentFiber;
-
- if (returnFiber !== null) {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
- didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
- break;
- }
-
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
- didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
- break;
- }
- }
- }
- }
- }
-
- return shouldUpdate;
- }
-
- function skipPastDehydratedSuspenseInstance(fiber) {
-
- var suspenseState = fiber.memoizedState;
- var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
-
- if (!suspenseInstance) {
- {
- throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
- }
-
- function popToNextHostParent(fiber) {
- var parent = fiber.return;
-
- while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
- parent = parent.return;
- }
-
- hydrationParentFiber = parent;
- }
-
- function popHydrationState(fiber) {
-
- if (fiber !== hydrationParentFiber) {
- // We're deeper than the current hydration context, inside an inserted
- // tree.
- return false;
- }
-
- if (!isHydrating) {
- // If we're not currently hydrating but we're in a hydration context, then
- // we were an insertion and now need to pop up reenter hydration of our
- // siblings.
- popToNextHostParent(fiber);
- isHydrating = true;
- return false;
- }
-
- var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
- // We only do this deeper than head and body since they tend to have random
- // other nodes in them. We also ignore components with pure text content in
- // side of them.
- // TODO: Better heuristic.
-
- if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
- var nextInstance = nextHydratableInstance;
-
- while (nextInstance) {
- deleteHydratableInstance(fiber, nextInstance);
- nextInstance = getNextHydratableSibling(nextInstance);
- }
- }
-
- popToNextHostParent(fiber);
-
- if (fiber.tag === SuspenseComponent) {
- nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
- } else {
- nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
+ while (child) {
+ fiber.actualDuration += child.actualDuration;
+ child = child.sibling;
}
-
- return true;
- }
-
- function resetHydrationState() {
-
- hydrationParentFiber = null;
- nextHydratableInstance = null;
- isHydrating = false;
}
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
@@ -16888,24 +17011,24 @@
didWarnAboutTailOptions = {};
}
- function reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime) {
+ function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
if (current === null) {
// If this is a fresh new component that hasn't been rendered yet, we
// won't update its child set by applying minimal side-effects. Instead,
// we will add them all to the child before it gets rendered. That means
// we can optimize this reconciliation pass by not tracking side-effects.
- workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
+ workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
} else {
// If the current child is the same as the work in progress, it means that
// we haven't yet started any work on these children. Therefore, we use
// the clone algorithm to create a copy of all the current children.
// If we had any progressed work already, that is invalid at this point so
// let's throw it out.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
+ workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);
}
}
- function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime) {
+ function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {
// This function is fork of reconcileChildren. It's used in cases where we
// want to reconcile without matching against the existing set. This has the
// effect of all current children being unmounted; even if the type and key
@@ -16914,15 +17037,15 @@
// To do this, we're going to go through the reconcile algorithm twice. In
// the first pass, we schedule a deletion for all the current children by
// passing null.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderExpirationTime); // In the second pass, we mount the new children. The trick here is that we
+ workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we
// pass null in place of where we usually pass the current child set. This has
// the effect of remounting all children regardless of whether their
// identities match.
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
+ workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
}
- function updateForwardRef(current, workInProgress, Component, nextProps, renderExpirationTime) {
+ function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
// TODO: current can be non-null here even if the component
// hasn't yet mounted. This happens after the first render suspends.
// We'll need to figure out if this is fine or can cause issues.
@@ -16933,8 +17056,8 @@
var innerPropTypes = Component.propTypes;
if (innerPropTypes) {
- checkPropTypes_1(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
+ checkPropTypes(innerPropTypes, nextProps, // Resolved props
+ 'prop', getComponentName(Component));
}
}
}
@@ -16943,17 +17066,20 @@
var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent
var nextChildren;
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
{
ReactCurrentOwner$1.current = workInProgress;
setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
+ nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
+ disableLogs();
+
+ try {
+ nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
+ } finally {
+ reenableLogs();
}
}
@@ -16961,17 +17087,17 @@
}
if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderExpirationTime);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ bailoutHooks(current, workInProgress, renderLanes);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ workInProgress.flags |= PerformedWork;
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
- function updateMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
+ function updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
if (current === null) {
var type = Component.type;
@@ -16993,7 +17119,7 @@
validateFunctionComponentInDev(workInProgress, type);
}
- return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateExpirationTime, renderExpirationTime);
+ return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);
}
{
@@ -17002,12 +17128,12 @@
if (innerPropTypes) {
// Inner memo component props aren't currently validated in createElement.
// We could move it there, but we'd still need this for lazy code path.
- checkPropTypes_1(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(type), getCurrentFiberStackInDev);
+ checkPropTypes(innerPropTypes, nextProps, // Resolved props
+ 'prop', getComponentName(type));
}
}
- var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
+ var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);
child.ref = workInProgress.ref;
child.return = workInProgress;
workInProgress.child = child;
@@ -17021,14 +17147,14 @@
if (_innerPropTypes) {
// Inner memo component props aren't currently validated in createElement.
// We could move it there, but we'd still need this for lazy code path.
- checkPropTypes_1(_innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(_type), getCurrentFiberStackInDev);
+ checkPropTypes(_innerPropTypes, nextProps, // Resolved props
+ 'prop', getComponentName(_type));
}
}
var currentChild = current.child; // This is always exactly one child
- if (updateExpirationTime < renderExpirationTime) {
+ if (!includesSomeLane(updateLanes, renderLanes)) {
// This will be the props with resolved defaultProps,
// unlike current.memoizedProps which will be the unresolved ones.
var prevProps = currentChild.memoizedProps; // Default to shallow comparison
@@ -17037,12 +17163,12 @@
compare = compare !== null ? compare : shallowEqual;
if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
+ workInProgress.flags |= PerformedWork;
var newChild = createWorkInProgress(currentChild, nextProps);
newChild.ref = workInProgress.ref;
newChild.return = workInProgress;
@@ -17050,7 +17176,7 @@
return newChild;
}
- function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
+ function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
// TODO: current can be non-null here even if the component
// hasn't yet mounted. This happens when the inner render suspends.
// We'll need to figure out if this is fine or can cause issues.
@@ -17064,16 +17190,24 @@
// We warn when you define propTypes on lazy()
// so let's just skip over it to find memo() outer wrapper.
// Inner props for memo are validated later.
- outerMemoType = refineResolvedLazyComponent(outerMemoType);
- }
+ var lazyComponent = outerMemoType;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
- var outerPropTypes = outerMemoType && outerMemoType.propTypes;
+ try {
+ outerMemoType = init(payload);
+ } catch (x) {
+ outerMemoType = null;
+ } // Inner propTypes will be validated in the function component path.
- if (outerPropTypes) {
- checkPropTypes_1(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
- 'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);
- } // Inner propTypes will be validated in the function component path.
+ var outerPropTypes = outerMemoType && outerMemoType.propTypes;
+
+ if (outerPropTypes) {
+ checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
+ 'prop', getComponentName(outerMemoType));
+ }
+ }
}
}
@@ -17084,10 +17218,10 @@
workInProgress.type === current.type )) {
didReceiveUpdate = false;
- if (updateExpirationTime < renderExpirationTime) {
- // The pending update priority was cleared at the beginning of
- // beginWork. We're about to bail out, but there might be additional
- // updates at a lower priority. Usually, the priority level of the
+ if (!includesSomeLane(renderLanes, updateLanes)) {
+ // The pending lanes were cleared at the beginning of beginWork. We're
+ // about to bail out, but there might be other lanes that weren't
+ // included in the current render. Usually, the priority level of the
// remaining updates is accumlated during the evaluation of the
// component (i.e. when processing the update queue). But since since
// we're bailing out early *without* evaluating the component, we need
@@ -17098,35 +17232,118 @@
// contains hooks.
// TODO: Move the reset at in beginWork out of the common path so that
// this is no longer necessary.
- workInProgress.expirationTime = current.expirationTime;
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ workInProgress.lanes = current.lanes;
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
+ } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
+ // This is a special case that only exists for legacy mode.
+ // See https://github.com/facebook/react/pull/19216.
+ didReceiveUpdate = true;
}
}
}
- return updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime);
+ return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
}
- function updateFragment(current, workInProgress, renderExpirationTime) {
+ function updateOffscreenComponent(current, workInProgress, renderLanes) {
+ var nextProps = workInProgress.pendingProps;
+ var nextChildren = nextProps.children;
+ var prevState = current !== null ? current.memoizedState : null;
+
+ if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {
+ if ((workInProgress.mode & ConcurrentMode) === NoMode) {
+ // In legacy sync mode, don't defer the subtree. Render it now.
+ // TODO: Figure out what we should do in Blocking mode.
+ var nextState = {
+ baseLanes: NoLanes
+ };
+ workInProgress.memoizedState = nextState;
+ pushRenderLanes(workInProgress, renderLanes);
+ } else if (!includesSomeLane(renderLanes, OffscreenLane)) {
+ var nextBaseLanes;
+
+ if (prevState !== null) {
+ var prevBaseLanes = prevState.baseLanes;
+ nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);
+ } else {
+ nextBaseLanes = renderLanes;
+ } // Schedule this fiber to re-render at offscreen priority. Then bailout.
+
+
+ {
+ markSpawnedWork(OffscreenLane);
+ }
+
+ workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);
+ var _nextState = {
+ baseLanes: nextBaseLanes
+ };
+ workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway
+ // to avoid a push/pop misalignment.
+
+ pushRenderLanes(workInProgress, nextBaseLanes);
+ return null;
+ } else {
+ // Rendering at offscreen, so we can clear the base lanes.
+ var _nextState2 = {
+ baseLanes: NoLanes
+ };
+ workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.
+
+ var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;
+ pushRenderLanes(workInProgress, subtreeRenderLanes);
+ }
+ } else {
+ var _subtreeRenderLanes;
+
+ if (prevState !== null) {
+ _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state
+
+ workInProgress.memoizedState = null;
+ } else {
+ // We weren't previously hidden, and we still aren't, so there's nothing
+ // special to do. Need to push to the stack regardless, though, to avoid
+ // a push/pop misalignment.
+ _subtreeRenderLanes = renderLanes;
+ }
+
+ pushRenderLanes(workInProgress, _subtreeRenderLanes);
+ }
+
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
+ return workInProgress.child;
+ } // Note: These happen to have identical begin phases, for now. We shouldn't hold
+ // ourselves to this constraint, though. If the behavior diverges, we should
+ // fork the function.
+
+
+ var updateLegacyHiddenComponent = updateOffscreenComponent;
+
+ function updateFragment(current, workInProgress, renderLanes) {
var nextChildren = workInProgress.pendingProps;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
- function updateMode(current, workInProgress, renderExpirationTime) {
+ function updateMode(current, workInProgress, renderLanes) {
var nextChildren = workInProgress.pendingProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
- function updateProfiler(current, workInProgress, renderExpirationTime) {
+ function updateProfiler(current, workInProgress, renderLanes) {
{
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.
+ // These are reset during render to allow the DevTools commit hook a chance to read them,
+
+ var stateNode = workInProgress.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
}
var nextProps = workInProgress.pendingProps;
var nextChildren = nextProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -17135,11 +17352,11 @@
if (current === null && ref !== null || current !== null && current.ref !== ref) {
// Schedule a Ref effect
- workInProgress.effectTag |= Ref;
+ workInProgress.flags |= Ref;
}
}
- function updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
+ function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
{
if (workInProgress.type !== workInProgress.elementType) {
// Lazy component props can't be validated in createElement
@@ -17147,8 +17364,8 @@
var innerPropTypes = Component.propTypes;
if (innerPropTypes) {
- checkPropTypes_1(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
+ checkPropTypes(innerPropTypes, nextProps, // Resolved props
+ 'prop', getComponentName(Component));
}
}
}
@@ -17161,17 +17378,20 @@
}
var nextChildren;
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
{
ReactCurrentOwner$1.current = workInProgress;
setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
+ nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
+ disableLogs();
+
+ try {
+ nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
+ } finally {
+ reenableLogs();
}
}
@@ -17179,17 +17399,17 @@
}
if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderExpirationTime);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ bailoutHooks(current, workInProgress, renderLanes);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ workInProgress.flags |= PerformedWork;
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
- function updateClassComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
+ function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
{
if (workInProgress.type !== workInProgress.elementType) {
// Lazy component props can't be validated in createElement
@@ -17197,8 +17417,8 @@
var innerPropTypes = Component.propTypes;
if (innerPropTypes) {
- checkPropTypes_1(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
+ checkPropTypes(innerPropTypes, nextProps, // Resolved props
+ 'prop', getComponentName(Component));
}
}
} // Push context providers early to prevent context stack mismatches.
@@ -17215,7 +17435,7 @@
hasContext = false;
}
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
var instance = workInProgress.stateNode;
var shouldUpdate;
@@ -17228,26 +17448,26 @@
current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
+ workInProgress.flags |= Placement;
} // In the initial pass we might need to construct the instance.
constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
+ mountClassInstance(workInProgress, Component, nextProps, renderLanes);
shouldUpdate = true;
} else if (current === null) {
// In a resume, we'll already have an instance we can reuse.
- shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
+ shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);
} else {
- shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderExpirationTime);
+ shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);
}
- var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
+ var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);
{
var inst = workInProgress.stateNode;
- if (inst.props !== nextProps) {
+ if (shouldUpdate && inst.props !== nextProps) {
if (!didWarnAboutReassigningProps) {
error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');
}
@@ -17259,10 +17479,10 @@
return nextUnitOfWork;
}
- function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
+ function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {
// Refs should update even if shouldComponentUpdate returns false
markRef(current, workInProgress);
- var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;
+ var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;
if (!shouldUpdate && !didCaptureError) {
// Context providers should defer to sCU for rendering
@@ -17270,7 +17490,7 @@
invalidateContextProvider(workInProgress, Component, false);
}
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
var instance = workInProgress.stateNode; // Rerender
@@ -17295,7 +17515,13 @@
nextChildren = instance.render();
if ( workInProgress.mode & StrictMode) {
- instance.render();
+ disableLogs();
+
+ try {
+ instance.render();
+ } finally {
+ reenableLogs();
+ }
}
setIsRendering(false);
@@ -17303,16 +17529,16 @@
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
+ workInProgress.flags |= PerformedWork;
if (current !== null && didCaptureError) {
// If we're recovering from an error, reconcile without reusing any of
// the existing children. Conceptually, the normal children and the children
// that are shown on error are two different sets, so we shouldn't reuse
// normal children even if their identities match.
- forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime);
+ forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);
} else {
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
} // Memoize state using the values we just used to render.
// TODO: Restructure so we never read values from the instance.
@@ -17339,7 +17565,7 @@
pushHostContainer(workInProgress, root.containerInfo);
}
- function updateHostRoot(current, workInProgress, renderExpirationTime) {
+ function updateHostRoot(current, workInProgress, renderLanes) {
pushHostRootContext(workInProgress);
var updateQueue = workInProgress.updateQueue;
@@ -17353,17 +17579,15 @@
var prevState = workInProgress.memoizedState;
var prevChildren = prevState !== null ? prevState.element : null;
cloneUpdateQueue(current, workInProgress);
- processUpdateQueue(workInProgress, nextProps, null, renderExpirationTime);
+ processUpdateQueue(workInProgress, nextProps, null, renderLanes);
var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
// being called "element".
var nextChildren = nextState.element;
if (nextChildren === prevChildren) {
- // If the state is the same as before, that's a bailout because we had
- // no work that expires at this time.
resetHydrationState();
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
var root = workInProgress.stateNode;
@@ -17373,7 +17597,19 @@
// We always try to hydrate. If this isn't a hydration pass there won't
// be any children to hydrate which is effectively the same thing as
// not hydrating.
- var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
+ {
+ var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;
+
+ if (mutableSourceEagerHydrationData != null) {
+ for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {
+ var mutableSource = mutableSourceEagerHydrationData[i];
+ var version = mutableSourceEagerHydrationData[i + 1];
+ setWorkInProgressVersion(mutableSource, version);
+ }
+ }
+ }
+
+ var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
workInProgress.child = child;
var node = child;
@@ -17384,20 +17620,20 @@
// Conceptually this is similar to Placement in that a new subtree is
// inserted into the React tree here. It just happens to not need DOM
// mutations because it already exists.
- node.effectTag = node.effectTag & ~Placement | Hydrating;
+ node.flags = node.flags & ~Placement | Hydrating;
node = node.sibling;
}
} else {
// Otherwise reset hydration state in case we aborted and resumed another
// root.
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
resetHydrationState();
}
return workInProgress.child;
}
- function updateHostComponent(current, workInProgress, renderExpirationTime) {
+ function updateHostComponent(current, workInProgress, renderLanes) {
pushHostContext(workInProgress);
if (current === null) {
@@ -17419,22 +17655,11 @@
} else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
// If we're switching from a direct text child to a normal child, or to
// empty, we need to schedule the text content to be reset.
- workInProgress.effectTag |= ContentReset;
- }
-
- markRef(current, workInProgress); // Check the host config to see if the children are offscreen/hidden.
-
- if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(type, nextProps)) {
- {
- markSpawnedWork(Never);
- } // Schedule this fiber to re-render at offscreen priority. Then bailout.
-
-
- workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
- return null;
+ workInProgress.flags |= ContentReset;
}
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ markRef(current, workInProgress);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
return workInProgress.child;
}
@@ -17448,7 +17673,7 @@
return null;
}
- function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {
+ function mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) {
if (_current !== null) {
// A lazy component only mounts if it suspended inside a non-
// concurrent tree, in an inconsistent state. We want to treat it like
@@ -17457,18 +17682,17 @@
_current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
+ workInProgress.flags |= Placement;
}
- var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet.
- // Cancel and resume right after we know the tag.
-
- cancelWorkTimer(workInProgress);
- var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type.
+ var props = workInProgress.pendingProps;
+ var lazyComponent = elementType;
+ var payload = lazyComponent._payload;
+ var init = lazyComponent._init;
+ var Component = init(payload); // Store the unwrapped component in the type.
workInProgress.type = Component;
var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
- startWorkTimer(workInProgress);
var resolvedProps = resolveDefaultProps(Component, props);
var child;
@@ -17480,7 +17704,7 @@
workInProgress.type = Component = resolveFunctionForHotReloading(Component);
}
- child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
+ child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
@@ -17490,7 +17714,7 @@
workInProgress.type = Component = resolveClassForHotReloading(Component);
}
- child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
+ child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
@@ -17500,7 +17724,7 @@
workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
}
- child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);
+ child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);
return child;
}
@@ -17511,14 +17735,14 @@
var outerPropTypes = Component.propTypes;
if (outerPropTypes) {
- checkPropTypes_1(outerPropTypes, resolvedProps, // Resolved for outer only
- 'prop', getComponentName(Component), getCurrentFiberStackInDev);
+ checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
+ 'prop', getComponentName(Component));
}
}
}
child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
- updateExpirationTime, renderExpirationTime);
+ updateLanes, renderLanes);
return child;
}
}
@@ -17541,7 +17765,7 @@
}
}
- function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {
+ function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
if (_current !== null) {
// An incomplete component only mounts if it suspended inside a non-
// concurrent tree, in an inconsistent state. We want to treat it like
@@ -17550,7 +17774,7 @@
_current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
+ workInProgress.flags |= Placement;
} // Promote the fiber to a class and try rendering again.
@@ -17568,13 +17792,13 @@
hasContext = false;
}
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
+ mountClassInstance(workInProgress, Component, nextProps, renderLanes);
+ return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
}
- function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {
+ function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
if (_current !== null) {
// An indeterminate component only mounts if it suspended inside a non-
// concurrent tree, in an inconsistent state. We want to treat it like
@@ -17583,7 +17807,7 @@
_current.alternate = null;
workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
- workInProgress.effectTag |= Placement;
+ workInProgress.flags |= Placement;
}
var props = workInProgress.pendingProps;
@@ -17594,7 +17818,7 @@
context = getMaskedContext(workInProgress, unmaskedContext);
}
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
var value;
{
@@ -17614,15 +17838,17 @@
setIsRendering(true);
ReactCurrentOwner$1.current = workInProgress;
- value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
+ value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
setIsRendering(false);
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
+ workInProgress.flags |= PerformedWork;
- if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
- {
+ {
+ // Support for module components is deprecated and is removed behind a flag.
+ // Whether or not it would crash later, we want to show a good message in DEV first.
+ if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
var _componentName = getComponentName(Component) || 'Unknown';
if (!didWarnAboutModulePatternComponent[_componentName]) {
@@ -17630,6 +17856,20 @@
didWarnAboutModulePatternComponent[_componentName] = true;
}
+ }
+ }
+
+ if ( // Run these checks in production only if the flag is off.
+ // Eventually we'll delete this branch altogether.
+ typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
+ {
+ var _componentName2 = getComponentName(Component) || 'Unknown';
+
+ if (!didWarnAboutModulePatternComponent[_componentName2]) {
+ error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);
+
+ didWarnAboutModulePatternComponent[_componentName2] = true;
+ }
} // Proceed under the assumption that this is a class instance
@@ -17658,8 +17898,8 @@
}
adoptClassInstance(workInProgress, value);
- mountClassInstance(workInProgress, Component, props, renderExpirationTime);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
+ mountClassInstance(workInProgress, Component, props, renderLanes);
+ return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
} else {
// Proceed under the assumption that this is a function component
workInProgress.tag = FunctionComponent;
@@ -17667,14 +17907,17 @@
{
if ( workInProgress.mode & StrictMode) {
- // Only double-render components with Hooks
- if (workInProgress.memoizedState !== null) {
- value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
+ disableLogs();
+
+ try {
+ value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
+ } finally {
+ reenableLogs();
}
}
}
- reconcileChildren(null, workInProgress, value, renderExpirationTime);
+ reconcileChildren(null, workInProgress, value, renderLanes);
{
validateFunctionComponentInDev(workInProgress, Component);
@@ -17715,22 +17958,22 @@
}
if (typeof Component.getDerivedStateFromProps === 'function') {
- var _componentName2 = getComponentName(Component) || 'Unknown';
+ var _componentName3 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) {
- error('%s: Function components do not support getDerivedStateFromProps.', _componentName2);
+ if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
+ error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);
- didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true;
+ didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
}
}
if (typeof Component.contextType === 'object' && Component.contextType !== null) {
- var _componentName3 = getComponentName(Component) || 'Unknown';
+ var _componentName4 = getComponentName(Component) || 'Unknown';
- if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
- error('%s: Function components do not support contextType.', _componentName3);
+ if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
+ error('%s: Function components do not support contextType.', _componentName4);
- didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
+ didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
}
}
}
@@ -17738,34 +17981,65 @@
var SUSPENDED_MARKER = {
dehydrated: null,
- retryTime: NoWork
+ retryLane: NoLane
};
- function shouldRemainOnFallback(suspenseContext, current, workInProgress) {
- // If the context is telling us that we should show a fallback, and we're not
- // already showing content, then we should show the fallback instead.
- return hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && (current === null || current.memoizedState !== null);
+ function mountSuspenseOffscreenState(renderLanes) {
+ return {
+ baseLanes: renderLanes
+ };
}
- function updateSuspenseComponent(current, workInProgress, renderExpirationTime) {
- var mode = workInProgress.mode;
+ function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {
+ return {
+ baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)
+ };
+ } // TODO: Probably should inline this back
+
+
+ function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
+ // If we're already showing a fallback, there are cases where we need to
+ // remain on that fallback regardless of whether the content has resolved.
+ // For example, SuspenseList coordinates when nested content appears.
+ if (current !== null) {
+ var suspenseState = current.memoizedState;
+
+ if (suspenseState === null) {
+ // Currently showing content. Don't hide it, even if ForceSuspenseFallack
+ // is true. More precise name might be "ForceRemainSuspenseFallback".
+ // Note: This is a factoring smell. Can't remain on a fallback if there's
+ // no fallback to remain on.
+ return false;
+ }
+ } // Not currently showing content. Consult the Suspense context.
+
+
+ return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
+ }
+
+ function getRemainingWorkInPrimaryTree(current, renderLanes) {
+ // TODO: Should not remove render lanes that were pinged during this render
+ return removeLanes(current.childLanes, renderLanes);
+ }
+
+ function updateSuspenseComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.
{
if (shouldSuspend(workInProgress)) {
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
}
}
var suspenseContext = suspenseStackCursor.current;
- var nextDidTimeout = false;
- var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect;
+ var showFallback = false;
+ var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;
if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
// Something in this boundary's subtree already suspended. Switch to
// rendering the fallback children.
- nextDidTimeout = true;
- workInProgress.effectTag &= ~DidCapture;
+ showFallback = true;
+ workInProgress.flags &= ~DidCapture;
} else {
// Attempting the main content
if (current === null || current.memoizedState !== null) {
@@ -17781,246 +18055,302 @@
}
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- pushSuspenseContext(workInProgress, suspenseContext); // This next part is a bit confusing. If the children timeout, we switch to
- // showing the fallback children in place of the "primary" children.
- // However, we don't want to delete the primary children because then their
- // state will be lost (both the React state and the host state, e.g.
- // uncontrolled form inputs). Instead we keep them mounted and hide them.
- // Both the fallback children AND the primary children are rendered at the
- // same time. Once the primary children are un-suspended, we can delete
- // the fallback children — don't need to preserve their state.
+ pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
+ // boundary's children. This involves some custom reconcilation logic. Two
+ // main reasons this is so complicated.
//
- // The two sets of children are siblings in the host environment, but
- // semantically, for purposes of reconciliation, they are two separate sets.
- // So we store them using two fragment fibers.
+ // First, Legacy Mode has different semantics for backwards compatibility. The
+ // primary tree will commit in an inconsistent state, so when we do the
+ // second pass to render the fallback, we do some exceedingly, uh, clever
+ // hacks to make that not totally break. Like transferring effects and
+ // deletions from hidden tree. In Concurrent Mode, it's much simpler,
+ // because we bailout on the primary tree completely and leave it in its old
+ // state, no effects. Same as what we do for Offscreen (except that
+ // Offscreen doesn't have the first render pass).
//
- // However, we want to avoid allocating extra fibers for every placeholder.
- // They're only necessary when the children time out, because that's the
- // only time when both sets are mounted.
+ // Second is hydration. During hydration, the Suspense fiber has a slightly
+ // different layout, where the child points to a dehydrated fragment, which
+ // contains the DOM rendered by the server.
//
- // So, the extra fragment fibers are only used if the children time out.
- // Otherwise, we render the primary children directly. This requires some
- // custom reconciliation logic to preserve the state of the primary
- // children. It's essentially a very basic form of re-parenting.
+ // Third, even if you set all that aside, Suspense is like error boundaries in
+ // that we first we try to render one tree, and if that fails, we render again
+ // and switch to a different tree. Like a try/catch block. So we have to track
+ // which branch we're currently rendering. Ideally we would model this using
+ // a stack.
if (current === null) {
+ // Initial mount
// If we're currently hydrating, try to hydrate this boundary.
// But only if this has a fallback.
if (nextProps.fallback !== undefined) {
tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
- } // This is the initial mount. This branch is pretty simple because there's
- // no previous state that needs to be preserved.
-
-
- if (nextDidTimeout) {
- // Mount separate fragments for primary and fallback children.
- var nextFallbackChildren = nextProps.fallback;
- var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
- primaryChildFragment.return = workInProgress;
-
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var progressedState = workInProgress.memoizedState;
- var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
- primaryChildFragment.child = progressedPrimaryChild;
- var progressedChild = progressedPrimaryChild;
-
- while (progressedChild !== null) {
- progressedChild.return = primaryChildFragment;
- progressedChild = progressedChild.sibling;
- }
- }
+ }
- var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);
- fallbackChildFragment.return = workInProgress;
- primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the
- // fallback children.
+ var nextPrimaryChildren = nextProps.children;
+ var nextFallbackChildren = nextProps.fallback;
+ if (showFallback) {
+ var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
+ var primaryChildFragment = workInProgress.child;
+ primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = primaryChildFragment;
- return fallbackChildFragment;
+ return fallbackFragment;
+ } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {
+ // This is a CPU-bound tree. Skip this tree and show a placeholder to
+ // unblock the surrounding content. Then immediately retry after the
+ // initial commit.
+ var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
+
+ var _primaryChildFragment = workInProgress.child;
+ _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
+ workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to
+ // get it started back up to attempt the next item. While in terms of
+ // priority this work has the same priority as this current render, it's
+ // not part of the same transition once the transition has committed. If
+ // it's sync, we still want to yield so that it can be painted.
+ // Conceptually, this is really the same as pinging. We can use any
+ // RetryLane even if it's the one currently rendering since we're leaving
+ // it behind on this node.
+
+ workInProgress.lanes = SomeRetryLane;
+
+ {
+ markSpawnedWork(SomeRetryLane);
+ }
+
+ return _fallbackFragment;
} else {
- // Mount the primary children without an intermediate fragment fiber.
- var nextPrimaryChildren = nextProps.children;
- workInProgress.memoizedState = null;
- return workInProgress.child = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);
+ return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);
}
} else {
- // This is an update. This branch is more complicated because we need to
- // ensure the state of the primary children is preserved.
+ // This is an update.
+ // If the current fiber has a SuspenseState, that means it's already showing
+ // a fallback.
var prevState = current.memoizedState;
if (prevState !== null) {
- // wrapped in a fragment fiber.
-
-
- var currentPrimaryChildFragment = current.child;
- var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
- if (nextDidTimeout) {
- // Still timed out. Reuse the current primary children by cloning
- // its fragment. We're going to skip over these entirely.
+ if (showFallback) {
var _nextFallbackChildren2 = nextProps.fallback;
+ var _nextPrimaryChildren2 = nextProps.children;
- var _primaryChildFragment2 = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps);
-
- _primaryChildFragment2.return = workInProgress;
-
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var _progressedState = workInProgress.memoizedState;
-
- var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;
-
- if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {
- _primaryChildFragment2.child = _progressedPrimaryChild;
- var _progressedChild2 = _progressedPrimaryChild;
-
- while (_progressedChild2 !== null) {
- _progressedChild2.return = _primaryChildFragment2;
- _progressedChild2 = _progressedChild2.sibling;
- }
- }
- } // Because primaryChildFragment is a new fiber that we're inserting as the
- // parent of a new tree, we need to set its treeBaseDuration.
-
-
- if ( workInProgress.mode & ProfileMode) {
- // treeBaseDuration is the sum of all the child tree base durations.
- var _treeBaseDuration = 0;
- var _hiddenChild = _primaryChildFragment2.child;
+ var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);
- while (_hiddenChild !== null) {
- _treeBaseDuration += _hiddenChild.treeBaseDuration;
- _hiddenChild = _hiddenChild.sibling;
- }
+ var _primaryChildFragment3 = workInProgress.child;
+ var prevOffscreenState = current.child.memoizedState;
+ _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);
+ _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);
+ workInProgress.memoizedState = SUSPENDED_MARKER;
+ return _fallbackChildFragment;
+ } else {
+ var _nextPrimaryChildren3 = nextProps.children;
- _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;
- } // Clone the fallback child fragment, too. These we'll continue
- // working on.
+ var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);
+ workInProgress.memoizedState = null;
+ return _primaryChildFragment4;
+ }
+ } else {
+ // The current tree is not already showing a fallback.
+ if (showFallback) {
+ // Timed out.
+ var _nextFallbackChildren3 = nextProps.fallback;
+ var _nextPrimaryChildren4 = nextProps.children;
- var _fallbackChildFragment2 = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren2);
+ var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);
- _fallbackChildFragment2.return = workInProgress;
- _primaryChildFragment2.sibling = _fallbackChildFragment2;
- _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
+ var _primaryChildFragment5 = workInProgress.child;
+ var _prevOffscreenState = current.child.memoizedState;
+ _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);
+ _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the
// fallback children.
workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = _primaryChildFragment2;
return _fallbackChildFragment2;
} else {
- // No longer suspended. Switch back to showing the primary children,
- // and remove the intermediate fragment fiber.
- var _nextPrimaryChildren = nextProps.children;
- var currentPrimaryChild = currentPrimaryChildFragment.child;
- var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime); // If this render doesn't suspend, we need to delete the fallback
- // children. Wait until the complete phase, after we've confirmed the
- // fallback is no longer needed.
- // TODO: Would it be better to store the fallback fragment on
- // the stateNode?
- // Continue rendering the children, like we normally do.
+ // Still haven't timed out. Continue rendering the children, like we
+ // normally do.
+ var _nextPrimaryChildren5 = nextProps.children;
+
+ var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);
workInProgress.memoizedState = null;
- return workInProgress.child = primaryChild;
+ return _primaryChildFragment6;
}
- } else {
- // The current tree has not already timed out. That means the primary
- // children are not wrapped in a fragment fiber.
- var _currentPrimaryChild = current.child;
-
- if (nextDidTimeout) {
- // Timed out. Wrap the children in a fragment fiber to keep them
- // separate from the fallback children.
- var _nextFallbackChildren3 = nextProps.fallback;
-
- var _primaryChildFragment3 = createFiberFromFragment( // It shouldn't matter what the pending props are because we aren't
- // going to render this fragment.
- null, mode, NoWork, null);
-
- _primaryChildFragment3.return = workInProgress;
- _primaryChildFragment3.child = _currentPrimaryChild;
-
- if (_currentPrimaryChild !== null) {
- _currentPrimaryChild.return = _primaryChildFragment3;
- } // Even though we're creating a new fiber, there are no new children,
- // because we're reusing an already mounted tree. So we don't need to
- // schedule a placement.
- // primaryChildFragment.effectTag |= Placement;
+ }
+ }
+ }
+ function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {
+ var mode = workInProgress.mode;
+ var primaryChildProps = {
+ mode: 'visible',
+ children: primaryChildren
+ };
+ var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);
+ primaryChildFragment.return = workInProgress;
+ workInProgress.child = primaryChildFragment;
+ return primaryChildFragment;
+ }
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, we commit the effects from the
- // partially completed, timed-out tree, too.
- var _progressedState2 = workInProgress.memoizedState;
+ function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {
+ var mode = workInProgress.mode;
+ var progressedPrimaryFragment = workInProgress.child;
+ var primaryChildProps = {
+ mode: 'hidden',
+ children: primaryChildren
+ };
+ var primaryChildFragment;
+ var fallbackChildFragment;
+
+ if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {
+ // In legacy mode, we commit the primary tree as if it successfully
+ // completed, even though it's in an inconsistent state.
+ primaryChildFragment = progressedPrimaryFragment;
+ primaryChildFragment.childLanes = NoLanes;
+ primaryChildFragment.pendingProps = primaryChildProps;
+
+ if ( workInProgress.mode & ProfileMode) {
+ // Reset the durations from the first pass so they aren't included in the
+ // final amounts. This seems counterintuitive, since we're intentionally
+ // not measuring part of the render phase, but this makes it match what we
+ // do in Concurrent Mode.
+ primaryChildFragment.actualDuration = 0;
+ primaryChildFragment.actualStartTime = -1;
+ primaryChildFragment.selfBaseDuration = 0;
+ primaryChildFragment.treeBaseDuration = 0;
+ }
+
+ fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
+ } else {
+ primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);
+ fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
+ }
- var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;
+ primaryChildFragment.return = workInProgress;
+ fallbackChildFragment.return = workInProgress;
+ primaryChildFragment.sibling = fallbackChildFragment;
+ workInProgress.child = primaryChildFragment;
+ return fallbackChildFragment;
+ }
- _primaryChildFragment3.child = _progressedPrimaryChild2;
- var _progressedChild3 = _progressedPrimaryChild2;
+ function createWorkInProgressOffscreenFiber(current, offscreenProps) {
+ // The props argument to `createWorkInProgress` is `any` typed, so we use this
+ // wrapper function to constrain it.
+ return createWorkInProgress(current, offscreenProps);
+ }
- while (_progressedChild3 !== null) {
- _progressedChild3.return = _primaryChildFragment3;
- _progressedChild3 = _progressedChild3.sibling;
- }
- } // Because primaryChildFragment is a new fiber that we're inserting as the
- // parent of a new tree, we need to set its treeBaseDuration.
+ function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {
+ var currentPrimaryChildFragment = current.child;
+ var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
+ var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
+ mode: 'visible',
+ children: primaryChildren
+ });
+ if ((workInProgress.mode & BlockingMode) === NoMode) {
+ primaryChildFragment.lanes = renderLanes;
+ }
- if ( workInProgress.mode & ProfileMode) {
- // treeBaseDuration is the sum of all the child tree base durations.
- var _treeBaseDuration2 = 0;
- var _hiddenChild2 = _primaryChildFragment3.child;
+ primaryChildFragment.return = workInProgress;
+ primaryChildFragment.sibling = null;
- while (_hiddenChild2 !== null) {
- _treeBaseDuration2 += _hiddenChild2.treeBaseDuration;
- _hiddenChild2 = _hiddenChild2.sibling;
- }
+ if (currentFallbackChildFragment !== null) {
+ // Delete the fallback child fragment
+ currentFallbackChildFragment.nextEffect = null;
+ currentFallbackChildFragment.flags = Deletion;
+ workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
+ }
- _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2;
- } // Create a fragment from the fallback children, too.
+ workInProgress.child = primaryChildFragment;
+ return primaryChildFragment;
+ }
+ function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
+ var mode = workInProgress.mode;
+ var currentPrimaryChildFragment = current.child;
+ var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
+ var primaryChildProps = {
+ mode: 'hidden',
+ children: primaryChildren
+ };
+ var primaryChildFragment;
+
+ if ( // In legacy mode, we commit the primary tree as if it successfully
+ // completed, even though it's in an inconsistent state.
+ (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
+ // already cloned. In legacy mode, the only case where this isn't true is
+ // when DevTools forces us to display a fallback; we skip the first render
+ // pass entirely and go straight to rendering the fallback. (In Concurrent
+ // Mode, SuspenseList can also trigger this scenario, but this is a legacy-
+ // only codepath.)
+ workInProgress.child !== currentPrimaryChildFragment) {
+ var progressedPrimaryFragment = workInProgress.child;
+ primaryChildFragment = progressedPrimaryFragment;
+ primaryChildFragment.childLanes = NoLanes;
+ primaryChildFragment.pendingProps = primaryChildProps;
+
+ if ( workInProgress.mode & ProfileMode) {
+ // Reset the durations from the first pass so they aren't included in the
+ // final amounts. This seems counterintuitive, since we're intentionally
+ // not measuring part of the render phase, but this makes it match what we
+ // do in Concurrent Mode.
+ primaryChildFragment.actualDuration = 0;
+ primaryChildFragment.actualStartTime = -1;
+ primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
+ primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
+ } // The fallback fiber was added as a deletion effect during the first pass.
+ // However, since we're going to remain on the fallback, we no longer want
+ // to delete it. So we need to remove it from the list. Deletions are stored
+ // on the same list as effects. We want to keep the effects from the primary
+ // tree. So we copy the primary child fragment's effect list, which does not
+ // include the fallback deletion effect.
+
+
+ var progressedLastEffect = primaryChildFragment.lastEffect;
+
+ if (progressedLastEffect !== null) {
+ workInProgress.firstEffect = primaryChildFragment.firstEffect;
+ workInProgress.lastEffect = progressedLastEffect;
+ progressedLastEffect.nextEffect = null;
+ } else {
+ // TODO: Reset this somewhere else? Lol legacy mode is so weird.
+ workInProgress.firstEffect = workInProgress.lastEffect = null;
+ }
+ } else {
+ primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);
+ }
- var _fallbackChildFragment3 = createFiberFromFragment(_nextFallbackChildren3, mode, renderExpirationTime, null);
+ var fallbackChildFragment;
- _fallbackChildFragment3.return = workInProgress;
- _primaryChildFragment3.sibling = _fallbackChildFragment3;
- _fallbackChildFragment3.effectTag |= Placement;
- _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
- // fallback children.
+ if (currentFallbackChildFragment !== null) {
+ fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
+ } else {
+ fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already
+ // mounted but this is a new fiber.
- workInProgress.memoizedState = SUSPENDED_MARKER;
- workInProgress.child = _primaryChildFragment3;
- return _fallbackChildFragment3;
- } else {
- // Still haven't timed out. Continue rendering the children, like we
- // normally do.
- workInProgress.memoizedState = null;
- var _nextPrimaryChildren2 = nextProps.children;
- return workInProgress.child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);
- }
- }
+ fallbackChildFragment.flags |= Placement;
}
- }
- function scheduleWorkOnFiber(fiber, renderExpirationTime) {
- if (fiber.expirationTime < renderExpirationTime) {
- fiber.expirationTime = renderExpirationTime;
- }
+ fallbackChildFragment.return = workInProgress;
+ primaryChildFragment.return = workInProgress;
+ primaryChildFragment.sibling = fallbackChildFragment;
+ workInProgress.child = primaryChildFragment;
+ return fallbackChildFragment;
+ }
+ function scheduleWorkOnFiber(fiber, renderLanes) {
+ fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
var alternate = fiber.alternate;
- if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
- alternate.expirationTime = renderExpirationTime;
+ if (alternate !== null) {
+ alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
}
- scheduleWorkOnParentPath(fiber.return, renderExpirationTime);
+ scheduleWorkOnParentPath(fiber.return, renderLanes);
}
- function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) {
+ function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
// Mark any Suspense boundaries with fallbacks as having work to do.
// If they were previously forced into fallbacks, they may now be able
// to unblock.
@@ -18031,7 +18361,7 @@
var state = node.memoizedState;
if (state !== null) {
- scheduleWorkOnFiber(node, renderExpirationTime);
+ scheduleWorkOnFiber(node, renderLanes);
}
} else if (node.tag === SuspenseListComponent) {
// If the tail is hidden there might not be an Suspense boundaries
@@ -18039,7 +18369,7 @@
// list itself.
// We don't have to traverse to the children of the list since
// the list will propagate the change when it rerenders.
- scheduleWorkOnFiber(node, renderExpirationTime);
+ scheduleWorkOnFiber(node, renderLanes);
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
@@ -18201,7 +18531,6 @@
renderingStartTime: 0,
last: lastContentRow,
tail: tail,
- tailExpiration: 0,
tailMode: tailMode,
lastEffect: lastEffectBeforeRendering
};
@@ -18212,7 +18541,6 @@
renderState.renderingStartTime = 0;
renderState.last = lastContentRow;
renderState.tail = tail;
- renderState.tailExpiration = 0;
renderState.tailMode = tailMode;
renderState.lastEffect = lastEffectBeforeRendering;
}
@@ -18225,7 +18553,7 @@
// That happens in the completeWork phase without going back to beginWork.
- function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {
+ function updateSuspenseListComponent(current, workInProgress, renderLanes) {
var nextProps = workInProgress.pendingProps;
var revealOrder = nextProps.revealOrder;
var tailMode = nextProps.tail;
@@ -18233,21 +18561,21 @@
validateRevealOrder(revealOrder);
validateTailOptions(tailMode, revealOrder);
validateSuspenseListChildren(newChildren, revealOrder);
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, newChildren, renderLanes);
var suspenseContext = suspenseStackCursor.current;
var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
if (shouldForceFallback) {
suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
} else {
- var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;
+ var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;
if (didSuspendBefore) {
// If we previously forced a fallback, we need to schedule work
// on any nested boundaries to let them know to try to render
// again. This is the same as context updating.
- propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);
+ propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);
}
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
@@ -18256,7 +18584,7 @@
pushSuspenseContext(workInProgress, suspenseContext);
if ((workInProgress.mode & BlockingMode) === NoMode) {
- // Outside of blocking mode, SuspenseList doesn't work so we just
+ // In legacy mode, SuspenseList doesn't work so we just
// use make it a noop by treating it as the default revealOrder.
workInProgress.memoizedState = null;
} else {
@@ -18336,7 +18664,7 @@
return workInProgress.child;
}
- function updatePortalComponent(current, workInProgress, renderExpirationTime) {
+ function updatePortalComponent(current, workInProgress, renderLanes) {
pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
var nextChildren = workInProgress.pendingProps;
@@ -18346,15 +18674,17 @@
// flow doesn't do during mount. This doesn't happen at the root because
// the root always starts with a "current" with a null child.
// TODO: Consider unifying this with how the root works.
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
+ workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
} else {
- reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, nextChildren, renderLanes);
}
return workInProgress.child;
}
- function updateContextProvider(current, workInProgress, renderExpirationTime) {
+ var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
+
+ function updateContextProvider(current, workInProgress, renderLanes) {
var providerType = workInProgress.type;
var context = providerType._context;
var newProps = workInProgress.pendingProps;
@@ -18362,10 +18692,18 @@
var newValue = newProps.value;
{
+ if (!('value' in newProps)) {
+ if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
+ hasWarnedAboutUsingNoValuePropOnContextProvider = true;
+
+ error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');
+ }
+ }
+
var providerPropTypes = workInProgress.type.propTypes;
if (providerPropTypes) {
- checkPropTypes_1(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
+ checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');
}
}
@@ -18378,23 +18716,23 @@
if (changedBits === 0) {
// No change. Bailout early if children are the same.
if (oldProps.children === newProps.children && !hasContextChanged()) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
}
} else {
// The context value changed. Search for matching consumers and schedule
// them to update.
- propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
+ propagateContextChange(workInProgress, context, changedBits, renderLanes);
}
}
var newChildren = newProps.children;
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
+ reconcileChildren(current, workInProgress, newChildren, renderLanes);
return workInProgress.child;
}
var hasWarnedAboutUsingContextAsConsumer = false;
- function updateContextConsumer(current, workInProgress, renderExpirationTime) {
+ function updateContextConsumer(current, workInProgress, renderLanes) {
var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
// DEV mode, we create a separate object for Context.Consumer that acts
// like a proxy to Context. This proxy object adds unnecessary code in PROD
@@ -18429,7 +18767,7 @@
}
}
- prepareToReadContext(workInProgress, renderExpirationTime);
+ prepareToReadContext(workInProgress, renderLanes);
var newValue = readContext(context, newProps.unstable_observedBits);
var newChildren;
@@ -18441,8 +18779,8 @@
} // React DevTools reads this flag.
- workInProgress.effectTag |= PerformedWork;
- reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
+ workInProgress.flags |= PerformedWork;
+ reconcileChildren(current, workInProgress, newChildren, renderLanes);
return workInProgress.child;
}
@@ -18450,9 +18788,7 @@
didReceiveUpdate = true;
}
- function bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime) {
- cancelWorkTimer(workInProgress);
-
+ function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
if (current !== null) {
// Reuse previous dependencies
workInProgress.dependencies = current.dependencies;
@@ -18463,16 +18799,9 @@
stopProfilerTimerIfRunning();
}
- var updateExpirationTime = workInProgress.expirationTime;
-
- if (updateExpirationTime !== NoWork) {
- markUnprocessedUpdateTime(updateExpirationTime);
- } // Check if the children have any pending work.
-
+ markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.
- var childExpirationTime = workInProgress.childExpirationTime;
-
- if (childExpirationTime < renderExpirationTime) {
+ if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
// The children don't have any work either. We can skip them.
// TODO: Once we add back resuming, we should check if the children are
// a work-in-progress set. If so, we need to transfer their effects.
@@ -18535,20 +18864,20 @@
}
current.nextEffect = null;
- current.effectTag = Deletion;
- newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber.
+ current.flags = Deletion;
+ newWorkInProgress.flags |= Placement; // Restart work from the new fiber.
return newWorkInProgress;
}
}
- function beginWork(current, workInProgress, renderExpirationTime) {
- var updateExpirationTime = workInProgress.expirationTime;
+ function beginWork(current, workInProgress, renderLanes) {
+ var updateLanes = workInProgress.lanes;
{
if (workInProgress._debugNeedsRemount && current !== null) {
// This will restart the begin phase with a new fiber.
- return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.expirationTime));
+ return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
}
}
@@ -18561,7 +18890,7 @@
// If props or context changed, mark the fiber as having performed work.
// This may be unset if the props are determined to be equal later (memo).
didReceiveUpdate = true;
- } else if (updateExpirationTime < renderExpirationTime) {
+ } else if (!includesSomeLane(renderLanes, updateLanes)) {
didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering
// the begin phase. There's still some bookkeeping we that needs to be done
// in this optimized path, mostly pushing stuff onto the stack.
@@ -18574,17 +18903,6 @@
case HostComponent:
pushHostContext(workInProgress);
-
- if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(workInProgress.type, newProps)) {
- {
- markSpawnedWork(Never);
- } // Schedule this fiber to re-render at offscreen priority. Then bailout.
-
-
- workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
- return null;
- }
-
break;
case ClassComponent:
@@ -18612,11 +18930,17 @@
case Profiler:
{
// Profiler should only call onRender when one of its descendants actually rendered.
- var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
+ var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
if (hasChildWork) {
- workInProgress.effectTag |= Update;
- }
+ workInProgress.flags |= Update;
+ } // Reset effect durations for the next eventual effect phase.
+ // These are reset during render to allow the DevTools commit hook a chance to read them,
+
+
+ var stateNode = workInProgress.stateNode;
+ stateNode.effectDuration = 0;
+ stateNode.passiveEffectDuration = 0;
}
break;
@@ -18632,17 +18956,19 @@
var primaryChildFragment = workInProgress.child;
- var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;
+ var primaryChildLanes = primaryChildFragment.childLanes;
- if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {
+ if (includesSomeLane(renderLanes, primaryChildLanes)) {
// The primary children have pending work. Use the normal path
// to attempt to render the primary children again.
- return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
+ return updateSuspenseComponent(current, workInProgress, renderLanes);
} else {
+ // The primary child fragment does not have pending work marked
+ // on it
pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
// priority. Bailout.
- var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
if (child !== null) {
// The fallback children have pending work. Skip over the
@@ -18661,9 +18987,9 @@
case SuspenseListComponent:
{
- var didSuspendBefore = (current.effectTag & DidCapture) !== NoEffect;
+ var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;
- var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;
+ var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
if (didSuspendBefore) {
if (_hasChildWork) {
@@ -18672,13 +18998,13 @@
// Something might get unblocked by state updates or retries in the
// tree which will affect the tail. So we need to use the normal
// path to compute the correct tail.
- return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
+ return updateSuspenseListComponent(current, workInProgress, renderLanes);
} // If none of the children had any work, that means that none of
// them got retried so they'll still be blocked in the same way
// as before. We can fast bail out.
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
} // If nothing suspended before and we're rendering the same children,
// then the tail doesn't matter. Anything new that suspends will work
// in the "together" mode, so we can continue from the state we had.
@@ -18691,6 +19017,7 @@
// update in the past but didn't complete it.
renderState.rendering = null;
renderState.tail = null;
+ renderState.lastEffect = null;
}
pushSuspenseContext(workInProgress, suspenseStackCursor.current);
@@ -18704,15 +19031,36 @@
return null;
}
}
+
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ {
+ // Need to check if the tree still needs to be deferred. This is
+ // almost identical to the logic used in the normal update path,
+ // so we'll just enter that. The only difference is we'll bail out
+ // at the next level instead of this one, because the child props
+ // have not changed. Which is fine.
+ // TODO: Probably should refactor `beginWork` to split the bailout
+ // path from the normal path. I'm tempted to do a labeled break here
+ // but I won't :)
+ workInProgress.lanes = NoLanes;
+ return updateOffscreenComponent(current, workInProgress, renderLanes);
+ }
}
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
+ return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
} else {
- // An update was scheduled on this fiber, but there are no new props
- // nor legacy context. Set this to false. If an update queue or context
- // consumer produces a changed value, it will set this to true. Otherwise,
- // the component will assume the children have not changed and bail out.
- didReceiveUpdate = false;
+ if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
+ // This is a special case that only exists for legacy mode.
+ // See https://github.com/facebook/react/pull/19216.
+ didReceiveUpdate = true;
+ } else {
+ // An update was scheduled on this fiber, but there are no new props
+ // nor legacy context. Set this to false. If an update queue or context
+ // consumer produces a changed value, it will set this to true. Otherwise,
+ // the component will assume the children have not changed and bail out.
+ didReceiveUpdate = false;
+ }
}
} else {
didReceiveUpdate = false;
@@ -18723,18 +19071,18 @@
// move this assignment out of the common path and into each branch.
- workInProgress.expirationTime = NoWork;
+ workInProgress.lanes = NoLanes;
switch (workInProgress.tag) {
case IndeterminateComponent:
{
- return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderExpirationTime);
+ return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
}
case LazyComponent:
{
var elementType = workInProgress.elementType;
- return mountLazyComponent(current, workInProgress, elementType, updateExpirationTime, renderExpirationTime);
+ return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);
}
case FunctionComponent:
@@ -18742,7 +19090,7 @@
var _Component = workInProgress.type;
var unresolvedProps = workInProgress.pendingProps;
var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
- return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderExpirationTime);
+ return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);
}
case ClassComponent:
@@ -18752,23 +19100,23 @@
var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
- return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
+ return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);
}
case HostRoot:
- return updateHostRoot(current, workInProgress, renderExpirationTime);
+ return updateHostRoot(current, workInProgress, renderLanes);
case HostComponent:
- return updateHostComponent(current, workInProgress, renderExpirationTime);
+ return updateHostComponent(current, workInProgress, renderLanes);
case HostText:
return updateHostText(current, workInProgress);
case SuspenseComponent:
- return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
+ return updateSuspenseComponent(current, workInProgress, renderLanes);
case HostPortal:
- return updatePortalComponent(current, workInProgress, renderExpirationTime);
+ return updatePortalComponent(current, workInProgress, renderLanes);
case ForwardRef:
{
@@ -18777,23 +19125,23 @@
var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
- return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderExpirationTime);
+ return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);
}
case Fragment:
- return updateFragment(current, workInProgress, renderExpirationTime);
+ return updateFragment(current, workInProgress, renderLanes);
case Mode:
- return updateMode(current, workInProgress, renderExpirationTime);
+ return updateMode(current, workInProgress, renderLanes);
case Profiler:
- return updateProfiler(current, workInProgress, renderExpirationTime);
+ return updateProfiler(current, workInProgress, renderLanes);
case ContextProvider:
- return updateContextProvider(current, workInProgress, renderExpirationTime);
+ return updateContextProvider(current, workInProgress, renderLanes);
case ContextConsumer:
- return updateContextConsumer(current, workInProgress, renderExpirationTime);
+ return updateContextConsumer(current, workInProgress, renderLanes);
case MemoComponent:
{
@@ -18807,19 +19155,19 @@
var outerPropTypes = _type2.propTypes;
if (outerPropTypes) {
- checkPropTypes_1(outerPropTypes, _resolvedProps3, // Resolved for outer only
- 'prop', getComponentName(_type2), getCurrentFiberStackInDev);
+ checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
+ 'prop', getComponentName(_type2));
}
}
}
_resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
- return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);
+ return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);
}
case SimpleMemoComponent:
{
- return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
+ return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);
}
case IncompleteClassComponent:
@@ -18829,12 +19177,40 @@
var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
- return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);
+ return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);
}
case SuspenseListComponent:
{
- return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
+ return updateSuspenseListComponent(current, workInProgress, renderLanes);
+ }
+
+ case FundamentalComponent:
+ {
+
+ break;
+ }
+
+ case ScopeComponent:
+ {
+
+ break;
+ }
+
+ case Block:
+ {
+
+ break;
+ }
+
+ case OffscreenComponent:
+ {
+ return updateOffscreenComponent(current, workInProgress, renderLanes);
+ }
+
+ case LegacyHiddenComponent:
+ {
+ return updateLegacyHiddenComponent(current, workInProgress, renderLanes);
}
}
@@ -18848,11 +19224,11 @@
function markUpdate(workInProgress) {
// Tag the fiber with an update effect. This turns a Placement into
// a PlacementAndUpdate.
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
function markRef$1(workInProgress) {
- workInProgress.effectTag |= Ref;
+ workInProgress.flags |= Ref;
}
var appendAllChildren;
@@ -18935,6 +19311,12 @@
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
+ if (getIsHydrating()) {
+ // If we're hydrating, we should consume as many items as we can
+ // so we don't leave any behind.
+ return;
+ }
+
switch (renderState.tailMode) {
case 'hidden':
{
@@ -19008,7 +19390,7 @@
}
}
- function completeWork(current, workInProgress, renderExpirationTime) {
+ function completeWork(current, workInProgress, renderLanes) {
var newProps = workInProgress.pendingProps;
switch (workInProgress.tag) {
@@ -19039,6 +19421,7 @@
{
popHostContainer(workInProgress);
popTopLevelContextObject(workInProgress);
+ resetWorkInProgressVersions();
var fiberRoot = workInProgress.stateNode;
if (fiberRoot.pendingContext) {
@@ -19055,6 +19438,12 @@
// If we hydrated, then we'll need to schedule an update for
// the commit side-effects on the root.
markUpdate(workInProgress);
+ } else if (!fiberRoot.hydrate) {
+ // Schedule an effect to clear this container at the start of the next commit.
+ // This handles the case of React rendering into a container with previous children.
+ // It's also safe to do for updates too, because current.child would only be null
+ // if the previous render was null (so the the container would already be empty).
+ workInProgress.flags |= Snapshot;
}
}
@@ -19103,13 +19492,11 @@
}
} else {
var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
- appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners
-
- workInProgress.stateNode = instance;
+ appendAllChildren(instance, workInProgress, false, false);
+ workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
// (eg DOM renderer supports auto-focus for certain elements).
// Make sure such renderers get scheduled for later work.
-
if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
markUpdate(workInProgress);
}
@@ -19166,9 +19553,13 @@
popSuspenseContext(workInProgress);
var nextState = workInProgress.memoizedState;
- if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
+ if ((workInProgress.flags & DidCapture) !== NoFlags) {
// Something suspended. Re-render with the fallback children.
- workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list.
+ workInProgress.lanes = renderLanes; // Do not reset the effect list.
+
+ if ( (workInProgress.mode & ProfileMode) !== NoMode) {
+ transferActualDuration(workInProgress);
+ }
return workInProgress;
}
@@ -19183,29 +19574,6 @@
} else {
var prevState = current.memoizedState;
prevDidTimeout = prevState !== null;
-
- if (!nextDidTimeout && prevState !== null) {
- // We just switched from the fallback to the normal children.
- // Delete the fallback.
- // TODO: Would it be better to store the fallback fragment on
- // the stateNode during the begin phase?
- var currentFallbackChild = current.child.sibling;
-
- if (currentFallbackChild !== null) {
- // Deletions go at the beginning of the return fiber's effect list
- var first = workInProgress.firstEffect;
-
- if (first !== null) {
- workInProgress.firstEffect = currentFallbackChild;
- currentFallbackChild.nextEffect = first;
- } else {
- workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
- currentFallbackChild.nextEffect = null;
- }
-
- currentFallbackChild.effectTag = Deletion;
- }
- }
}
if (nextDidTimeout && !prevDidTimeout) {
@@ -19244,7 +19612,7 @@
// primary children. In mutation mode, we also need the flag to
// *unhide* children that were previously hidden, so check if this
// is currently timed out, too.
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
}
@@ -19254,6 +19622,11 @@
case HostPortal:
popHostContainer(workInProgress);
updateHostContainer(workInProgress);
+
+ if (current === null) {
+ preparePortalMount(workInProgress.stateNode.containerInfo);
+ }
+
return null;
case ContextProvider:
@@ -19285,7 +19658,7 @@
return null;
}
- var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;
+ var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;
var renderedTail = renderState.rendering;
if (renderedTail === null) {
@@ -19300,7 +19673,7 @@
// something in the previous committed pass suspended. Otherwise,
// there's no chance so we can skip the expensive call to
// findFirstSuspended.
- var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);
+ var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);
if (!cannotBeSuspended) {
var row = workInProgress.child;
@@ -19310,7 +19683,7 @@
if (suspended !== null) {
didSuspendAlready = true;
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
// part of the second pass. In that case nothing will subscribe to
// its thennables. Instead, we'll transfer its thennables to the
@@ -19328,7 +19701,7 @@
if (newThennables !== null) {
workInProgress.updateQueue = newThennables;
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
} // Rerender the whole list, but this time, we'll force fallbacks
// to stay in place.
// Reset the effect list before doing the second pass since that's now invalid.
@@ -19340,7 +19713,7 @@
workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.
- resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately
+ resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately
// rerender the children.
pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
@@ -19350,6 +19723,28 @@
row = row.sibling;
}
}
+
+ if (renderState.tail !== null && now() > getRenderTargetTime()) {
+ // We have already passed our CPU deadline but we still have rows
+ // left in the tail. We'll just give up further attempts to render
+ // the main content and only render fallbacks.
+ workInProgress.flags |= DidCapture;
+ didSuspendAlready = true;
+ cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
+ // to get it started back up to attempt the next item. While in terms
+ // of priority this work has the same priority as this current render,
+ // it's not part of the same transition once the transition has
+ // committed. If it's sync, we still want to yield so that it can be
+ // painted. Conceptually, this is really the same as pinging.
+ // We can use any RetryLane even if it's the one currently rendering
+ // since we're leaving it behind on this node.
+
+ workInProgress.lanes = SomeRetryLane;
+
+ {
+ markSpawnedWork(SomeRetryLane);
+ }
+ }
} else {
cutOffTailIfNeeded(renderState, false);
} // Next we're going to render the tail.
@@ -19360,7 +19755,7 @@
var _suspended = findFirstSuspended(renderedTail);
if (_suspended !== null) {
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
// get lost if this row ends up dropped during a second pass.
@@ -19368,43 +19763,47 @@
if (_newThennables !== null) {
workInProgress.updateQueue = _newThennables;
- workInProgress.effectTag |= Update;
+ workInProgress.flags |= Update;
}
cutOffTailIfNeeded(renderState, true); // This might have been modified.
- if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {
- // We need to delete the row we just rendered.
- // Reset the effect list to what it was before we rendered this
- // child. The nested children have already appended themselves.
- var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
+ if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.
+ ) {
+ // We need to delete the row we just rendered.
+ // Reset the effect list to what it was before we rendered this
+ // child. The nested children have already appended themselves.
+ var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
- if (lastEffect !== null) {
- lastEffect.nextEffect = null;
- } // We're done.
+ if (lastEffect !== null) {
+ lastEffect.nextEffect = null;
+ } // We're done.
- return null;
- }
- } else if ( // The time it took to render last row is greater than time until
- // the expiration.
- now() * 2 - renderState.renderingStartTime > renderState.tailExpiration && renderExpirationTime > Never) {
+ return null;
+ }
+ } else if ( // The time it took to render last row is greater than the remaining
+ // time we have to render. So rendering one more row would likely
+ // exceed it.
+ now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {
// We have now passed our CPU deadline and we'll just give up further
// attempts to render the main content and only render fallbacks.
// The assumption is that this is usually faster.
- workInProgress.effectTag |= DidCapture;
+ workInProgress.flags |= DidCapture;
didSuspendAlready = true;
cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
- // to get it started back up to attempt the next item. If we can show
- // them, then they really have the same priority as this render.
- // So we'll pick it back up the very next render pass once we've had
- // an opportunity to yield for paint.
+ // to get it started back up to attempt the next item. While in terms
+ // of priority this work has the same priority as this current render,
+ // it's not part of the same transition once the transition has
+ // committed. If it's sync, we still want to yield so that it can be
+ // painted. Conceptually, this is really the same as pinging.
+ // We can use any RetryLane even if it's the one currently rendering
+ // since we're leaving it behind on this node.
- var nextPriority = renderExpirationTime - 1;
- workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;
+ workInProgress.lanes = SomeRetryLane;
{
- markSpawnedWork(nextPriority);
+ markSpawnedWork(SomeRetryLane);
}
}
}
@@ -19432,19 +19831,7 @@
if (renderState.tail !== null) {
// We still have tail rows to render.
- if (renderState.tailExpiration === 0) {
- // Heuristic for how long we're willing to spend rendering rows
- // until we just give up and show what we have so far.
- var TAIL_EXPIRATION_TIMEOUT_MS = 500;
- renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; // TODO: This is meant to mimic the train model or JND but this
- // is a per component value. It should really be since the start
- // of the total render or last commit. Consider using something like
- // globalMostRecentFallbackTime. That doesn't account for being
- // suspended for part of the time or when it's a new render.
- // It should probably use a global start time value instead.
- } // Pop a row.
-
-
+ // Pop a row.
var next = renderState.tail;
renderState.rendering = next;
renderState.tail = next.sibling;
@@ -19469,6 +19856,41 @@
return null;
}
+
+ case FundamentalComponent:
+ {
+
+ break;
+ }
+
+ case ScopeComponent:
+ {
+
+ break;
+ }
+
+ case Block:
+
+ break;
+
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ {
+ popRenderLanes(workInProgress);
+
+ if (current !== null) {
+ var _nextState = workInProgress.memoizedState;
+ var _prevState = current.memoizedState;
+ var prevIsHidden = _prevState !== null;
+ var nextIsHidden = _nextState !== null;
+
+ if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {
+ workInProgress.flags |= Update;
+ }
+ }
+
+ return null;
+ }
}
{
@@ -19478,7 +19900,7 @@
}
}
- function unwindWork(workInProgress, renderExpirationTime) {
+ function unwindWork(workInProgress, renderLanes) {
switch (workInProgress.tag) {
case ClassComponent:
{
@@ -19488,10 +19910,15 @@
popContext(workInProgress);
}
- var effectTag = workInProgress.effectTag;
+ var flags = workInProgress.flags;
+
+ if (flags & ShouldCapture) {
+ workInProgress.flags = flags & ~ShouldCapture | DidCapture;
+
+ if ( (workInProgress.mode & ProfileMode) !== NoMode) {
+ transferActualDuration(workInProgress);
+ }
- if (effectTag & ShouldCapture) {
- workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
return workInProgress;
}
@@ -19502,15 +19929,16 @@
{
popHostContainer(workInProgress);
popTopLevelContextObject(workInProgress);
- var _effectTag = workInProgress.effectTag;
+ resetWorkInProgressVersions();
+ var _flags = workInProgress.flags;
- if (!((_effectTag & DidCapture) === NoEffect)) {
+ if (!((_flags & DidCapture) === NoFlags)) {
{
throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
}
}
- workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
+ workInProgress.flags = _flags & ~ShouldCapture | DidCapture;
return workInProgress;
}
@@ -19525,10 +19953,14 @@
{
popSuspenseContext(workInProgress);
- var _effectTag2 = workInProgress.effectTag;
+ var _flags2 = workInProgress.flags;
+
+ if (_flags2 & ShouldCapture) {
+ workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
- if (_effectTag2 & ShouldCapture) {
- workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
+ if ( (workInProgress.mode & ProfileMode) !== NoMode) {
+ transferActualDuration(workInProgress);
+ }
return workInProgress;
}
@@ -19552,6 +19984,11 @@
popProvider(workInProgress);
return null;
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ popRenderLanes(workInProgress);
+ return null;
+
default:
return null;
}
@@ -19574,6 +20011,7 @@
{
popHostContainer(interruptedWork);
popTopLevelContextObject(interruptedWork);
+ resetWorkInProgressVersions();
break;
}
@@ -19598,6 +20036,11 @@
case ContextProvider:
popProvider(interruptedWork);
break;
+
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ popRenderLanes(interruptedWork);
+ break;
}
}
@@ -19611,109 +20054,394 @@
};
}
- function logCapturedError(capturedError) {
+ // This module is forked in different environments.
+ // By default, return `true` to log errors to the console.
+ // Forks can return `false` if this isn't desirable.
+ function showErrorDialog(boundary, errorInfo) {
+ return true;
+ }
- var error = capturedError.error;
+ function logCapturedError(boundary, errorInfo) {
+ try {
+ var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.
+ // This enables renderers like ReactNative to better manage redbox behavior.
- {
- var componentName = capturedError.componentName,
- componentStack = capturedError.componentStack,
- errorBoundaryName = capturedError.errorBoundaryName,
- errorBoundaryFound = capturedError.errorBoundaryFound,
- willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling
- // `preventDefault()` in window `error` handler.
- // We record this information as an expando on the error.
-
- if (error != null && error._suppressLogging) {
- if (errorBoundaryFound && willRetry) {
- // The error is recoverable and was silenced.
- // Ignore it and don't print the stack addendum.
- // This is handy for testing error boundaries without noise.
- return;
- } // The error is fatal. Since the silencing might have
- // been accidental, we'll surface it anyway.
- // However, the browser would have silenced the original error
- // so we'll print it first, and then print the stack addendum.
+ if (logError === false) {
+ return;
+ }
+ var error = errorInfo.value;
- console['error'](error); // Don't transform to our wrapper
- // For a more detailed description of this block, see:
- // https://github.com/facebook/react/pull/13384
- }
+ if (true) {
+ var source = errorInfo.source;
+ var stack = errorInfo.stack;
+ var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling
+ // `preventDefault()` in window `error` handler.
+ // We record this information as an expando on the error.
+
+ if (error != null && error._suppressLogging) {
+ if (boundary.tag === ClassComponent) {
+ // The error is recoverable and was silenced.
+ // Ignore it and don't print the stack addendum.
+ // This is handy for testing error boundaries without noise.
+ return;
+ } // The error is fatal. Since the silencing might have
+ // been accidental, we'll surface it anyway.
+ // However, the browser would have silenced the original error
+ // so we'll print it first, and then print the stack addendum.
+
+
+ console['error'](error); // Don't transform to our wrapper
+ // For a more detailed description of this block, see:
+ // https://github.com/facebook/react/pull/13384
+ }
- var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
- var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
+ var componentName = source ? getComponentName(source.type) : null;
+ var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
+ var errorBoundaryMessage;
+ var errorBoundaryName = getComponentName(boundary.type);
- if (errorBoundaryFound && errorBoundaryName) {
- if (willRetry) {
+ if (errorBoundaryName) {
errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
} else {
- errorBoundaryMessage = "This error was initially handled by the error boundary " + errorBoundaryName + ".\n" + "Recreating the tree from scratch failed so React will unmount the tree.";
+ errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
}
+
+ var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
+ // We don't include the original error message and JS stack because the browser
+ // has already printed it. Even if the application swallows the error, it is still
+ // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
+
+ console['error'](combinedMessage); // Don't transform to our wrapper
} else {
- errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
+ // In production, we print the error directly.
+ // This will include the message, the JS stack, and anything the browser wants to show.
+ // We pass the error object instead of custom message so that the browser displays the error natively.
+ console['error'](error); // Don't transform to our wrapper
}
+ } catch (e) {
+ // This method must not throw, or React internal state will get messed up.
+ // If console.error is overridden, or logCapturedError() shows a dialog that throws,
+ // we want to report this error outside of the normal stack as a last resort.
+ // https://github.com/facebook/react/issues/13188
+ setTimeout(function () {
+ throw e;
+ });
+ }
+ }
- var combinedMessage = "" + componentNameMessage + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
- // We don't include the original error message and JS stack because the browser
- // has already printed it. Even if the application swallows the error, it is still
- // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
+ var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
- console['error'](combinedMessage); // Don't transform to our wrapper
- }
+ function createRootErrorUpdate(fiber, errorInfo, lane) {
+ var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.
+
+ update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
+ // being called "element".
+
+ update.payload = {
+ element: null
+ };
+ var error = errorInfo.value;
+
+ update.callback = function () {
+ onUncaughtError(error);
+ logCapturedError(fiber, errorInfo);
+ };
+
+ return update;
}
- var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
+ function createClassErrorUpdate(fiber, errorInfo, lane) {
+ var update = createUpdate(NoTimestamp, lane);
+ update.tag = CaptureUpdate;
+ var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
- {
- didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
+ if (typeof getDerivedStateFromError === 'function') {
+ var error$1 = errorInfo.value;
+
+ update.payload = function () {
+ logCapturedError(fiber, errorInfo);
+ return getDerivedStateFromError(error$1);
+ };
+ }
+
+ var inst = fiber.stateNode;
+
+ if (inst !== null && typeof inst.componentDidCatch === 'function') {
+ update.callback = function callback() {
+ {
+ markFailedErrorBoundaryForHotReloading(fiber);
+ }
+
+ if (typeof getDerivedStateFromError !== 'function') {
+ // To preserve the preexisting retry behavior of error boundaries,
+ // we keep track of which ones already failed during this batch.
+ // This gets reset before we yield back to the browser.
+ // TODO: Warn in strict mode if getDerivedStateFromError is
+ // not defined.
+ markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
+
+ logCapturedError(fiber, errorInfo);
+ }
+
+ var error$1 = errorInfo.value;
+ var stack = errorInfo.stack;
+ this.componentDidCatch(error$1, {
+ componentStack: stack !== null ? stack : ''
+ });
+
+ {
+ if (typeof getDerivedStateFromError !== 'function') {
+ // If componentDidCatch is the only error boundary method defined,
+ // then it needs to call setState to recover from errors.
+ // If no state update is scheduled then the boundary will swallow the error.
+ if (!includesSomeLane(fiber.lanes, SyncLane)) {
+ error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
+ }
+ }
+ }
+ };
+ } else {
+ update.callback = function () {
+ markFailedErrorBoundaryForHotReloading(fiber);
+ };
+ }
+
+ return update;
}
- var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
- function logError(boundary, errorInfo) {
- var source = errorInfo.source;
- var stack = errorInfo.stack;
-
- if (stack === null && source !== null) {
- stack = getStackByFiberInDevAndProd(source);
- }
-
- var capturedError = {
- componentName: source !== null ? getComponentName(source.type) : null,
- componentStack: stack !== null ? stack : '',
- error: errorInfo.value,
- errorBoundary: null,
- errorBoundaryName: null,
- errorBoundaryFound: false,
- willRetry: false
- };
+ function attachPingListener(root, wakeable, lanes) {
+ // Attach a listener to the promise to "ping" the root and retry. But only if
+ // one does not already exist for the lanes we're currently rendering (which
+ // acts like a "thread ID" here).
+ var pingCache = root.pingCache;
+ var threadIDs;
- if (boundary !== null && boundary.tag === ClassComponent) {
- capturedError.errorBoundary = boundary.stateNode;
- capturedError.errorBoundaryName = getComponentName(boundary.type);
- capturedError.errorBoundaryFound = true;
- capturedError.willRetry = true;
+ if (pingCache === null) {
+ pingCache = root.pingCache = new PossiblyWeakMap$1();
+ threadIDs = new Set();
+ pingCache.set(wakeable, threadIDs);
+ } else {
+ threadIDs = pingCache.get(wakeable);
+
+ if (threadIDs === undefined) {
+ threadIDs = new Set();
+ pingCache.set(wakeable, threadIDs);
+ }
}
- try {
- logCapturedError(capturedError);
- } catch (e) {
- // This method must not throw, or React internal state will get messed up.
- // If console.error is overridden, or logCapturedError() shows a dialog that throws,
- // we want to report this error outside of the normal stack as a last resort.
- // https://github.com/facebook/react/issues/13188
- setTimeout(function () {
- throw e;
- });
+ if (!threadIDs.has(lanes)) {
+ // Memoize using the thread ID to prevent redundant listeners.
+ threadIDs.add(lanes);
+ var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
+ wakeable.then(ping, ping);
}
}
+ function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
+ // The source fiber did not complete.
+ sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.
+
+ sourceFiber.firstEffect = sourceFiber.lastEffect = null;
+
+ if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
+ // This is a wakeable.
+ var wakeable = value;
+
+ if ((sourceFiber.mode & BlockingMode) === NoMode) {
+ // Reset the memoizedState to what it was before we attempted
+ // to render it.
+ var currentSource = sourceFiber.alternate;
+
+ if (currentSource) {
+ sourceFiber.updateQueue = currentSource.updateQueue;
+ sourceFiber.memoizedState = currentSource.memoizedState;
+ sourceFiber.lanes = currentSource.lanes;
+ } else {
+ sourceFiber.updateQueue = null;
+ sourceFiber.memoizedState = null;
+ }
+ }
+
+ var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
+
+ var _workInProgress = returnFiber;
+
+ do {
+ if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
+ // Found the nearest boundary.
+ // Stash the promise on the boundary fiber. If the boundary times out, we'll
+ // attach another listener to flip the boundary back to its normal state.
+ var wakeables = _workInProgress.updateQueue;
+
+ if (wakeables === null) {
+ var updateQueue = new Set();
+ updateQueue.add(wakeable);
+ _workInProgress.updateQueue = updateQueue;
+ } else {
+ wakeables.add(wakeable);
+ } // If the boundary is outside of blocking mode, we should *not*
+ // suspend the commit. Pretend as if the suspended component rendered
+ // null and keep rendering. In the commit phase, we'll schedule a
+ // subsequent synchronous update to re-render the Suspense.
+ //
+ // Note: It doesn't matter whether the component that suspended was
+ // inside a blocking mode tree. If the Suspense is outside of it, we
+ // should *not* suspend the commit.
+
+
+ if ((_workInProgress.mode & BlockingMode) === NoMode) {
+ _workInProgress.flags |= DidCapture;
+ sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.
+ // But we shouldn't call any lifecycle methods or callbacks. Remove
+ // all lifecycle effect tags.
+
+ sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);
+
+ if (sourceFiber.tag === ClassComponent) {
+ var currentSourceFiber = sourceFiber.alternate;
+
+ if (currentSourceFiber === null) {
+ // This is a new mount. Change the tag so it's not mistaken for a
+ // completed class component. For example, we should not call
+ // componentWillUnmount if it is deleted.
+ sourceFiber.tag = IncompleteClassComponent;
+ } else {
+ // When we try rendering again, we should not reuse the current fiber,
+ // since it's known to be in an inconsistent state. Use a force update to
+ // prevent a bail out.
+ var update = createUpdate(NoTimestamp, SyncLane);
+ update.tag = ForceUpdate;
+ enqueueUpdate(sourceFiber, update);
+ }
+ } // The source fiber did not complete. Mark it with Sync priority to
+ // indicate that it still has pending work.
+
+
+ sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.
+
+ return;
+ } // Confirmed that the boundary is in a concurrent mode tree. Continue
+ // with the normal suspend path.
+ //
+ // After this we'll use a set of heuristics to determine whether this
+ // render pass will run to completion or restart or "suspend" the commit.
+ // The actual logic for this is spread out in different places.
+ //
+ // This first principle is that if we're going to suspend when we complete
+ // a root, then we should also restart if we get an update or ping that
+ // might unsuspend it, and vice versa. The only reason to suspend is
+ // because you think you might want to restart before committing. However,
+ // it doesn't make sense to restart only while in the period we're suspended.
+ //
+ // Restarting too aggressively is also not good because it starves out any
+ // intermediate loading state. So we use heuristics to determine when.
+ // Suspense Heuristics
+ //
+ // If nothing threw a Promise or all the same fallbacks are already showing,
+ // then don't suspend/restart.
+ //
+ // If this is an initial render of a new tree of Suspense boundaries and
+ // those trigger a fallback, then don't suspend/restart. We want to ensure
+ // that we can show the initial loading state as quickly as possible.
+ //
+ // If we hit a "Delayed" case, such as when we'd switch from content back into
+ // a fallback, then we should always suspend/restart. Transitions apply
+ // to this case. If none is defined, JND is used instead.
+ //
+ // If we're already showing a fallback and it gets "retried", allowing us to show
+ // another level, but there's still an inner boundary that would show a fallback,
+ // then we suspend/restart for 500ms since the last time we showed a fallback
+ // anywhere in the tree. This effectively throttles progressive loading into a
+ // consistent train of commits. This also gives us an opportunity to restart to
+ // get to the completed state slightly earlier.
+ //
+ // If there's ambiguity due to batching it's resolved in preference of:
+ // 1) "delayed", 2) "initial render", 3) "retry".
+ //
+ // We want to ensure that a "busy" state doesn't get force committed. We want to
+ // ensure that new initial loading states can commit as soon as possible.
+
+
+ attachPingListener(root, wakeable, rootRenderLanes);
+ _workInProgress.flags |= ShouldCapture;
+ _workInProgress.lanes = rootRenderLanes;
+ return;
+ } // This boundary already captured during this render. Continue to the next
+ // boundary.
+
+
+ _workInProgress = _workInProgress.return;
+ } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
+ // TODO: Use invariant so the message is stripped in prod?
+
+
+ value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.');
+ } // We didn't find a boundary that could handle this type of exception. Start
+ // over and traverse parent path again, this time treating the exception
+ // as an error.
+
+
+ renderDidError();
+ value = createCapturedValue(value, sourceFiber);
+ var workInProgress = returnFiber;
+
+ do {
+ switch (workInProgress.tag) {
+ case HostRoot:
+ {
+ var _errorInfo = value;
+ workInProgress.flags |= ShouldCapture;
+ var lane = pickArbitraryLane(rootRenderLanes);
+ workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);
+
+ var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);
+
+ enqueueCapturedUpdate(workInProgress, _update);
+ return;
+ }
+
+ case ClassComponent:
+ // Capture and retry
+ var errorInfo = value;
+ var ctor = workInProgress.type;
+ var instance = workInProgress.stateNode;
+
+ if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
+ workInProgress.flags |= ShouldCapture;
+
+ var _lane = pickArbitraryLane(rootRenderLanes);
+
+ workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state
+
+ var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);
+
+ enqueueCapturedUpdate(workInProgress, _update2);
+ return;
+ }
+
+ break;
+ }
+
+ workInProgress = workInProgress.return;
+ } while (workInProgress !== null);
+ }
+
+ var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
+
+ {
+ didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
+ }
+
+ var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
+
var callComponentWillUnmountWithTimer = function (current, instance) {
- startPhaseTimer(current, 'componentWillUnmount');
instance.props = current.memoizedProps;
instance.state = current.memoizedState;
- instance.componentWillUnmount();
- stopPhaseTimer();
+
+ {
+ instance.componentWillUnmount();
+ }
}; // Capture errors so they don't interrupt unmounting.
@@ -19770,11 +20498,10 @@
case ClassComponent:
{
- if (finishedWork.effectTag & Snapshot) {
+ if (finishedWork.flags & Snapshot) {
if (current !== null) {
var prevProps = current.memoizedProps;
var prevState = current.memoizedState;
- startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
var instance = finishedWork.stateNode; // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
@@ -19786,7 +20513,7 @@
}
if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
+ error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
}
}
}
@@ -19804,7 +20531,6 @@
}
instance.__reactInternalSnapshotBeforeUpdate = snapshot;
- stopPhaseTimer();
}
}
@@ -19812,6 +20538,17 @@
}
case HostRoot:
+ {
+ {
+ if (finishedWork.flags & Snapshot) {
+ var root = finishedWork.stateNode;
+ clearContainer(root.containerInfo);
+ }
+ }
+
+ return;
+ }
+
case HostComponent:
case HostText:
case HostPortal:
@@ -19874,12 +20611,12 @@
if (destroy === null) {
addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
} else if (typeof destroy.then === 'function') {
- addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
+ addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
} else {
addendum = ' You returned: ' + destroy;
}
- error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));
+ error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);
}
}
}
@@ -19889,26 +20626,30 @@
}
}
- function commitPassiveHookEffects(finishedWork) {
- if ((finishedWork.effectTag & Passive) !== NoEffect) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- // TODO (#17945) We should call all passive destroy functions (for all fibers)
- // before calling any create functions. The current approach only serializes
- // these for a single fiber.
- commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork);
- commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
- break;
- }
- }
+ function schedulePassiveEffects(finishedWork) {
+ var updateQueue = finishedWork.updateQueue;
+ var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
+
+ if (lastEffect !== null) {
+ var firstEffect = lastEffect.next;
+ var effect = firstEffect;
+
+ do {
+ var _effect = effect,
+ next = _effect.next,
+ tag = _effect.tag;
+
+ if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {
+ enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);
+ enqueuePendingPassiveHookEffectMount(finishedWork, effect);
+ }
+
+ effect = next;
+ } while (effect !== firstEffect);
}
}
- function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirationTime) {
+ function commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
@@ -19919,8 +20660,11 @@
// This is done to prevent sibling component effects from interfering with each other,
// e.g. a destroy function in one component should never override a ref set
// by a create function in another component during the same commit.
- commitHookEffectListMount(Layout | HasEffect, finishedWork);
+ {
+ commitHookEffectListMount(Layout | HasEffect, finishedWork);
+ }
+ schedulePassiveEffects(finishedWork);
return;
}
@@ -19928,12 +20672,11 @@
{
var instance = finishedWork.stateNode;
- if (finishedWork.effectTag & Update) {
+ if (finishedWork.flags & Update) {
if (current === null) {
- startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here,
+ // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
-
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
@@ -19941,17 +20684,17 @@
}
if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
+ error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
}
}
}
- instance.componentDidMount();
- stopPhaseTimer();
+ {
+ instance.componentDidMount();
+ }
} else {
var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
- var prevState = current.memoizedState;
- startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here,
+ var prevState = current.memoizedState; // We could update instance props and state here,
// but instead we rely on them being set during last render.
// TODO: revisit this when we implement resuming.
@@ -19962,15 +20705,18 @@
}
if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
+ error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
}
}
}
- instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
- stopPhaseTimer();
+ {
+ instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
+ }
}
- }
+ } // TODO: I think this is now always non-null by the time it reaches the
+ // commit phase. Consider removing the type check.
+
var updateQueue = finishedWork.updateQueue;
@@ -19982,7 +20728,7 @@
}
if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
+ error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
}
}
} // We could update instance props and state here,
@@ -19998,6 +20744,8 @@
case HostRoot:
{
+ // TODO: I think this is now always non-null by the time it reaches the
+ // commit phase. Consider removing the type check.
var _updateQueue = finishedWork.updateQueue;
if (_updateQueue !== null) {
@@ -20028,7 +20776,7 @@
// These effects should only be committed when components are first mounted,
// aka when there is no current/alternate.
- if (current === null && finishedWork.effectTag & Update) {
+ if (current === null && finishedWork.flags & Update) {
var type = finishedWork.type;
var props = finishedWork.memoizedProps;
commitMount(_instance2, type, props);
@@ -20052,11 +20800,15 @@
case Profiler:
{
{
- var onRender = finishedWork.memoizedProps.onRender;
+ var _finishedWork$memoize2 = finishedWork.memoizedProps,
+ onCommit = _finishedWork$memoize2.onCommit,
+ onRender = _finishedWork$memoize2.onRender;
+ var effectDuration = finishedWork.stateNode.effectDuration;
+ var commitTime = getCommitTime();
if (typeof onRender === 'function') {
{
- onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
+ onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);
}
}
}
@@ -20074,6 +20826,8 @@
case IncompleteClassComponent:
case FundamentalComponent:
case ScopeComponent:
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
return;
}
@@ -20107,14 +20861,7 @@
} else {
unhideTextInstance(_instance3, node.memoizedProps);
}
- } else if (node.tag === SuspenseComponent && node.memoizedState !== null && node.memoizedState.dehydrated === null) {
- // Found a nested Suspense component that timed out. Skip over the
- // primary child fragment, which should remain hidden.
- var fallbackChildFragment = node.child.sibling;
- fallbackChildFragment.return = node;
- node = fallbackChildFragment;
- continue;
- } else if (node.child !== null) {
+ } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
@@ -20159,7 +20906,7 @@
} else {
{
if (!ref.hasOwnProperty('current')) {
- error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
+ error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));
}
}
@@ -20200,35 +20947,25 @@
if (lastEffect !== null) {
var firstEffect = lastEffect.next;
+ var effect = firstEffect;
- {
- // When the owner fiber is deleted, the destroy function of a passive
- // effect hook is called during the synchronous commit phase. This is
- // a concession to implementation complexity. Calling it in the
- // passive effect phase (like they usually are, when dependencies
- // change during an update) would require either traversing the
- // children of the deleted fiber again, or including unmount effects
- // as part of the fiber effect list.
- //
- // Because this is during the sync commit phase, we need to change
- // the priority.
- //
- // TODO: Reconsider this implementation trade off.
- var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;
- runWithPriority$1(priorityLevel, function () {
- var effect = firstEffect;
-
- do {
- var _destroy = effect.destroy;
-
- if (_destroy !== undefined) {
- safelyCallDestroy(current, _destroy);
+ do {
+ var _effect2 = effect,
+ destroy = _effect2.destroy,
+ tag = _effect2.tag;
+
+ if (destroy !== undefined) {
+ if ((tag & Passive$1) !== NoFlags$1) {
+ enqueuePendingPassiveHookEffectUnmount(current, effect);
+ } else {
+ {
+ safelyCallDestroy(current, destroy);
}
+ }
+ }
- effect = effect.next;
- } while (effect !== firstEffect);
- });
- }
+ effect = effect.next;
+ } while (effect !== firstEffect);
}
}
@@ -20249,7 +20986,6 @@
case HostComponent:
{
-
safelyDetachRef(current);
return;
}
@@ -20260,7 +20996,7 @@
// We are also not using this parent because
// the portal will get pushed immediately.
{
- unmountHostComponents(finishedRoot, current, renderPriorityLevel);
+ unmountHostComponents(finishedRoot, current);
}
return;
@@ -20295,7 +21031,7 @@
var node = root;
while (true) {
- commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes.
+ commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.
// Skip portals because commitUnmount() currently visits them recursively.
if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
@@ -20323,27 +21059,33 @@
}
}
- function detachFiber(current) {
- var alternate = current.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we
+ function detachFiberMutation(fiber) {
+ // Cut off the return pointers to disconnect it from the tree. Ideally, we
// should clear the child pointer of the parent alternate to let this
// get GC:ed but we don't know which for sure which parent is the current
// one so we'll settle for GC:ing the subtree of this child. This child
// itself will be GC:ed when the parent updates the next time.
+ // Note: we cannot null out sibling here, otherwise it can cause issues
+ // with findDOMNode and how it requires the sibling field to carry out
+ // traversal in a later effect. See PR #16820. We now clear the sibling
+ // field after effects, see: detachFiberAfterEffects.
+ //
+ // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.
+ // It may be required if the current component is an error boundary,
+ // and one of its descendants throws while unmounting a passive effect.
+ fiber.alternate = null;
+ fiber.child = null;
+ fiber.dependencies = null;
+ fiber.firstEffect = null;
+ fiber.lastEffect = null;
+ fiber.memoizedProps = null;
+ fiber.memoizedState = null;
+ fiber.pendingProps = null;
+ fiber.return = null;
+ fiber.updateQueue = null;
- current.return = null;
- current.child = null;
- current.memoizedState = null;
- current.updateQueue = null;
- current.dependencies = null;
- current.alternate = null;
- current.firstEffect = null;
- current.lastEffect = null;
- current.pendingProps = null;
- current.memoizedProps = null;
- current.stateNode = null;
-
- if (alternate !== null) {
- detachFiber(alternate);
+ {
+ fiber._debugOwner = null;
}
}
@@ -20394,7 +21136,7 @@
while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
// If it is not host node and, we might have a host node inside it.
// Try to search down until we find one.
- if (node.effectTag & Placement) {
+ if (node.flags & Placement) {
// If we don't have a child, try the siblings instead.
continue siblings;
} // If we don't have a child, try the siblings instead.
@@ -20410,7 +21152,7 @@
} // Check if this host node is stable or about to be placed.
- if (!(node.effectTag & Placement)) {
+ if (!(node.flags & Placement)) {
// Found it!
return node.stateNode;
}
@@ -20455,11 +21197,11 @@
}
- if (parentFiber.effectTag & ContentReset) {
+ if (parentFiber.flags & ContentReset) {
// Reset the text content of the parent before doing any insertions
resetTextContent(parent); // Clear ContentReset from the effect tag
- parentFiber.effectTag &= ~ContentReset;
+ parentFiber.flags &= ~ContentReset;
}
var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
@@ -20575,7 +21317,7 @@
}
if (node.tag === HostComponent || node.tag === HostText) {
- commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the
+ commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the
// node from the tree.
if (currentParentIsContainer) {
@@ -20596,7 +21338,7 @@
continue;
}
} else {
- commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below.
+ commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.
if (node.child !== null) {
node.child.return = node;
@@ -20632,10 +21374,15 @@
{
// Recursively delete all host nodes from the parent.
// Detach refs and call componentWillUnmount() on the whole subtree.
- unmountHostComponents(finishedRoot, current, renderPriorityLevel);
+ unmountHostComponents(finishedRoot, current);
}
- detachFiber(current);
+ var alternate = current.alternate;
+ detachFiberMutation(current);
+
+ if (alternate !== null) {
+ detachFiberMutation(alternate);
+ }
}
function commitWork(current, finishedWork) {
@@ -20652,7 +21399,10 @@
// This prevents sibling component effects from interfering with each other,
// e.g. a destroy function in one component should never override a ref set
// by a create function in another component during the same commit.
- commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
+ {
+ commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
+ }
+
return;
}
@@ -20740,6 +21490,27 @@
{
return;
}
+
+ case FundamentalComponent:
+ {
+
+ break;
+ }
+
+ case ScopeComponent:
+ {
+
+ break;
+ }
+
+ case OffscreenComponent:
+ case LegacyHiddenComponent:
+ {
+ var newState = finishedWork.memoizedState;
+ var isHidden = newState !== null;
+ hideOrUnhideAllChildren(finishedWork, isHidden);
+ return;
+ }
}
{
@@ -20751,19 +21522,23 @@
function commitSuspenseComponent(finishedWork) {
var newState = finishedWork.memoizedState;
- var newDidTimeout;
- var primaryChildParent = finishedWork;
- if (newState === null) {
- newDidTimeout = false;
- } else {
- newDidTimeout = true;
- primaryChildParent = finishedWork.child;
+ if (newState !== null) {
markCommitTimeOfFallback();
- }
- if ( primaryChildParent !== null) {
- hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
+ {
+ // Hide the Offscreen component that contains the primary children. TODO:
+ // Ideally, this effect would have been scheduled on the Offscreen fiber
+ // itself. That's how unhiding works: the Offscreen component schedules an
+ // effect on itself. However, in this case, the component didn't complete,
+ // so the fiber was never added to the effect list in the normal path. We
+ // could have appended it to the effect list in the Suspense component's
+ // second pass, but doing it this way is less complicated. This would be
+ // simpler if we got rid of the effect list and traversed the tree, like
+ // we're planning to do.
+ var primaryChildParent = finishedWork.child;
+ hideOrUnhideAllChildren(primaryChildParent, true);
+ }
}
}
@@ -20789,12 +21564,12 @@
}
function attachSuspenseRetryListeners(finishedWork) {
- // If this boundary just timed out, then it will have a set of thenables.
- // For each thenable, attach a listener so that when it resolves, React
+ // If this boundary just timed out, then it will have a set of wakeables.
+ // For each wakeable, attach a listener so that when it resolves, React
// attempts to re-render the boundary in the primary (pre-timeout) state.
- var thenables = finishedWork.updateQueue;
+ var wakeables = finishedWork.updateQueue;
- if (thenables !== null) {
+ if (wakeables !== null) {
finishedWork.updateQueue = null;
var retryCache = finishedWork.stateNode;
@@ -20802,327 +21577,74 @@
retryCache = finishedWork.stateNode = new PossiblyWeakSet();
}
- thenables.forEach(function (thenable) {
+ wakeables.forEach(function (wakeable) {
// Memoize using the boundary fiber to prevent redundant listeners.
- var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
+ var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
- if (!retryCache.has(thenable)) {
+ if (!retryCache.has(wakeable)) {
{
- if (thenable.__reactDoNotTraceInteractions !== true) {
+ if (wakeable.__reactDoNotTraceInteractions !== true) {
retry = unstable_wrap(retry);
}
}
- retryCache.add(thenable);
- thenable.then(retry, retry);
+ retryCache.add(wakeable);
+ wakeable.then(retry, retry);
}
});
}
- }
-
- function commitResetTextContent(current) {
-
- resetTextContent(current.stateNode);
- }
+ } // This function detects when a Suspense boundary goes from visible to hidden.
+ // It returns false if the boundary is already hidden.
+ // TODO: Use an effect tag.
- var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
-
- function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
- var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.
-
- update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
- // being called "element".
-
- update.payload = {
- element: null
- };
- var error = errorInfo.value;
-
- update.callback = function () {
- onUncaughtError(error);
- logError(fiber, errorInfo);
- };
-
- return update;
- }
-
- function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
- var update = createUpdate(expirationTime, null);
- update.tag = CaptureUpdate;
- var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
-
- if (typeof getDerivedStateFromError === 'function') {
- var error$1 = errorInfo.value;
-
- update.payload = function () {
- logError(fiber, errorInfo);
- return getDerivedStateFromError(error$1);
- };
- }
-
- var inst = fiber.stateNode;
-
- if (inst !== null && typeof inst.componentDidCatch === 'function') {
- update.callback = function callback() {
- {
- markFailedErrorBoundaryForHotReloading(fiber);
- }
-
- if (typeof getDerivedStateFromError !== 'function') {
- // To preserve the preexisting retry behavior of error boundaries,
- // we keep track of which ones already failed during this batch.
- // This gets reset before we yield back to the browser.
- // TODO: Warn in strict mode if getDerivedStateFromError is
- // not defined.
- markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
-
- logError(fiber, errorInfo);
- }
-
- var error$1 = errorInfo.value;
- var stack = errorInfo.stack;
- this.componentDidCatch(error$1, {
- componentStack: stack !== null ? stack : ''
- });
-
- {
- if (typeof getDerivedStateFromError !== 'function') {
- // If componentDidCatch is the only error boundary method defined,
- // then it needs to call setState to recover from errors.
- // If no state update is scheduled then the boundary will swallow the error.
- if (fiber.expirationTime !== Sync) {
- error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
- }
- }
- }
- };
- } else {
- update.callback = function () {
- markFailedErrorBoundaryForHotReloading(fiber);
- };
- }
- return update;
- }
-
- function attachPingListener(root, renderExpirationTime, thenable) {
- // Attach a listener to the promise to "ping" the root and retry. But
- // only if one does not already exist for the current render expiration
- // time (which acts like a "thread ID" here).
- var pingCache = root.pingCache;
- var threadIDs;
-
- if (pingCache === null) {
- pingCache = root.pingCache = new PossiblyWeakMap$1();
- threadIDs = new Set();
- pingCache.set(thenable, threadIDs);
- } else {
- threadIDs = pingCache.get(thenable);
+ function isSuspenseBoundaryBeingHidden(current, finishedWork) {
+ if (current !== null) {
+ var oldState = current.memoizedState;
- if (threadIDs === undefined) {
- threadIDs = new Set();
- pingCache.set(thenable, threadIDs);
+ if (oldState === null || oldState.dehydrated !== null) {
+ var newState = finishedWork.memoizedState;
+ return newState !== null && newState.dehydrated === null;
}
}
- if (!threadIDs.has(renderExpirationTime)) {
- // Memoize using the thread ID to prevent redundant listeners.
- threadIDs.add(renderExpirationTime);
- var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
- thenable.then(ping, ping);
- }
+ return false;
}
- function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
- // The source fiber did not complete.
- sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid.
-
- sourceFiber.firstEffect = sourceFiber.lastEffect = null;
-
- if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
- // This is a thenable.
- var thenable = value;
-
- if ((sourceFiber.mode & BlockingMode) === NoMode) {
- // Reset the memoizedState to what it was before we attempted
- // to render it.
- var currentSource = sourceFiber.alternate;
-
- if (currentSource) {
- sourceFiber.updateQueue = currentSource.updateQueue;
- sourceFiber.memoizedState = currentSource.memoizedState;
- sourceFiber.expirationTime = currentSource.expirationTime;
- } else {
- sourceFiber.updateQueue = null;
- sourceFiber.memoizedState = null;
- }
- }
-
- var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
-
- var _workInProgress = returnFiber;
-
- do {
- if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
- // Found the nearest boundary.
- // Stash the promise on the boundary fiber. If the boundary times out, we'll
- // attach another listener to flip the boundary back to its normal state.
- var thenables = _workInProgress.updateQueue;
-
- if (thenables === null) {
- var updateQueue = new Set();
- updateQueue.add(thenable);
- _workInProgress.updateQueue = updateQueue;
- } else {
- thenables.add(thenable);
- } // If the boundary is outside of blocking mode, we should *not*
- // suspend the commit. Pretend as if the suspended component rendered
- // null and keep rendering. In the commit phase, we'll schedule a
- // subsequent synchronous update to re-render the Suspense.
- //
- // Note: It doesn't matter whether the component that suspended was
- // inside a blocking mode tree. If the Suspense is outside of it, we
- // should *not* suspend the commit.
-
-
- if ((_workInProgress.mode & BlockingMode) === NoMode) {
- _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.
- // But we shouldn't call any lifecycle methods or callbacks. Remove
- // all lifecycle effect tags.
-
- sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);
-
- if (sourceFiber.tag === ClassComponent) {
- var currentSourceFiber = sourceFiber.alternate;
-
- if (currentSourceFiber === null) {
- // This is a new mount. Change the tag so it's not mistaken for a
- // completed class component. For example, we should not call
- // componentWillUnmount if it is deleted.
- sourceFiber.tag = IncompleteClassComponent;
- } else {
- // When we try rendering again, we should not reuse the current fiber,
- // since it's known to be in an inconsistent state. Use a force update to
- // prevent a bail out.
- var update = createUpdate(Sync, null);
- update.tag = ForceUpdate;
- enqueueUpdate(sourceFiber, update);
- }
- } // The source fiber did not complete. Mark it with Sync priority to
- // indicate that it still has pending work.
-
-
- sourceFiber.expirationTime = Sync; // Exit without suspending.
-
- return;
- } // Confirmed that the boundary is in a concurrent mode tree. Continue
- // with the normal suspend path.
- //
- // After this we'll use a set of heuristics to determine whether this
- // render pass will run to completion or restart or "suspend" the commit.
- // The actual logic for this is spread out in different places.
- //
- // This first principle is that if we're going to suspend when we complete
- // a root, then we should also restart if we get an update or ping that
- // might unsuspend it, and vice versa. The only reason to suspend is
- // because you think you might want to restart before committing. However,
- // it doesn't make sense to restart only while in the period we're suspended.
- //
- // Restarting too aggressively is also not good because it starves out any
- // intermediate loading state. So we use heuristics to determine when.
- // Suspense Heuristics
- //
- // If nothing threw a Promise or all the same fallbacks are already showing,
- // then don't suspend/restart.
- //
- // If this is an initial render of a new tree of Suspense boundaries and
- // those trigger a fallback, then don't suspend/restart. We want to ensure
- // that we can show the initial loading state as quickly as possible.
- //
- // If we hit a "Delayed" case, such as when we'd switch from content back into
- // a fallback, then we should always suspend/restart. SuspenseConfig applies to
- // this case. If none is defined, JND is used instead.
- //
- // If we're already showing a fallback and it gets "retried", allowing us to show
- // another level, but there's still an inner boundary that would show a fallback,
- // then we suspend/restart for 500ms since the last time we showed a fallback
- // anywhere in the tree. This effectively throttles progressive loading into a
- // consistent train of commits. This also gives us an opportunity to restart to
- // get to the completed state slightly earlier.
- //
- // If there's ambiguity due to batching it's resolved in preference of:
- // 1) "delayed", 2) "initial render", 3) "retry".
- //
- // We want to ensure that a "busy" state doesn't get force committed. We want to
- // ensure that new initial loading states can commit as soon as possible.
-
-
- attachPingListener(root, renderExpirationTime, thenable);
- _workInProgress.effectTag |= ShouldCapture;
- _workInProgress.expirationTime = renderExpirationTime;
- return;
- } // This boundary already captured during this render. Continue to the next
- // boundary.
-
-
- _workInProgress = _workInProgress.return;
- } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
- // TODO: Use invariant so the message is stripped in prod?
-
-
- value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
- } // We didn't find a boundary that could handle this type of exception. Start
- // over and traverse parent path again, this time treating the exception
- // as an error.
-
-
- renderDidError();
- value = createCapturedValue(value, sourceFiber);
- var workInProgress = returnFiber;
-
- do {
- switch (workInProgress.tag) {
- case HostRoot:
- {
- var _errorInfo = value;
- workInProgress.effectTag |= ShouldCapture;
- workInProgress.expirationTime = renderExpirationTime;
-
- var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);
-
- enqueueCapturedUpdate(workInProgress, _update);
- return;
- }
-
- case ClassComponent:
- // Capture and retry
- var errorInfo = value;
- var ctor = workInProgress.type;
- var instance = workInProgress.stateNode;
-
- if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
- workInProgress.effectTag |= ShouldCapture;
- workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state
-
- var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);
+ function commitResetTextContent(current) {
- enqueueCapturedUpdate(workInProgress, _update2);
- return;
- }
+ resetTextContent(current.stateNode);
+ }
- break;
- }
+ var COMPONENT_TYPE = 0;
+ var HAS_PSEUDO_CLASS_TYPE = 1;
+ var ROLE_TYPE = 2;
+ var TEST_NAME_TYPE = 3;
+ var TEXT_TYPE = 4;
- workInProgress = workInProgress.return;
- } while (workInProgress !== null);
+ if (typeof Symbol === 'function' && Symbol.for) {
+ var symbolFor$1 = Symbol.for;
+ COMPONENT_TYPE = symbolFor$1('selector.component');
+ HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');
+ ROLE_TYPE = symbolFor$1('selector.role');
+ TEST_NAME_TYPE = symbolFor$1('selector.test_id');
+ TEXT_TYPE = symbolFor$1('selector.text');
+ }
+ var commitHooks = [];
+ function onCommitRoot$1() {
+ {
+ commitHooks.forEach(function (commitHook) {
+ return commitHook();
+ });
+ }
}
var ceil = Math.ceil;
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
+ var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
var NoContext =
- /* */
+ /* */
0;
var BatchedContext =
/* */
@@ -21142,188 +21664,254 @@
var CommitContext =
/* */
32;
+ var RetryAfterError =
+ /* */
+ 64;
var RootIncomplete = 0;
var RootFatalErrored = 1;
var RootErrored = 2;
var RootSuspended = 3;
var RootSuspendedWithDelay = 4;
- var RootCompleted = 5;
- // Describes where we are in the React execution stack
+ var RootCompleted = 5; // Describes where we are in the React execution stack
+
var executionContext = NoContext; // The root we're working on
var workInProgressRoot = null; // The fiber we're working on
- var workInProgress = null; // The expiration time we're rendering
+ var workInProgress = null; // The lanes we're rendering
+
+ var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree
+ // This is a superset of the lanes we started working on at the root. The only
+ // case where it's different from `workInProgressRootRenderLanes` is when we
+ // enter a subtree that is hidden and needs to be unhidden: Suspense and
+ // Offscreen component.
+ //
+ // Most things in the work loop should deal with workInProgressRootRenderLanes.
+ // Most things in begin/complete phases should deal with subtreeRenderLanes.
- var renderExpirationTime$1 = NoWork; // Whether to root completed, errored, suspended, etc.
+ var subtreeRenderLanes = NoLanes;
+ var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.
var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown
- var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render.
- // This is conceptually a time stamp but expressed in terms of an ExpirationTime
- // because we deal mostly with expiration times in the hot path, so this avoids
- // the conversion happening in the hot path.
+ var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's
+ // slightly different than `renderLanes` because `renderLanes` can change as you
+ // enter and exit an Offscreen tree. This value is the combination of all render
+ // lanes for the entire render phase.
- var workInProgressRootLatestProcessedExpirationTime = Sync;
- var workInProgressRootLatestSuspenseTimeout = Sync;
- var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only
+ var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only
// includes unprocessed updates, not work in bailed out children.
- var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately.
- // This flag determines if it might be worthwhile to restart if an opportunity
- // happens latere.
+ var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.
- var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train
+ var workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.
+
+ var workInProgressRootPingedLanes = NoLanes;
+ var mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train
// model where we don't commit new loading states in too quick succession.
var globalMostRecentFallbackTime = 0;
- var FALLBACK_THROTTLE_MS = 500;
+ var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering
+ // more and prefer CPU suspense heuristics instead.
+
+ var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU
+ // suspense heuristics and opt out of rendering more content.
+
+ var RENDER_TIMEOUT_MS = 500;
+
+ function resetRenderTimer() {
+ workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;
+ }
+
+ function getRenderTargetTime() {
+ return workInProgressRootRenderTargetTime;
+ }
var nextEffect = null;
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
- var pendingPassiveEffectsRenderPriority = NoPriority;
- var pendingPassiveEffectsExpirationTime = NoWork;
+ var pendingPassiveEffectsRenderPriority = NoPriority$1;
+ var pendingPassiveEffectsLanes = NoLanes;
+ var pendingPassiveHookEffectsMount = [];
+ var pendingPassiveHookEffectsUnmount = [];
var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates
var NESTED_UPDATE_LIMIT = 50;
var nestedUpdateCount = 0;
var rootWithNestedUpdates = null;
var NESTED_PASSIVE_UPDATE_LIMIT = 50;
- var nestedPassiveUpdateCount = 0;
- var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times
+ var nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes
// during the commit phase. This enables them to be traced across components
// that spawn new work during render. E.g. hidden boundaries, suspended SSR
// hydration or SuspenseList.
+ // TODO: Can use a bitmask instead of an array
+
+ var spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their
+ // event times as simultaneous, even if the actual clock time has advanced
+ // between the first and second call.
- var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start
- // time). However, if two updates are scheduled within the same event, we
- // should treat their start times as simultaneous, even if the actual clock
- // time has advanced between the first and second call.
- // In other words, because expiration times determine how updates are batched,
- // we want all updates of like priority that occur within the same event to
- // receive the same expiration time. Otherwise we get tearing.
+ var currentEventTime = NoTimestamp;
+ var currentEventWipLanes = NoLanes;
+ var currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
+ // We warn about state updates for unmounted components differently in this case.
- var currentEventTime = NoWork;
- function requestCurrentTimeForUpdate() {
+ var isFlushingPassiveEffects = false;
+ var focusedInstanceHandle = null;
+ var shouldFireAfterActiveInstanceBlur = false;
+ function getWorkInProgressRoot() {
+ return workInProgressRoot;
+ }
+ function requestEventTime() {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
// We're inside React, so it's fine to read the actual time.
- return msToExpirationTime(now());
+ return now();
} // We're not inside React, so we may be in the middle of a browser event.
- if (currentEventTime !== NoWork) {
+ if (currentEventTime !== NoTimestamp) {
// Use the same start time for all updates until we enter React again.
return currentEventTime;
} // This is the first update since React yielded. Compute a new start time.
- currentEventTime = msToExpirationTime(now());
+ currentEventTime = now();
return currentEventTime;
}
- function getCurrentTime() {
- return msToExpirationTime(now());
- }
- function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
+ function requestUpdateLane(fiber) {
+ // Special cases
var mode = fiber.mode;
if ((mode & BlockingMode) === NoMode) {
- return Sync;
- }
+ return SyncLane;
+ } else if ((mode & ConcurrentMode) === NoMode) {
+ return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
+ } // The algorithm for assigning an update to a lane should be stable for all
+ // updates at the same priority within the same event. To do this, the inputs
+ // to the algorithm must be the same. For example, we use the `renderLanes`
+ // to avoid choosing a lane that is already in the middle of rendering.
+ //
+ // However, the "included" lanes could be mutated in between updates in the
+ // same event, like if you perform an update inside `flushSync`. Or any other
+ // code path that might call `prepareFreshStack`.
+ //
+ // The trick we use is to cache the first of each of these inputs within an
+ // event. Then reset the cached values once we can be sure the event is over.
+ // Our heuristic for that is whenever we enter a concurrent work loop.
+ //
+ // We'll do the same for `currentEventPendingLanes` below.
- var priorityLevel = getCurrentPriorityLevel();
- if ((mode & ConcurrentMode) === NoMode) {
- return priorityLevel === ImmediatePriority ? Sync : Batched;
+ if (currentEventWipLanes === NoLanes) {
+ currentEventWipLanes = workInProgressRootIncludedLanes;
}
- if ((executionContext & RenderContext) !== NoContext) {
- // Use whatever time we're already rendering
- // TODO: Should there be a way to opt out, like with `runWithPriority`?
- return renderExpirationTime$1;
- }
+ var isTransition = requestCurrentTransition() !== NoTransition;
- var expirationTime;
+ if (isTransition) {
+ if (currentEventPendingLanes !== NoLanes) {
+ currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;
+ }
- if (suspenseConfig !== null) {
- // Compute an expiration time based on the Suspense timeout.
- expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
- } else {
- // Compute an expiration time based on the Scheduler priority.
- switch (priorityLevel) {
- case ImmediatePriority:
- expirationTime = Sync;
- break;
+ return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);
+ } // TODO: Remove this dependency on the Scheduler priority.
+ // To do that, we're replacing it with an update lane priority.
- case UserBlockingPriority$1:
- // TODO: Rename this to computeUserBlockingExpiration
- expirationTime = computeInteractiveExpiration(currentTime);
- break;
- case NormalPriority:
- case LowPriority:
- // TODO: Handle LowPriority
- // TODO: Rename this to... something better.
- expirationTime = computeAsyncExpiration(currentTime);
- break;
+ var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.
+ // This couples React to the Scheduler internals, so we're replacing it
+ // with the currentUpdateLanePriority above. As an example of how this
+ // could be problematic, if we're not inside `Scheduler.runWithPriority`,
+ // then we'll get the priority of the current running Scheduler task,
+ // which is probably not what we want.
- case IdlePriority:
- expirationTime = Idle;
- break;
+ var lane;
- default:
- {
- {
- throw Error( "Expected a valid priority level" );
- }
- }
+ if ( // TODO: Temporary. We're removing the concept of discrete updates.
+ (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {
+ lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);
+ } else {
+ var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);
- }
- } // If we're in the middle of rendering a tree, do not update at the same
- // expiration time that is already rendering.
- // TODO: We shouldn't have to do this if the update is on a different root.
- // Refactor computeExpirationForFiber + scheduleUpdate so we have access to
- // the root when we check for this condition.
+ lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);
+ }
+
+ return lane;
+ }
+
+ function requestRetryLane(fiber) {
+ // This is a fork of `requestUpdateLane` designed specifically for Suspense
+ // "retries" — a special update that attempts to flip a Suspense boundary
+ // from its placeholder state to its primary/resolved state.
+ // Special cases
+ var mode = fiber.mode;
+
+ if ((mode & BlockingMode) === NoMode) {
+ return SyncLane;
+ } else if ((mode & ConcurrentMode) === NoMode) {
+ return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
+ } // See `requestUpdateLane` for explanation of `currentEventWipLanes`
- if (workInProgressRoot !== null && expirationTime === renderExpirationTime$1) {
- // This is a trick to move this update into a separate batch
- expirationTime -= 1;
+ if (currentEventWipLanes === NoLanes) {
+ currentEventWipLanes = workInProgressRootIncludedLanes;
}
- return expirationTime;
+ return findRetryLane(currentEventWipLanes);
}
- function scheduleUpdateOnFiber(fiber, expirationTime) {
+
+ function scheduleUpdateOnFiber(fiber, lane, eventTime) {
checkForNestedUpdates();
warnAboutRenderPhaseUpdatesInDEV(fiber);
- var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
+ var root = markUpdateLaneFromFiberToRoot(fiber, lane);
if (root === null) {
warnAboutUpdateOnUnmountedFiberInDEV(fiber);
- return;
- }
+ return null;
+ } // Mark that the root has a pending update.
+
+
+ markRootUpdated(root, lane, eventTime);
- checkForInterruption(fiber, expirationTime);
- recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the
+ if (root === workInProgressRoot) {
+ // Received an update to a tree that's in the middle of rendering. Mark
+ // that there was an interleaved update work on this root. Unless the
+ // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
+ // phase update. In that case, we don't treat render phase updates as if
+ // they were interleaved, for backwards compat reasons.
+ {
+ workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);
+ }
+
+ if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
+ // The root already suspended with a delay, which means this render
+ // definitely won't finish. Since we have a new update, let's mark it as
+ // suspended now, right before marking the incoming update. This has the
+ // effect of interrupting the current render and switching to the update.
+ // TODO: Make sure this doesn't override pings that happen while we've
+ // already started rendering.
+ markRootSuspended$1(root, workInProgressRootRenderLanes);
+ }
+ } // TODO: requestUpdateLanePriority also reads the priority. Pass the
// priority as an argument to that function and this one.
+
var priorityLevel = getCurrentPriorityLevel();
- if (expirationTime === Sync) {
+ if (lane === SyncLane) {
if ( // Check if we're inside unbatchedUpdates
(executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
(executionContext & (RenderContext | CommitContext)) === NoContext) {
// Register pending interactions on the root to avoid losing traced interaction data.
- schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
+ schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
// root inside of batchedUpdates should be synchronous, but layout updates
// should be deferred until the end of the batch.
performSyncWorkOnRoot(root);
} else {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, expirationTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, lane);
if (executionContext === NoContext) {
// Flush the synchronous work now, unless we're already working or inside
@@ -21331,314 +21919,242 @@
// scheduleCallbackForFiber to preserve the ability to schedule a callback
// without immediately flushing it. We only do this for user-initiated
// updates, to preserve historical behavior of legacy mode.
+ resetRenderTimer();
flushSyncCallbackQueue();
}
}
} else {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, expirationTime);
- }
+ // Schedule a discrete update but only if it's not Sync.
+ if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
+ // discrete, even inside a discrete event.
+ priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {
+ // This is the result of a discrete event. Track the lowest priority
+ // discrete update per root so we can flush them early, if needed.
+ if (rootsWithPendingDiscreteUpdates === null) {
+ rootsWithPendingDiscreteUpdates = new Set([root]);
+ } else {
+ rootsWithPendingDiscreteUpdates.add(root);
+ }
+ } // Schedule other updates after in case the callback is sync.
- if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
- // discrete, even inside a discrete event.
- priorityLevel === UserBlockingPriority$1 || priorityLevel === ImmediatePriority)) {
- // This is the result of a discrete event. Track the lowest priority
- // discrete update per root so we can flush them early, if needed.
- if (rootsWithPendingDiscreteUpdates === null) {
- rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);
- } else {
- var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);
- if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {
- rootsWithPendingDiscreteUpdates.set(root, expirationTime);
- }
- }
- }
- }
- var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, lane);
+ } // We use this when assigning a lane for a transition inside
+ // `requestUpdateLane`. We assume it's the same as the root being updated,
+ // since in the common case of a single root app it probably is. If it's not
+ // the same root, then it's not a huge deal, we just might batch more stuff
+ // together more than necessary.
+
+
+ mostRecentlyUpdatedRoot = root;
+ } // This is split into a separate function so we can mark a fiber with pending
// work without treating it as a typical update that originates from an event;
// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
// on a fiber.
- function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
- // Update the source fiber's expiration time
- if (fiber.expirationTime < expirationTime) {
- fiber.expirationTime = expirationTime;
- }
+ function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
+ // Update the source fiber's lanes
+ sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
+ var alternate = sourceFiber.alternate;
- var alternate = fiber.alternate;
+ if (alternate !== null) {
+ alternate.lanes = mergeLanes(alternate.lanes, lane);
+ }
- if (alternate !== null && alternate.expirationTime < expirationTime) {
- alternate.expirationTime = expirationTime;
+ {
+ if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
+ warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
+ }
} // Walk the parent path to the root and update the child expiration time.
- var node = fiber.return;
- var root = null;
+ var node = sourceFiber;
+ var parent = sourceFiber.return;
- if (node === null && fiber.tag === HostRoot) {
- root = fiber.stateNode;
- } else {
- while (node !== null) {
- alternate = node.alternate;
-
- if (node.childExpirationTime < expirationTime) {
- node.childExpirationTime = expirationTime;
+ while (parent !== null) {
+ parent.childLanes = mergeLanes(parent.childLanes, lane);
+ alternate = parent.alternate;
- if (alternate !== null && alternate.childExpirationTime < expirationTime) {
- alternate.childExpirationTime = expirationTime;
+ if (alternate !== null) {
+ alternate.childLanes = mergeLanes(alternate.childLanes, lane);
+ } else {
+ {
+ if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
+ warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
}
- } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
- alternate.childExpirationTime = expirationTime;
}
-
- if (node.return === null && node.tag === HostRoot) {
- root = node.stateNode;
- break;
- }
-
- node = node.return;
}
- }
- if (root !== null) {
- if (workInProgressRoot === root) {
- // Received an update to a tree that's in the middle of rendering. Mark
- // that's unprocessed work on this root.
- markUnprocessedUpdateTime(expirationTime);
-
- if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
- // The root already suspended with a delay, which means this render
- // definitely won't finish. Since we have a new update, let's mark it as
- // suspended now, right before marking the incoming update. This has the
- // effect of interrupting the current render and switching to the update.
- // TODO: This happens to work when receiving an update during the render
- // phase, because of the trick inside computeExpirationForFiber to
- // subtract 1 from `renderExpirationTime` to move it into a
- // separate bucket. But we should probably model it with an exception,
- // using the same mechanism we use to force hydration of a subtree.
- // TODO: This does not account for low pri updates that were already
- // scheduled before the root started rendering. Need to track the next
- // pending expiration time (perhaps by backtracking the return path) and
- // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.
- markRootSuspendedAtTime(root, renderExpirationTime$1);
- }
- } // Mark that the root has a pending update.
-
-
- markRootUpdatedAtTime(root, expirationTime);
+ node = parent;
+ parent = parent.return;
}
- return root;
- }
-
- function getNextRootExpirationTimeToWorkOn(root) {
- // Determines the next expiration time that the root should render, taking
- // into account levels that may be suspended, or levels that may have
- // received a ping.
- var lastExpiredTime = root.lastExpiredTime;
-
- if (lastExpiredTime !== NoWork) {
- return lastExpiredTime;
- } // "Pending" refers to any update that hasn't committed yet, including if it
- // suspended. The "suspended" range is therefore a subset.
-
-
- var firstPendingTime = root.firstPendingTime;
-
- if (!isRootSuspendedAtTime(root, firstPendingTime)) {
- // The highest priority pending time is not suspended. Let's work on that.
- return firstPendingTime;
- } // If the first pending time is suspended, check if there's a lower priority
- // pending level that we know about. Or check if we received a ping. Work
- // on whichever is higher priority.
-
-
- var lastPingedTime = root.lastPingedTime;
- var nextKnownPendingLevel = root.nextKnownPendingLevel;
- var nextLevel = lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel;
-
- if ( nextLevel <= Idle && firstPendingTime !== nextLevel) {
- // Don't work on Idle/Never priority unless everything else is committed.
- return NoWork;
+ if (node.tag === HostRoot) {
+ var root = node.stateNode;
+ return root;
+ } else {
+ return null;
}
-
- return nextLevel;
} // Use this function to schedule a task for a root. There's only one task per
- // root; if a task was already scheduled, we'll check to make sure the
- // expiration time of the existing task is the same as the expiration time of
- // the next level that the root has work on. This function is called on every
- // update, and right before exiting a task.
+ // root; if a task was already scheduled, we'll check to make sure the priority
+ // of the existing task is the same as the priority of the next level that the
+ // root has work on. This function is called on every update, and right before
+ // exiting a task.
- function ensureRootIsScheduled(root) {
- var lastExpiredTime = root.lastExpiredTime;
+ function ensureRootIsScheduled(root, currentTime) {
+ var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as
+ // expired so we know to work on those next.
- if (lastExpiredTime !== NoWork) {
- // Special case: Expired work should flush synchronously.
- root.callbackExpirationTime = Sync;
- root.callbackPriority = ImmediatePriority;
- root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
- return;
- }
+ markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.
+
+ var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.
- var expirationTime = getNextRootExpirationTimeToWorkOn(root);
- var existingCallbackNode = root.callbackNode;
+ var newCallbackPriority = returnNextLanesPriority();
- if (expirationTime === NoWork) {
- // There's nothing to work on.
+ if (nextLanes === NoLanes) {
+ // Special case: There's nothing to work on.
if (existingCallbackNode !== null) {
+ cancelCallback(existingCallbackNode);
root.callbackNode = null;
- root.callbackExpirationTime = NoWork;
- root.callbackPriority = NoPriority;
+ root.callbackPriority = NoLanePriority;
}
return;
- } // TODO: If this is an update, we already read the current time. Pass the
- // time as an argument.
+ } // Check if there's an existing task. We may be able to reuse it.
- var currentTime = requestCurrentTimeForUpdate();
- var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and
- // expiration time. Otherwise, we'll cancel it and schedule a new one.
-
if (existingCallbackNode !== null) {
var existingCallbackPriority = root.callbackPriority;
- var existingCallbackExpirationTime = root.callbackExpirationTime;
- if ( // Callback must have the exact same expiration time.
- existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.
- existingCallbackPriority >= priorityLevel) {
- // Existing callback is sufficient.
+ if (existingCallbackPriority === newCallbackPriority) {
+ // The priority hasn't changed. We can reuse the existing task. Exit.
return;
- } // Need to schedule a new task.
- // TODO: Instead of scheduling a new task, we should be able to change the
- // priority of the existing one.
+ } // The priority changed. Cancel the existing callback. We'll schedule a new
+ // one below.
cancelCallback(existingCallbackNode);
- }
+ } // Schedule a new callback.
+
- root.callbackExpirationTime = expirationTime;
- root.callbackPriority = priorityLevel;
- var callbackNode;
+ var newCallbackNode;
- if (expirationTime === Sync) {
- // Sync React callbacks are scheduled on a special internal queue
- callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
+ if (newCallbackPriority === SyncLanePriority) {
+ // Special case: Sync React callbacks are scheduled on a special
+ // internal queue
+ newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
+ } else if (newCallbackPriority === SyncBatchedLanePriority) {
+ newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));
} else {
- callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects
- // ordering because tasks are processed in timeout order.
- {
- timeout: expirationTimeToMs(expirationTime) - now()
- });
+ var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);
+ newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));
}
- root.callbackNode = callbackNode;
+ root.callbackPriority = newCallbackPriority;
+ root.callbackNode = newCallbackNode;
} // This is the entry point for every concurrent task, i.e. anything that
// goes through Scheduler.
- function performConcurrentWorkOnRoot(root, didTimeout) {
+ function performConcurrentWorkOnRoot(root) {
// Since we know we're in a React event, we can clear the current
// event time. The next update will compute a new event time.
- currentEventTime = NoWork;
+ currentEventTime = NoTimestamp;
+ currentEventWipLanes = NoLanes;
+ currentEventPendingLanes = NoLanes;
- if (didTimeout) {
- // The render task took too long to complete. Mark the current time as
- // expired to synchronously render all expired work in a single batch.
- var currentTime = requestCurrentTimeForUpdate();
- markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback.
+ if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
+ {
+ throw Error( "Should not already be working." );
+ }
+ } // Flush any pending passive effects before deciding which lanes to work on,
+ // in case they schedule additional work.
- ensureRootIsScheduled(root);
- return null;
- } // Determine the next expiration time to work on, using the fields stored
- // on the root.
+ var originalCallbackNode = root.callbackNode;
+ var didFlushPassiveEffects = flushPassiveEffects();
- var expirationTime = getNextRootExpirationTimeToWorkOn(root);
+ if (didFlushPassiveEffects) {
+ // Something in the passive effect phase may have canceled the current task.
+ // Check if the task node for this root was changed.
+ if (root.callbackNode !== originalCallbackNode) {
+ // The current task was canceled. Exit. We don't need to call
+ // `ensureRootIsScheduled` because the check above implies either that
+ // there's a new task, or that there's no remaining work on this root.
+ return null;
+ }
+ } // Determine the next expiration time to work on, using the fields stored
+ // on the root.
- if (expirationTime !== NoWork) {
- var originalCallbackNode = root.callbackNode;
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
+ var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
- flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
+ if (lanes === NoLanes) {
+ // Defensive coding. This is never expected to happen.
+ return null;
+ }
- if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
- prepareFreshStack(root, expirationTime);
- startWorkOnPendingInteractions(root, expirationTime);
- } // If we have a work-in-progress fiber, it means there's still work to do
- // in this root.
+ var exitStatus = renderRootConcurrent(root, lanes);
+ if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
+ // The render included lanes that were updated during the render phase.
+ // For example, when unhiding a hidden tree, we include all the lanes
+ // that were previously skipped when the tree was hidden. That set of
+ // lanes is a superset of the lanes we started rendering with.
+ //
+ // So we'll throw out the current work and restart.
+ prepareFreshStack(root, NoLanes);
+ } else if (exitStatus !== RootIncomplete) {
+ if (exitStatus === RootErrored) {
+ executionContext |= RetryAfterError; // If an error occurred during hydration,
+ // discard server response and fall back to client side render.
- if (workInProgress !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher();
- var prevInteractions = pushInteractions(root);
- startWorkLoopTimer(workInProgress);
+ if (root.hydrate) {
+ root.hydrate = false;
+ clearContainer(root.containerInfo);
+ } // If something threw an error, try rendering one more time. We'll render
+ // synchronously to block concurrent data mutations, and we'll includes
+ // all pending updates are included. If it still fails after the second
+ // attempt, we'll give up and commit the resulting tree.
- do {
- try {
- workLoopConcurrent();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
- resetContextDependencies();
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
+ lanes = getLanesToRetrySynchronouslyOnError(root);
- {
- popInteractions(prevInteractions);
+ if (lanes !== NoLanes) {
+ exitStatus = renderRootSync(root, lanes);
}
+ }
- if (workInProgressRootExitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- stopInterruptedWorkLoopTimer();
- prepareFreshStack(root, expirationTime);
- markRootSuspendedAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- throw fatalError;
- }
+ if (exitStatus === RootFatalErrored) {
+ var fatalError = workInProgressRootFatalError;
+ prepareFreshStack(root, NoLanes);
+ markRootSuspended$1(root, lanes);
+ ensureRootIsScheduled(root, now());
+ throw fatalError;
+ } // We now have a consistent tree. The next step is either to commit it,
+ // or, if something suspended, wait to commit it after a timeout.
- if (workInProgress !== null) {
- // There's still work left over. Exit without committing.
- stopInterruptedWorkLoopTimer();
- } else {
- // We now have a consistent tree. The next step is either to commit it,
- // or, if something suspended, wait to commit it after a timeout.
- stopFinishedWorkLoopTimer();
- var finishedWork = root.finishedWork = root.current.alternate;
- root.finishedExpirationTime = expirationTime;
- finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime);
- }
- ensureRootIsScheduled(root);
+ var finishedWork = root.current.alternate;
+ root.finishedWork = finishedWork;
+ root.finishedLanes = lanes;
+ finishConcurrentRender(root, exitStatus, lanes);
+ }
- if (root.callbackNode === originalCallbackNode) {
- // The task node scheduled for this root is the same one that's
- // currently executed. Need to return a continuation.
- return performConcurrentWorkOnRoot.bind(null, root);
- }
- }
+ ensureRootIsScheduled(root, now());
+
+ if (root.callbackNode === originalCallbackNode) {
+ // The task node scheduled for this root is the same one that's
+ // currently executed. Need to return a continuation.
+ return performConcurrentWorkOnRoot.bind(null, root);
}
return null;
}
- function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) {
- // Set this to null to indicate there's no in-progress render.
- workInProgressRoot = null;
-
+ function finishConcurrentRender(root, exitStatus, lanes) {
switch (exitStatus) {
case RootIncomplete:
case RootFatalErrored:
@@ -21655,70 +22171,40 @@
case RootErrored:
{
- // If this was an async render, the error may have happened due to
- // a mutation in a concurrent event. Try rendering one more time,
- // synchronously, to see if the error goes away. If there are
- // lower priority updates, let's include those, too, in case they
- // fix the inconsistency. Render at Idle to include all updates.
- // If it was Idle or Never or some not-yet-invented time, render
- // at that time.
- markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous
- // and therefore not hit this path again.
-
+ // We should have already attempted to retry this tree. If we reached
+ // this point, it errored again. Commit it.
+ commitRoot(root);
break;
}
case RootSuspended:
{
- markRootSuspendedAtTime(root, expirationTime);
- var lastSuspendedTime = root.lastSuspendedTime;
-
- if (expirationTime === lastSuspendedTime) {
- root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
- } // We have an acceptable loading state. We need to figure out if we
+ markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we
// should immediately commit it or wait a bit.
- // If we have processed new updates during this render, we may now
- // have a new loading state ready. We want to ensure that we commit
- // that as soon as possible.
-
- var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;
-
- if (hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current)) {
- // If we have not processed any new updates during this pass, then
- // this is either a retry of an existing fallback state or a
- // hidden tree. Hidden trees shouldn't be batched with other work
- // and after that's fixed it can only be a retry. We're going to
- // throttle committing retries so that we don't show too many
- // loading states too quickly.
+ if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
+ !shouldForceFlushFallbacksInDEV()) {
+ // This render only included retries, no updates. Throttle committing
+ // retries so that we don't show too many loading states too quickly.
var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
if (msUntilTimeout > 10) {
- if (workInProgressRootHasPendingPing) {
- var lastPingedTime = root.lastPingedTime;
-
- if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) {
- // This render was pinged but we didn't get to restart
- // earlier so try restarting now instead.
- root.lastPingedTime = expirationTime;
- prepareFreshStack(root, expirationTime);
- break;
- }
- }
-
- var nextTime = getNextRootExpirationTimeToWorkOn(root);
+ var nextLanes = getNextLanes(root, NoLanes);
- if (nextTime !== NoWork && nextTime !== expirationTime) {
+ if (nextLanes !== NoLanes) {
// There's additional work on this root.
break;
}
- if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) {
+ var suspendedLanes = root.suspendedLanes;
+
+ if (!isSubsetOfLanes(suspendedLanes, lanes)) {
// We should prefer to render the fallback of at the last
// suspended level. Ping the last suspended level to try
// rendering it again.
- root.lastPingedTime = lastSuspendedTime;
+ // FIXME: What if the suspended lanes are Idle? Should not restart.
+ var eventTime = requestEventTime();
+ markRootPinged(root, suspendedLanes);
break;
} // The render is suspended, it hasn't timed out, and there's no
// lower priority work to do. Instead of committing the fallback
@@ -21737,86 +22223,36 @@
case RootSuspendedWithDelay:
{
- markRootSuspendedAtTime(root, expirationTime);
- var _lastSuspendedTime = root.lastSuspendedTime;
+ markRootSuspended$1(root, lanes);
- if (expirationTime === _lastSuspendedTime) {
- root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
+ if (includesOnlyTransitions(lanes)) {
+ // This is a transition, so we should exit without committing a
+ // placeholder and without scheduling a timeout. Delay indefinitely
+ // until we receive more data.
+ break;
}
- if ( // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current)) {
- // We're suspended in a state that should be avoided. We'll try to
- // avoid committing it for as long as the timeouts let us.
- if (workInProgressRootHasPendingPing) {
- var _lastPingedTime = root.lastPingedTime;
-
- if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) {
- // This render was pinged but we didn't get to restart earlier
- // so try restarting now instead.
- root.lastPingedTime = expirationTime;
- prepareFreshStack(root, expirationTime);
- break;
- }
- }
+ if (!shouldForceFlushFallbacksInDEV()) {
+ // This is not a transition, but we did trigger an avoided state.
+ // Schedule a placeholder to display after a short delay, using the Just
+ // Noticeable Difference.
+ // TODO: Is the JND optimization worth the added complexity? If this is
+ // the only reason we track the event time, then probably not.
+ // Consider removing.
+ var mostRecentEventTime = getMostRecentEventTime(root, lanes);
+ var eventTimeMs = mostRecentEventTime;
+ var timeElapsedMs = now() - eventTimeMs;
- var _nextTime = getNextRootExpirationTimeToWorkOn(root);
-
- if (_nextTime !== NoWork && _nextTime !== expirationTime) {
- // There's additional work on this root.
- break;
- }
-
- if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) {
- // We should prefer to render the fallback of at the last
- // suspended level. Ping the last suspended level to try
- // rendering it again.
- root.lastPingedTime = _lastSuspendedTime;
- break;
- }
-
- var _msUntilTimeout;
-
- if (workInProgressRootLatestSuspenseTimeout !== Sync) {
- // We have processed a suspense config whose expiration time we
- // can use as the timeout.
- _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();
- } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {
- // This should never normally happen because only new updates
- // cause delayed states, so we should have processed something.
- // However, this could also happen in an offscreen tree.
- _msUntilTimeout = 0;
- } else {
- // If we don't have a suspense config, we're going to use a
- // heuristic to determine how long we can suspend.
- var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);
- var currentTimeMs = now();
- var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;
- var timeElapsed = currentTimeMs - eventTimeMs;
-
- if (timeElapsed < 0) {
- // We get this wrong some time since we estimate the time.
- timeElapsed = 0;
- }
-
- _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the
- // event time is exact instead of inferred from expiration time
- // we don't need this.
-
- if (timeUntilExpirationMs < _msUntilTimeout) {
- _msUntilTimeout = timeUntilExpirationMs;
- }
- } // Don't bother with a very short suspense time.
+ var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.
if (_msUntilTimeout > 10) {
- // The render is suspended, it hasn't timed out, and there's no
- // lower priority work to do. Instead of committing the fallback
- // immediately, wait for more data to arrive.
+ // Instead of committing the fallback immediately, wait for more data
+ // to arrive.
root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
break;
}
- } // The work expired. Commit immediately.
+ } // Commit the placeholder.
commitRoot(root);
@@ -21826,21 +22262,6 @@
case RootCompleted:
{
// The work completed. Ready to commit.
- if ( // do not delay if we're inside an act() scope
- !( IsThisRendererActing.current) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {
- // If we have exceeded the minimum loading delay, which probably
- // means we have shown a spinner already, we might have to suspend
- // a bit longer to ensure that the spinner is shown for
- // enough time.
- var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);
-
- if (_msUntilTimeout2 > 10) {
- markRootSuspendedAtTime(root, expirationTime);
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);
- break;
- }
- }
-
commitRoot(root);
break;
}
@@ -21854,93 +22275,93 @@
}
}
}
+ }
+
+ function markRootSuspended$1(root, suspendedLanes) {
+ // When suspending, we should always exclude lanes that were pinged or (more
+ // rarely, since we try to avoid it) updated during the render phase.
+ // TODO: Lol maybe there's a better way to factor this besides this
+ // obnoxiously named function :)
+ suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
+ suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);
+ markRootSuspended(root, suspendedLanes);
} // This is the entry point for synchronous tasks that don't go
// through Scheduler
function performSyncWorkOnRoot(root) {
- // Check if there's expired work on this root. Otherwise, render at Sync.
- var lastExpiredTime = root.lastExpiredTime;
- var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync;
-
if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
{
throw Error( "Should not already be working." );
}
}
- flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
-
- if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
- prepareFreshStack(root, expirationTime);
- startWorkOnPendingInteractions(root, expirationTime);
- } // If we have a work-in-progress fiber, it means there's still work to do
- // in this root.
-
+ flushPassiveEffects();
+ var lanes;
+ var exitStatus;
+
+ if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {
+ // There's a partial tree, and at least one of its lanes has expired. Finish
+ // rendering it before rendering the rest of the expired work.
+ lanes = workInProgressRootRenderLanes;
+ exitStatus = renderRootSync(root, lanes);
+
+ if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
+ // The render included lanes that were updated during the render phase.
+ // For example, when unhiding a hidden tree, we include all the lanes
+ // that were previously skipped when the tree was hidden. That set of
+ // lanes is a superset of the lanes we started rendering with.
+ //
+ // Note that this only happens when part of the tree is rendered
+ // concurrently. If the whole tree is rendered synchronously, then there
+ // are no interleaved events.
+ lanes = getNextLanes(root, lanes);
+ exitStatus = renderRootSync(root, lanes);
+ }
+ } else {
+ lanes = getNextLanes(root, NoLanes);
+ exitStatus = renderRootSync(root, lanes);
+ }
- if (workInProgress !== null) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher();
- var prevInteractions = pushInteractions(root);
- startWorkLoopTimer(workInProgress);
+ if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
+ executionContext |= RetryAfterError; // If an error occurred during hydration,
+ // discard server response and fall back to client side render.
- do {
- try {
- workLoopSync();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
+ if (root.hydrate) {
+ root.hydrate = false;
+ clearContainer(root.containerInfo);
+ } // If something threw an error, try rendering one more time. We'll render
+ // synchronously to block concurrent data mutations, and we'll includes
+ // all pending updates are included. If it still fails after the second
+ // attempt, we'll give up and commit the resulting tree.
- resetContextDependencies();
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
- {
- popInteractions(prevInteractions);
- }
+ lanes = getLanesToRetrySynchronouslyOnError(root);
- if (workInProgressRootExitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- stopInterruptedWorkLoopTimer();
- prepareFreshStack(root, expirationTime);
- markRootSuspendedAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- throw fatalError;
+ if (lanes !== NoLanes) {
+ exitStatus = renderRootSync(root, lanes);
}
+ }
- if (workInProgress !== null) {
- // This is a sync render, so we should have finished the whole tree.
- {
- {
- throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } else {
- // We now have a consistent tree. Because this is a sync render, we
- // will commit it even if something suspended.
- stopFinishedWorkLoopTimer();
- root.finishedWork = root.current.alternate;
- root.finishedExpirationTime = expirationTime;
- finishSyncRender(root);
- } // Before exiting, make sure there's a callback scheduled for the next
- // pending level.
+ if (exitStatus === RootFatalErrored) {
+ var fatalError = workInProgressRootFatalError;
+ prepareFreshStack(root, NoLanes);
+ markRootSuspended$1(root, lanes);
+ ensureRootIsScheduled(root, now());
+ throw fatalError;
+ } // We now have a consistent tree. Because this is a sync render, we
+ // will commit it even if something suspended.
- ensureRootIsScheduled(root);
- }
+ var finishedWork = root.current.alternate;
+ root.finishedWork = finishedWork;
+ root.finishedLanes = lanes;
+ commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next
+ // pending level.
+ ensureRootIsScheduled(root, now());
return null;
}
-
- function finishSyncRender(root) {
- // Set this to null to indicate there's no in-progress render.
- workInProgressRoot = null;
- commitRoot(root);
- }
function flushDiscreteUpdates() {
// TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
// However, `act` uses `batchedUpdates`, so there's no way to distinguish
@@ -21964,9 +22385,6 @@
flushPassiveEffects();
}
- function syncUpdates(fn, a, b, c) {
- return runWithPriority$1(ImmediatePriority, fn.bind(null, a, b, c));
- }
function flushPendingDiscreteUpdates() {
if (rootsWithPendingDiscreteUpdates !== null) {
@@ -21974,13 +22392,14 @@
// immediately flush them.
var roots = rootsWithPendingDiscreteUpdates;
rootsWithPendingDiscreteUpdates = null;
- roots.forEach(function (expirationTime, root) {
- markRootExpiredAtTime(root, expirationTime);
- ensureRootIsScheduled(root);
- }); // Now flush the immediate queue.
+ roots.forEach(function (root) {
+ markDiscreteUpdatesExpired(root);
+ ensureRootIsScheduled(root, now());
+ });
+ } // Now flush the immediate queue.
- flushSyncCallbackQueue();
- }
+
+ flushSyncCallbackQueue();
}
function batchedUpdates$1(fn, a) {
@@ -21994,6 +22413,7 @@
if (executionContext === NoContext) {
// Flush the immediate callbacks that were scheduled during this batch
+ resetRenderTimer();
flushSyncCallbackQueue();
}
}
@@ -22009,6 +22429,7 @@
if (executionContext === NoContext) {
// Flush the immediate callbacks that were scheduled during this batch
+ resetRenderTimer();
flushSyncCallbackQueue();
}
}
@@ -22017,15 +22438,17 @@
var prevExecutionContext = executionContext;
executionContext |= DiscreteEventContext;
- try {
- // Should this
- return runWithPriority$1(UserBlockingPriority$1, fn.bind(null, a, b, c, d));
- } finally {
- executionContext = prevExecutionContext;
+ {
+ try {
+ return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));
+ } finally {
+ executionContext = prevExecutionContext;
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- flushSyncCallbackQueue();
+ if (executionContext === NoContext) {
+ // Flush the immediate callbacks that were scheduled during this batch
+ resetRenderTimer();
+ flushSyncCallbackQueue();
+ }
}
}
}
@@ -22041,36 +22464,53 @@
if (executionContext === NoContext) {
// Flush the immediate callbacks that were scheduled during this batch
+ resetRenderTimer();
flushSyncCallbackQueue();
}
}
}
function flushSync(fn, a) {
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
+ var prevExecutionContext = executionContext;
+
+ if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {
{
- {
- throw Error( "flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering." );
- }
+ error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
}
+
+ return fn(a);
}
- var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
- try {
- return runWithPriority$1(ImmediatePriority, fn.bind(null, a));
- } finally {
- executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
- // Note that this will happen even if batchedUpdates is higher up
- // the stack.
+ {
+ try {
+ if (fn) {
+ return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));
+ } else {
+ return undefined;
+ }
+ } finally {
+ executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
+ // Note that this will happen even if batchedUpdates is higher up
+ // the stack.
- flushSyncCallbackQueue();
+ flushSyncCallbackQueue();
+ }
}
}
+ function pushRenderLanes(fiber, lanes) {
+ push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
+ subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
+ workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
+ }
+ function popRenderLanes(fiber) {
+ subtreeRenderLanes = subtreeRenderLanesCursor.current;
+ pop(subtreeRenderLanesCursor, fiber);
+ }
- function prepareFreshStack(root, expirationTime) {
+ function prepareFreshStack(root, lanes) {
root.finishedWork = null;
- root.finishedExpirationTime = NoWork;
+ root.finishedLanes = NoLanes;
var timeoutHandle = root.timeoutHandle;
if (timeoutHandle !== noTimeout) {
@@ -22092,14 +22532,12 @@
workInProgressRoot = root;
workInProgress = createWorkInProgress(root.current, null);
- renderExpirationTime$1 = expirationTime;
+ workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
workInProgressRootExitStatus = RootIncomplete;
workInProgressRootFatalError = null;
- workInProgressRootLatestProcessedExpirationTime = Sync;
- workInProgressRootLatestSuspenseTimeout = Sync;
- workInProgressRootCanSuspendUsingConfig = null;
- workInProgressRootNextUnprocessedUpdateTime = NoWork;
- workInProgressRootHasPendingPing = false;
+ workInProgressRootSkippedLanes = NoLanes;
+ workInProgressRootUpdatedLanes = NoLanes;
+ workInProgressRootPingedLanes = NoLanes;
{
spawnedWorkDuringRender = null;
@@ -22112,13 +22550,18 @@
function handleError(root, thrownValue) {
do {
+ var erroredWork = workInProgress;
+
try {
// Reset module-level state that was set during the render phase.
resetContextDependencies();
resetHooksAfterThrow();
- resetCurrentFiber();
+ resetCurrentFiber(); // TODO: I found and added this missing line while investigating a
+ // separate issue. Write a regression test using string refs.
+
+ ReactCurrentOwner$2.current = null;
- if (workInProgress === null || workInProgress.return === null) {
+ if (erroredWork === null || erroredWork.return === null) {
// Expected to be working on a non-root fiber. This is a fatal error
// because there's no ancestor that can handle it; the root is
// supposed to capture all errors that weren't caught by an error
@@ -22128,25 +22571,35 @@
// sibling, or the parent if there are no siblings. But since the root
// has no siblings nor a parent, we set it to null. Usually this is
// handled by `completeUnitOfWork` or `unwindWork`, but since we're
- // interntionally not calling those, we need set it here.
+ // intentionally not calling those, we need set it here.
// TODO: Consider calling `unwindWork` to pop the contexts.
workInProgress = null;
- return null;
+ return;
}
- if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
+ if (enableProfilerTimer && erroredWork.mode & ProfileMode) {
// Record the time spent rendering before an error was thrown. This
// avoids inaccurate Profiler durations in the case of a
// suspended render.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
+ stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);
}
- throwException(root, workInProgress.return, workInProgress, thrownValue, renderExpirationTime$1);
- workInProgress = completeUnitOfWork(workInProgress);
+ throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
+ completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
// Something in the return path also threw.
thrownValue = yetAnotherThrownValue;
+
+ if (workInProgress === erroredWork && erroredWork !== null) {
+ // If this boundary has already errored, then we had trouble processing
+ // the error. Bubble it to the next boundary.
+ erroredWork = erroredWork.return;
+ workInProgress = erroredWork;
+ } else {
+ erroredWork = workInProgress;
+ }
+
continue;
} // Return to the normal work loop.
@@ -22155,9 +22608,9 @@
} while (true);
}
- function pushDispatcher(root) {
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
+ function pushDispatcher() {
+ var prevDispatcher = ReactCurrentDispatcher$2.current;
+ ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;
if (prevDispatcher === null) {
// The React isomorphic package does not include a default dispatcher.
@@ -22170,7 +22623,7 @@
}
function popDispatcher(prevDispatcher) {
- ReactCurrentDispatcher$1.current = prevDispatcher;
+ ReactCurrentDispatcher$2.current = prevDispatcher;
}
function pushInteractions(root) {
@@ -22190,23 +22643,8 @@
function markCommitTimeOfFallback() {
globalMostRecentFallbackTime = now();
}
- function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
- if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) {
- workInProgressRootLatestProcessedExpirationTime = expirationTime;
- }
-
- if (suspenseConfig !== null) {
- if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) {
- workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad.
-
- workInProgressRootCanSuspendUsingConfig = suspenseConfig;
- }
- }
- }
- function markUnprocessedUpdateTime(expirationTime) {
- if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) {
- workInProgressRootNextUnprocessedUpdateTime = expirationTime;
- }
+ function markSkippedUpdateLanes(lane) {
+ workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
}
function renderDidSuspend() {
if (workInProgressRootExitStatus === RootIncomplete) {
@@ -22216,16 +22654,19 @@
function renderDidSuspendDelayIfPossible() {
if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
workInProgressRootExitStatus = RootSuspendedWithDelay;
- } // Check if there's a lower priority update somewhere else in the tree.
+ } // Check if there are updates that we skipped tree that might have unblocked
+ // this render.
- if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) {
- // Mark the current render as suspended, and then mark that there's a
- // pending update.
- // TODO: This should immediately interrupt the current render, instead
- // of waiting until the next time we yield.
- markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime$1);
- markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime);
+ if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {
+ // Mark the current render as suspended so that we switch to working on
+ // the updates that were skipped. Usually we only suspend at the end of
+ // the render phase.
+ // TODO: We should probably always mark the root as suspended immediately
+ // (inside this function), since by suspending at the end of the render
+ // phase introduces a potential mistake where we suspend lanes that were
+ // pinged or updated while we were rendering.
+ markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
}
}
function renderDidError() {
@@ -22241,19 +22682,50 @@
return workInProgressRootExitStatus === RootIncomplete;
}
- function inferTimeFromExpirationTime(expirationTime) {
- // We don't know exactly when the update was scheduled, but we can infer an
- // approximate start time from the expiration time.
- var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
- return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
- }
+ function renderRootSync(root, lanes) {
+ var prevExecutionContext = executionContext;
+ executionContext |= RenderContext;
+ var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
+ // and prepare a fresh one. Otherwise we'll continue where we left off.
- function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {
- // We don't know exactly when the update was scheduled, but we can infer an
- // approximate start time from the expiration time by subtracting the timeout
- // that was added to the event time.
- var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
- return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
+ if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
+ prepareFreshStack(root, lanes);
+ startWorkOnPendingInteractions(root, lanes);
+ }
+
+ var prevInteractions = pushInteractions(root);
+
+ do {
+ try {
+ workLoopSync();
+ break;
+ } catch (thrownValue) {
+ handleError(root, thrownValue);
+ }
+ } while (true);
+
+ resetContextDependencies();
+
+ {
+ popInteractions(prevInteractions);
+ }
+
+ executionContext = prevExecutionContext;
+ popDispatcher(prevDispatcher);
+
+ if (workInProgress !== null) {
+ // This is a sync render, so we should have finished the whole tree.
+ {
+ {
+ throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
+ }
+ }
+ }
+
+
+ workInProgressRoot = null;
+ workInProgressRootRenderLanes = NoLanes;
+ return workInProgressRootExitStatus;
} // The work loop is an extremely hot path. Tell Closure not to inline it.
/** @noinline */
@@ -22262,7 +22734,53 @@
function workLoopSync() {
// Already timed out, so perform work without checking if we need to yield.
while (workInProgress !== null) {
- workInProgress = performUnitOfWork(workInProgress);
+ performUnitOfWork(workInProgress);
+ }
+ }
+
+ function renderRootConcurrent(root, lanes) {
+ var prevExecutionContext = executionContext;
+ executionContext |= RenderContext;
+ var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
+ // and prepare a fresh one. Otherwise we'll continue where we left off.
+
+ if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
+ resetRenderTimer();
+ prepareFreshStack(root, lanes);
+ startWorkOnPendingInteractions(root, lanes);
+ }
+
+ var prevInteractions = pushInteractions(root);
+
+ do {
+ try {
+ workLoopConcurrent();
+ break;
+ } catch (thrownValue) {
+ handleError(root, thrownValue);
+ }
+ } while (true);
+
+ resetContextDependencies();
+
+ {
+ popInteractions(prevInteractions);
+ }
+
+ popDispatcher(prevDispatcher);
+ executionContext = prevExecutionContext;
+
+
+ if (workInProgress !== null) {
+
+ return RootIncomplete;
+ } else {
+
+
+ workInProgressRoot = null;
+ workInProgressRootRenderLanes = NoLanes; // Return the final exit status.
+
+ return workInProgressRootExitStatus;
}
}
/** @noinline */
@@ -22271,7 +22789,7 @@
function workLoopConcurrent() {
// Perform work until Scheduler asks us to yield
while (workInProgress !== null && !shouldYield()) {
- workInProgress = performUnitOfWork(workInProgress);
+ performUnitOfWork(workInProgress);
}
}
@@ -22280,16 +22798,15 @@
// nothing should rely on this, but relying on it here means that we don't
// need an additional field on the work in progress.
var current = unitOfWork.alternate;
- startWorkTimer(unitOfWork);
setCurrentFiber(unitOfWork);
var next;
if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
startProfilerTimer(unitOfWork);
- next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
+ next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
} else {
- next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
+ next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
}
resetCurrentFiber();
@@ -22297,62 +22814,64 @@
if (next === null) {
// If this doesn't spawn new work, complete the current work.
- next = completeUnitOfWork(unitOfWork);
+ completeUnitOfWork(unitOfWork);
+ } else {
+ workInProgress = next;
}
ReactCurrentOwner$2.current = null;
- return next;
}
function completeUnitOfWork(unitOfWork) {
// Attempt to complete the current unit of work, then move to the next
// sibling. If there are no more siblings, return to the parent fiber.
- workInProgress = unitOfWork;
+ var completedWork = unitOfWork;
do {
// The current, flushed, state of this fiber is the alternate. Ideally
// nothing should rely on this, but relying on it here means that we don't
// need an additional field on the work in progress.
- var current = workInProgress.alternate;
- var returnFiber = workInProgress.return; // Check if the work completed or if something threw.
+ var current = completedWork.alternate;
+ var returnFiber = completedWork.return; // Check if the work completed or if something threw.
- if ((workInProgress.effectTag & Incomplete) === NoEffect) {
- setCurrentFiber(workInProgress);
+ if ((completedWork.flags & Incomplete) === NoFlags) {
+ setCurrentFiber(completedWork);
var next = void 0;
- if ( (workInProgress.mode & ProfileMode) === NoMode) {
- next = completeWork(current, workInProgress, renderExpirationTime$1);
+ if ( (completedWork.mode & ProfileMode) === NoMode) {
+ next = completeWork(current, completedWork, subtreeRenderLanes);
} else {
- startProfilerTimer(workInProgress);
- next = completeWork(current, workInProgress, renderExpirationTime$1); // Update render duration assuming we didn't error.
+ startProfilerTimer(completedWork);
+ next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
+ stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
}
- stopWorkTimer(workInProgress);
resetCurrentFiber();
- resetChildExpirationTime(workInProgress);
if (next !== null) {
// Completing this fiber spawned new work. Work on that next.
- return next;
+ workInProgress = next;
+ return;
}
+ resetChildLanes(completedWork);
+
if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
- (returnFiber.effectTag & Incomplete) === NoEffect) {
+ (returnFiber.flags & Incomplete) === NoFlags) {
// Append all the effects of the subtree and this fiber onto the effect
// list of the parent. The completion order of the children affects the
// side-effect order.
if (returnFiber.firstEffect === null) {
- returnFiber.firstEffect = workInProgress.firstEffect;
+ returnFiber.firstEffect = completedWork.firstEffect;
}
- if (workInProgress.lastEffect !== null) {
+ if (completedWork.lastEffect !== null) {
if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
+ returnFiber.lastEffect.nextEffect = completedWork.firstEffect;
}
- returnFiber.lastEffect = workInProgress.lastEffect;
+ returnFiber.lastEffect = completedWork.lastEffect;
} // If this fiber had side-effects, we append it AFTER the children's
// side-effects. We can perform certain side-effects earlier if needed,
// by doing multiple passes over the effect list. We don't want to
@@ -22361,96 +22880,89 @@
// at the end.
- var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect
+ var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect
// list. PerformedWork effect is read by React DevTools but shouldn't be
// committed.
- if (effectTag > PerformedWork) {
+ if (flags > PerformedWork) {
if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = workInProgress;
+ returnFiber.lastEffect.nextEffect = completedWork;
} else {
- returnFiber.firstEffect = workInProgress;
+ returnFiber.firstEffect = completedWork;
}
- returnFiber.lastEffect = workInProgress;
+ returnFiber.lastEffect = completedWork;
}
}
} else {
// This fiber did not complete because something threw. Pop values off
// the stack without entering the complete phase. If this is a boundary,
// capture values if possible.
- var _next = unwindWork(workInProgress); // Because this fiber did not complete, don't reset its expiration time.
+ var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time.
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
+ if (_next !== null) {
+ // If completing this work spawned new work, do that next. We'll come
+ // back here again.
+ // Since we're restarting, remove anything that is not a host effect
+ // from the effect tag.
+ _next.flags &= HostEffectMask;
+ workInProgress = _next;
+ return;
+ }
+
+ if ( (completedWork.mode & ProfileMode) !== NoMode) {
// Record the render duration for the fiber that errored.
- stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing.
+ stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.
- var actualDuration = workInProgress.actualDuration;
- var child = workInProgress.child;
+ var actualDuration = completedWork.actualDuration;
+ var child = completedWork.child;
while (child !== null) {
actualDuration += child.actualDuration;
child = child.sibling;
}
- workInProgress.actualDuration = actualDuration;
+ completedWork.actualDuration = actualDuration;
}
- if (_next !== null) {
- // If completing this work spawned new work, do that next. We'll come
- // back here again.
- // Since we're restarting, remove anything that is not a host effect
- // from the effect tag.
- // TODO: The name stopFailedWorkTimer is misleading because Suspense
- // also captures and restarts.
- stopFailedWorkTimer(workInProgress);
- _next.effectTag &= HostEffectMask;
- return _next;
- }
-
- stopWorkTimer(workInProgress);
-
if (returnFiber !== null) {
// Mark the parent fiber as incomplete and clear its effect list.
returnFiber.firstEffect = returnFiber.lastEffect = null;
- returnFiber.effectTag |= Incomplete;
+ returnFiber.flags |= Incomplete;
}
}
- var siblingFiber = workInProgress.sibling;
+ var siblingFiber = completedWork.sibling;
if (siblingFiber !== null) {
// If there is more work to do in this returnFiber, do that next.
- return siblingFiber;
+ workInProgress = siblingFiber;
+ return;
} // Otherwise, return to the parent
- workInProgress = returnFiber;
- } while (workInProgress !== null); // We've reached the root.
+ completedWork = returnFiber; // Update the next thing we're working on in case something throws.
+
+ workInProgress = completedWork;
+ } while (completedWork !== null); // We've reached the root.
if (workInProgressRootExitStatus === RootIncomplete) {
workInProgressRootExitStatus = RootCompleted;
}
-
- return null;
}
- function getRemainingExpirationTime(fiber) {
- var updateExpirationTime = fiber.expirationTime;
- var childExpirationTime = fiber.childExpirationTime;
- return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime;
- }
-
- function resetChildExpirationTime(completedWork) {
- if (renderExpirationTime$1 !== Never && completedWork.childExpirationTime === Never) {
+ function resetChildLanes(completedWork) {
+ if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`
+ // to switch statement in `completeWork`.
+ (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {
// The children of this component are hidden. Don't bubble their
// expiration times.
return;
}
- var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time.
+ var newChildLanes = NoLanes; // Bubble up the earliest expiration time.
if ( (completedWork.mode & ProfileMode) !== NoMode) {
// In profiling mode, resetChildExpirationTime is also used to reset
@@ -22468,16 +22980,7 @@
var child = completedWork.child;
while (child !== null) {
- var childUpdateExpirationTime = child.expirationTime;
- var childChildExpirationTime = child.childExpirationTime;
-
- if (childUpdateExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = childUpdateExpirationTime;
- }
-
- if (childChildExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = childChildExpirationTime;
- }
+ newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));
if (shouldBubbleActualDurations) {
actualDuration += child.actualDuration;
@@ -22487,33 +22990,34 @@
child = child.sibling;
}
+ var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;
+
+ if (isTimedOutSuspense) {
+ // Don't count time spent in a timed out Suspense subtree as part of the base duration.
+ var primaryChildFragment = completedWork.child;
+
+ if (primaryChildFragment !== null) {
+ treeBaseDuration -= primaryChildFragment.treeBaseDuration;
+ }
+ }
+
completedWork.actualDuration = actualDuration;
completedWork.treeBaseDuration = treeBaseDuration;
} else {
var _child = completedWork.child;
while (_child !== null) {
- var _childUpdateExpirationTime = _child.expirationTime;
- var _childChildExpirationTime = _child.childExpirationTime;
-
- if (_childUpdateExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = _childUpdateExpirationTime;
- }
-
- if (_childChildExpirationTime > newChildExpirationTime) {
- newChildExpirationTime = _childChildExpirationTime;
- }
-
+ newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
_child = _child.sibling;
}
}
- completedWork.childExpirationTime = newChildExpirationTime;
+ completedWork.childLanes = newChildLanes;
}
function commitRoot(root) {
var renderPriorityLevel = getCurrentPriorityLevel();
- runWithPriority$1(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel));
+ runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));
return null;
}
@@ -22537,14 +23041,15 @@
}
var finishedWork = root.finishedWork;
- var expirationTime = root.finishedExpirationTime;
+ var lanes = root.finishedLanes;
if (finishedWork === null) {
+
return null;
}
root.finishedWork = null;
- root.finishedExpirationTime = NoWork;
+ root.finishedLanes = NoLanes;
if (!(finishedWork !== root.current)) {
{
@@ -22554,30 +23059,31 @@
// So we can clear these now to allow a new callback to be scheduled.
- root.callbackNode = null;
- root.callbackExpirationTime = NoWork;
- root.callbackPriority = NoPriority;
- root.nextKnownPendingLevel = NoWork;
- startCommitTimer(); // Update the first and last pending times on this root. The new first
+ root.callbackNode = null; // Update the first and last pending times on this root. The new first
// pending time is whatever is left on the root fiber.
- var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork);
- markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit);
+ var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
+ markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of
+ // `flushDiscreteUpdates` starts a useless render pass which may cancels
+ // a scheduled timeout.
+
+ if (rootsWithPendingDiscreteUpdates !== null) {
+ if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {
+ rootsWithPendingDiscreteUpdates.delete(root);
+ }
+ }
if (root === workInProgressRoot) {
// We can reset these now that they are finished.
workInProgressRoot = null;
workInProgress = null;
- renderExpirationTime$1 = NoWork;
- } // This indicates that the last root we worked on is not the same one that
- // we're committing now. This most commonly happens when a suspended root
- // times out.
- // Get the list of effects.
+ workInProgressRootRenderLanes = NoLanes;
+ } // Get the list of effects.
var firstEffect;
- if (finishedWork.effectTag > PerformedWork) {
+ if (finishedWork.flags > PerformedWork) {
// A fiber's effect list consists only of its children, not itself. So if
// the root has an effect, we need to add it to the end of the list. The
// resulting list is the set that would belong to the root's parent, if it
@@ -22594,6 +23100,7 @@
}
if (firstEffect !== null) {
+
var prevExecutionContext = executionContext;
executionContext |= CommitContext;
var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles
@@ -22605,8 +23112,8 @@
// state of the host tree right before we mutate it. This is where
// getSnapshotBeforeUpdate is called.
- startCommitSnapshotEffectsTimer();
- prepareForCommit(root.containerInfo);
+ focusedInstanceHandle = prepareForCommit(root.containerInfo);
+ shouldFireAfterActiveInstanceBlur = false;
nextEffect = firstEffect;
do {
@@ -22625,9 +23132,10 @@
nextEffect = nextEffect.nextEffect;
}
}
- } while (nextEffect !== null);
+ } while (nextEffect !== null); // We no longer need to track the active instance fiber
- stopCommitSnapshotEffectsTimer();
+
+ focusedInstanceHandle = null;
{
// Mark the current commit time to be shared by all Profilers in this
@@ -22636,7 +23144,6 @@
} // The next phase is the mutation phase, where we mutate the host tree.
- startCommitHostEffectsTimer();
nextEffect = firstEffect;
do {
@@ -22658,7 +23165,6 @@
}
} while (nextEffect !== null);
- stopCommitHostEffectsTimer();
resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
// the mutation phase, so that the previous tree is still current during
// componentWillUnmount, but before the layout phase, so that the finished
@@ -22668,12 +23174,11 @@
// the host tree after it's been mutated. The idiomatic use case for this is
// layout, but class component lifecycles also fire here for legacy reasons.
- startCommitLifeCyclesTimer();
nextEffect = firstEffect;
do {
{
- invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime);
+ invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);
if (hasCaughtError()) {
if (!(nextEffect !== null)) {
@@ -22690,7 +23195,6 @@
}
} while (nextEffect !== null);
- stopCommitLifeCyclesTimer();
nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
// opportunity to paint.
@@ -22707,20 +23211,11 @@
// no effects.
// TODO: Maybe there's a better way to report this.
- startCommitSnapshotEffectsTimer();
- stopCommitSnapshotEffectsTimer();
-
{
recordCommitTime();
}
-
- startCommitHostEffectsTimer();
- stopCommitHostEffectsTimer();
- startCommitLifeCyclesTimer();
- stopCommitLifeCyclesTimer();
}
- stopCommitTimer();
var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
if (rootDoesHavePassiveEffects) {
@@ -22728,7 +23223,7 @@
// schedule a callback until after flushing layout work.
rootDoesHavePassiveEffects = false;
rootWithPendingPassiveEffects = root;
- pendingPassiveEffectsExpirationTime = expirationTime;
+ pendingPassiveEffectsLanes = lanes;
pendingPassiveEffectsRenderPriority = renderPriorityLevel;
} else {
// We are done with the effect chain at this point so let's clear the
@@ -22739,14 +23234,19 @@
while (nextEffect !== null) {
var nextNextEffect = nextEffect.nextEffect;
nextEffect.nextEffect = null;
+
+ if (nextEffect.flags & Deletion) {
+ detachFiberAfterEffects(nextEffect);
+ }
+
nextEffect = nextNextEffect;
}
- } // Check if there's remaining work on this root
+ } // Read this again, since an effect might have updated it
- var remainingExpirationTime = root.firstPendingTime;
+ remainingLanes = root.pendingLanes; // Check if there's remaining work on this root
- if (remainingExpirationTime !== NoWork) {
+ if (remainingLanes !== NoLanes) {
{
if (spawnedWorkDuringRender !== null) {
var expirationTimes = spawnedWorkDuringRender;
@@ -22757,7 +23257,7 @@
}
}
- schedulePendingInteractions(root, remainingExpirationTime);
+ schedulePendingInteractions(root, remainingLanes);
}
} else {
// If there's no remaining work, we can clear the set of already failed
@@ -22771,11 +23271,11 @@
// Otherwise, we'll wait until after the passive effects are flushed.
// Wait to do this until after remaining work has been scheduled,
// so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
- finishPendingInteractions(root, expirationTime);
+ finishPendingInteractions(root, lanes);
}
}
- if (remainingExpirationTime === Sync) {
+ if (remainingLanes === SyncLane) {
// Count the number of times the root synchronously re-renders without
// finishing. If there are too many, it indicates an infinite update loop.
if (root === rootWithNestedUpdates) {
@@ -22788,10 +23288,15 @@
nestedUpdateCount = 0;
}
- onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any
+ onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
+
+ {
+ onCommitRoot$1();
+ } // Always call this before exiting `commitRoot`, to ensure that any
// additional work on this root is scheduled.
- ensureRootIsScheduled(root);
+
+ ensureRootIsScheduled(root, now());
if (hasUncaughtError) {
hasUncaughtError = false;
@@ -22801,36 +23306,51 @@
}
if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
- // This is a legacy edge case. We just committed the initial mount of
// a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
// synchronously, but layout updates should be deferred until the end
// of the batch.
+
+
return null;
} // If layout work was scheduled, flush it now.
flushSyncCallbackQueue();
+
return null;
}
function commitBeforeMutationEffects() {
while (nextEffect !== null) {
- var effectTag = nextEffect.effectTag;
+ var current = nextEffect.alternate;
- if ((effectTag & Snapshot) !== NoEffect) {
+ if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {
+ if ((nextEffect.flags & Deletion) !== NoFlags) {
+ if (doesFiberContain(nextEffect, focusedInstanceHandle)) {
+ shouldFireAfterActiveInstanceBlur = true;
+ }
+ } else {
+ // TODO: Move this out of the hot path using a dedicated effect tag.
+ if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {
+ shouldFireAfterActiveInstanceBlur = true;
+ }
+ }
+ }
+
+ var flags = nextEffect.flags;
+
+ if ((flags & Snapshot) !== NoFlags) {
setCurrentFiber(nextEffect);
- recordEffect();
- var current = nextEffect.alternate;
commitBeforeMutationLifeCycles(current, nextEffect);
resetCurrentFiber();
}
- if ((effectTag & Passive) !== NoEffect) {
+ if ((flags & Passive) !== NoFlags) {
// If there are passive effects, schedule a callback to flush at
// the earliest opportunity.
if (!rootDoesHavePassiveEffects) {
rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority, function () {
+ scheduleCallback(NormalPriority$1, function () {
flushPassiveEffects();
return null;
});
@@ -22845,13 +23365,13 @@
// TODO: Should probably move the bulk of this function to commitWork.
while (nextEffect !== null) {
setCurrentFiber(nextEffect);
- var effectTag = nextEffect.effectTag;
+ var flags = nextEffect.flags;
- if (effectTag & ContentReset) {
+ if (flags & ContentReset) {
commitResetTextContent(nextEffect);
}
- if (effectTag & Ref) {
+ if (flags & Ref) {
var current = nextEffect.alternate;
if (current !== null) {
@@ -22863,9 +23383,9 @@
// switch on that value.
- var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating);
+ var primaryFlags = flags & (Placement | Update | Deletion | Hydrating);
- switch (primaryEffectTag) {
+ switch (primaryFlags) {
case Placement:
{
commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
@@ -22873,7 +23393,7 @@
// TODO: findDOMNode doesn't rely on this any more but isMounted does
// and isMounted is deprecated anyway so we should be able to kill this.
- nextEffect.effectTag &= ~Placement;
+ nextEffect.flags &= ~Placement;
break;
}
@@ -22883,7 +23403,7 @@
commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
// inserted, before any life-cycles like componentDidMount gets called.
- nextEffect.effectTag &= ~Placement; // Update
+ nextEffect.flags &= ~Placement; // Update
var _current = nextEffect.alternate;
commitWork(_current, nextEffect);
@@ -22892,13 +23412,13 @@
case Hydrating:
{
- nextEffect.effectTag &= ~Hydrating;
+ nextEffect.flags &= ~Hydrating;
break;
}
case HydratingAndUpdate:
{
- nextEffect.effectTag &= ~Hydrating; // Update
+ nextEffect.flags &= ~Hydrating; // Update
var _current2 = nextEffect.alternate;
commitWork(_current2, nextEffect);
@@ -22914,33 +23434,32 @@
case Deletion:
{
- commitDeletion(root, nextEffect, renderPriorityLevel);
+ commitDeletion(root, nextEffect);
break;
}
- } // TODO: Only record a mutation effect if primaryEffectTag is non-zero.
-
+ }
- recordEffect();
resetCurrentFiber();
nextEffect = nextEffect.nextEffect;
}
}
- function commitLayoutEffects(root, committedExpirationTime) {
- // TODO: Should probably move the bulk of this function to commitWork.
+ function commitLayoutEffects(root, committedLanes) {
+
+
while (nextEffect !== null) {
setCurrentFiber(nextEffect);
- var effectTag = nextEffect.effectTag;
+ var flags = nextEffect.flags;
- if (effectTag & (Update | Callback)) {
- recordEffect();
+ if (flags & (Update | Callback)) {
var current = nextEffect.alternate;
commitLifeCycles(root, current, nextEffect);
}
- if (effectTag & Ref) {
- recordEffect();
- commitAttachRef(nextEffect);
+ {
+ if (flags & Ref) {
+ commitAttachRef(nextEffect);
+ }
}
resetCurrentFiber();
@@ -22949,22 +23468,64 @@
}
function flushPassiveEffects() {
- if (pendingPassiveEffectsRenderPriority !== NoPriority) {
- var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority ? NormalPriority : pendingPassiveEffectsRenderPriority;
- pendingPassiveEffectsRenderPriority = NoPriority;
- return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
+ // Returns whether passive effects were flushed.
+ if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {
+ var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;
+ pendingPassiveEffectsRenderPriority = NoPriority$1;
+
+ {
+ return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
+ }
+ }
+
+ return false;
+ }
+ function enqueuePendingPassiveHookEffectMount(fiber, effect) {
+ pendingPassiveHookEffectsMount.push(effect, fiber);
+
+ if (!rootDoesHavePassiveEffects) {
+ rootDoesHavePassiveEffects = true;
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects();
+ return null;
+ });
+ }
+ }
+ function enqueuePendingPassiveHookEffectUnmount(fiber, effect) {
+ pendingPassiveHookEffectsUnmount.push(effect, fiber);
+
+ {
+ fiber.flags |= PassiveUnmountPendingDev;
+ var alternate = fiber.alternate;
+
+ if (alternate !== null) {
+ alternate.flags |= PassiveUnmountPendingDev;
+ }
+ }
+
+ if (!rootDoesHavePassiveEffects) {
+ rootDoesHavePassiveEffects = true;
+ scheduleCallback(NormalPriority$1, function () {
+ flushPassiveEffects();
+ return null;
+ });
}
}
+ function invokePassiveEffectCreate(effect) {
+ var create = effect.create;
+ effect.destroy = create();
+ }
+
function flushPassiveEffectsImpl() {
if (rootWithPendingPassiveEffects === null) {
return false;
}
var root = rootWithPendingPassiveEffects;
- var expirationTime = pendingPassiveEffectsExpirationTime;
+ var lanes = pendingPassiveEffectsLanes;
rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsExpirationTime = NoWork;
+ pendingPassiveEffectsLanes = NoLanes;
if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
{
@@ -22972,46 +23533,117 @@
}
}
+ {
+ isFlushingPassiveEffects = true;
+ }
+
var prevExecutionContext = executionContext;
executionContext |= CommitContext;
- var prevInteractions = pushInteractions(root);
+ var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called
+ // before ANY passive effect create functions are called.
+ // Otherwise effects in sibling components might interfere with each other.
+ // e.g. a destroy function in one component may unintentionally override a ref
+ // value set by a create function in another component.
+ // Layout effects have the same constraint.
+ // First pass: Destroy stale passive effects.
+
+ var unmountEffects = pendingPassiveHookEffectsUnmount;
+ pendingPassiveHookEffectsUnmount = [];
+
+ for (var i = 0; i < unmountEffects.length; i += 2) {
+ var _effect = unmountEffects[i];
+ var fiber = unmountEffects[i + 1];
+ var destroy = _effect.destroy;
+ _effect.destroy = undefined;
- {
- // Note: This currently assumes there are no passive effects on the root fiber
- // because the root is not part of its own effect list.
- // This could change in the future.
- var _effect2 = root.current.firstEffect;
+ {
+ fiber.flags &= ~PassiveUnmountPendingDev;
+ var alternate = fiber.alternate;
- while (_effect2 !== null) {
+ if (alternate !== null) {
+ alternate.flags &= ~PassiveUnmountPendingDev;
+ }
+ }
+
+ if (typeof destroy === 'function') {
{
- setCurrentFiber(_effect2);
- invokeGuardedCallback(null, commitPassiveHookEffects, null, _effect2);
+ setCurrentFiber(fiber);
+
+ {
+ invokeGuardedCallback(null, destroy, null);
+ }
if (hasCaughtError()) {
- if (!(_effect2 !== null)) {
+ if (!(fiber !== null)) {
{
throw Error( "Should be working on an effect." );
}
}
- var _error5 = clearCaughtError();
-
- captureCommitPhaseError(_effect2, _error5);
+ var error = clearCaughtError();
+ captureCommitPhaseError(fiber, error);
}
resetCurrentFiber();
}
+ }
+ } // Second pass: Create new passive effects.
+
+
+ var mountEffects = pendingPassiveHookEffectsMount;
+ pendingPassiveHookEffectsMount = [];
+
+ for (var _i = 0; _i < mountEffects.length; _i += 2) {
+ var _effect2 = mountEffects[_i];
+ var _fiber = mountEffects[_i + 1];
+
+ {
+ setCurrentFiber(_fiber);
+
+ {
+ invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);
+ }
- var nextNextEffect = _effect2.nextEffect; // Remove nextEffect pointer to assist GC
+ if (hasCaughtError()) {
+ if (!(_fiber !== null)) {
+ {
+ throw Error( "Should be working on an effect." );
+ }
+ }
- _effect2.nextEffect = null;
- _effect2 = nextNextEffect;
+ var _error4 = clearCaughtError();
+
+ captureCommitPhaseError(_fiber, _error4);
+ }
+
+ resetCurrentFiber();
}
+ } // Note: This currently assumes there are no passive effects on the root fiber
+ // because the root is not part of its own effect list.
+ // This could change in the future.
+
+
+ var effect = root.current.firstEffect;
+
+ while (effect !== null) {
+ var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC
+
+ effect.nextEffect = null;
+
+ if (effect.flags & Deletion) {
+ detachFiberAfterEffects(effect);
+ }
+
+ effect = nextNextEffect;
}
{
popInteractions(prevInteractions);
- finishPendingInteractions(root, expirationTime);
+ finishPendingInteractions(root, lanes);
+ }
+
+ {
+ isFlushingPassiveEffects = false;
}
executionContext = prevExecutionContext;
@@ -23044,13 +23676,15 @@
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createRootErrorUpdate(rootFiber, errorInfo, Sync);
+ var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
enqueueUpdate(rootFiber, update);
- var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync);
+ var eventTime = requestEventTime();
+ var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);
if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, Sync);
+ markRootUpdated(root, SyncLane, eventTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, SyncLane);
}
}
@@ -23074,14 +23708,29 @@
if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createClassErrorUpdate(fiber, errorInfo, // TODO: This is always sync
- Sync);
+ var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
enqueueUpdate(fiber, update);
- var root = markUpdateTimeFromFiberToRoot(fiber, Sync);
+ var eventTime = requestEventTime();
+ var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);
if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, Sync);
+ markRootUpdated(root, SyncLane, eventTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, SyncLane);
+ } else {
+ // This component has already been unmounted.
+ // We can't schedule any follow up work for the root because the fiber is already unmounted,
+ // but we can still call the log-only boundary so the error isn't swallowed.
+ //
+ // TODO This is only a temporary bandaid for the old reconciler fork.
+ // We can delete this special case once the new fork is merged.
+ if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
+ try {
+ instance.componentDidCatch(error, errorInfo);
+ } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?
+ // This is kind of an edge case.
+ }
+ }
}
return;
@@ -23091,81 +23740,61 @@
fiber = fiber.return;
}
}
- function pingSuspendedRoot(root, thenable, suspendedTime) {
+ function pingSuspendedRoot(root, wakeable, pingedLanes) {
var pingCache = root.pingCache;
if (pingCache !== null) {
- // The thenable resolved, so we no longer need to memoize, because it will
+ // The wakeable resolved, so we no longer need to memoize, because it will
// never be thrown again.
- pingCache.delete(thenable);
+ pingCache.delete(wakeable);
}
- if (workInProgressRoot === root && renderExpirationTime$1 === suspendedTime) {
+ var eventTime = requestEventTime();
+ markRootPinged(root, pingedLanes);
+
+ if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
// Received a ping at the same priority level at which we're currently
// rendering. We might want to restart this render. This should mirror
// the logic of whether or not a root suspends once it completes.
// TODO: If we're rendering sync either due to Sync, Batched or expired,
// we should probably never restart.
- // If we're suspended with delay, we'll always suspend so we can always
- // restart. If we're suspended without any updates, it might be a retry.
- // If it's early in the retry we can restart. We can't know for sure
- // whether we'll eventually process an update during this render pass,
- // but it's somewhat unlikely that we get to a ping before that, since
- // getting to the root most update is usually very fast.
- if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && workInProgressRootLatestProcessedExpirationTime === Sync && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
- // Restart from the root. Don't need to schedule a ping because
- // we're already working on this tree.
- prepareFreshStack(root, renderExpirationTime$1);
+ // If we're suspended with delay, or if it's a retry, we'll always suspend
+ // so we can always restart.
+ if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
+ // Restart from the root.
+ prepareFreshStack(root, NoLanes);
} else {
// Even though we can't restart right now, we might get an
// opportunity later. So we mark this render as having a ping.
- workInProgressRootHasPendingPing = true;
+ workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
}
-
- return;
}
- if (!isRootSuspendedAtTime(root, suspendedTime)) {
- // The root is no longer suspended at this time.
- return;
- }
-
- var lastPingedTime = root.lastPingedTime;
-
- if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) {
- // There's already a lower priority ping scheduled.
- return;
- } // Mark the time at which this ping was scheduled.
-
-
- root.lastPingedTime = suspendedTime;
-
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, suspendedTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, pingedLanes);
}
- function retryTimedOutBoundary(boundaryFiber, retryTime) {
+ function retryTimedOutBoundary(boundaryFiber, retryLane) {
// The boundary fiber (a Suspense component or SuspenseList component)
// previously was rendered in its fallback state. One of the promises that
// suspended it has resolved, which means at least part of the tree was
// likely unblocked. Try rendering again, at a new expiration time.
- if (retryTime === NoWork) {
- var suspenseConfig = null; // Retries don't carry over the already committed update.
-
- var currentTime = requestCurrentTimeForUpdate();
- retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig);
+ if (retryLane === NoLane) {
+ retryLane = requestRetryLane(boundaryFiber);
} // TODO: Special case idle priority?
- var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime);
+ var eventTime = requestEventTime();
+ var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);
if (root !== null) {
- ensureRootIsScheduled(root);
- schedulePendingInteractions(root, retryTime);
+ markRootUpdated(root, retryLane, eventTime);
+ ensureRootIsScheduled(root, eventTime);
+ schedulePendingInteractions(root, retryLane);
}
}
- function resolveRetryThenable(boundaryFiber, thenable) {
- var retryTime = NoWork; // Default
+ function resolveRetryWakeable(boundaryFiber, wakeable) {
+ var retryLane = NoLane; // Default
var retryCache;
@@ -23174,12 +23803,12 @@
}
if (retryCache !== null) {
- // The thenable resolved, so we no longer need to memoize, because it will
+ // The wakeable resolved, so we no longer need to memoize, because it will
// never be thrown again.
- retryCache.delete(thenable);
+ retryCache.delete(wakeable);
}
- retryTimedOutBoundary(boundaryFiber, retryTime);
+ retryTimedOutBoundary(boundaryFiber, retryLane);
} // Computes the next Just Noticeable Difference (JND) boundary.
// The theory is that a person can't tell the difference between small differences in time.
// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
@@ -23194,30 +23823,6 @@
return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
}
- function computeMsUntilSuspenseLoadingDelay(mostRecentEventTime, committedExpirationTime, suspenseConfig) {
- var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0;
-
- if (busyMinDurationMs <= 0) {
- return 0;
- }
-
- var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire.
-
- var currentTimeMs = now();
- var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig(mostRecentEventTime, suspenseConfig);
- var timeElapsed = currentTimeMs - eventTimeMs;
-
- if (timeElapsed <= busyDelayMs) {
- // If we haven't yet waited longer than the initial delay, we don't
- // have to wait any additional time.
- return 0;
- }
-
- var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`.
-
- return msUntilTimeout;
- }
-
function checkForNestedUpdates() {
if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
nestedUpdateCount = 0;
@@ -23249,22 +23854,53 @@
}
}
- function stopFinishedWorkLoopTimer() {
- var didCompleteRoot = true;
- stopWorkLoopTimer(interruptedBy, didCompleteRoot);
- interruptedBy = null;
- }
+ var didWarnStateUpdateForNotYetMountedComponent = null;
- function stopInterruptedWorkLoopTimer() {
- // TODO: Track which fiber caused the interruption.
- var didCompleteRoot = false;
- stopWorkLoopTimer(interruptedBy, didCompleteRoot);
- interruptedBy = null;
- }
+ function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
+ {
+ if ((executionContext & RenderContext) !== NoContext) {
+ // We let the other warning about render phase updates deal with this one.
+ return;
+ }
+
+ if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {
+ return;
+ }
- function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) {
- if ( workInProgressRoot !== null && updateExpirationTime > renderExpirationTime$1) {
- interruptedBy = fiberThatReceivedUpdate;
+ var tag = fiber.tag;
+
+ if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
+ // Only warn for user-defined components, not internal ones like Suspense.
+ return;
+ } // We show the whole stack but dedupe on the top component's name because
+ // the problematic code almost always lies inside that component.
+
+
+ var componentName = getComponentName(fiber.type) || 'ReactComponent';
+
+ if (didWarnStateUpdateForNotYetMountedComponent !== null) {
+ if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
+ return;
+ }
+
+ didWarnStateUpdateForNotYetMountedComponent.add(componentName);
+ } else {
+ didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);
+ }
+
+ var previousFiber = current;
+
+ try {
+ setCurrentFiber(fiber);
+
+ error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');
+ } finally {
+ if (previousFiber) {
+ setCurrentFiber(fiber);
+ } else {
+ resetCurrentFiber();
+ }
+ }
}
}
@@ -23277,7 +23913,13 @@
if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
// Only warn for user-defined components, not internal ones like Suspense.
return;
- }
+ } // If there are pending passive effects unmounts for this Fiber,
+ // we can assume that they would have prevented this update.
+
+
+ if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {
+ return;
+ } // We show the whole stack but dedupe on the top component's name because
// the problematic code almost always lies inside that component.
@@ -23293,7 +23935,21 @@
didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
}
- error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));
+ if (isFlushingPassiveEffects) ; else {
+ var previousFiber = current;
+
+ try {
+ setCurrentFiber(fiber);
+
+ error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function');
+ } finally {
+ if (previousFiber) {
+ setCurrentFiber(fiber);
+ } else {
+ resetCurrentFiber();
+ }
+ }
+ }
}
}
@@ -23302,7 +23958,7 @@
{
var dummyFiber = null;
- beginWork$1 = function (current, unitOfWork, expirationTime) {
+ beginWork$1 = function (current, unitOfWork, lanes) {
// If a component throws an error, we replay it again in a synchronously
// dispatched event, so that the debugger will treat it as an uncaught
// error See ReactErrorUtils for more information.
@@ -23311,7 +23967,7 @@
var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
try {
- return beginWork(current, unitOfWork, expirationTime);
+ return beginWork(current, unitOfWork, lanes);
} catch (originalError) {
if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
// Don't replay promises. Treat everything else like an error.
@@ -23335,7 +23991,7 @@
} // Run beginWork again.
- invokeGuardedCallback(null, beginWork, null, current, unitOfWork, expirationTime);
+ invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);
if (hasCaughtError()) {
var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
@@ -23359,7 +24015,7 @@
function warnAboutRenderPhaseUpdatesInDEV(fiber) {
{
- if (isRendering && (executionContext & RenderContext) !== NoContext) {
+ if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
@@ -23373,7 +24029,7 @@
didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
var setStateComponentName = getComponentName(fiber.type) || 'Unknown';
- error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://fb.me/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
+ error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
}
break;
@@ -23401,14 +24057,28 @@
function warnIfNotScopedWithMatchingAct(fiber) {
{
if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
- error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + "import {act} from 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + "import TestRenderer from 'react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);' + '%s', getStackByFiberInDevAndProd(fiber));
+ var previousFiber = current;
+
+ try {
+ setCurrentFiber(fiber);
+
+ error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
+ 'import {act} fr' + "om 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
+ 'import TestRenderer fr' + "om react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);');
+ } finally {
+ if (previousFiber) {
+ setCurrentFiber(fiber);
+ } else {
+ resetCurrentFiber();
+ }
+ }
}
}
}
function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
{
if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
+ error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
}
}
}
@@ -23416,7 +24086,19 @@
function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
{
if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
+ var previousFiber = current;
+
+ try {
+ setCurrentFiber(fiber);
+
+ error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
+ } finally {
+ if (previousFiber) {
+ setCurrentFiber(fiber);
+ } else {
+ resetCurrentFiber();
+ }
+ }
}
}
}
@@ -23434,31 +24116,35 @@
if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
didWarnAboutUnmockedScheduler = true;
- error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
+ error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + // Break up requires to avoid accidentally parsing them as dependencies.
+ "jest.mock('scheduler', () => require" + "('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://reactjs.org/link/mock-scheduler');
}
}
}
}
- function computeThreadID(root, expirationTime) {
+ function computeThreadID(root, lane) {
// Interaction threads are unique per root and expiration time.
- return expirationTime * 1000 + root.interactionThreadID;
+ // NOTE: Intentionally unsound cast. All that matters is that it's a number
+ // and it represents a batch of work. Could make a helper function instead,
+ // but meh this is fine for now.
+ return lane * 1000 + root.interactionThreadID;
}
- function markSpawnedWork(expirationTime) {
+ function markSpawnedWork(lane) {
if (spawnedWorkDuringRender === null) {
- spawnedWorkDuringRender = [expirationTime];
+ spawnedWorkDuringRender = [lane];
} else {
- spawnedWorkDuringRender.push(expirationTime);
+ spawnedWorkDuringRender.push(lane);
}
}
- function scheduleInteractions(root, expirationTime, interactions) {
+ function scheduleInteractions(root, lane, interactions) {
if (interactions.size > 0) {
var pendingInteractionMap = root.pendingInteractionMap;
- var pendingInteractions = pendingInteractionMap.get(expirationTime);
+ var pendingInteractions = pendingInteractionMap.get(lane);
if (pendingInteractions != null) {
interactions.forEach(function (interaction) {
@@ -23470,7 +24156,7 @@
pendingInteractions.add(interaction);
});
} else {
- pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions.
+ pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.
interactions.forEach(function (interaction) {
interaction.__count++;
@@ -23480,25 +24166,25 @@
var subscriber = __subscriberRef.current;
if (subscriber !== null) {
- var threadID = computeThreadID(root, expirationTime);
+ var threadID = computeThreadID(root, lane);
subscriber.onWorkScheduled(interactions, threadID);
}
}
}
- function schedulePendingInteractions(root, expirationTime) {
+ function schedulePendingInteractions(root, lane) {
- scheduleInteractions(root, expirationTime, __interactionsRef.current);
+ scheduleInteractions(root, lane, __interactionsRef.current);
}
- function startWorkOnPendingInteractions(root, expirationTime) {
+ function startWorkOnPendingInteractions(root, lanes) {
// we can accurately attribute time spent working on it, And so that cascading
// work triggered during the render phase will be associated with it.
var interactions = new Set();
- root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
- if (scheduledExpirationTime >= expirationTime) {
+ root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {
+ if (includesSomeLane(lanes, scheduledLane)) {
scheduledInteractions.forEach(function (interaction) {
return interactions.add(interaction);
});
@@ -23515,13 +24201,13 @@
var subscriber = __subscriberRef.current;
if (subscriber !== null) {
- var threadID = computeThreadID(root, expirationTime);
+ var threadID = computeThreadID(root, lanes);
try {
subscriber.onWorkStarted(interactions, threadID);
} catch (error) {
// If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
+ scheduleCallback(ImmediatePriority$1, function () {
throw error;
});
}
@@ -23529,21 +24215,22 @@
}
}
- function finishPendingInteractions(root, committedExpirationTime) {
+ function finishPendingInteractions(root, committedLanes) {
- var earliestRemainingTimeAfterCommit = root.firstPendingTime;
+ var remainingLanesAfterCommit = root.pendingLanes;
var subscriber;
try {
subscriber = __subscriberRef.current;
if (subscriber !== null && root.memoizedInteractions.size > 0) {
- var threadID = computeThreadID(root, committedExpirationTime);
+ // FIXME: More than one lane can finish in a single commit.
+ var threadID = computeThreadID(root, committedLanes);
subscriber.onWorkStopped(root.memoizedInteractions, threadID);
}
} catch (error) {
// If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
+ scheduleCallback(ImmediatePriority$1, function () {
throw error;
});
} finally {
@@ -23551,12 +24238,12 @@
// Unless the render was suspended or cascading work was scheduled,
// In which case– leave pending interactions until the subsequent render.
var pendingInteractionMap = root.pendingInteractionMap;
- pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
+ pendingInteractionMap.forEach(function (scheduledInteractions, lane) {
// Only decrement the pending interaction count if we're done.
// If there's still work at the current priority,
// That indicates that we are waiting for suspense data.
- if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {
- pendingInteractionMap.delete(scheduledExpirationTime);
+ if (!includesSomeLane(remainingLanesAfterCommit, lane)) {
+ pendingInteractionMap.delete(lane);
scheduledInteractions.forEach(function (interaction) {
interaction.__count--;
@@ -23565,7 +24252,7 @@
subscriber.onInteractionScheduledWorkCompleted(interaction);
} catch (error) {
// If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority, function () {
+ scheduleCallback(ImmediatePriority$1, function () {
throw error;
});
}
@@ -23574,116 +24261,416 @@
}
});
}
+ } // `act` testing API
+
+ function shouldForceFlushFallbacksInDEV() {
+ // Never force flush in production. This function should get stripped out.
+ return actingUpdatesScopeDepth > 0;
}
+ // so we can tell if any async act() calls try to run in parallel.
- var onScheduleFiberRoot = null;
- var onCommitFiberRoot = null;
- var onCommitFiberUnmount = null;
- var hasLoggedError = false;
- var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
- function injectInternals(internals) {
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
- // No DevTools
- return false;
- }
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ var actingUpdatesScopeDepth = 0;
- if (hook.isDisabled) {
- // This isn't a real property on the hook, but it can be set to opt out
- // of DevTools integration and associated warnings and logs.
- // https://github.com/facebook/react/issues/3877
- return true;
+ function detachFiberAfterEffects(fiber) {
+ fiber.sibling = null;
+ fiber.stateNode = null;
+ }
+
+ var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
+
+ var failedBoundaries = null;
+ var setRefreshHandler = function (handler) {
+ {
+ resolveFamily = handler;
}
+ };
+ function resolveFunctionForHotReloading(type) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return type;
+ }
- if (!hook.supportsFiber) {
- {
- error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
- } // DevTools exists, even though it doesn't support Fiber.
+ var family = resolveFamily(type);
+ if (family === undefined) {
+ return type;
+ } // Use the latest known implementation.
- return true;
+
+ return family.current;
}
+ }
+ function resolveClassForHotReloading(type) {
+ // No implementation differences.
+ return resolveFunctionForHotReloading(type);
+ }
+ function resolveForwardRefForHotReloading(type) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return type;
+ }
- try {
- var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
+ var family = resolveFamily(type);
- if (true) {
- // Only used by Fast Refresh
- if (typeof hook.onScheduleFiberRoot === 'function') {
- onScheduleFiberRoot = function (root, children) {
- try {
- hook.onScheduleFiberRoot(rendererID, root, children);
- } catch (err) {
- if (true && !hasLoggedError) {
- hasLoggedError = true;
+ if (family === undefined) {
+ // Check if we're dealing with a real forwardRef. Don't want to crash early.
+ if (type !== null && type !== undefined && typeof type.render === 'function') {
+ // ForwardRef is special because its resolved .type is an object,
+ // but it's possible that we only have its inner render function in the map.
+ // If that inner render function is different, we'll build a new forwardRef type.
+ var currentRender = resolveFunctionForHotReloading(type.render);
- error('React instrumentation encountered an error: %s', err);
- }
+ if (type.render !== currentRender) {
+ var syntheticType = {
+ $$typeof: REACT_FORWARD_REF_TYPE,
+ render: currentRender
+ };
+
+ if (type.displayName !== undefined) {
+ syntheticType.displayName = type.displayName;
}
- };
+
+ return syntheticType;
+ }
}
+
+ return type;
+ } // Use the latest known implementation.
+
+
+ return family.current;
+ }
+ }
+ function isCompatibleFamilyForHotReloading(fiber, element) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return false;
}
- onCommitFiberRoot = function (root, expirationTime) {
- try {
- var didError = (root.current.effectTag & DidCapture) === DidCapture;
+ var prevType = fiber.elementType;
+ var nextType = element.type; // If we got here, we know types aren't === equal.
- if (enableProfilerTimer) {
- var currentTime = getCurrentTime();
- var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime);
- hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
- } else {
- hook.onCommitFiberRoot(rendererID, root, undefined, didError);
+ var needsCompareFamilies = false;
+ var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
+
+ switch (fiber.tag) {
+ case ClassComponent:
+ {
+ if (typeof nextType === 'function') {
+ needsCompareFamilies = true;
+ }
+
+ break;
}
- } catch (err) {
- if (true) {
- if (!hasLoggedError) {
- hasLoggedError = true;
- error('React instrumentation encountered an error: %s', err);
+ case FunctionComponent:
+ {
+ if (typeof nextType === 'function') {
+ needsCompareFamilies = true;
+ } else if ($$typeofNextType === REACT_LAZY_TYPE) {
+ // We don't know the inner type yet.
+ // We're going to assume that the lazy inner type is stable,
+ // and so it is sufficient to avoid reconciling it away.
+ // We're not going to unwrap or actually use the new lazy type.
+ needsCompareFamilies = true;
+ }
+
+ break;
+ }
+
+ case ForwardRef:
+ {
+ if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
+ needsCompareFamilies = true;
+ } else if ($$typeofNextType === REACT_LAZY_TYPE) {
+ needsCompareFamilies = true;
+ }
+
+ break;
+ }
+
+ case MemoComponent:
+ case SimpleMemoComponent:
+ {
+ if ($$typeofNextType === REACT_MEMO_TYPE) {
+ // TODO: if it was but can no longer be simple,
+ // we shouldn't set this.
+ needsCompareFamilies = true;
+ } else if ($$typeofNextType === REACT_LAZY_TYPE) {
+ needsCompareFamilies = true;
}
+
+ break;
}
+
+ default:
+ return false;
+ } // Check if both types have a family and it's the same one.
+
+
+ if (needsCompareFamilies) {
+ // Note: memo() and forwardRef() we'll compare outer rather than inner type.
+ // This means both of them need to be registered to preserve state.
+ // If we unwrapped and compared the inner types for wrappers instead,
+ // then we would risk falsely saying two separate memo(Foo)
+ // calls are equivalent because they wrap the same Foo function.
+ var prevFamily = resolveFamily(prevType);
+
+ if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
+ return true;
}
- };
+ }
- onCommitFiberUnmount = function (fiber) {
- try {
- hook.onCommitFiberUnmount(rendererID, fiber);
- } catch (err) {
- if (true) {
- if (!hasLoggedError) {
- hasLoggedError = true;
+ return false;
+ }
+ }
+ function markFailedErrorBoundaryForHotReloading(fiber) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return;
+ }
+
+ if (typeof WeakSet !== 'function') {
+ return;
+ }
+
+ if (failedBoundaries === null) {
+ failedBoundaries = new WeakSet();
+ }
+
+ failedBoundaries.add(fiber);
+ }
+ }
+ var scheduleRefresh = function (root, update) {
+ {
+ if (resolveFamily === null) {
+ // Hot reloading is disabled.
+ return;
+ }
+
+ var staleFamilies = update.staleFamilies,
+ updatedFamilies = update.updatedFamilies;
+ flushPassiveEffects();
+ flushSync(function () {
+ scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
+ });
+ }
+ };
+ var scheduleRoot = function (root, element) {
+ {
+ if (root.context !== emptyContextObject) {
+ // Super edge case: root has a legacy _renderSubtree context
+ // but we don't know the parentComponent so we can't pass it.
+ // Just ignore. We'll delete this with _renderSubtree code path later.
+ return;
+ }
+
+ flushPassiveEffects();
+ flushSync(function () {
+ updateContainer(element, root, null, null);
+ });
+ }
+ };
+
+ function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
+ {
+ var alternate = fiber.alternate,
+ child = fiber.child,
+ sibling = fiber.sibling,
+ tag = fiber.tag,
+ type = fiber.type;
+ var candidateType = null;
+
+ switch (tag) {
+ case FunctionComponent:
+ case SimpleMemoComponent:
+ case ClassComponent:
+ candidateType = type;
+ break;
- error('React instrumentation encountered an error: %s', err);
+ case ForwardRef:
+ candidateType = type.render;
+ break;
+ }
+
+ if (resolveFamily === null) {
+ throw new Error('Expected resolveFamily to be set during hot reload.');
+ }
+
+ var needsRender = false;
+ var needsRemount = false;
+
+ if (candidateType !== null) {
+ var family = resolveFamily(candidateType);
+
+ if (family !== undefined) {
+ if (staleFamilies.has(family)) {
+ needsRemount = true;
+ } else if (updatedFamilies.has(family)) {
+ if (tag === ClassComponent) {
+ needsRemount = true;
+ } else {
+ needsRender = true;
}
}
}
- };
- } catch (err) {
- // Catch all errors because it is unsafe to throw during initialization.
- {
- error('React instrumentation encountered an error: %s.', err);
}
- } // DevTools exists
+ if (failedBoundaries !== null) {
+ if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
+ needsRemount = true;
+ }
+ }
- return true;
+ if (needsRemount) {
+ fiber._debugNeedsRemount = true;
+ }
+
+ if (needsRemount || needsRender) {
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ }
+
+ if (child !== null && !needsRemount) {
+ scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
+ }
+
+ if (sibling !== null) {
+ scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
+ }
+ }
}
- function onScheduleRoot(root, children) {
- if (typeof onScheduleFiberRoot === 'function') {
- onScheduleFiberRoot(root, children);
+
+ var findHostInstancesForRefresh = function (root, families) {
+ {
+ var hostInstances = new Set();
+ var types = new Set(families.map(function (family) {
+ return family.current;
+ }));
+ findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
+ return hostInstances;
+ }
+ };
+
+ function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
+ {
+ var child = fiber.child,
+ sibling = fiber.sibling,
+ tag = fiber.tag,
+ type = fiber.type;
+ var candidateType = null;
+
+ switch (tag) {
+ case FunctionComponent:
+ case SimpleMemoComponent:
+ case ClassComponent:
+ candidateType = type;
+ break;
+
+ case ForwardRef:
+ candidateType = type.render;
+ break;
+ }
+
+ var didMatch = false;
+
+ if (candidateType !== null) {
+ if (types.has(candidateType)) {
+ didMatch = true;
+ }
+ }
+
+ if (didMatch) {
+ // We have a match. This only drills down to the closest host components.
+ // There's no need to search deeper because for the purpose of giving
+ // visual feedback, "flashing" outermost parent rectangles is sufficient.
+ findHostInstancesForFiberShallowly(fiber, hostInstances);
+ } else {
+ // If there's no match, maybe there will be one further down in the child tree.
+ if (child !== null) {
+ findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
+ }
+ }
+
+ if (sibling !== null) {
+ findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
+ }
}
}
- function onCommitRoot(root, expirationTime) {
- if (typeof onCommitFiberRoot === 'function') {
- onCommitFiberRoot(root, expirationTime);
+
+ function findHostInstancesForFiberShallowly(fiber, hostInstances) {
+ {
+ var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
+
+ if (foundHostInstances) {
+ return;
+ } // If we didn't find any host children, fallback to closest host parent.
+
+
+ var node = fiber;
+
+ while (true) {
+ switch (node.tag) {
+ case HostComponent:
+ hostInstances.add(node.stateNode);
+ return;
+
+ case HostPortal:
+ hostInstances.add(node.stateNode.containerInfo);
+ return;
+
+ case HostRoot:
+ hostInstances.add(node.stateNode.containerInfo);
+ return;
+ }
+
+ if (node.return === null) {
+ throw new Error('Expected to reach root first.');
+ }
+
+ node = node.return;
+ }
}
}
- function onCommitUnmount(fiber) {
- if (typeof onCommitFiberUnmount === 'function') {
- onCommitFiberUnmount(fiber);
+
+ function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
+ {
+ var node = fiber;
+ var foundHostInstances = false;
+
+ while (true) {
+ if (node.tag === HostComponent) {
+ // We got a match.
+ foundHostInstances = true;
+ hostInstances.add(node.stateNode); // There may still be more, so keep searching.
+ } else if (node.child !== null) {
+ node.child.return = node;
+ node = node.child;
+ continue;
+ }
+
+ if (node === fiber) {
+ return foundHostInstances;
+ }
+
+ while (node.sibling === null) {
+ if (node.return === null || node.return === fiber) {
+ return foundHostInstances;
+ }
+
+ node = node.return;
+ }
+
+ node.sibling.return = node.return;
+ node = node.sibling;
+ }
}
+
+ return false;
}
var hasBadMapPolyfill;
@@ -23693,13 +24680,11 @@
try {
var nonExtensibleObject = Object.preventExtensions({});
- var testMap = new Map([[nonExtensibleObject, null]]);
- var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused.
- // https://github.com/rollup/rollup/issues/1771
- // TODO: we can remove these if Rollup fixes the bug.
+ /* eslint-disable no-new */
- testMap.set(0, 0);
- testSet.add(0);
+ new Map([[nonExtensibleObject, null]]);
+ new Set([nonExtensibleObject]);
+ /* eslint-enable no-new */
} catch (e) {
// TODO: Consider warning about bad polyfills
hasBadMapPolyfill = true;
@@ -23728,12 +24713,12 @@
this.dependencies = null;
this.mode = mode; // Effects
- this.effectTag = NoEffect;
+ this.flags = NoFlags;
this.nextEffect = null;
this.firstEffect = null;
this.lastEffect = null;
- this.expirationTime = NoWork;
- this.childExpirationTime = NoWork;
+ this.lanes = NoLanes;
+ this.childLanes = NoLanes;
this.alternate = null;
{
@@ -23760,16 +24745,11 @@
this.actualStartTime = -1;
this.selfBaseDuration = 0;
this.treeBaseDuration = 0;
- } // This is normally DEV-only except www when it adds listeners.
- // TODO: remove the User Timing integration in favor of Root Events.
-
-
- {
- this._debugID = debugCounter++;
- this._debugIsCurrentlyTiming = false;
}
{
+ // This isn't directly used but is handy for debugging internals:
+ this._debugID = debugCounter++;
this._debugSource = null;
this._debugOwner = null;
this._debugNeedsRemount = false;
@@ -23799,17 +24779,17 @@
return new FiberNode(tag, pendingProps, key, mode);
};
- function shouldConstruct(Component) {
+ function shouldConstruct$1(Component) {
var prototype = Component.prototype;
return !!(prototype && prototype.isReactComponent);
}
function isSimpleFunctionComponent(type) {
- return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
+ return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;
}
function resolveLazyComponentTag(Component) {
if (typeof Component === 'function') {
- return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
+ return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;
} else if (Component !== undefined && Component !== null) {
var $$typeof = Component.$$typeof;
@@ -23841,10 +24821,7 @@
{
// DEV-only fields
- {
- workInProgress._debugID = current._debugID;
- }
-
+ workInProgress._debugID = current._debugID;
workInProgress._debugSource = current._debugSource;
workInProgress._debugOwner = current._debugOwner;
workInProgress._debugHookTypes = current._debugHookTypes;
@@ -23853,10 +24830,12 @@
workInProgress.alternate = current;
current.alternate = workInProgress;
} else {
- workInProgress.pendingProps = pendingProps; // We already have an alternate.
+ workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.
+
+ workInProgress.type = current.type; // We already have an alternate.
// Reset the effect tag.
- workInProgress.effectTag = NoEffect; // The effect list is no longer valid.
+ workInProgress.flags = NoFlags; // The effect list is no longer valid.
workInProgress.nextEffect = null;
workInProgress.firstEffect = null;
@@ -23872,8 +24851,8 @@
}
}
- workInProgress.childExpirationTime = current.childExpirationTime;
- workInProgress.expirationTime = current.expirationTime;
+ workInProgress.childLanes = current.childLanes;
+ workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
workInProgress.memoizedProps = current.memoizedProps;
workInProgress.memoizedState = current.memoizedState;
@@ -23882,9 +24861,8 @@
var currentDependencies = current.dependencies;
workInProgress.dependencies = currentDependencies === null ? null : {
- expirationTime: currentDependencies.expirationTime,
- firstContext: currentDependencies.firstContext,
- responders: currentDependencies.responders
+ lanes: currentDependencies.lanes,
+ firstContext: currentDependencies.firstContext
}; // These will be overridden during the parent's reconciliation
workInProgress.sibling = current.sibling;
@@ -23919,7 +24897,7 @@
return workInProgress;
} // Used to reuse a Fiber for a second pass.
- function resetWorkInProgress(workInProgress, renderExpirationTime) {
+ function resetWorkInProgress(workInProgress, renderLanes) {
// This resets the Fiber to what createFiber or createWorkInProgress would
// have set the values to before during the first pass. Ideally this wouldn't
// be necessary but unfortunately many code paths reads from the workInProgress
@@ -23928,7 +24906,7 @@
// avoid doing another reconciliation.
// Reset the effect tag but keep any Placement tags, since that's something
// that child fiber is setting, not the reconciliation.
- workInProgress.effectTag &= Placement; // The effect list is no longer valid.
+ workInProgress.flags &= Placement; // The effect list is no longer valid.
workInProgress.nextEffect = null;
workInProgress.firstEffect = null;
@@ -23937,13 +24915,14 @@
if (current === null) {
// Reset to createFiber's initial values.
- workInProgress.childExpirationTime = NoWork;
- workInProgress.expirationTime = renderExpirationTime;
+ workInProgress.childLanes = NoLanes;
+ workInProgress.lanes = renderLanes;
workInProgress.child = null;
workInProgress.memoizedProps = null;
workInProgress.memoizedState = null;
workInProgress.updateQueue = null;
workInProgress.dependencies = null;
+ workInProgress.stateNode = null;
{
// Note: We don't reset the actualTime counts. It's useful to accumulate
@@ -23953,19 +24932,20 @@
}
} else {
// Reset to the cloned values that createWorkInProgress would've.
- workInProgress.childExpirationTime = current.childExpirationTime;
- workInProgress.expirationTime = current.expirationTime;
+ workInProgress.childLanes = current.childLanes;
+ workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
workInProgress.memoizedProps = current.memoizedProps;
workInProgress.memoizedState = current.memoizedState;
- workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
+ workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.
+
+ workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so
// it cannot be shared with the current fiber.
var currentDependencies = current.dependencies;
workInProgress.dependencies = currentDependencies === null ? null : {
- expirationTime: currentDependencies.expirationTime,
- firstContext: currentDependencies.firstContext,
- responders: currentDependencies.responders
+ lanes: currentDependencies.lanes,
+ firstContext: currentDependencies.firstContext
};
{
@@ -23999,14 +24979,13 @@
return createFiber(HostRoot, null, null, mode);
}
function createFiberFromTypeAndProps(type, // React$ElementType
- key, pendingProps, owner, mode, expirationTime) {
- var fiber;
+ key, pendingProps, owner, mode, lanes) {
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
var resolvedType = type;
if (typeof type === 'function') {
- if (shouldConstruct(type)) {
+ if (shouldConstruct$1(type)) {
fiberTag = ClassComponent;
{
@@ -24022,11 +25001,11 @@
} else {
getTag: switch (type) {
case REACT_FRAGMENT_TYPE:
- return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
+ return createFiberFromFragment(pendingProps.children, mode, lanes, key);
- case REACT_CONCURRENT_MODE_TYPE:
+ case REACT_DEBUG_TRACING_MODE_TYPE:
fiberTag = Mode;
- mode |= ConcurrentMode | BlockingMode | StrictMode;
+ mode |= DebugTracingMode;
break;
case REACT_STRICT_MODE_TYPE:
@@ -24035,13 +25014,23 @@
break;
case REACT_PROFILER_TYPE:
- return createFiberFromProfiler(pendingProps, mode, expirationTime, key);
+ return createFiberFromProfiler(pendingProps, mode, lanes, key);
case REACT_SUSPENSE_TYPE:
- return createFiberFromSuspense(pendingProps, mode, expirationTime, key);
+ return createFiberFromSuspense(pendingProps, mode, lanes, key);
case REACT_SUSPENSE_LIST_TYPE:
- return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key);
+ return createFiberFromSuspenseList(pendingProps, mode, lanes, key);
+
+ case REACT_OFFSCREEN_TYPE:
+ return createFiberFromOffscreen(pendingProps, mode, lanes, key);
+
+ case REACT_LEGACY_HIDDEN_TYPE:
+ return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);
+
+ case REACT_SCOPE_TYPE:
+
+ // eslint-disable-next-line no-fallthrough
default:
{
@@ -24077,7 +25066,6 @@
case REACT_BLOCK_TYPE:
fiberTag = Block;
break getTag;
-
}
}
@@ -24104,13 +25092,18 @@
}
}
- fiber = createFiber(fiberTag, pendingProps, key, mode);
+ var fiber = createFiber(fiberTag, pendingProps, key, mode);
fiber.elementType = type;
fiber.type = resolvedType;
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
+
+ {
+ fiber._debugOwner = owner;
+ }
+
return fiber;
}
- function createFiberFromElement(element, mode, expirationTime) {
+ function createFiberFromElement(element, mode, lanes) {
var owner = null;
{
@@ -24120,7 +25113,7 @@
var type = element.type;
var key = element.key;
var pendingProps = element.props;
- var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);
+ var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);
{
fiber._debugSource = element._source;
@@ -24129,16 +25122,16 @@
return fiber;
}
- function createFiberFromFragment(elements, mode, expirationTime, key) {
+ function createFiberFromFragment(elements, mode, lanes, key) {
var fiber = createFiber(Fragment, elements, key, mode);
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
return fiber;
}
- function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
+ function createFiberFromProfiler(pendingProps, mode, lanes, key) {
{
- if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {
- error('Profiler must specify an "id" string and "onRender" function as props');
+ if (typeof pendingProps.id !== 'string') {
+ error('Profiler must specify an "id" as a prop');
}
}
@@ -24146,21 +25139,29 @@
fiber.elementType = REACT_PROFILER_TYPE;
fiber.type = REACT_PROFILER_TYPE;
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
+
+ {
+ fiber.stateNode = {
+ effectDuration: 0,
+ passiveEffectDuration: 0
+ };
+ }
+
return fiber;
}
- function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {
+ function createFiberFromSuspense(pendingProps, mode, lanes, key) {
var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
// This needs to be fixed in getComponentName so that it relies on the tag
// instead.
fiber.type = REACT_SUSPENSE_TYPE;
fiber.elementType = REACT_SUSPENSE_TYPE;
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
return fiber;
}
- function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {
+ function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
{
@@ -24171,12 +25172,38 @@
}
fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
+ return fiber;
+ }
+ function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
+ var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.
+ // This needs to be fixed in getComponentName so that it relies on the tag
+ // instead.
+
+ {
+ fiber.type = REACT_OFFSCREEN_TYPE;
+ }
+
+ fiber.elementType = REACT_OFFSCREEN_TYPE;
+ fiber.lanes = lanes;
+ return fiber;
+ }
+ function createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {
+ var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.
+ // This needs to be fixed in getComponentName so that it relies on the tag
+ // instead.
+
+ {
+ fiber.type = REACT_LEGACY_HIDDEN_TYPE;
+ }
+
+ fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
+ fiber.lanes = lanes;
return fiber;
}
- function createFiberFromText(content, mode, expirationTime) {
+ function createFiberFromText(content, mode, lanes) {
var fiber = createFiber(HostText, content, null, mode);
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
return fiber;
}
function createFiberFromHostInstanceForDeletion() {
@@ -24186,10 +25213,10 @@
fiber.type = 'DELETED';
return fiber;
}
- function createFiberFromPortal(portal, mode, expirationTime) {
+ function createFiberFromPortal(portal, mode, lanes) {
var pendingProps = portal.children !== null ? portal.children : [];
var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
- fiber.expirationTime = expirationTime;
+ fiber.lanes = lanes;
fiber.stateNode = {
containerInfo: portal.containerInfo,
pendingChildren: null,
@@ -24227,12 +25254,12 @@
target.memoizedState = source.memoizedState;
target.dependencies = source.dependencies;
target.mode = source.mode;
- target.effectTag = source.effectTag;
+ target.flags = source.flags;
target.nextEffect = source.nextEffect;
target.firstEffect = source.firstEffect;
target.lastEffect = source.lastEffect;
- target.expirationTime = source.expirationTime;
- target.childExpirationTime = source.childExpirationTime;
+ target.lanes = source.lanes;
+ target.childLanes = source.childLanes;
target.alternate = source.alternate;
{
@@ -24242,13 +25269,9 @@
target.treeBaseDuration = source.treeBaseDuration;
}
- {
- target._debugID = source._debugID;
- }
-
+ target._debugID = source._debugID;
target._debugSource = source._debugSource;
target._debugOwner = source._debugOwner;
- target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;
target._debugNeedsRemount = source._debugNeedsRemount;
target._debugHookTypes = source._debugHookTypes;
return target;
@@ -24256,30 +25279,53 @@
function FiberRootNode(containerInfo, tag, hydrate) {
this.tag = tag;
- this.current = null;
this.containerInfo = containerInfo;
this.pendingChildren = null;
+ this.current = null;
this.pingCache = null;
- this.finishedExpirationTime = NoWork;
this.finishedWork = null;
this.timeoutHandle = noTimeout;
this.context = null;
this.pendingContext = null;
this.hydrate = hydrate;
this.callbackNode = null;
- this.callbackPriority = NoPriority;
- this.firstPendingTime = NoWork;
- this.firstSuspendedTime = NoWork;
- this.lastSuspendedTime = NoWork;
- this.nextKnownPendingLevel = NoWork;
- this.lastPingedTime = NoWork;
- this.lastExpiredTime = NoWork;
+ this.callbackPriority = NoLanePriority;
+ this.eventTimes = createLaneMap(NoLanes);
+ this.expirationTimes = createLaneMap(NoTimestamp);
+ this.pendingLanes = NoLanes;
+ this.suspendedLanes = NoLanes;
+ this.pingedLanes = NoLanes;
+ this.expiredLanes = NoLanes;
+ this.mutableReadLanes = NoLanes;
+ this.finishedLanes = NoLanes;
+ this.entangledLanes = NoLanes;
+ this.entanglements = createLaneMap(NoLanes);
+
+ {
+ this.mutableSourceEagerHydrationData = null;
+ }
{
this.interactionThreadID = unstable_getThreadID();
this.memoizedInteractions = new Set();
this.pendingInteractionMap = new Map();
}
+
+ {
+ switch (tag) {
+ case BlockingRoot:
+ this._debugRootType = 'createBlockingRoot()';
+ break;
+
+ case ConcurrentRoot:
+ this._debugRootType = 'createRoot()';
+ break;
+
+ case LegacyRoot:
+ this._debugRootType = 'createLegacyRoot()';
+ break;
+ }
+ }
}
function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
@@ -24293,89 +25339,34 @@
initializeUpdateQueue(uninitializedFiber);
return root;
}
- function isRootSuspendedAtTime(root, expirationTime) {
- var firstSuspendedTime = root.firstSuspendedTime;
- var lastSuspendedTime = root.lastSuspendedTime;
- return firstSuspendedTime !== NoWork && firstSuspendedTime >= expirationTime && lastSuspendedTime <= expirationTime;
- }
- function markRootSuspendedAtTime(root, expirationTime) {
- var firstSuspendedTime = root.firstSuspendedTime;
- var lastSuspendedTime = root.lastSuspendedTime;
-
- if (firstSuspendedTime < expirationTime) {
- root.firstSuspendedTime = expirationTime;
- }
-
- if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) {
- root.lastSuspendedTime = expirationTime;
- }
-
- if (expirationTime <= root.lastPingedTime) {
- root.lastPingedTime = NoWork;
- }
-
- if (expirationTime <= root.lastExpiredTime) {
- root.lastExpiredTime = NoWork;
- }
- }
- function markRootUpdatedAtTime(root, expirationTime) {
- // Update the range of pending times
- var firstPendingTime = root.firstPendingTime;
- if (expirationTime > firstPendingTime) {
- root.firstPendingTime = expirationTime;
- } // Update the range of suspended times. Treat everything lower priority or
- // equal to this update as unsuspended.
+ // This ensures that the version used for server rendering matches the one
+ // that is eventually read during hydration.
+ // If they don't match there's a potential tear and a full deopt render is required.
+ function registerMutableSourceForHydration(root, mutableSource) {
+ var getVersion = mutableSource._getVersion;
+ var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
+ // Retaining it forever may interfere with GC.
- var firstSuspendedTime = root.firstSuspendedTime;
-
- if (firstSuspendedTime !== NoWork) {
- if (expirationTime >= firstSuspendedTime) {
- // The entire suspended range is now unsuspended.
- root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
- } else if (expirationTime >= root.lastSuspendedTime) {
- root.lastSuspendedTime = expirationTime + 1;
- } // This is a pending level. Check if it's higher priority than the next
- // known pending level.
-
-
- if (expirationTime > root.nextKnownPendingLevel) {
- root.nextKnownPendingLevel = expirationTime;
- }
- }
- }
- function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) {
- // Update the range of pending times
- root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or
- // equal to this update as unsuspended.
-
- if (finishedExpirationTime <= root.lastSuspendedTime) {
- // The entire suspended range is now unsuspended.
- root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
- } else if (finishedExpirationTime <= root.firstSuspendedTime) {
- // Part of the suspended range is now unsuspended. Narrow the range to
- // include everything between the unsuspended time (non-inclusive) and the
- // last suspended time.
- root.firstSuspendedTime = finishedExpirationTime - 1;
- }
-
- if (finishedExpirationTime <= root.lastPingedTime) {
- // Clear the pinged time
- root.lastPingedTime = NoWork;
- }
-
- if (finishedExpirationTime <= root.lastExpiredTime) {
- // Clear the expired time
- root.lastExpiredTime = NoWork;
+ if (root.mutableSourceEagerHydrationData == null) {
+ root.mutableSourceEagerHydrationData = [mutableSource, version];
+ } else {
+ root.mutableSourceEagerHydrationData.push(mutableSource, version);
}
}
- function markRootExpiredAtTime(root, expirationTime) {
- var lastExpiredTime = root.lastExpiredTime;
- if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) {
- root.lastExpiredTime = expirationTime;
- }
+ function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
+ implementation) {
+ var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
+ return {
+ // This tag allow us to uniquely identify this as a React Portal
+ $$typeof: REACT_PORTAL_TYPE,
+ key: key == null ? null : '' + key,
+ children: children,
+ containerInfo: containerInfo,
+ implementation: implementation
+ };
}
var didWarnAboutNestedUpdates;
@@ -24436,11 +25427,24 @@
if (!didWarnAboutFindNodeInStrictMode[componentName]) {
didWarnAboutFindNodeInStrictMode[componentName] = true;
+ var previousFiber = current;
- if (fiber.mode & StrictMode) {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
- } else {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
+ try {
+ setCurrentFiber(hostFiber);
+
+ if (fiber.mode & StrictMode) {
+ error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
+ } else {
+ error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
+ }
+ } finally {
+ // Ideally this should reset to previous but this shouldn't be called in
+ // render and there's another warning for that anyway.
+ if (previousFiber) {
+ setCurrentFiber(previousFiber);
+ } else {
+ resetCurrentFiber();
+ }
}
}
}
@@ -24458,7 +25462,7 @@
}
var current$1 = container.current;
- var currentTime = requestCurrentTimeForUpdate();
+ var eventTime = requestEventTime();
{
// $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
@@ -24468,8 +25472,8 @@
}
}
- var suspenseConfig = requestCurrentSuspenseConfig();
- var expirationTime = computeExpirationForFiber(currentTime, current$1, suspenseConfig);
+ var lane = requestUpdateLane(current$1);
+
var context = getContextForSubtree(parentComponent);
if (container.context === null) {
@@ -24486,7 +25490,7 @@
}
}
- var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property
+ var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property
// being called "element".
update.payload = {
@@ -24505,8 +25509,8 @@
}
enqueueUpdate(current$1, update);
- scheduleWork(current$1, expirationTime);
- return expirationTime;
+ scheduleUpdateOnFiber(current$1, lane, eventTime);
+ return lane;
}
function getPublicRootInstance(container) {
var containerFiber = container.current;
@@ -24524,23 +25528,21 @@
}
}
- function markRetryTimeImpl(fiber, retryTime) {
+ function markRetryLaneImpl(fiber, retryLane) {
var suspenseState = fiber.memoizedState;
if (suspenseState !== null && suspenseState.dehydrated !== null) {
- if (suspenseState.retryTime < retryTime) {
- suspenseState.retryTime = retryTime;
- }
+ suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
}
} // Increases the priority of thennables when they resolve within this boundary.
- function markRetryTimeIfNotHydrated(fiber, retryTime) {
- markRetryTimeImpl(fiber, retryTime);
+ function markRetryLaneIfNotHydrated(fiber, retryLane) {
+ markRetryLaneImpl(fiber, retryLane);
var alternate = fiber.alternate;
if (alternate) {
- markRetryTimeImpl(alternate, retryTime);
+ markRetryLaneImpl(alternate, retryLane);
}
}
@@ -24553,9 +25555,10 @@
return;
}
- var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate());
- scheduleWork(fiber, expTime);
- markRetryTimeIfNotHydrated(fiber, expTime);
+ var eventTime = requestEventTime();
+ var lane = InputDiscreteHydrationLane;
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
+ markRetryLaneIfNotHydrated(fiber, lane);
}
function attemptContinuousHydration$1(fiber) {
if (fiber.tag !== SuspenseComponent) {
@@ -24566,8 +25569,10 @@
return;
}
- scheduleWork(fiber, ContinuousHydration);
- markRetryTimeIfNotHydrated(fiber, ContinuousHydration);
+ var eventTime = requestEventTime();
+ var lane = SelectiveHydrationLane;
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
+ markRetryLaneIfNotHydrated(fiber, lane);
}
function attemptHydrationAtCurrentPriority$1(fiber) {
if (fiber.tag !== SuspenseComponent) {
@@ -24576,10 +25581,18 @@
return;
}
- var currentTime = requestCurrentTimeForUpdate();
- var expTime = computeExpirationForFiber(currentTime, fiber, null);
- scheduleWork(fiber, expTime);
- markRetryTimeIfNotHydrated(fiber, expTime);
+ var eventTime = requestEventTime();
+ var lane = requestUpdateLane(fiber);
+ scheduleUpdateOnFiber(fiber, lane, eventTime);
+ markRetryLaneIfNotHydrated(fiber, lane);
+ }
+ function runWithPriority$2(priority, fn) {
+
+ try {
+ setCurrentUpdateLanePriority(priority);
+ return fn();
+ } finally {
+ }
}
function findHostInstanceWithNoPortals(fiber) {
var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
@@ -24603,29 +25616,96 @@
return shouldSuspendImpl(fiber);
}
var overrideHookState = null;
+ var overrideHookStateDeletePath = null;
+ var overrideHookStateRenamePath = null;
var overrideProps = null;
+ var overridePropsDeletePath = null;
+ var overridePropsRenamePath = null;
var scheduleUpdate = null;
var setSuspenseHandler = null;
{
- var copyWithSetImpl = function (obj, path, idx, value) {
- if (idx >= path.length) {
+ var copyWithDeleteImpl = function (obj, path, index) {
+ var key = path[index];
+ var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
+
+ if (index + 1 === path.length) {
+ if (Array.isArray(updated)) {
+ updated.splice(key, 1);
+ } else {
+ delete updated[key];
+ }
+
+ return updated;
+ } // $FlowFixMe number or string is fine here
+
+
+ updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
+ return updated;
+ };
+
+ var copyWithDelete = function (obj, path) {
+ return copyWithDeleteImpl(obj, path, 0);
+ };
+
+ var copyWithRenameImpl = function (obj, oldPath, newPath, index) {
+ var oldKey = oldPath[index];
+ var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
+
+ if (index + 1 === oldPath.length) {
+ var newKey = newPath[index]; // $FlowFixMe number or string is fine here
+
+ updated[newKey] = updated[oldKey];
+
+ if (Array.isArray(updated)) {
+ updated.splice(oldKey, 1);
+ } else {
+ delete updated[oldKey];
+ }
+ } else {
+ // $FlowFixMe number or string is fine here
+ updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here
+ obj[oldKey], oldPath, newPath, index + 1);
+ }
+
+ return updated;
+ };
+
+ var copyWithRename = function (obj, oldPath, newPath) {
+ if (oldPath.length !== newPath.length) {
+ warn('copyWithRename() expects paths of the same length');
+
+ return;
+ } else {
+ for (var i = 0; i < newPath.length - 1; i++) {
+ if (oldPath[i] !== newPath[i]) {
+ warn('copyWithRename() expects paths to be the same except for the deepest key');
+
+ return;
+ }
+ }
+ }
+
+ return copyWithRenameImpl(obj, oldPath, newPath, 0);
+ };
+
+ var copyWithSetImpl = function (obj, path, index, value) {
+ if (index >= path.length) {
return value;
}
- var key = path[idx];
+ var key = path[index];
var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here
- updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
+ updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
return updated;
};
var copyWithSet = function (obj, path, value) {
return copyWithSetImpl(obj, path, 0, value);
- }; // Support DevTools editable values for useState and useReducer.
-
+ };
- overrideHookState = function (fiber, id, path, value) {
+ var findHook = function (fiber, id) {
// For now, the "id" of stateful hooks is just the stateful hook index.
// This may change in the future with e.g. nested hooks.
var currentHook = fiber.memoizedState;
@@ -24635,17 +25715,58 @@
id--;
}
- if (currentHook !== null) {
- var newState = copyWithSet(currentHook.memoizedState, path, value);
- currentHook.memoizedState = newState;
- currentHook.baseState = newState; // We aren't actually adding an update to the queue,
+ return currentHook;
+ }; // Support DevTools editable values for useState and useReducer.
+
+
+ overrideHookState = function (fiber, id, path, value) {
+ var hook = findHook(fiber, id);
+
+ if (hook !== null) {
+ var newState = copyWithSet(hook.memoizedState, path, value);
+ hook.memoizedState = newState;
+ hook.baseState = newState; // We aren't actually adding an update to the queue,
// because there is no update we can add for useReducer hooks that won't trigger an error.
// (There's no appropriate action type for DevTools overrides.)
// As a result though, React will see the scheduled update as a noop and bailout.
// Shallow cloning props works as a workaround for now to bypass the bailout check.
fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleWork(fiber, Sync);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ }
+ };
+
+ overrideHookStateDeletePath = function (fiber, id, path) {
+ var hook = findHook(fiber, id);
+
+ if (hook !== null) {
+ var newState = copyWithDelete(hook.memoizedState, path);
+ hook.memoizedState = newState;
+ hook.baseState = newState; // We aren't actually adding an update to the queue,
+ // because there is no update we can add for useReducer hooks that won't trigger an error.
+ // (There's no appropriate action type for DevTools overrides.)
+ // As a result though, React will see the scheduled update as a noop and bailout.
+ // Shallow cloning props works as a workaround for now to bypass the bailout check.
+
+ fiber.memoizedProps = _assign({}, fiber.memoizedProps);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ }
+ };
+
+ overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
+ var hook = findHook(fiber, id);
+
+ if (hook !== null) {
+ var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
+ hook.memoizedState = newState;
+ hook.baseState = newState; // We aren't actually adding an update to the queue,
+ // because there is no update we can add for useReducer hooks that won't trigger an error.
+ // (There's no appropriate action type for DevTools overrides.)
+ // As a result though, React will see the scheduled update as a noop and bailout.
+ // Shallow cloning props works as a workaround for now to bypass the bailout check.
+
+ fiber.memoizedProps = _assign({}, fiber.memoizedProps);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
}
}; // Support DevTools props for function components, forwardRef, memo, host components, etc.
@@ -24657,11 +25778,31 @@
fiber.alternate.pendingProps = fiber.pendingProps;
}
- scheduleWork(fiber, Sync);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ };
+
+ overridePropsDeletePath = function (fiber, path) {
+ fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);
+
+ if (fiber.alternate) {
+ fiber.alternate.pendingProps = fiber.pendingProps;
+ }
+
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
+ };
+
+ overridePropsRenamePath = function (fiber, oldPath, newPath) {
+ fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
+
+ if (fiber.alternate) {
+ fiber.alternate.pendingProps = fiber.pendingProps;
+ }
+
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
};
scheduleUpdate = function (fiber) {
- scheduleWork(fiber, Sync);
+ scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
};
setSuspenseHandler = function (newShouldSuspendImpl) {
@@ -24669,44 +25810,52 @@
};
}
+ function findHostInstanceByFiber(fiber) {
+ var hostFiber = findCurrentHostFiber(fiber);
+
+ if (hostFiber === null) {
+ return null;
+ }
+
+ return hostFiber.stateNode;
+ }
+
+ function emptyFindFiberByHostInstance(instance) {
+ return null;
+ }
+
+ function getCurrentFiberForDevTools() {
+ return current;
+ }
+
function injectIntoDevTools(devToolsConfig) {
var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
- return injectInternals(_assign({}, devToolsConfig, {
+ return injectInternals({
+ bundleType: devToolsConfig.bundleType,
+ version: devToolsConfig.version,
+ rendererPackageName: devToolsConfig.rendererPackageName,
+ rendererConfig: devToolsConfig.rendererConfig,
overrideHookState: overrideHookState,
+ overrideHookStateDeletePath: overrideHookStateDeletePath,
+ overrideHookStateRenamePath: overrideHookStateRenamePath,
overrideProps: overrideProps,
+ overridePropsDeletePath: overridePropsDeletePath,
+ overridePropsRenamePath: overridePropsRenamePath,
setSuspenseHandler: setSuspenseHandler,
scheduleUpdate: scheduleUpdate,
currentDispatcherRef: ReactCurrentDispatcher,
- findHostInstanceByFiber: function (fiber) {
- var hostFiber = findCurrentHostFiber(fiber);
-
- if (hostFiber === null) {
- return null;
- }
-
- return hostFiber.stateNode;
- },
- findFiberByHostInstance: function (instance) {
- if (!findFiberByHostInstance) {
- // Might not be implemented by the renderer.
- return null;
- }
-
- return findFiberByHostInstance(instance);
- },
+ findHostInstanceByFiber: findHostInstanceByFiber,
+ findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
// React Refresh
findHostInstancesForRefresh: findHostInstancesForRefresh ,
scheduleRefresh: scheduleRefresh ,
scheduleRoot: scheduleRoot ,
setRefreshHandler: setRefreshHandler ,
// Enables DevTools to append owner stacks to error messages in DEV mode.
- getCurrentFiber: function () {
- return current;
- }
- }));
+ getCurrentFiber: getCurrentFiberForDevTools
+ });
}
- var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing;
function ReactDOMRoot(container, options) {
this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
@@ -24758,12 +25907,21 @@
// Tag is either LegacyRoot or Concurrent Root
var hydrate = options != null && options.hydrate === true;
var hydrationCallbacks = options != null && options.hydrationOptions || null;
+ var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;
var root = createContainer(container, tag, hydrate);
markContainerAsRoot(root.current, container);
+ var containerNodeType = container.nodeType;
- if (hydrate && tag !== LegacyRoot) {
- var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument;
- eagerlyTrapReplayableEvents(container, doc);
+ {
+ var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
+ listenToAllSupportedEvents(rootContainerElement);
+ }
+
+ if (mutableSources) {
+ for (var i = 0; i < mutableSources.length; i++) {
+ var mutableSource = mutableSources[i];
+ registerMutableSourceForHydration(root, mutableSource);
+ }
}
return root;
@@ -24793,7 +25951,7 @@
var isRootRenderedBySomeReact = !!container._reactRootContainer;
var rootEl = getReactRootElementInContainer(container);
- var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));
+ var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));
if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
@@ -24846,7 +26004,7 @@
if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
warnedAboutHydrateAPI = true;
- warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
+ warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v18. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
}
}
@@ -24981,7 +26139,7 @@
}
}
- if (!(parentComponent != null && has$1(parentComponent))) {
+ if (!(parentComponent != null && has(parentComponent))) {
{
throw Error( "parentComponent must be a valid React Component" );
}
@@ -25007,7 +26165,7 @@
if (container._reactRootContainer) {
{
var rootEl = getReactRootElementInContainer(container);
- var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
+ var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);
if (renderedByDifferentReact) {
error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
@@ -25029,7 +26187,7 @@
{
var _rootEl = getReactRootElementInContainer(container);
- var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node.
+ var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.
var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
@@ -25042,31 +26200,17 @@
}
}
- function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
- implementation) {
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
- return {
- // This tag allow us to uniquely identify this as a React Portal
- $$typeof: REACT_PORTAL_TYPE,
- key: key == null ? null : '' + key,
- children: children,
- containerInfo: containerInfo,
- implementation: implementation
- };
- }
-
- var ReactVersion = '16.14.0';
-
setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
setAttemptContinuousHydration(attemptContinuousHydration$1);
setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
+ setAttemptHydrationAtPriority(runWithPriority$2);
var didWarnAboutUnstableCreatePortal = false;
{
if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
- error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
+ error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
}
}
@@ -25099,7 +26243,7 @@
if (!didWarnAboutUnstableCreatePortal) {
didWarnAboutUnstableCreatePortal = true;
- warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
+ warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 18+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
}
}
@@ -25107,9 +26251,10 @@
}
var Internals = {
- // Keep in sync with ReactDOMUnstableNativeDependencies.js
- // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
- Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
+ // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.
+ // This is an array for better minification.
+ Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?
+ IsThisRendererActing]
};
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
@@ -25126,7 +26271,7 @@
if (/^(https?|file):$/.test(protocol)) {
// eslint-disable-next-line react-internal/no-production-logging
- console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');
+ console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');
}
}
}
diff --git a/node_modules/react-dom/umd/react-dom.production.min.js b/node_modules/react-dom/umd/react-dom.production.min.js
index e6eecc7..e38d120 100644
--- a/node_modules/react-dom/umd/react-dom.production.min.js
+++ b/node_modules/react-dom/umd/react-dom.production.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,234 +6,240 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-/*
+(function(){/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
-'use strict';(function(I,ea){"object"===typeof exports&&"undefined"!==typeof module?ea(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],ea):(I=I||self,ea(I.ReactDOM={},I.React))})(this,function(I,ea){function k(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-function ji(a,b,c,d,e,f,g,h,m){yb=!1;gc=null;ki.apply(li,arguments)}function mi(a,b,c,d,e,f,g,h,m){ji.apply(this,arguments);if(yb){if(yb){var n=gc;yb=!1;gc=null}else throw Error(k(198));hc||(hc=!0,pd=n)}}function lf(a,b,c){var d=a.type||"unknown-event";a.currentTarget=mf(c);mi(d,b,void 0,a);a.currentTarget=null}function nf(){if(ic)for(var a in cb){var b=cb[a],c=ic.indexOf(a);if(!(-1<c))throw Error(k(96,a));if(!jc[c]){if(!b.extractEvents)throw Error(k(97,a));jc[c]=b;c=b.eventTypes;for(var d in c){var e=
-void 0;var f=c[d],g=b,h=d;if(qd.hasOwnProperty(h))throw Error(k(99,h));qd[h]=f;var m=f.phasedRegistrationNames;if(m){for(e in m)m.hasOwnProperty(e)&&of(m[e],g,h);e=!0}else f.registrationName?(of(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(k(98,d,a));}}}}function of(a,b,c){if(db[a])throw Error(k(100,a));db[a]=b;rd[a]=b.eventTypes[c].dependencies}function pf(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!cb.hasOwnProperty(c)||cb[c]!==d){if(cb[c])throw Error(k(102,c));cb[c]=
-d;b=!0}}b&&nf()}function qf(a){if(a=rf(a)){if("function"!==typeof sd)throw Error(k(280));var b=a.stateNode;b&&(b=td(b),sd(a.stateNode,a.type,b))}}function sf(a){eb?fb?fb.push(a):fb=[a]:eb=a}function tf(){if(eb){var a=eb,b=fb;fb=eb=null;qf(a);if(b)for(a=0;a<b.length;a++)qf(b[a])}}function ud(){if(null!==eb||null!==fb)vd(),tf()}function uf(a,b,c){if(wd)return a(b,c);wd=!0;try{return vf(a,b,c)}finally{wd=!1,ud()}}function ni(a){if(wf.call(xf,a))return!0;if(wf.call(yf,a))return!1;if(oi.test(a))return xf[a]=
-!0;yf[a]=!0;return!1}function pi(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function qi(a,b,c,d){if(null===b||"undefined"===typeof b||pi(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function L(a,
-b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}function xd(a,b,c,d){var e=E.hasOwnProperty(b)?E[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(qi(b,c,e,d)&&(c=null),d||null===e?ni(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,
-d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}function zb(a){if(null===a||"object"!==typeof a)return null;a=zf&&a[zf]||a["@@iterator"];return"function"===typeof a?a:null}function ri(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}function na(a){if(null==a)return null;
-if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Ma:return"Fragment";case gb:return"Portal";case kc:return"Profiler";case Af:return"StrictMode";case lc:return"Suspense";case yd:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Bf:return"Context.Consumer";case Cf:return"Context.Provider";case zd:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Ad:return na(a.type);
-case Df:return na(a.render);case Ef:if(a=1===a._status?a._result:null)return na(a)}return null}function Bd(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=a._debugSource,f=na(a.type);c=null;d&&(c=na(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(si,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}function va(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;
-default:return""}}function Ff(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function ti(a){var b=Ff(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,
-b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}}function mc(a){a._valueTracker||(a._valueTracker=ti(a))}function Gf(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ff(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Cd(a,b){var c=b.checked;return M({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=
-c?c:a._wrapperState.initialChecked})}function Hf(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=va(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function If(a,b){b=b.checked;null!=b&&xd(a,"checked",b,!1)}function Dd(a,b){If(a,b);var c=va(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==
-""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Ed(a,b.type,c):b.hasOwnProperty("defaultValue")&&Ed(a,b.type,va(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function Jf(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=
-b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function Ed(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function ui(a){var b="";ea.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Fd(a,b){a=M({children:void 0},b);if(b=ui(b.children))a.children=b;return a}function hb(a,b,c,d){a=a.options;if(b){b={};
-for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+va(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function Gd(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(k(91));return M({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}
-function Kf(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(k(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(k(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:va(c)}}function Lf(a,b){var c=va(b.value),d=va(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Mf(a,b){b=a.textContent;b===a._wrapperState.initialValue&&""!==
-b&&null!==b&&(a.value=b)}function Nf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Hd(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Nf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function nc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function oc(a){if(Id[a])return Id[a];
-if(!ib[a])return a;var b=ib[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Of)return Id[a]=b[c];return a}function Jd(a){var b=Pf.get(a);void 0===b&&(b=new Map,Pf.set(a,b));return b}function Na(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function Qf(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Rf(a){if(Na(a)!==
-a)throw Error(k(188));}function vi(a){var b=a.alternate;if(!b){b=Na(a);if(null===b)throw Error(k(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Rf(e),a;if(f===d)return Rf(e),b;f=f.sibling}throw Error(k(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=
-f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(k(189));}}if(c.alternate!==d)throw Error(k(190));}if(3!==c.tag)throw Error(k(188));return c.stateNode.current===c?a:b}function Sf(a){a=vi(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}function jb(a,b){if(null==
-b)throw Error(k(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function Kd(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function pc(a){null!==a&&(Ab=jb(Ab,a));a=Ab;Ab=null;if(a){Kd(a,wi);if(Ab)throw Error(k(95));if(hc)throw a=pd,hc=!1,pd=null,a;}}function Ld(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:
-a}function Tf(a){if(!wa)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function Uf(a){a.topLevelType=null;a.nativeEvent=null;a.targetInst=null;a.ancestors.length=0;10>qc.length&&qc.push(a)}function Vf(a,b,c,d){if(qc.length){var e=qc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}function Wf(a){var b=
-a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=Bb(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=Ld(a.nativeEvent);d=a.topLevelType;var f=a.nativeEvent,g=a.eventSystemFlags;0===c&&(g|=64);for(var h=null,m=0;m<jc.length;m++){var n=jc[m];n&&(n=n.extractEvents(d,b,f,e,g))&&(h=jb(h,n))}pc(h)}}function Md(a,
-b,c){if(!c.has(a)){switch(a){case "scroll":Cb(b,"scroll",!0);break;case "focus":case "blur":Cb(b,"focus",!0);Cb(b,"blur",!0);c.set("blur",null);c.set("focus",null);break;case "cancel":case "close":Tf(a)&&Cb(b,a,!0);break;case "invalid":case "submit":case "reset":break;default:-1===Db.indexOf(a)&&w(a,b)}c.set(a,null)}}function xi(a,b){var c=Jd(b);Nd.forEach(function(a){Md(a,b,c)});yi.forEach(function(a){Md(a,b,c)})}function Od(a,b,c,d,e){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:e,
-container:d}}function Xf(a,b){switch(a){case "focus":case "blur":xa=null;break;case "dragenter":case "dragleave":ya=null;break;case "mouseover":case "mouseout":za=null;break;case "pointerover":case "pointerout":Eb.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Fb.delete(b.pointerId)}}function Gb(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=Od(b,c,d,e,f),null!==b&&(b=Hb(b),null!==b&&Yf(b)),a;a.eventSystemFlags|=d;return a}function zi(a,b,c,d,e){switch(b){case "focus":return xa=
-Gb(xa,a,b,c,d,e),!0;case "dragenter":return ya=Gb(ya,a,b,c,d,e),!0;case "mouseover":return za=Gb(za,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Eb.set(f,Gb(Eb.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Fb.set(f,Gb(Fb.get(f)||null,a,b,c,d,e)),!0}return!1}function Ai(a){var b=Bb(a.target);if(null!==b){var c=Na(b);if(null!==c)if(b=c.tag,13===b){if(b=Qf(c),null!==b){a.blockedOn=b;Pd(a.priority,function(){Bi(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=
-3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function rc(a){if(null!==a.blockedOn)return!1;var b=Qd(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);if(null!==b){var c=Hb(b);null!==c&&Yf(c);a.blockedOn=b;return!1}return!0}function Zf(a,b,c){rc(a)&&c.delete(b)}function Ci(){for(Rd=!1;0<fa.length;){var a=fa[0];if(null!==a.blockedOn){a=Hb(a.blockedOn);null!==a&&Di(a);break}var b=Qd(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);null!==b?a.blockedOn=b:fa.shift()}null!==
-xa&&rc(xa)&&(xa=null);null!==ya&&rc(ya)&&(ya=null);null!==za&&rc(za)&&(za=null);Eb.forEach(Zf);Fb.forEach(Zf)}function Ib(a,b){a.blockedOn===b&&(a.blockedOn=null,Rd||(Rd=!0,$f(ag,Ci)))}function bg(a){if(0<fa.length){Ib(fa[0],a);for(var b=1;b<fa.length;b++){var c=fa[b];c.blockedOn===a&&(c.blockedOn=null)}}null!==xa&&Ib(xa,a);null!==ya&&Ib(ya,a);null!==za&&Ib(za,a);b=function(b){return Ib(b,a)};Eb.forEach(b);Fb.forEach(b);for(b=0;b<Jb.length;b++)c=Jb[b],c.blockedOn===a&&(c.blockedOn=null);for(;0<Jb.length&&
-(b=Jb[0],null===b.blockedOn);)Ai(b),null===b.blockedOn&&Jb.shift()}function Sd(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f="on"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+"Capture"},dependencies:[d],eventPriority:b};Td.set(d,b);cg.set(d,f);dg[e]=f}}function w(a,b){Cb(b,a,!1)}function Cb(a,b,c){var d=Td.get(b);switch(void 0===d?2:d){case 0:d=Ei.bind(null,b,1,a);break;case 1:d=Fi.bind(null,b,1,a);break;default:d=sc.bind(null,b,1,a)}c?a.addEventListener(b,
-d,!0):a.addEventListener(b,d,!1)}function Ei(a,b,c,d){Oa||vd();var e=sc,f=Oa;Oa=!0;try{eg(e,a,b,c,d)}finally{(Oa=f)||ud()}}function Fi(a,b,c,d){Gi(Hi,sc.bind(null,a,b,c,d))}function sc(a,b,c,d){if(tc)if(0<fa.length&&-1<Nd.indexOf(a))a=Od(null,a,b,c,d),fa.push(a);else{var e=Qd(a,b,c,d);if(null===e)Xf(a,d);else if(-1<Nd.indexOf(a))a=Od(e,a,b,c,d),fa.push(a);else if(!zi(e,a,b,c,d)){Xf(a,d);a=Vf(a,d,null,b);try{uf(Wf,a)}finally{Uf(a)}}}}function Qd(a,b,c,d){c=Ld(d);c=Bb(c);if(null!==c){var e=Na(c);if(null===
-e)c=null;else{var f=e.tag;if(13===f){c=Qf(e);if(null!==c)return c;c=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null}else e!==c&&(c=null)}}a=Vf(a,d,c,b);try{uf(Wf,a)}finally{Uf(a)}return null}function fg(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Kb.hasOwnProperty(a)&&Kb[a]?(""+b).trim():b+"px"}function gg(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=fg(c,b[c],d);"float"===
-c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function Ud(a,b){if(b){if(Ii[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(k(137,a,""));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(k(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(k(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(k(62,""));}}function Vd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;
-default:return!0}}function oa(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Jd(a);b=rd[b];for(var d=0;d<b.length;d++)Md(b[d],a,c)}function uc(){}function Wd(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function hg(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function ig(a,b){var c=hg(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,
-offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=hg(c)}}function jg(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?jg(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function kg(){for(var a=window,b=Wd();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Wd(a.document)}return b}
-function Xd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function lg(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}function Yd(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&
-null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function kb(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function mg(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===ng||c===Zd||c===$d){if(0===b)return a;b--}else c===og&&b++}a=a.previousSibling}return null}function Bb(a){var b=a[Aa];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Lb]||c[Aa]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=mg(a);null!==
-a;){if(c=a[Aa])return c;a=mg(a)}return b}a=c;c=a.parentNode}return null}function Hb(a){a=a[Aa]||a[Lb];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pa(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(k(33));}function ae(a){return a[vc]||null}function pa(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function pg(a,b){var c=a.stateNode;if(!c)return null;var d=td(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=
-!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(k(231,b,typeof c));return c}function qg(a,b,c){if(b=pg(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=jb(c._dispatchListeners,b),c._dispatchInstances=jb(c._dispatchInstances,a)}function Ji(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=pa(b);for(b=c.length;0<b--;)qg(c[b],
-"captured",a);for(b=0;b<c.length;b++)qg(c[b],"bubbled",a)}}function be(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=pg(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=jb(c._dispatchListeners,b),c._dispatchInstances=jb(c._dispatchInstances,a))}function Ki(a){a&&a.dispatchConfig.registrationName&&be(a._targetInst,null,a)}function lb(a){Kd(a,Ji)}function rg(){if(wc)return wc;var a,b=ce,c=b.length,d,e="value"in Ba?Ba.value:Ba.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=
-c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return wc=e.slice(a,1<d?1-d:void 0)}function xc(){return!0}function yc(){return!1}function R(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?xc:yc;this.isPropagationStopped=yc;return this}function Li(a,b,c,d){if(this.eventPool.length){var e=
-this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}function Mi(a){if(!(a instanceof this))throw Error(k(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function sg(a){a.eventPool=[];a.getPooled=Li;a.release=Mi}function tg(a,b){switch(a){case "keyup":return-1!==Ni.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function ug(a){a=a.detail;return"object"===typeof a&&"data"in
-a?a.data:null}function Oi(a,b){switch(a){case "compositionend":return ug(b);case "keypress":if(32!==b.which)return null;vg=!0;return wg;case "textInput":return a=b.data,a===wg&&vg?null:a;default:return null}}function Pi(a,b){if(mb)return"compositionend"===a||!de&&tg(a,b)?(a=rg(),wc=ce=Ba=null,mb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;
-case "compositionend":return xg&&"ko"!==b.locale?null:b.data;default:return null}}function yg(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Qi[a.type]:"textarea"===b?!0:!1}function zg(a,b,c){a=R.getPooled(Ag.change,a,b,c);a.type="change";sf(c);lb(a);return a}function Ri(a){pc(a)}function zc(a){var b=Pa(a);if(Gf(b))return a}function Si(a,b){if("change"===a)return b}function Bg(){Mb&&(Mb.detachEvent("onpropertychange",Cg),Nb=Mb=null)}function Cg(a){if("value"===a.propertyName&&
-zc(Nb))if(a=zg(Nb,a,Ld(a)),Oa)pc(a);else{Oa=!0;try{ee(Ri,a)}finally{Oa=!1,ud()}}}function Ti(a,b,c){"focus"===a?(Bg(),Mb=b,Nb=c,Mb.attachEvent("onpropertychange",Cg)):"blur"===a&&Bg()}function Ui(a,b){if("selectionchange"===a||"keyup"===a||"keydown"===a)return zc(Nb)}function Vi(a,b){if("click"===a)return zc(b)}function Wi(a,b){if("input"===a||"change"===a)return zc(b)}function Xi(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Yi[a])?!!b[a]:!1}function fe(a){return Xi}
-function Zi(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function Ob(a,b){if(Qa(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!$i.call(b,c[d])||!Qa(a[c[d]],b[c[d]]))return!1;return!0}function Dg(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(ge||null==nb||nb!==Wd(c))return null;c=nb;"selectionStart"in c&&Xd(c)?c={start:c.selectionStart,
-end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return Pb&&Ob(Pb,c)?null:(Pb=c,a=R.getPooled(Eg.select,he,a,b),a.type="select",a.target=nb,lb(a),a)}function Ac(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function q(a,b){0>ob||(a.current=ie[ob],ie[ob]=null,ob--)}function y(a,b,c){ob++;
-ie[ob]=a.current;a.current=b}function pb(a,b){var c=a.type.contextTypes;if(!c)return Ca;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function N(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Fg(a,b,c){if(B.current!==Ca)throw Error(k(168));y(B,b);y(G,c)}
-function Gg(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(k(108,na(b)||"Unknown",e));return M({},c,{},d)}function Bc(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ca;Ra=B.current;y(B,a);y(G,G.current);return!0}function Hg(a,b,c){var d=a.stateNode;if(!d)throw Error(k(169));c?(a=Gg(a,b,Ra),d.__reactInternalMemoizedMergedChildContext=a,q(G),q(B),y(B,a)):q(G);y(G,c)}function Cc(){switch(aj()){case Dc:return 99;
-case Ig:return 98;case Jg:return 97;case Kg:return 96;case Lg:return 95;default:throw Error(k(332));}}function Mg(a){switch(a){case 99:return Dc;case 98:return Ig;case 97:return Jg;case 96:return Kg;case 95:return Lg;default:throw Error(k(332));}}function Da(a,b){a=Mg(a);return bj(a,b)}function Ng(a,b,c){a=Mg(a);return je(a,b,c)}function Og(a){null===qa?(qa=[a],Ec=je(Dc,Pg)):qa.push(a);return Qg}function ha(){if(null!==Ec){var a=Ec;Ec=null;Rg(a)}Pg()}function Pg(){if(!ke&&null!==qa){ke=!0;var a=0;
-try{var b=qa;Da(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});qa=null}catch(c){throw null!==qa&&(qa=qa.slice(a+1)),je(Dc,ha),c;}finally{ke=!1}}}function Fc(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function aa(a,b){if(a&&a.defaultProps){b=M({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}function le(){Gc=qb=Hc=null}function me(a){var b=Ic.current;q(Ic);a.type._context._currentValue=b}function Sg(a,b){for(;null!==a;){var c=
-a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function rb(a,b){Hc=a;Gc=qb=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(ia=!0),a.firstContext=null)}function W(a,b){if(Gc!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)Gc=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===qb){if(null===
-Hc)throw Error(k(308));qb=b;Hc.dependencies={expirationTime:0,firstContext:b,responders:null}}else qb=qb.next=b}return a._currentValue}function ne(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function oe(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function Ea(a,b){a={expirationTime:a,suspenseConfig:b,tag:Tg,payload:null,callback:null,next:null};return a.next=
-a}function Fa(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}function Ug(a,b){var c=a.alternate;null!==c&&oe(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}function Qb(a,b,c,d){var e=a.updateQueue;Ga=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&
-(h.baseQueue=g))}if(null!==f){h=f.next;var m=e.baseState,n=0,k=null,ba=null,l=null;if(null!==h){var p=h;do{g=p.expirationTime;if(g<d){var t={expirationTime:p.expirationTime,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null};null===l?(ba=l=t,k=m):l=l.next=t;g>n&&(n=g)}else{null!==l&&(l=l.next={expirationTime:1073741823,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null});Vg(g,p.suspenseConfig);a:{var q=a,r=p;g=b;t=c;switch(r.tag){case 1:q=
-r.payload;if("function"===typeof q){m=q.call(t,m,g);break a}m=q;break a;case 3:q.effectTag=q.effectTag&-4097|64;case Tg:q=r.payload;g="function"===typeof q?q.call(t,m,g):q;if(null===g||void 0===g)break a;m=M({},m,g);break a;case Jc:Ga=!0}}null!==p.callback&&(a.effectTag|=32,g=e.effects,null===g?e.effects=[p]:g.push(p))}p=p.next;if(null===p||p===h)if(g=e.shared.pending,null===g)break;else p=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===l?k=m:l.next=ba;e.baseState=k;e.baseQueue=
-l;Kc(n);a.expirationTime=n;a.memoizedState=m}}function Wg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=e;e=c;if("function"!==typeof d)throw Error(k(191,d));d.call(e)}}}function Lc(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:M({},b,c);a.memoizedState=c;0===a.expirationTime&&(a.updateQueue.baseState=c)}function Xg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,
-f,g):b.prototype&&b.prototype.isPureReactComponent?!Ob(c,d)||!Ob(e,f):!0}function Yg(a,b,c){var d=!1,e=Ca;var f=b.contextType;"object"===typeof f&&null!==f?f=W(f):(e=N(b)?Ra:B.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?pb(a,e):Ca);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Mc;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}function Zg(a,
-b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Mc.enqueueReplaceState(b,b.state,null)}function pe(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=$g;ne(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=W(f):(f=N(b)?Ra:B.current,e.context=pb(a,f));Qb(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;
-"function"===typeof f&&(Lc(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Mc.enqueueReplaceState(e,e.state,null),Qb(a,c,e,d),e.state=a.memoizedState);"function"===
-typeof e.componentDidMount&&(a.effectTag|=4)}function Rb(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(k(309));var d=c.stateNode}if(!d)throw Error(k(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===$g&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(k(284));if(!c._owner)throw Error(k(290,
-a));}return a}function Nc(a,b){if("textarea"!==a.type)throw Error(k(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,""));}function ah(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,
-b),b=b.sibling;return a}function e(a,b){a=Sa(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=qe(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function m(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Rb(a,b,c),d.return=a,d;d=Oc(c.type,
-c.key,c.props,null,a.mode,d);d.ref=Rb(a,b,c);d.return=a;return d}function n(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=re(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function l(a,b,c,d,f){if(null===b||7!==b.tag)return b=Ha(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function ba(a,b,c){if("string"===typeof b||"number"===typeof b)return b=qe(""+b,a.mode,c),b.return=a,b;if("object"===
-typeof b&&null!==b){switch(b.$$typeof){case Pc:return c=Oc(b.type,b.key,b.props,null,a.mode,c),c.ref=Rb(a,null,b),c.return=a,c;case gb:return b=re(b,a.mode,c),b.return=a,b}if(Qc(b)||zb(b))return b=Ha(b,a.mode,c,null),b.return=a,b;Nc(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Pc:return c.key===e?c.type===Ma?l(a,b,c.props.children,d,e):m(a,b,c,
-d):null;case gb:return c.key===e?n(a,b,c,d):null}if(Qc(c)||zb(c))return null!==e?null:l(a,b,c,d,null);Nc(a,c)}return null}function t(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Pc:return a=a.get(null===d.key?c:d.key)||null,d.type===Ma?l(b,a,d.props.children,e,d.key):m(b,a,d,e);case gb:return a=a.get(null===d.key?c:d.key)||null,n(b,a,d,e)}if(Qc(d)||zb(d))return a=a.get(c)||null,l(b,a,d,e,null);
-Nc(b,d)}return null}function q(e,g,h,m){for(var n=null,k=null,l=g,r=g=0,C=null;null!==l&&r<h.length;r++){l.index>r?(C=l,l=null):C=l.sibling;var O=p(e,l,h[r],m);if(null===O){null===l&&(l=C);break}a&&l&&null===O.alternate&&b(e,l);g=f(O,g,r);null===k?n=O:k.sibling=O;k=O;l=C}if(r===h.length)return c(e,l),n;if(null===l){for(;r<h.length;r++)l=ba(e,h[r],m),null!==l&&(g=f(l,g,r),null===k?n=l:k.sibling=l,k=l);return n}for(l=d(e,l);r<h.length;r++)C=t(l,e,r,h[r],m),null!==C&&(a&&null!==C.alternate&&l.delete(null===
-C.key?r:C.key),g=f(C,g,r),null===k?n=C:k.sibling=C,k=C);a&&l.forEach(function(a){return b(e,a)});return n}function w(e,g,h,n){var m=zb(h);if("function"!==typeof m)throw Error(k(150));h=m.call(h);if(null==h)throw Error(k(151));for(var l=m=null,r=g,C=g=0,O=null,v=h.next();null!==r&&!v.done;C++,v=h.next()){r.index>C?(O=r,r=null):O=r.sibling;var q=p(e,r,v.value,n);if(null===q){null===r&&(r=O);break}a&&r&&null===q.alternate&&b(e,r);g=f(q,g,C);null===l?m=q:l.sibling=q;l=q;r=O}if(v.done)return c(e,r),m;
-if(null===r){for(;!v.done;C++,v=h.next())v=ba(e,v.value,n),null!==v&&(g=f(v,g,C),null===l?m=v:l.sibling=v,l=v);return m}for(r=d(e,r);!v.done;C++,v=h.next())v=t(r,e,C,v.value,n),null!==v&&(a&&null!==v.alternate&&r.delete(null===v.key?C:v.key),g=f(v,g,C),null===l?m=v:l.sibling=v,l=v);a&&r.forEach(function(a){return b(e,a)});return m}return function(a,d,f,h){var m="object"===typeof f&&null!==f&&f.type===Ma&&null===f.key;m&&(f=f.props.children);var n="object"===typeof f&&null!==f;if(n)switch(f.$$typeof){case Pc:a:{n=
-f.key;for(m=d;null!==m;){if(m.key===n){switch(m.tag){case 7:if(f.type===Ma){c(a,m.sibling);d=e(m,f.props.children);d.return=a;a=d;break a}break;default:if(m.elementType===f.type){c(a,m.sibling);d=e(m,f.props);d.ref=Rb(a,m,f);d.return=a;a=d;break a}}c(a,m);break}else b(a,m);m=m.sibling}f.type===Ma?(d=Ha(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Oc(f.type,f.key,f.props,null,a.mode,h),h.ref=Rb(a,d,f),h.return=a,a=h)}return g(a);case gb:a:{for(m=f.key;null!==d;){if(d.key===m)if(4===d.tag&&d.stateNode.containerInfo===
-f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=re(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=qe(f,a.mode,h),d.return=a,a=d),g(a);if(Qc(f))return q(a,d,f,h);if(zb(f))return w(a,d,f,h);n&&Nc(a,f);if("undefined"===typeof f&&!m)switch(a.tag){case 1:case 0:throw a=
-a.type,Error(k(152,a.displayName||a.name||"Component"));}return c(a,d)}}function Ta(a){if(a===Sb)throw Error(k(174));return a}function se(a,b){y(Tb,b);y(Ub,a);y(ja,Sb);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Hd(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Hd(b,a)}q(ja);y(ja,b)}function tb(a){q(ja);q(Ub);q(Tb)}function bh(a){Ta(Tb.current);var b=Ta(ja.current);var c=Hd(b,a.type);b!==c&&(y(Ub,a),y(ja,c))}function te(a){Ub.current===
-a&&(q(ja),q(Ub))}function Rc(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===$d||c.data===Zd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ue(a,b){return{responder:a,props:b}}
-function S(){throw Error(k(321));}function ve(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!Qa(a[c],b[c]))return!1;return!0}function we(a,b,c,d,e,f){Ia=f;z=b;b.memoizedState=null;b.updateQueue=null;b.expirationTime=0;Sc.current=null===a||null===a.memoizedState?dj:ej;a=c(d,e);if(b.expirationTime===Ia){f=0;do{b.expirationTime=0;if(!(25>f))throw Error(k(301));f+=1;J=K=null;b.updateQueue=null;Sc.current=fj;a=c(d,e)}while(b.expirationTime===Ia)}Sc.current=Tc;b=null!==K&&null!==K.next;
-Ia=0;J=K=z=null;Uc=!1;if(b)throw Error(k(300));return a}function ub(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===J?z.memoizedState=J=a:J=J.next=a;return J}function vb(){if(null===K){var a=z.alternate;a=null!==a?a.memoizedState:null}else a=K.next;var b=null===J?z.memoizedState:J.next;if(null!==b)J=b,K=a;else{if(null===a)throw Error(k(310));K=a;a={memoizedState:K.memoizedState,baseState:K.baseState,baseQueue:K.baseQueue,queue:K.queue,next:null};null===J?z.memoizedState=
-J=a:J=J.next=a}return J}function Ua(a,b){return"function"===typeof b?b(a):b}function Vc(a,b,c){b=vb();c=b.queue;if(null===c)throw Error(k(311));c.lastRenderedReducer=a;var d=K,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,m=e;do{var n=m.expirationTime;if(n<Ia){var l={expirationTime:m.expirationTime,suspenseConfig:m.suspenseConfig,action:m.action,eagerReducer:m.eagerReducer,eagerState:m.eagerState,
-next:null};null===h?(g=h=l,f=d):h=h.next=l;n>z.expirationTime&&(z.expirationTime=n,Kc(n))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:m.suspenseConfig,action:m.action,eagerReducer:m.eagerReducer,eagerState:m.eagerState,next:null}),Vg(n,m.suspenseConfig),d=m.eagerReducer===a?m.eagerState:a(d,m.action);m=m.next}while(null!==m&&m!==e);null===h?f=d:h.next=g;Qa(d,b.memoizedState)||(ia=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,
-c.dispatch]}function Wc(a,b,c){b=vb();c=b.queue;if(null===c)throw Error(k(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);Qa(f,b.memoizedState)||(ia=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function xe(a){var b=ub();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Ua,
-lastRenderedState:a};a=a.dispatch=ch.bind(null,z,a);return[b.memoizedState,a]}function ye(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=z.updateQueue;null===b?(b={lastEffect:null},z.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function dh(a){return vb().memoizedState}function ze(a,b,c,d){var e=ub();z.effectTag|=a;e.memoizedState=ye(1|b,c,void 0,void 0===d?null:d)}function Ae(a,b,c,d){var e=vb();
-d=void 0===d?null:d;var f=void 0;if(null!==K){var g=K.memoizedState;f=g.destroy;if(null!==d&&ve(d,g.deps)){ye(b,c,f,d);return}}z.effectTag|=a;e.memoizedState=ye(1|b,c,f,d)}function eh(a,b){return ze(516,4,a,b)}function Xc(a,b){return Ae(516,4,a,b)}function fh(a,b){return Ae(4,2,a,b)}function gh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function hh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;
-return Ae(4,2,gh.bind(null,b,a),c)}function Be(a,b){}function ih(a,b){ub().memoizedState=[a,void 0===b?null:b];return a}function Yc(a,b){var c=vb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&ve(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function jh(a,b){var c=vb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&ve(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Ce(a,b,c){var d=Cc();Da(98>d?98:d,function(){a(!0)});Da(97<d?97:d,function(){var d=
-X.suspense;X.suspense=void 0===b?null:b;try{a(!1),c()}finally{X.suspense=d}})}function ch(a,b,c){var d=ka(),e=Vb.suspense;d=Va(d,a,e);e={expirationTime:d,suspenseConfig:e,action:c,eagerReducer:null,eagerState:null,next:null};var f=b.pending;null===f?e.next=e:(e.next=f.next,f.next=e);b.pending=e;f=a.alternate;if(a===z||null!==f&&f===z)Uc=!0,e.expirationTime=Ia,z.expirationTime=Ia;else{if(0===a.expirationTime&&(null===f||0===f.expirationTime)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,
-h=f(g,c);e.eagerReducer=f;e.eagerState=h;if(Qa(h,g))return}catch(m){}finally{}Ja(a,d)}}function kh(a,b){var c=la(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function lh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?
-null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}function De(a){if(Wa){var b=Ka;if(b){var c=b;if(!lh(a,b)){b=kb(c.nextSibling);if(!b||!lh(a,b)){a.effectTag=a.effectTag&-1025|2;Wa=!1;ra=a;return}kh(ra,c)}ra=a;Ka=kb(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,Wa=!1,ra=a}}function mh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;ra=a}function Zc(a){if(a!==ra)return!1;if(!Wa)return mh(a),Wa=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==
-b&&!Yd(b,a.memoizedProps))for(b=Ka;b;)kh(a,b),b=kb(b.nextSibling);mh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(k(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===og){if(0===b){Ka=kb(a.nextSibling);break a}b--}else c!==ng&&c!==Zd&&c!==$d||b++}a=a.nextSibling}Ka=null}}else Ka=ra?kb(a.stateNode.nextSibling):null;return!0}function Ee(){Ka=ra=null;Wa=!1}function T(a,b,c,d){b.child=null===a?Fe(b,null,c,d):wb(b,a.child,c,d)}function nh(a,
-b,c,d,e){c=c.render;var f=b.ref;rb(b,e);d=we(a,b,c,d,f,e);if(null!==a&&!ia)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),sa(a,b,e);b.effectTag|=1;T(a,b,d,e);return b.child}function oh(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!Ge(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ph(a,b,g,d,e,f);a=Oc(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<
-f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Ob,c(e,d)&&a.ref===b.ref))return sa(a,b,f);b.effectTag|=1;a=Sa(g,d);a.ref=b.ref;a.return=b;return b.child=a}function ph(a,b,c,d,e,f){return null!==a&&Ob(a.memoizedProps,d)&&a.ref===b.ref&&(ia=!1,e<f)?(b.expirationTime=a.expirationTime,sa(a,b,f)):He(a,b,c,d,f)}function qh(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function He(a,b,c,d,e){var f=N(c)?Ra:B.current;f=pb(b,f);rb(b,e);c=we(a,b,c,d,f,e);if(null!==a&&!ia)return b.updateQueue=
-a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),sa(a,b,e);b.effectTag|=1;T(a,b,c,e);return b.child}function rh(a,b,c,d,e){if(N(c)){var f=!0;Bc(b)}else f=!1;rb(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Yg(b,c,d),pe(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var m=g.context,n=c.contextType;"object"===typeof n&&null!==n?n=W(n):(n=N(c)?Ra:B.current,n=pb(b,n));var l=c.getDerivedStateFromProps,k="function"===
-typeof l||"function"===typeof g.getSnapshotBeforeUpdate;k||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||m!==n)&&Zg(b,g,d,n);Ga=!1;var p=b.memoizedState;g.state=p;Qb(b,d,g,e);m=b.memoizedState;h!==d||p!==m||G.current||Ga?("function"===typeof l&&(Lc(b,c,l,d),m=b.memoizedState),(h=Ga||Xg(b,c,h,d,p,m,n))?(k||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&
-g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.effectTag|=4)):("function"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=m),g.props=d,g.state=m,g.context=n,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,oe(a,b),h=b.memoizedProps,g.props=b.type===b.elementType?h:aa(b.type,h),m=g.context,n=c.contextType,"object"===typeof n&&null!==
-n?n=W(n):(n=N(c)?Ra:B.current,n=pb(b,n)),l=c.getDerivedStateFromProps,(k="function"===typeof l||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||m!==n)&&Zg(b,g,d,n),Ga=!1,m=b.memoizedState,g.state=m,Qb(b,d,g,e),p=b.memoizedState,h!==d||m!==p||G.current||Ga?("function"===typeof l&&(Lc(b,c,l,d),p=b.memoizedState),(l=Ga||Xg(b,c,h,d,m,p,n))?(k||"function"!==typeof g.UNSAFE_componentWillUpdate&&
-"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,p,n),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,p,n)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&m===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&m===
-a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=p),g.props=d,g.state=p,g.context=n,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&m===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&m===a.memoizedState||(b.effectTag|=256),d=!1);return Ie(a,b,c,d,f,e)}function Ie(a,b,c,d,e,f){qh(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Hg(b,c,!1),sa(a,b,f);d=b.stateNode;gj.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?
-null:d.render();b.effectTag|=1;null!==a&&g?(b.child=wb(b,a.child,null,f),b.child=wb(b,null,h,f)):T(a,b,h,f);b.memoizedState=d.state;e&&Hg(b,c,!0);return b.child}function sh(a){var b=a.stateNode;b.pendingContext?Fg(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Fg(a,b.context,!1);se(a,b.containerInfo)}function th(a,b,c){var d=b.mode,e=b.pendingProps,f=D.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===
-a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);y(D,f&1);if(null===a){void 0!==e.fallback&&De(b);if(g){g=e.fallback;e=Ha(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Ha(g,d,c,null);c.return=b;e.sibling=c;b.memoizedState=Je;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Fe(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;
-c=Sa(a,a.pendingProps);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;d=Sa(d,e);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=Je;b.child=c;return d}c=wb(b,a.child,e.children,c);b.memoizedState=null;return b.child=c}a=a.child;if(g){g=e.fallback;e=Ha(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==
-a;)a.return=e,a=a.sibling;c=Ha(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=Je;b.child=e;return c}b.memoizedState=null;return b.child=wb(b,a,e.children,c)}function uh(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);Sg(a.return,b)}function Ke(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailExpiration:0,tailMode:e,
-lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}function vh(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;T(a,b,d.children,c);d=D.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&uh(a,c);else if(19===a.tag)uh(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===
-a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}y(D,d);if(0===(b.mode&2))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Rc(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ke(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Rc(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ke(b,
-!0,c,null,f,b.lastEffect);break;case "together":Ke(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}function sa(a,b,c){null!==a&&(b.dependencies=a.dependencies);var d=b.expirationTime;0!==d&&Kc(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(k(153));if(null!==b.child){a=b.child;c=Sa(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Sa(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}
-function $c(a,b){switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}function hj(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return N(b.type)&&(q(G),q(B)),
-null;case 3:return tb(),q(G),q(B),c=b.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==a&&null!==a.child||!Zc(b)||(b.effectTag|=4),wh(b),null;case 5:te(b);c=Ta(Tb.current);var e=b.type;if(null!==a&&null!=b.stateNode)ij(a,b,e,d,c),a.ref!==b.ref&&(b.effectTag|=128);else{if(!d){if(null===b.stateNode)throw Error(k(166));return null}a=Ta(ja.current);if(Zc(b)){d=b.stateNode;e=b.type;var f=b.memoizedProps;d[Aa]=b;d[vc]=f;switch(e){case "iframe":case "object":case "embed":w("load",
-d);break;case "video":case "audio":for(a=0;a<Db.length;a++)w(Db[a],d);break;case "source":w("error",d);break;case "img":case "image":case "link":w("error",d);w("load",d);break;case "form":w("reset",d);w("submit",d);break;case "details":w("toggle",d);break;case "input":Hf(d,f);w("invalid",d);oa(c,"onChange");break;case "select":d._wrapperState={wasMultiple:!!f.multiple};w("invalid",d);oa(c,"onChange");break;case "textarea":Kf(d,f),w("invalid",d),oa(c,"onChange")}Ud(e,f);a=null;for(var g in f)if(f.hasOwnProperty(g)){var h=
-f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(a=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(a=["children",""+h]):db.hasOwnProperty(g)&&null!=h&&oa(c,g)}switch(e){case "input":mc(d);Jf(d,f,!0);break;case "textarea":mc(d);Mf(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=uc)}c=a;b.updateQueue=c;null!==c&&(b.effectTag|=4)}else{g=9===c.nodeType?c:c.ownerDocument;"http://www.w3.org/1999/xhtml"===a&&(a=Nf(e));"http://www.w3.org/1999/xhtml"===
-a?"script"===e?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),"select"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Aa]=b;a[vc]=d;jj(a,b,!1,!1);b.stateNode=a;g=Vd(e,d);switch(e){case "iframe":case "object":case "embed":w("load",a);h=d;break;case "video":case "audio":for(h=0;h<Db.length;h++)w(Db[h],a);h=d;break;case "source":w("error",a);
-h=d;break;case "img":case "image":case "link":w("error",a);w("load",a);h=d;break;case "form":w("reset",a);w("submit",a);h=d;break;case "details":w("toggle",a);h=d;break;case "input":Hf(a,d);h=Cd(a,d);w("invalid",a);oa(c,"onChange");break;case "option":h=Fd(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};h=M({},d,{value:void 0});w("invalid",a);oa(c,"onChange");break;case "textarea":Kf(a,d);h=Gd(a,d);w("invalid",a);oa(c,"onChange");break;default:h=d}Ud(e,h);var m=h;for(f in m)if(m.hasOwnProperty(f)){var n=
-m[f];"style"===f?gg(a,n):"dangerouslySetInnerHTML"===f?(n=n?n.__html:void 0,null!=n&&xh(a,n)):"children"===f?"string"===typeof n?("textarea"!==e||""!==n)&&Wb(a,n):"number"===typeof n&&Wb(a,""+n):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(db.hasOwnProperty(f)?null!=n&&oa(c,f):null!=n&&xd(a,f,n,g))}switch(e){case "input":mc(a);Jf(a,d,!1);break;case "textarea":mc(a);Mf(a);break;case "option":null!=d.value&&a.setAttribute("value",""+va(d.value));break;case "select":a.multiple=
-!!d.multiple;c=d.value;null!=c?hb(a,!!d.multiple,c,!1):null!=d.defaultValue&&hb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof h.onClick&&(a.onclick=uc)}lg(e,d)&&(b.effectTag|=4)}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)kj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(k(166));c=Ta(Tb.current);Ta(ja.current);Zc(b)?(c=b.stateNode,d=b.memoizedProps,c[Aa]=b,c.nodeValue!==d&&(b.effectTag|=4)):(c=(9===c.nodeType?
-c:c.ownerDocument).createTextNode(d),c[Aa]=b,b.stateNode=c)}return null;case 13:q(D);d=b.memoizedState;if(0!==(b.effectTag&64))return b.expirationTime=c,b;c=null!==d;d=!1;null===a?void 0!==b.memoizedProps.fallback&&Zc(b):(e=a.memoizedState,d=null!==e,c||null===e||(e=a.child.sibling,null!==e&&(f=b.firstEffect,null!==f?(b.firstEffect=e,e.nextEffect=f):(b.firstEffect=b.lastEffect=e,e.nextEffect=null),e.effectTag=8)));if(c&&!d&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||
-0!==(D.current&1))F===Xa&&(F=ad);else{if(F===Xa||F===ad)F=bd;0!==Xb&&null!==U&&(Ya(U,P),yh(U,Xb))}if(c||d)b.effectTag|=4;return null;case 4:return tb(),wh(b),null;case 10:return me(b),null;case 17:return N(b.type)&&(q(G),q(B)),null;case 19:q(D);d=b.memoizedState;if(null===d)return null;e=0!==(b.effectTag&64);f=d.rendering;if(null===f)if(e)$c(d,!1);else{if(F!==Xa||null!==a&&0!==(a.effectTag&64))for(f=b.child;null!==f;){a=Rc(f);if(null!==a){b.effectTag|=64;$c(d,!1);e=a.updateQueue;null!==e&&(b.updateQueue=
-e,b.effectTag|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;for(d=b.child;null!==d;)e=d,f=c,e.effectTag&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null,a=e.alternate,null===a?(e.childExpirationTime=0,e.expirationTime=f,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null):(e.childExpirationTime=a.childExpirationTime,e.expirationTime=a.expirationTime,e.child=a.child,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,
-e.updateQueue=a.updateQueue,f=a.dependencies,e.dependencies=null===f?null:{expirationTime:f.expirationTime,firstContext:f.firstContext,responders:f.responders}),d=d.sibling;y(D,D.current&1|2);return b.child}f=f.sibling}}else{if(!e)if(a=Rc(f),null!==a){if(b.effectTag|=64,e=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),$c(d,!0),null===d.tail&&"hidden"===d.tailMode&&!f.alternate)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*Y()-d.renderingStartTime>d.tailExpiration&&
-1<c&&(b.effectTag|=64,e=!0,$c(d,!1),b.expirationTime=b.childExpirationTime=c-1);d.isBackwards?(f.sibling=b.child,b.child=f):(c=d.last,null!==c?c.sibling=f:b.child=f,d.last=f)}return null!==d.tail?(0===d.tailExpiration&&(d.tailExpiration=Y()+500),c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=Y(),c.sibling=null,b=D.current,y(D,e?b&1|2:b&1),c):null}throw Error(k(156,b.tag));}function lj(a,b){switch(a.tag){case 1:return N(a.type)&&(q(G),q(B)),b=a.effectTag,b&4096?
-(a.effectTag=b&-4097|64,a):null;case 3:tb();q(G);q(B);b=a.effectTag;if(0!==(b&64))throw Error(k(285));a.effectTag=b&-4097|64;return a;case 5:return te(a),null;case 13:return q(D),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return q(D),null;case 4:return tb(),null;case 10:return me(a),null;default:return null}}function Le(a,b){return{value:a,source:b,stack:Bd(b)}}function Me(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=Bd(c));null!==c&&na(c.type);b=b.value;null!==a&&1===a.tag&&
-na(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function mj(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Za(a,c)}}function zh(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Za(a,c)}else b.current=null}function nj(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===
-b.type?c:aa(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(k(163));}function Ah(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.destroy;c.destroy=void 0;void 0!==d&&d()}c=c.next}while(c!==b)}}function Bh(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function oj(a,b,c,d){switch(c.tag){case 0:case 11:case 15:case 22:Bh(3,
-c);return;case 1:a=c.stateNode;c.effectTag&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:aa(c.type,b.memoizedProps),a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Wg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Wg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.effectTag&4&&lg(c.type,c.memoizedProps)&&
-a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&bg(c))));return;case 19:case 17:case 20:case 21:return}throw Error(k(163));}function Ch(a,b,c){"function"===typeof Ne&&Ne(b);switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;Da(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){Za(g,
-h)}}a=a.next}while(a!==d)})}break;case 1:zh(b);c=b.stateNode;"function"===typeof c.componentWillUnmount&&mj(b,c);break;case 5:zh(b);break;case 4:Dh(a,b,c)}}function Eh(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;a.stateNode=null;null!==b&&Eh(b)}function Fh(a){return 5===a.tag||3===a.tag||4===a.tag}function Gh(a){a:{for(var b=a.return;null!==
-b;){if(Fh(b)){var c=b;break a}b=b.return}throw Error(k(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(k(161));}c.effectTag&16&&(Wb(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Fh(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;
-else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}d?Oe(a,c,b):Pe(a,c,b)}function Oe(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=uc));else if(4!==d&&(a=a.child,null!==a))for(Oe(a,b,c),a=a.sibling;null!==a;)Oe(a,b,c),a=a.sibling}
-function Pe(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Pe(a,b,c),a=a.sibling;null!==a;)Pe(a,b,c),a=a.sibling}function Dh(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(k(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=
-a,m=d,n=c,l=m;;)if(Ch(h,l,n),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===m)break a;for(;null===l.sibling;){if(null===l.return||l.return===m)break a;l=l.return}l.sibling.return=l.return;l=l.sibling}g?(h=f,m=d.stateNode,8===h.nodeType?h.parentNode.removeChild(m):h.removeChild(m)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Ch(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===
-b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}function Qe(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:Ah(3,b);return;case 1:return;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[vc]=d;"input"===a&&"radio"===d.type&&null!=d.name&&If(c,d);Vd(a,e);b=Vd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],
-h=f[e+1];"style"===g?gg(c,h):"dangerouslySetInnerHTML"===g?xh(c,h):"children"===g?Wb(c,h):xd(c,g,h,b)}switch(a){case "input":Dd(c,d);break;case "textarea":Lf(c,d);break;case "select":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?hb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?hb(c,!!d.multiple,d.defaultValue,!0):hb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(k(162));b.stateNode.nodeValue=b.memoizedProps;
-return;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,bg(b.containerInfo));return;case 12:return;case 13:c=b;null===b.memoizedState?d=!1:(d=!0,c=b.child,Re=Y());if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null,f.style.display=fg("display",e));else if(6===a.tag)a.stateNode.nodeValue=d?
-"":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=f;continue}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===c)break;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}Hh(b);return;case 19:Hh(b);return;case 17:return}throw Error(k(163));}function Hh(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=
-new pj);b.forEach(function(b){var d=qj.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}function Ih(a,b,c){c=Ea(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){cd||(cd=!0,Se=d);Me(a,b)};return c}function Jh(a,b,c){c=Ea(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Me(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&
-(null===La?La=new Set([this]):La.add(this),Me(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}function ka(){return(p&(ca|ma))!==H?1073741821-(Y()/10|0):0!==dd?dd:dd=1073741821-(Y()/10|0)}function Va(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=Cc();if(0===(b&4))return 99===d?1073741823:1073741822;if((p&ca)!==H)return P;if(null!==c)a=Fc(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=Fc(a,150,100);break;case 97:case 96:a=
-Fc(a,5E3,250);break;case 95:a=2;break;default:throw Error(k(326));}null!==U&&a===P&&--a;return a}function ed(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&
-(U===e&&(Kc(b),F===bd&&Ya(e,P)),yh(e,b));return e}function fd(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Kh(a,b))return b;var c=a.lastPingedTime;a=a.nextKnownPendingLevel;a=c>a?c:a;return 2>=a&&b!==a?0:a}function V(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=Og(Te.bind(null,a));else{var b=fd(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=ka();
-1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Qg&&Rg(c)}a.callbackExpirationTime=b;a.callbackPriority=d;b=1073741823===b?Og(Te.bind(null,a)):Ng(d,Lh.bind(null,a),{timeout:10*(1073741821-b)-Y()});a.callbackNode=b}}}function Lh(a,b){dd=0;if(b)return b=ka(),Ue(a,b),V(a),null;var c=fd(a);if(0!==c){b=a.callbackNode;if((p&(ca|ma))!==H)throw Error(k(327));
-xb();a===U&&c===P||$a(a,c);if(null!==t){var d=p;p|=ca;var e=Mh();do try{rj();break}catch(h){Nh(a,h)}while(1);le();p=d;gd.current=e;if(F===hd)throw b=id,$a(a,c),Ya(a,c),V(a),b;if(null===t)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=F,U=null,d){case Xa:case hd:throw Error(k(345));case Oh:Ue(a,2<c?2:c);break;case ad:Ya(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ve(e));if(1073741823===ta&&(e=Re+Ph-Y(),10<e)){if(jd){var f=a.lastPingedTime;if(0===f||f>=c){a.lastPingedTime=
-c;$a(a,c);break}}f=fd(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=We(ab.bind(null,a),e);break}ab(a);break;case bd:Ya(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ve(e));if(jd&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;$a(a,c);break}e=fd(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}1073741823!==Yb?d=10*(1073741821-Yb)-Y():1073741823===ta?d=0:(d=10*(1073741821-ta)-5E3,e=Y(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=
-(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*sj(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=We(ab.bind(null,a),d);break}ab(a);break;case Xe:if(1073741823!==ta&&null!==kd){f=ta;var g=kd;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=Y()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10<d){Ya(a,c);a.timeoutHandle=We(ab.bind(null,a),d);break}}ab(a);break;default:throw Error(k(329));}V(a);if(a.callbackNode===b)return Lh.bind(null,a)}}return null}function Te(a){var b=
-a.lastExpiredTime;b=0!==b?b:1073741823;if((p&(ca|ma))!==H)throw Error(k(327));xb();a===U&&b===P||$a(a,b);if(null!==t){var c=p;p|=ca;var d=Mh();do try{tj();break}catch(e){Nh(a,e)}while(1);le();p=c;gd.current=d;if(F===hd)throw c=id,$a(a,b),Ya(a,b),V(a),c;if(null!==t)throw Error(k(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;U=null;ab(a);V(a)}return null}function uj(){if(null!==bb){var a=bb;bb=null;a.forEach(function(a,c){Ue(c,a);V(c)});ha()}}function Qh(a,b){var c=p;p|=1;try{return a(b)}finally{p=
-c,p===H&&ha()}}function Rh(a,b){var c=p;p&=-2;p|=Ye;try{return a(b)}finally{p=c,p===H&&ha()}}function $a(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,vj(c));if(null!==t)for(c=t.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&(q(G),q(B));break;case 3:tb();q(G);q(B);break;case 5:te(d);break;case 4:tb();break;case 13:q(D);break;case 19:q(D);break;case 10:me(d)}c=c.return}U=a;t=Sa(a.current,null);
-P=b;F=Xa;id=null;Yb=ta=1073741823;kd=null;Xb=0;jd=!1}function Nh(a,b){do{try{le();Sc.current=Tc;if(Uc)for(var c=z.memoizedState;null!==c;){var d=c.queue;null!==d&&(d.pending=null);c=c.next}Ia=0;J=K=z=null;Uc=!1;if(null===t||null===t.return)return F=hd,id=b,t=null;a:{var e=a,f=t.return,g=t,h=b;b=P;g.effectTag|=2048;g.firstEffect=g.lastEffect=null;if(null!==h&&"object"===typeof h&&"function"===typeof h.then){var m=h;if(0===(g.mode&2)){var n=g.alternate;n?(g.updateQueue=n.updateQueue,g.memoizedState=
-n.memoizedState,g.expirationTime=n.expirationTime):(g.updateQueue=null,g.memoizedState=null)}var l=0!==(D.current&1),k=f;do{var p;if(p=13===k.tag){var q=k.memoizedState;if(null!==q)p=null!==q.dehydrated?!0:!1;else{var w=k.memoizedProps;p=void 0===w.fallback?!1:!0!==w.unstable_avoidThisFallback?!0:l?!1:!0}}if(p){var y=k.updateQueue;if(null===y){var r=new Set;r.add(m);k.updateQueue=r}else y.add(m);if(0===(k.mode&2)){k.effectTag|=64;g.effectTag&=-2981;if(1===g.tag)if(null===g.alternate)g.tag=17;else{var O=
-Ea(1073741823,null);O.tag=Jc;Fa(g,O)}g.expirationTime=1073741823;break a}h=void 0;g=b;var v=e.pingCache;null===v?(v=e.pingCache=new wj,h=new Set,v.set(m,h)):(h=v.get(m),void 0===h&&(h=new Set,v.set(m,h)));if(!h.has(g)){h.add(g);var x=xj.bind(null,e,m,g);m.then(x,x)}k.effectTag|=4096;k.expirationTime=b;break a}k=k.return}while(null!==k);h=Error((na(g.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+
-Bd(g))}F!==Xe&&(F=Oh);h=Le(h,g);k=f;do{switch(k.tag){case 3:m=h;k.effectTag|=4096;k.expirationTime=b;var A=Ih(k,m,b);Ug(k,A);break a;case 1:m=h;var u=k.type,B=k.stateNode;if(0===(k.effectTag&64)&&("function"===typeof u.getDerivedStateFromError||null!==B&&"function"===typeof B.componentDidCatch&&(null===La||!La.has(B)))){k.effectTag|=4096;k.expirationTime=b;var H=Jh(k,m,b);Ug(k,H);break a}}k=k.return}while(null!==k)}t=Sh(t)}catch(cj){b=cj;continue}break}while(1)}function Mh(a){a=gd.current;gd.current=
-Tc;return null===a?Tc:a}function Vg(a,b){a<ta&&2<a&&(ta=a);null!==b&&a<Yb&&2<a&&(Yb=a,kd=b)}function Kc(a){a>Xb&&(Xb=a)}function tj(){for(;null!==t;)t=Th(t)}function rj(){for(;null!==t&&!yj();)t=Th(t)}function Th(a){var b=zj(a.alternate,a,P);a.memoizedProps=a.pendingProps;null===b&&(b=Sh(a));Uh.current=null;return b}function Sh(a){t=a;do{var b=t.alternate;a=t.return;if(0===(t.effectTag&2048)){b=hj(b,t,P);if(1===P||1!==t.childExpirationTime){for(var c=0,d=t.child;null!==d;){var e=d.expirationTime,
-f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}t.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=t.firstEffect),a.lastEffect=t.lastEffect),1<t.effectTag&&(null!==a.lastEffect?a.lastEffect.nextEffect=t:a.firstEffect=t,a.lastEffect=t))}else{b=lj(t);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=
-2048)}b=t.sibling;if(null!==b)return b;t=a}while(null!==t);F===Xa&&(F=Xe);return null}function Ve(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function ab(a){var b=Cc();Da(99,Aj.bind(null,a,b));return null}function Aj(a,b){do xb();while(null!==Zb);if((p&(ca|ma))!==H)throw Error(k(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(k(177));a.callbackNode=null;a.callbackExpirationTime=
-0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ve(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===U&&(t=U=null,P=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=p;p|=ma;Uh.current=null;Ze=tc;var g=kg();if(Xd(g)){if("selectionStart"in
-g)var h={start:g.selectionStart,end:g.selectionEnd};else a:{h=(h=g.ownerDocument)&&h.defaultView||window;var m=h.getSelection&&h.getSelection();if(m&&0!==m.rangeCount){h=m.anchorNode;var n=m.anchorOffset,q=m.focusNode;m=m.focusOffset;try{h.nodeType,q.nodeType}catch(sb){h=null;break a}var ba=0,w=-1,y=-1,B=0,D=0,r=g,z=null;b:for(;;){for(var v;;){r!==h||0!==n&&3!==r.nodeType||(w=ba+n);r!==q||0!==m&&3!==r.nodeType||(y=ba+m);3===r.nodeType&&(ba+=r.nodeValue.length);if(null===(v=r.firstChild))break;z=r;
-r=v}for(;;){if(r===g)break b;z===h&&++B===n&&(w=ba);z===q&&++D===m&&(y=ba);if(null!==(v=r.nextSibling))break;r=z;z=r.parentNode}r=v}h=-1===w||-1===y?null:{start:w,end:y}}else h=null}h=h||{start:0,end:0}}else h=null;$e={activeElementDetached:null,focusedElem:g,selectionRange:h};tc=!1;l=e;do try{Bj()}catch(sb){if(null===l)throw Error(k(330));Za(l,sb);l=l.nextEffect}while(null!==l);l=e;do try{for(g=a,h=b;null!==l;){var x=l.effectTag;x&16&&Wb(l.stateNode,"");if(x&128){var A=l.alternate;if(null!==A){var u=
-A.ref;null!==u&&("function"===typeof u?u(null):u.current=null)}}switch(x&1038){case 2:Gh(l);l.effectTag&=-3;break;case 6:Gh(l);l.effectTag&=-3;Qe(l.alternate,l);break;case 1024:l.effectTag&=-1025;break;case 1028:l.effectTag&=-1025;Qe(l.alternate,l);break;case 4:Qe(l.alternate,l);break;case 8:n=l,Dh(g,n,h),Eh(n)}l=l.nextEffect}}catch(sb){if(null===l)throw Error(k(330));Za(l,sb);l=l.nextEffect}while(null!==l);u=$e;A=kg();x=u.focusedElem;h=u.selectionRange;if(A!==x&&x&&x.ownerDocument&&jg(x.ownerDocument.documentElement,
-x)){null!==h&&Xd(x)&&(A=h.start,u=h.end,void 0===u&&(u=A),"selectionStart"in x?(x.selectionStart=A,x.selectionEnd=Math.min(u,x.value.length)):(u=(A=x.ownerDocument||document)&&A.defaultView||window,u.getSelection&&(u=u.getSelection(),n=x.textContent.length,g=Math.min(h.start,n),h=void 0===h.end?g:Math.min(h.end,n),!u.extend&&g>h&&(n=h,h=g,g=n),n=ig(x,g),q=ig(x,h),n&&q&&(1!==u.rangeCount||u.anchorNode!==n.node||u.anchorOffset!==n.offset||u.focusNode!==q.node||u.focusOffset!==q.offset)&&(A=A.createRange(),
-A.setStart(n.node,n.offset),u.removeAllRanges(),g>h?(u.addRange(A),u.extend(q.node,q.offset)):(A.setEnd(q.node,q.offset),u.addRange(A))))));A=[];for(u=x;u=u.parentNode;)1===u.nodeType&&A.push({element:u,left:u.scrollLeft,top:u.scrollTop});"function"===typeof x.focus&&x.focus();for(x=0;x<A.length;x++)u=A[x],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}tc=!!Ze;$e=Ze=null;a.current=c;l=e;do try{for(x=a;null!==l;){var F=l.effectTag;F&36&&oj(x,l.alternate,l);if(F&128){A=void 0;var E=l.ref;if(null!==
-E){var G=l.stateNode;switch(l.tag){case 5:A=G;break;default:A=G}"function"===typeof E?E(A):E.current=A}}l=l.nextEffect}}catch(sb){if(null===l)throw Error(k(330));Za(l,sb);l=l.nextEffect}while(null!==l);l=null;Cj();p=f}else a.current=c;if(ld)ld=!1,Zb=a,$b=b;else for(l=e;null!==l;)b=l.nextEffect,l.nextEffect=null,l=b;b=a.firstPendingTime;0===b&&(La=null);1073741823===b?a===af?ac++:(ac=0,af=a):ac=0;"function"===typeof bf&&bf(c.stateNode,d);V(a);if(cd)throw cd=!1,a=Se,Se=null,a;if((p&Ye)!==H)return null;
-ha();return null}function Bj(){for(;null!==l;){var a=l.effectTag;0!==(a&256)&&nj(l.alternate,l);0===(a&512)||ld||(ld=!0,Ng(97,function(){xb();return null}));l=l.nextEffect}}function xb(){if(90!==$b){var a=97<$b?97:$b;$b=90;return Da(a,Dj)}}function Dj(){if(null===Zb)return!1;var a=Zb;Zb=null;if((p&(ca|ma))!==H)throw Error(k(331));var b=p;p|=ma;for(a=a.current.firstEffect;null!==a;){try{var c=a;if(0!==(c.effectTag&512))switch(c.tag){case 0:case 11:case 15:case 22:Ah(5,c),Bh(5,c)}}catch(d){if(null===
-a)throw Error(k(330));Za(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}p=b;ha();return!0}function Vh(a,b,c){b=Le(c,b);b=Ih(a,b,1073741823);Fa(a,b);a=ed(a,1073741823);null!==a&&V(a)}function Za(a,b){if(3===a.tag)Vh(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){Vh(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===La||!La.has(d))){a=Le(b,a);a=Jh(c,a,1073741823);Fa(c,a);c=ed(c,1073741823);null!==
-c&&V(c);break}}c=c.return}}function xj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);U===a&&P===c?F===bd||F===ad&&1073741823===ta&&Y()-Re<Ph?$a(a,P):jd=!0:Kh(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,V(a)))}function qj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=ka(),b=Va(b,a,null));a=ed(a,b);null!==a&&V(a)}function Ej(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=
-b.inject(a);bf=function(a,e){try{b.onCommitFiberRoot(c,a,void 0,64===(a.current.effectTag&64))}catch(f){}};Ne=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}function Fj(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=
-null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function Ge(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Gj(a){if("function"===typeof a)return Ge(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===zd)return 11;if(a===Ad)return 14}return 2}function Sa(a,b){var c=a.alternate;null===c?(c=la(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=
-null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,firstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}function Oc(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Ge(a)&&(g=1);else if("string"===typeof a)g=
-5;else a:switch(a){case Ma:return Ha(c.children,e,f,b);case Hj:g=8;e|=7;break;case Af:g=8;e|=1;break;case kc:return a=la(12,c,b,e|8),a.elementType=kc,a.type=kc,a.expirationTime=f,a;case lc:return a=la(13,c,b,e),a.type=lc,a.elementType=lc,a.expirationTime=f,a;case yd:return a=la(19,c,b,e),a.elementType=yd,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Cf:g=10;break a;case Bf:g=9;break a;case zd:g=11;break a;case Ad:g=14;break a;case Ef:g=16;d=null;break a;case Df:g=
-22;break a}throw Error(k(130,null==a?a:typeof a,""));}b=la(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Ha(a,b,c,d){a=la(7,a,d,b);a.expirationTime=c;return a}function qe(a,b,c){a=la(6,a,null,b);a.expirationTime=c;return a}function re(a,b,c){b=la(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Ij(a,b,c){this.tag=b;this.current=null;this.containerInfo=
-a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Kh(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function Ya(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;
-c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}function yh(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Ue(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}
-function md(a,b,c,d){var e=b.current,f=ka(),g=Vb.suspense;f=Va(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(Na(c)!==c||1!==c.tag)throw Error(k(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(N(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(k(171));}if(1===c.tag){var m=c.type;if(N(m)){c=Gg(c,m,h);break a}}c=h}else c=Ca;null===b.context?b.context=c:b.pendingContext=c;b=Ea(f,g);b.payload={element:a};d=void 0===
-d?null:d;null!==d&&(b.callback=d);Fa(e,b);Ja(e,f);return f}function cf(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Wh(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=b)}function df(a,b){Wh(a,b);(a=a.alternate)&&Wh(a,b)}function ef(a,b,c){c=null!=c&&!0===c.hydrate;var d=new Ij(a,b,c),e=la(3,null,null,2===b?7:1===b?3:0);d.current=e;e.stateNode=d;ne(e);a[Lb]=d.current;c&&0!==b&&
-xi(a,9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}function bc(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function Jj(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new ef(a,0,b?{hydrate:!0}:void 0)}function nd(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;
-if("function"===typeof e){var h=e;e=function(){var a=cf(g);h.call(a)}}md(b,g,a,e)}else{f=c._reactRootContainer=Jj(c,d);g=f._internalRoot;if("function"===typeof e){var m=e;e=function(){var a=cf(g);m.call(a)}}Rh(function(){md(b,g,a,e)})}return cf(g)}function Kj(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:gb,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function Xh(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;
-if(!bc(b))throw Error(k(200));return Kj(a,b,null,c)}if(!ea)throw Error(k(227));var ki=function(a,b,c,d,e,f,g,h,m){var n=Array.prototype.slice.call(arguments,3);try{b.apply(c,n)}catch(C){this.onError(C)}},yb=!1,gc=null,hc=!1,pd=null,li={onError:function(a){yb=!0;gc=a}},td=null,rf=null,mf=null,ic=null,cb={},jc=[],qd={},db={},rd={},wa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),M=ea.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,
-sd=null,eb=null,fb=null,ee=function(a,b){return a(b)},eg=function(a,b,c,d,e){return a(b,c,d,e)},vd=function(){},vf=ee,Oa=!1,wd=!1,Z=ea.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,Lj=Z.unstable_cancelCallback,ff=Z.unstable_now,$f=Z.unstable_scheduleCallback,Mj=Z.unstable_shouldYield,Yh=Z.unstable_requestPaint,Pd=Z.unstable_runWithPriority,Nj=Z.unstable_getCurrentPriorityLevel,Oj=Z.unstable_ImmediatePriority,Zh=Z.unstable_UserBlockingPriority,ag=Z.unstable_NormalPriority,Pj=Z.unstable_LowPriority,
-Qj=Z.unstable_IdlePriority,oi=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,wf=Object.prototype.hasOwnProperty,yf={},xf={},E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){E[a]=
-new L(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];E[b]=new L(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){E[a]=new L(a,2,!1,a.toLowerCase(),null,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){E[a]=new L(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){E[a]=
-new L(a,3,!1,a.toLowerCase(),null,!1)});["checked","multiple","muted","selected"].forEach(function(a){E[a]=new L(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){E[a]=new L(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){E[a]=new L(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){E[a]=new L(a,5,!1,a.toLowerCase(),null,!1)});var gf=/[\-:]([a-z])/g,hf=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
-a.replace(gf,hf);E[b]=new L(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(gf,hf);E[b]=new L(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(gf,hf);E[b]=new L(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){E[a]=new L(a,1,!1,a.toLowerCase(),null,!1)});E.xlinkHref=new L("xlinkHref",1,
-!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){E[a]=new L(a,1,!1,a.toLowerCase(),null,!0)});var da=ea.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;da.hasOwnProperty("ReactCurrentDispatcher")||(da.ReactCurrentDispatcher={current:null});da.hasOwnProperty("ReactCurrentBatchConfig")||(da.ReactCurrentBatchConfig={suspense:null});var si=/^(.*)[\\\/]/,Q="function"===typeof Symbol&&Symbol.for,Pc=Q?Symbol.for("react.element"):60103,gb=Q?Symbol.for("react.portal"):
-60106,Ma=Q?Symbol.for("react.fragment"):60107,Af=Q?Symbol.for("react.strict_mode"):60108,kc=Q?Symbol.for("react.profiler"):60114,Cf=Q?Symbol.for("react.provider"):60109,Bf=Q?Symbol.for("react.context"):60110,Hj=Q?Symbol.for("react.concurrent_mode"):60111,zd=Q?Symbol.for("react.forward_ref"):60112,lc=Q?Symbol.for("react.suspense"):60113,yd=Q?Symbol.for("react.suspense_list"):60120,Ad=Q?Symbol.for("react.memo"):60115,Ef=Q?Symbol.for("react.lazy"):60116,Df=Q?Symbol.for("react.block"):60121,zf="function"===
-typeof Symbol&&Symbol.iterator,od,xh=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{od=od||document.createElement("div");od.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=od.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),Wb=function(a,
-b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b},ib={animationend:nc("Animation","AnimationEnd"),animationiteration:nc("Animation","AnimationIteration"),animationstart:nc("Animation","AnimationStart"),transitionend:nc("Transition","TransitionEnd")},Id={},Of={};wa&&(Of=document.createElement("div").style,"AnimationEvent"in window||(delete ib.animationend.animation,delete ib.animationiteration.animation,delete ib.animationstart.animation),"TransitionEvent"in
-window||delete ib.transitionend.transition);var $h=oc("animationend"),ai=oc("animationiteration"),bi=oc("animationstart"),ci=oc("transitionend"),Db="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Pf=new ("function"===typeof WeakMap?WeakMap:Map),Ab=null,wi=function(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;
-if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)lf(a,b[d],c[d]);else b&&lf(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}},qc=[],Rd=!1,fa=[],xa=null,ya=null,za=null,Eb=new Map,Fb=new Map,Jb=[],Nd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),
-yi="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" "),dg={},cg=new Map,Td=new Map,Rj=["abort","abort",$h,"animationEnd",ai,"animationIteration",bi,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata",
-"loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",ci,"transitionEnd","waiting","waiting"];Sd("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
-0);Sd("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Sd(Rj,2);(function(a,b){for(var c=0;c<a.length;c++)Td.set(a[c],b)})("change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),0);var Hi=Zh,Gi=Pd,tc=!0,Kb={animationIterationCount:!0,
-borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,
-strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Sj=["Webkit","ms","Moz","O"];Object.keys(Kb).forEach(function(a){Sj.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Kb[b]=Kb[a]})});var Ii=M({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ng="$",og="/$",$d="$?",Zd="$!",Ze=null,$e=null,We="function"===typeof setTimeout?setTimeout:void 0,vj="function"===
-typeof clearTimeout?clearTimeout:void 0,jf=Math.random().toString(36).slice(2),Aa="__reactInternalInstance$"+jf,vc="__reactEventHandlers$"+jf,Lb="__reactContainere$"+jf,Ba=null,ce=null,wc=null;M(R.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=xc)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==
-typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=xc)},persist:function(){this.isPersistent=xc},isPersistent:yc,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=yc;this._dispatchInstances=this._dispatchListeners=null}});R.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||
-Date.now()},defaultPrevented:null,isTrusted:null};R.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,d=function(){};d.prototype=c.prototype;d=new d;M(d,b.prototype);b.prototype=d;b.prototype.constructor=b;b.Interface=M({},c.Interface,a);b.extend=c.extend;sg(b);return b};sg(R);var Tj=R.extend({data:null}),Uj=R.extend({data:null}),Ni=[9,13,27,32],de=wa&&"CompositionEvent"in window,cc=null;wa&&"documentMode"in document&&(cc=document.documentMode);var Vj=wa&&"TextEvent"in window&&
-!cc,xg=wa&&(!de||cc&&8<cc&&11>=cc),wg=String.fromCharCode(32),ua={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},
-dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},vg=!1,mb=!1,Wj={eventTypes:ua,extractEvents:function(a,b,c,d,e){var f;if(de)b:{switch(a){case "compositionstart":var g=ua.compositionStart;break b;case "compositionend":g=ua.compositionEnd;break b;case "compositionupdate":g=
-ua.compositionUpdate;break b}g=void 0}else mb?tg(a,c)&&(g=ua.compositionEnd):"keydown"===a&&229===c.keyCode&&(g=ua.compositionStart);g?(xg&&"ko"!==c.locale&&(mb||g!==ua.compositionStart?g===ua.compositionEnd&&mb&&(f=rg()):(Ba=d,ce="value"in Ba?Ba.value:Ba.textContent,mb=!0)),e=Tj.getPooled(g,b,c,d),f?e.data=f:(f=ug(c),null!==f&&(e.data=f)),lb(e),f=e):f=null;(a=Vj?Oi(a,c):Pi(a,c))?(b=Uj.getPooled(ua.beforeInput,b,c,d),b.data=a,lb(b)):b=null;return null===f?b:null===b?f:[f,b]}},Qi={color:!0,date:!0,
-datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Ag={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},Mb=null,Nb=null,kf=!1;wa&&(kf=Tf("input")&&(!document.documentMode||9<document.documentMode));var Xj={eventTypes:Ag,_isInputEventSupported:kf,extractEvents:function(a,b,c,d,e){e=b?Pa(b):window;var f=
-e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=Si;else if(yg(e))if(kf)g=Wi;else{g=Ui;var h=Ti}else(f=e.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(g=Vi);if(g&&(g=g(a,b)))return zg(g,c,d);h&&h(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Ed(e,"number",e.value)}},dc=R.extend({view:null,detail:null}),Yi={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},di=0,ei=0,fi=!1,gi=!1,ec=dc.extend({screenX:null,
-screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:fe,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=di;di=a.screenX;return fi?"mousemove"===a.type?a.screenX-b:0:(fi=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;var b=ei;ei=a.screenY;return gi?"mousemove"===
-a.type?a.screenY-b:0:(gi=!0,0)}}),hi=ec.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),fc={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout",
-"pointerover"]}},Yj={eventTypes:fc,extractEvents:function(a,b,c,d,e){var f="mouseover"===a||"pointerover"===a,g="mouseout"===a||"pointerout"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?Bb(b):null,null!==b){var h=Na(b);if(b!==h||5!==b.tag&&6!==b.tag)b=null}}else g=null;if(g===b)return null;if("mouseout"===a||"mouseover"===a){var m=ec;var n=fc.mouseLeave;
-var l=fc.mouseEnter;var k="mouse"}else if("pointerout"===a||"pointerover"===a)m=hi,n=fc.pointerLeave,l=fc.pointerEnter,k="pointer";a=null==g?f:Pa(g);f=null==b?f:Pa(b);n=m.getPooled(n,g,c,d);n.type=k+"leave";n.target=a;n.relatedTarget=f;c=m.getPooled(l,b,c,d);c.type=k+"enter";c.target=f;c.relatedTarget=a;d=g;k=b;if(d&&k)a:{m=d;l=k;g=0;for(a=m;a;a=pa(a))g++;a=0;for(b=l;b;b=pa(b))a++;for(;0<g-a;)m=pa(m),g--;for(;0<a-g;)l=pa(l),a--;for(;g--;){if(m===l||m===l.alternate)break a;m=pa(m);l=pa(l)}m=null}else m=
-null;l=m;for(m=[];d&&d!==l;){g=d.alternate;if(null!==g&&g===l)break;m.push(d);d=pa(d)}for(d=[];k&&k!==l;){g=k.alternate;if(null!==g&&g===l)break;d.push(k);k=pa(k)}for(k=0;k<m.length;k++)be(m[k],"bubbled",n);for(k=d.length;0<k--;)be(d[k],"captured",c);return 0===(e&64)?[n]:[n,c]}},Qa="function"===typeof Object.is?Object.is:Zi,$i=Object.prototype.hasOwnProperty,Zj=wa&&"documentMode"in document&&11>=document.documentMode,Eg={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},
-dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},nb=null,he=null,Pb=null,ge=!1,ak={eventTypes:Eg,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=Jd(e);f=rd.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?Pa(b):window;switch(a){case "focus":if(yg(e)||"true"===e.contentEditable)nb=e,he=b,Pb=null;break;case "blur":Pb=he=nb=null;
-break;case "mousedown":ge=!0;break;case "contextmenu":case "mouseup":case "dragend":return ge=!1,Dg(c,d);case "selectionchange":if(Zj)break;case "keydown":case "keyup":return Dg(c,d)}return null}},bk=R.extend({animationName:null,elapsedTime:null,pseudoElement:null}),ck=R.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),dk=dc.extend({relatedTarget:null}),ek={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",
-Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",
-224:"Meta"},gk=dc.extend({key:function(a){if(a.key){var b=ek[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Ac(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?fk[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:fe,charCode:function(a){return"keypress"===a.type?Ac(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
-a.type?Ac(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),hk=ec.extend({dataTransfer:null}),ik=dc.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:fe}),jk=R.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),kk=ec.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?
--a.wheelDelta:0},deltaZ:null,deltaMode:null}),lk={eventTypes:dg,extractEvents:function(a,b,c,d,e){e=cg.get(a);if(!e)return null;switch(a){case "keypress":if(0===Ac(c))return null;case "keydown":case "keyup":a=gk;break;case "blur":case "focus":a=dk;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=ec;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=
-hk;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=ik;break;case $h:case ai:case bi:a=bk;break;case ci:a=jk;break;case "scroll":a=dc;break;case "wheel":a=kk;break;case "copy":case "cut":case "paste":a=ck;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=hi;break;default:a=R}b=a.getPooled(e,b,c,d);lb(b);return b}};(function(a){if(ic)throw Error(k(101));
-ic=Array.prototype.slice.call(a);nf()})("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));(function(a,b,c){td=a;rf=b;mf=c})(ae,Hb,Pa);pf({SimpleEventPlugin:lk,EnterLeaveEventPlugin:Yj,ChangeEventPlugin:Xj,SelectEventPlugin:ak,BeforeInputEventPlugin:Wj});var ie=[],ob=-1,Ca={},B={current:Ca},G={current:!1},Ra=Ca,bj=Pd,je=$f,Rg=Lj,aj=Nj,Dc=Oj,Ig=Zh,Jg=ag,Kg=Pj,Lg=Qj,Qg={},yj=Mj,Cj=void 0!==Yh?Yh:function(){},qa=null,
-Ec=null,ke=!1,ii=ff(),Y=1E4>ii?ff:function(){return ff()-ii},Ic={current:null},Hc=null,qb=null,Gc=null,Tg=0,Jc=2,Ga=!1,Vb=da.ReactCurrentBatchConfig,$g=(new ea.Component).refs,Mc={isMounted:function(a){return(a=a._reactInternalFiber)?Na(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=ka(),e=Vb.suspense;d=Va(d,a,e);e=Ea(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Fa(a,e);Ja(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ka(),e=Vb.suspense;
-d=Va(d,a,e);e=Ea(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Fa(a,e);Ja(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ka(),d=Vb.suspense;c=Va(c,a,d);d=Ea(c,d);d.tag=Jc;void 0!==b&&null!==b&&(d.callback=b);Fa(a,d);Ja(a,c)}},Qc=Array.isArray,wb=ah(!0),Fe=ah(!1),Sb={},ja={current:Sb},Ub={current:Sb},Tb={current:Sb},D={current:0},Sc=da.ReactCurrentDispatcher,X=da.ReactCurrentBatchConfig,Ia=0,z=null,K=null,J=null,Uc=!1,Tc={readContext:W,useCallback:S,useContext:S,
-useEffect:S,useImperativeHandle:S,useLayoutEffect:S,useMemo:S,useReducer:S,useRef:S,useState:S,useDebugValue:S,useResponder:S,useDeferredValue:S,useTransition:S},dj={readContext:W,useCallback:ih,useContext:W,useEffect:eh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ze(4,2,gh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ze(4,2,a,b)},useMemo:function(a,b){var c=ub();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=
-ub();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=ch.bind(null,z,a);return[d.memoizedState,a]},useRef:function(a){var b=ub();a={current:a};return b.memoizedState=a},useState:xe,useDebugValue:Be,useResponder:ue,useDeferredValue:function(a,b){var c=xe(a),d=c[0],e=c[1];eh(function(){var c=X.suspense;X.suspense=void 0===b?null:b;try{e(a)}finally{X.suspense=c}},[a,b]);return d},useTransition:function(a){var b=
-xe(!1),c=b[0];b=b[1];return[ih(Ce.bind(null,b,a),[b,a]),c]}},ej={readContext:W,useCallback:Yc,useContext:W,useEffect:Xc,useImperativeHandle:hh,useLayoutEffect:fh,useMemo:jh,useReducer:Vc,useRef:dh,useState:function(a){return Vc(Ua)},useDebugValue:Be,useResponder:ue,useDeferredValue:function(a,b){var c=Vc(Ua),d=c[0],e=c[1];Xc(function(){var c=X.suspense;X.suspense=void 0===b?null:b;try{e(a)}finally{X.suspense=c}},[a,b]);return d},useTransition:function(a){var b=Vc(Ua),c=b[0];b=b[1];return[Yc(Ce.bind(null,
-b,a),[b,a]),c]}},fj={readContext:W,useCallback:Yc,useContext:W,useEffect:Xc,useImperativeHandle:hh,useLayoutEffect:fh,useMemo:jh,useReducer:Wc,useRef:dh,useState:function(a){return Wc(Ua)},useDebugValue:Be,useResponder:ue,useDeferredValue:function(a,b){var c=Wc(Ua),d=c[0],e=c[1];Xc(function(){var c=X.suspense;X.suspense=void 0===b?null:b;try{e(a)}finally{X.suspense=c}},[a,b]);return d},useTransition:function(a){var b=Wc(Ua),c=b[0];b=b[1];return[Yc(Ce.bind(null,b,a),[b,a]),c]}},ra=null,Ka=null,Wa=
-!1,gj=da.ReactCurrentOwner,ia=!1,Je={dehydrated:null,retryTime:0};var jj=function(a,b,c,d){for(c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};var wh=function(a){};var ij=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;Ta(ja.current);a=null;switch(c){case "input":f=
-Cd(g,f);d=Cd(g,d);a=[];break;case "option":f=Fd(g,f);d=Fd(g,d);a=[];break;case "select":f=M({},f,{value:void 0});d=M({},d,{value:void 0});a=[];break;case "textarea":f=Gd(g,f);d=Gd(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=uc)}Ud(c,d);var h,m;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if("style"===h)for(m in g=f[h],g)g.hasOwnProperty(m)&&(c||(c={}),c[m]="");else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==
-h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(db.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var k=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&k!==g&&(null!=k||null!=g))if("style"===h)if(g){for(m in g)!g.hasOwnProperty(m)||k&&k.hasOwnProperty(m)||(c||(c={}),c[m]="");for(m in k)k.hasOwnProperty(m)&&g[m]!==k[m]&&(c||(c={}),c[m]=k[m])}else c||(a||(a=[]),a.push(h,c)),c=k;else"dangerouslySetInnerHTML"===h?(k=k?k.__html:void 0,g=g?g.__html:void 0,null!=k&&g!==k&&(a=a||
-[]).push(h,k)):"children"===h?g===k||"string"!==typeof k&&"number"!==typeof k||(a=a||[]).push(h,""+k):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(db.hasOwnProperty(h)?(null!=k&&oa(e,h),a||g===k||(a=[])):(a=a||[]).push(h,k))}c&&(a=a||[]).push("style",c);e=a;if(b.updateQueue=e)b.effectTag|=4}};var kj=function(a,b,c,d){c!==d&&(b.effectTag|=4)};var pj="function"===typeof WeakSet?WeakSet:Set,wj="function"===typeof WeakMap?WeakMap:Map,sj=Math.ceil,gd=da.ReactCurrentDispatcher,
-Uh=da.ReactCurrentOwner,H=0,Ye=8,ca=16,ma=32,Xa=0,hd=1,Oh=2,ad=3,bd=4,Xe=5,p=H,U=null,t=null,P=0,F=Xa,id=null,ta=1073741823,Yb=1073741823,kd=null,Xb=0,jd=!1,Re=0,Ph=500,l=null,cd=!1,Se=null,La=null,ld=!1,Zb=null,$b=90,bb=null,ac=0,af=null,dd=0,Ja=function(a,b){if(50<ac)throw ac=0,af=null,Error(k(185));a=ed(a,b);if(null!==a){var c=Cc();1073741823===b?(p&Ye)!==H&&(p&(ca|ma))===H?Te(a):(V(a),p===H&&ha()):V(a);(p&4)===H||98!==c&&99!==c||(null===bb?bb=new Map([[a,b]]):(c=bb.get(a),(void 0===c||c>b)&&bb.set(a,
-b)))}};var zj=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||G.current)ia=!0;else{if(d<c){ia=!1;switch(b.tag){case 3:sh(b);Ee();break;case 5:bh(b);if(b.mode&4&&1!==c&&e.hidden)return b.expirationTime=b.childExpirationTime=1,null;break;case 1:N(b.type)&&Bc(b);break;case 4:se(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;e=b.type._context;y(Ic,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;
-if(0!==d&&d>=c)return th(a,b,c);y(D,D.current&1);b=sa(a,b,c);return null!==b?b.sibling:null}y(D,D.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return vh(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);y(D,D.current);if(!d)return null}return sa(a,b,c)}ia=!1}}else ia=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=pb(b,B.current);rb(b,c);e=we(null,
-b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(N(d)){var f=!0;Bc(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ne(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Lc(b,d,g,a);e.updater=Mc;b.stateNode=e;e._reactInternalFiber=b;pe(b,d,a,c);b=Ie(null,b,d,!0,f,c)}else b.tag=0,T(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=
-null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ri(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Gj(e);a=aa(e,a);switch(f){case 0:b=He(null,b,e,a,c);break a;case 1:b=rh(null,b,e,a,c);break a;case 11:b=nh(null,b,e,a,c);break a;case 14:b=oh(null,b,e,aa(e.type,a),d,c);break a}throw Error(k(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:aa(d,e),He(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:aa(d,e),rh(a,b,d,e,c);
-case 3:sh(b);d=b.updateQueue;if(null===a||null===d)throw Error(k(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;oe(a,b);Qb(b,d,null,c);d=b.memoizedState.element;if(d===e)Ee(),b=sa(a,b,c);else{if(e=b.stateNode.hydrate)Ka=kb(b.stateNode.containerInfo.firstChild),ra=b,e=Wa=!0;if(e)for(c=Fe(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else T(a,b,d,c),Ee();b=b.child}return b;case 5:return bh(b),null===a&&De(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:
-null,g=e.children,Yd(d,e)?g=null:null!==f&&Yd(d,f)&&(b.effectTag|=16),qh(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(T(a,b,g,c),b=b.child),b;case 6:return null===a&&De(b),null;case 13:return th(a,b,c);case 4:return se(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=wb(b,null,d,c):T(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:aa(d,e),nh(a,b,d,e,c);case 7:return T(a,b,b.pendingProps,c),b.child;case 8:return T(a,
-b,b.pendingProps.children,c),b.child;case 12:return T(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;y(Ic,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=Qa(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!G.current){b=sa(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var m=h.dependencies;if(null!==
-m){g=h.child;for(var l=m.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Ea(c,null),l.tag=Jc,Fa(h,l));h.expirationTime<c&&(h.expirationTime=c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);Sg(h.return,c);m.expirationTime<c&&(m.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=
-g}T(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,rb(b,c),e=W(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,T(a,b,d,c),b.child;case 14:return e=b.type,f=aa(e,b.pendingProps),f=aa(e.type,f),oh(a,b,e,f,d,c);case 15:return ph(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:aa(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,N(d)?(a=!0,Bc(b)):a=!1,rb(b,c),Yg(b,d,e),pe(b,d,e,c),Ie(null,
-b,d,!0,a,c);case 19:return vh(a,b,c)}throw Error(k(156,b.tag));};var bf=null,Ne=null,la=function(a,b,c,d){return new Fj(a,b,c,d)};ef.prototype.render=function(a){md(a,this._internalRoot,null,null)};ef.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;md(null,a,null,function(){b[Lb]=null})};var Di=function(a){if(13===a.tag){var b=Fc(ka(),150,100);Ja(a,b);df(a,b)}};var Yf=function(a){13===a.tag&&(Ja(a,3),df(a,3))};var Bi=function(a){if(13===a.tag){var b=ka();b=Va(b,a,null);Ja(a,
-b);df(a,b)}};sd=function(a,b,c){switch(b){case "input":Dd(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=ae(d);if(!e)throw Error(k(90));Gf(d);Dd(d,e)}}}break;case "textarea":Lf(a,c);break;case "select":b=c.value,null!=b&&hb(a,!!c.multiple,b,!1)}};(function(a,b,c,d){ee=a;eg=b;vd=c;vf=d})(Qh,function(a,b,c,d,e){var f=p;p|=4;
-try{return Da(98,a.bind(null,b,c,d,e))}finally{p=f,p===H&&ha()}},function(){(p&(1|ca|ma))===H&&(uj(),xb())},function(a,b){var c=p;p|=2;try{return a(b)}finally{p=c,p===H&&ha()}});var mk={Events:[Hb,Pa,ae,pf,qd,lb,function(a){Kd(a,Ki)},sf,tf,sc,pc,xb,{current:!1}]};(function(a){var b=a.findFiberByHostInstance;return Ej(M({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:da.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=Sf(a);
-return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:Bb,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"});I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mk;I.createPortal=Xh;I.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===
-b){if("function"===typeof a.render)throw Error(k(188));throw Error(k(268,Object.keys(a)));}a=Sf(b);a=null===a?null:a.stateNode;return a};I.flushSync=function(a,b){if((p&(ca|ma))!==H)throw Error(k(187));var c=p;p|=1;try{return Da(99,a.bind(null,b))}finally{p=c,ha()}};I.hydrate=function(a,b,c){if(!bc(b))throw Error(k(200));return nd(null,a,b,!0,c)};I.render=function(a,b,c){if(!bc(b))throw Error(k(200));return nd(null,a,b,!1,c)};I.unmountComponentAtNode=function(a){if(!bc(a))throw Error(k(40));return a._reactRootContainer?
-(Rh(function(){nd(null,null,a,!1,function(){a._reactRootContainer=null;a[Lb]=null})}),!0):!1};I.unstable_batchedUpdates=Qh;I.unstable_createPortal=function(a,b){return Xh(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};I.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!bc(c))throw Error(k(200));if(null==a||void 0===a._reactInternalFiber)throw Error(k(38));return nd(a,b,c,!1,d)};I.version="16.14.0"});
+'use strict';(function(M,ha){"object"===typeof exports&&"undefined"!==typeof module?ha(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],ha):(M=M||self,ha(M.ReactDOM={},M.React))})(this,function(M,ha){function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
+function Ta(a,b){gb(a,b);gb(a+"Capture",b)}function gb(a,b){Ib[a]=b;for(a=0;a<b.length;a++)zf.add(b[a])}function li(a){if(Af.call(Bf,a))return!0;if(Af.call(Cf,a))return!1;if(mi.test(a))return Bf[a]=!0;Cf[a]=!0;return!1}function ni(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function oi(a,b,c,d){if(null===
+b||"undefined"===typeof b||ni(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function Q(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}function Ed(a,b,c,d){var e=I.hasOwnProperty(b)?I[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||
+"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(oi(b,c,e,d)&&(c=null),d||null===e?li(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}function Jb(a){if(null===a||"object"!==typeof a)return null;a=Df&&a[Df]||a["@@iterator"];return"function"===typeof a?a:null}
+function Kb(a,b,c){if(void 0===Fd)try{throw Error();}catch(d){Fd=(b=d.stack.trim().match(/\n( *(at )?)/))&&b[1]||""}return"\n"+Fd+a}function Bc(a,b){if(!a||Gd)return"";Gd=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();
+}catch(k){d=k}a()}}catch(k){if(k&&d&&"string"===typeof k.stack){for(var e=k.stack.split("\n"),f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return"\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Gd=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Kb(a):""}function pi(a){switch(a.tag){case 5:return Kb(a.type);case 16:return Kb("Lazy");case 13:return Kb("Suspense");
+case 19:return Kb("SuspenseList");case 0:case 2:case 15:return a=Bc(a.type,!1),a;case 11:return a=Bc(a.type.render,!1),a;case 22:return a=Bc(a.type._render,!1),a;case 1:return a=Bc(a.type,!0),a;default:return""}}function hb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case wa:return"Fragment";case Ua:return"Portal";case Lb:return"Profiler";case Hd:return"StrictMode";case Mb:return"Suspense";case Cc:return"SuspenseList"}if("object"===
+typeof a)switch(a.$$typeof){case Id:return(a.displayName||"Context")+".Consumer";case Jd:return(a._context.displayName||"Context")+".Provider";case Dc:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Ec:return hb(a.type);case Kd:return hb(a._render);case Ld:b=a._payload;a=a._init;try{return hb(a(b))}catch(c){}}return null}function xa(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;
+default:return""}}function Ef(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function qi(a){var b=Ef(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,
+b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}}function Fc(a){a._valueTracker||(a._valueTracker=qi(a))}function Ff(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ef(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Gc(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||
+a.body}catch(b){return a.body}}function Md(a,b){var c=b.checked;return B({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Gf(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=xa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Hf(a,b){b=b.checked;null!=b&&Ed(a,"checked",
+b,!1)}function Nd(a,b){Hf(a,b);var c=xa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Od(a,b.type,c):b.hasOwnProperty("defaultValue")&&Od(a,b.type,xa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function If(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=
+b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function Od(a,b,c){if("number"!==b||Gc(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function ri(a){var b="";ha.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}
+function Pd(a,b){a=B({children:void 0},b);if(b=ri(b.children))a.children=b;return a}function ib(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+xa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function Qd(a,b){if(null!=
+b.dangerouslySetInnerHTML)throw Error(m(91));return B({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Jf(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(m(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(m(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:xa(c)}}function Kf(a,b){var c=xa(b.value),d=xa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==
+c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Lf(a,b){b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function Mf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Rd(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Mf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function Nf(a,b,c){return null==
+b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Nb.hasOwnProperty(a)&&Nb[a]?(""+b).trim():b+"px"}function Of(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=Nf(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function Sd(a,b){if(b){if(si[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(m(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(m(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&
+"__html"in b.dangerouslySetInnerHTML))throw Error(m(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(m(62));}}function Td(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function Ud(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);
+return 3===a.nodeType?a.parentNode:a}function Pf(a){if(a=Ob(a)){if("function"!==typeof Vd)throw Error(m(280));var b=a.stateNode;b&&(b=Hc(b),Vd(a.stateNode,a.type,b))}}function Qf(a){jb?kb?kb.push(a):kb=[a]:jb=a}function Rf(){if(jb){var a=jb,b=kb;kb=jb=null;Pf(a);if(b)for(a=0;a<b.length;a++)Pf(b[a])}}function Wd(){if(null!==jb||null!==kb)Xd(),Rf()}function ti(a,b,c){if(Yd)return a(b,c);Yd=!0;try{return Sf(a,b,c)}finally{Yd=!1,Wd()}}function Pb(a,b){var c=a.stateNode;if(null===c)return null;var d=Hc(c);
+if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(m(231,b,typeof c));return c}function ui(a,b,c,d,e,
+f,g,h,k){Qb=!1;Ic=null;vi.apply(wi,arguments)}function xi(a,b,c,d,e,f,g,h,k){ui.apply(this,arguments);if(Qb){if(Qb){var v=Ic;Qb=!1;Ic=null}else throw Error(m(198));Jc||(Jc=!0,Zd=v)}}function Va(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function Tf(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Uf(a){if(Va(a)!==
+a)throw Error(m(188));}function yi(a){var b=a.alternate;if(!b){b=Va(a);if(null===b)throw Error(m(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Uf(e),a;if(f===d)return Uf(e),b;f=f.sibling}throw Error(m(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=
+f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(m(189));}}if(c.alternate!==d)throw Error(m(190));}if(3!==c.tag)throw Error(m(188));return c.stateNode.current===c?a:b}function Vf(a){a=yi(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}function Wf(a,b){for(var c=
+a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}function $d(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function Xf(a,b){switch(a){case "focusin":case "focusout":ya=null;break;case "dragenter":case "dragleave":za=null;break;case "mouseover":case "mouseout":Aa=null;break;case "pointerover":case "pointerout":Rb.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Sb.delete(b.pointerId)}}function Tb(a,
+b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=$d(b,c,d,e,f),null!==b&&(b=Ob(b),null!==b&&Yf(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}function zi(a,b,c,d,e){switch(b){case "focusin":return ya=Tb(ya,a,b,c,d,e),!0;case "dragenter":return za=Tb(za,a,b,c,d,e),!0;case "mouseover":return Aa=Tb(Aa,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Rb.set(f,Tb(Rb.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Sb.set(f,
+Tb(Sb.get(f)||null,a,b,c,d,e)),!0}return!1}function Ai(a){var b=Wa(a.target);if(null!==b){var c=Va(b);if(null!==c)if(b=c.tag,13===b){if(b=Tf(c),null!==b){a.blockedOn=b;Bi(a.lanePriority,function(){ae(a.priority,function(){Ci(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Kc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=be(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);
+if(null!==c)return b=Ob(c),null!==b&&Yf(b),a.blockedOn=c,!1;b.shift()}return!0}function Zf(a,b,c){Kc(a)&&c.delete(b)}function Di(){for(ce=!1;0<ia.length;){var a=ia[0];if(null!==a.blockedOn){a=Ob(a.blockedOn);null!==a&&Ei(a);break}for(var b=a.targetContainers;0<b.length;){var c=be(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&ia.shift()}null!==ya&&Kc(ya)&&(ya=null);null!==za&&Kc(za)&&(za=null);null!==Aa&&Kc(Aa)&&(Aa=null);Rb.forEach(Zf);
+Sb.forEach(Zf)}function Ub(a,b){a.blockedOn===b&&(a.blockedOn=null,ce||(ce=!0,$f(ag,Di)))}function bg(a){if(0<ia.length){Ub(ia[0],a);for(var b=1;b<ia.length;b++){var c=ia[b];c.blockedOn===a&&(c.blockedOn=null)}}null!==ya&&Ub(ya,a);null!==za&&Ub(za,a);null!==Aa&&Ub(Aa,a);b=function(b){return Ub(b,a)};Rb.forEach(b);Sb.forEach(b);for(b=0;b<Vb.length;b++)c=Vb[b],c.blockedOn===a&&(c.blockedOn=null);for(;0<Vb.length&&(b=Vb[0],null===b.blockedOn);)Ai(b),null===b.blockedOn&&Vb.shift()}function Lc(a,b){var c=
+{};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function Mc(a){if(de[a])return de[a];if(!lb[a])return a;var b=lb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in cg)return de[a]=b[c];return a}function ee(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e="on"+(e[0].toUpperCase()+e.slice(1));fe.set(d,b);dg.set(d,e);Ta(e,[d])}}function mb(a){if(0!==(1&a))return w=15,1;if(0!==(2&a))return w=14,2;if(0!==(4&a))return w=13,4;var b=24&a;if(0!==b)return w=12,b;
+if(0!==(a&32))return w=11,32;b=192&a;if(0!==b)return w=10,b;if(0!==(a&256))return w=9,256;b=3584&a;if(0!==b)return w=8,b;if(0!==(a&4096))return w=7,4096;b=4186112&a;if(0!==b)return w=6,b;b=62914560&a;if(0!==b)return w=5,b;if(a&67108864)return w=4,67108864;if(0!==(a&134217728))return w=3,134217728;b=805306368&a;if(0!==b)return w=2,b;if(0!==(1073741824&a))return w=1,1073741824;w=8;return a}function Fi(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}
+function Gi(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(m(358,a));}}function Wb(a,b){var c=a.pendingLanes;if(0===c)return w=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=w=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=mb(k),e=w):(h&=f,0!==h&&(d=mb(h),e=w))}else f=c&~g,0!==f?(d=mb(f),e=w):0!==h&&(d=mb(h),
+e=w);if(0===d)return 0;d=31-Ba(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){mb(b);if(e<=w)return b;w=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Ba(b),e=1<<c,d|=a[c],b&=~e;return d}function eg(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Nc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=nb(24&~b),0===a?Nc(10,b):a;case 10:return a=nb(192&~b),0===a?Nc(8,b):a;case 8:return a=nb(3584&~b),0===a&&(a=nb(4186112&~b),
+0===a&&(a=512)),a;case 2:return b=nb(805306368&~b),0===b&&(b=268435456),b}throw Error(m(358,a));}function nb(a){return a&-a}function ge(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}function Oc(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Ba(b);a[b]=c}function Hi(a){return 0===a?32:31-(Ii(a)/Ji|0)|0}function Ki(a,b,c,d){Xa||Xd();var e=he,f=Xa;Xa=!0;try{fg(e,a,b,c,d)}finally{(Xa=f)||Wd()}}function Li(a,b,c,d){Mi(Ni,he.bind(null,a,b,c,d))}function he(a,
+b,c,d){if(Pc){var e;if((e=0===(b&4))&&0<ia.length&&-1<gg.indexOf(a))a=$d(null,a,b,c,d),ia.push(a);else{var f=be(a,b,c,d);if(null===f)e&&Xf(a,d);else{if(e){if(-1<gg.indexOf(a)){a=$d(f,a,b,c,d);ia.push(a);return}if(zi(f,a,b,c,d))return;Xf(a,d)}hg(a,b,d,null,c)}}}}function be(a,b,c,d){var e=Ud(d);e=Wa(e);if(null!==e){var f=Va(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=Tf(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==
+e&&(e=null)}}hg(a,b,d,e,c);return null}function ig(){if(Qc)return Qc;var a,b=ie,c=b.length,d,e="value"in Ca?Ca.value:Ca.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Qc=e.slice(a,1<d?1-d:void 0)}function Rc(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function Sc(){return!0}function jg(){return!1}function V(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=
+d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?Sc:jg;this.isPropagationStopped=jg;return this}B(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=Sc)},stopPropagation:function(){var a=
+this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=Sc)},persist:function(){},isPersistent:Sc});return b}function Oi(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Pi[a])?!!b[a]:!1}function je(a){return Oi}function kg(a,b){switch(a){case "keyup":return-1!==Qi.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}
+function lg(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}function Ri(a,b){switch(a){case "compositionend":return lg(b);case "keypress":if(32!==b.which)return null;mg=!0;return ng;case "textInput":return a=b.data,a===ng&&mg?null:a;default:return null}}function Si(a,b){if(ob)return"compositionend"===a||!ke&&kg(a,b)?(a=ig(),Qc=ie=Ca=null,ob=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;
+if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return og&&"ko"!==b.locale?null:b.data;default:return null}}function pg(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Ti[a.type]:"textarea"===b?!0:!1}function Ui(a){if(!oa)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function qg(a,b,c,d){Qf(d);b=Tc(b,"onChange");0<b.length&&(c=new le("onChange","change",
+null,c,d),a.push({event:c,listeners:b}))}function Vi(a){rg(a,0)}function Uc(a){var b=pb(a);if(Ff(b))return a}function Wi(a,b){if("change"===a)return b}function sg(){Xb&&(Xb.detachEvent("onpropertychange",tg),Yb=Xb=null)}function tg(a){if("value"===a.propertyName&&Uc(Yb)){var b=[];qg(b,Yb,a,Ud(a));a=Vi;if(Xa)a(b);else{Xa=!0;try{me(a,b)}finally{Xa=!1,Wd()}}}}function Xi(a,b,c){"focusin"===a?(sg(),Xb=b,Yb=c,Xb.attachEvent("onpropertychange",tg)):"focusout"===a&&sg()}function Yi(a,b){if("selectionchange"===
+a||"keyup"===a||"keydown"===a)return Uc(Yb)}function Zi(a,b){if("click"===a)return Uc(b)}function $i(a,b){if("input"===a||"change"===a)return Uc(b)}function aj(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function Zb(a,b){if(X(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!bj.call(b,c[d])||!X(a[c[d]],b[c[d]]))return!1;return!0}function ug(a){for(;a&&a.firstChild;)a=
+a.firstChild;return a}function vg(a,b){var c=ug(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ug(c)}}function wg(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wg(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xg(){for(var a=window,b=Gc();b instanceof a.HTMLIFrameElement;){try{var c=
+"string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Gc(a.document)}return b}function ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function yg(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;oe||null==qb||qb!==Gc(d)||(d=qb,"selectionStart"in d&&ne(d)?d={start:d.selectionStart,
+end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),$b&&Zb($b,d)||($b=d,d=Tc(pe,"onSelect"),0<d.length&&(b=new le("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=qb)))}function zg(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;xi(d,b,void 0,a);a.currentTarget=null}function rg(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=
+a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,v=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;zg(e,h,v);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;v=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;zg(e,h,v);f=k}}}if(Jc)throw a=Zd,Jc=!1,Zd=null,a;}function z(a,b){var c=Ag(b),d=a+"__bubble";c.has(d)||(Bg(b,a,2,!1),c.add(d))}function Cg(a){a[Dg]||(a[Dg]=!0,zf.forEach(function(b){Eg.has(b)||
+Fg(b,!1,a,null);Fg(b,!0,a,null)}))}function Fg(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;"selectionchange"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Eg.has(a)){if("scroll"!==a)return;e|=2;f=d}var g=Ag(f),h=a+"__"+(b?"capture":"bubble");g.has(h)||(b&&(e|=4),Bg(f,a,e,b),g.add(h))}function Bg(a,b,c,d,e){e=fe.get(b);switch(void 0===e?2:e){case 0:e=Ki;break;case 1:e=Li;break;default:e=he}c=e.bind(null,b,c,a);e=void 0;!qe||"touchstart"!==b&&"touchmove"!==
+b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}function hg(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&
+k.parentNode===e)return;g=g.return}for(;null!==h;){g=Wa(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}ti(function(){var d=f,e=Ud(c),g=[];a:{var h=dg.get(a);if(void 0!==h){var k=le,m=a;switch(a){case "keypress":if(0===Rc(c))break a;case "keydown":case "keyup":k=cj;break;case "focusin":m="focus";k=re;break;case "focusout":m="blur";k=re;break;case "beforeblur":case "afterblur":k=re;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=
+Gg;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=dj;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=ej;break;case Hg:case Ig:case Jg:k=fj;break;case Kg:k=gj;break;case "scroll":k=hj;break;case "wheel":k=ij;break;case "copy":case "cut":case "paste":k=jj;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=
+Lg}var l=0!==(b&4),C=!l&&"scroll"===a,x=l?null!==h?h+"Capture":null:h;l=[];for(var p=d,q;null!==p;){q=p;var u=q.stateNode;5===q.tag&&null!==u&&(q=u,null!==x&&(u=Pb(p,x),null!=u&&l.push(ac(p,u,q))));if(C)break;p=p.return}0<l.length&&(h=new k(h,m,null,c,e),g.push({event:h,listeners:l}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&0===(b&16)&&(m=c.relatedTarget||c.fromElement)&&(Wa(m)||m[rb]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||
+h.parentWindow:window;if(k){if(m=c.relatedTarget||c.toElement,k=d,m=m?Wa(m):null,null!==m&&(C=Va(m),m!==C||5!==m.tag&&6!==m.tag))m=null}else k=null,m=d;if(k!==m){l=Gg;u="onMouseLeave";x="onMouseEnter";p="mouse";if("pointerout"===a||"pointerover"===a)l=Lg,u="onPointerLeave",x="onPointerEnter",p="pointer";C=null==k?h:pb(k);q=null==m?h:pb(m);h=new l(u,p+"leave",k,c,e);h.target=C;h.relatedTarget=q;u=null;Wa(e)===d&&(l=new l(x,p+"enter",m,c,e),l.target=q,l.relatedTarget=C,u=l);C=u;if(k&&m)b:{l=k;x=m;p=
+0;for(q=l;q;q=sb(q))p++;q=0;for(u=x;u;u=sb(u))q++;for(;0<p-q;)l=sb(l),p--;for(;0<q-p;)x=sb(x),q--;for(;p--;){if(l===x||null!==x&&l===x.alternate)break b;l=sb(l);x=sb(x)}l=null}else l=null;null!==k&&Mg(g,h,k,l,!1);null!==m&&null!==C&&Mg(g,C,m,l,!0)}}}a:{h=d?pb(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var n=Wi;else if(pg(h))if(Ng)n=$i;else{n=Yi;var da=Xi}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(n=Zi);
+if(n&&(n=n(a,d))){qg(g,n,c,e);break a}da&&da(a,h,d);"focusout"===a&&(da=h._wrapperState)&&da.controlled&&"number"===h.type&&Od(h,"number",h.value)}da=d?pb(d):window;switch(a){case "focusin":if(pg(da)||"true"===da.contentEditable)qb=da,pe=d,$b=null;break;case "focusout":$b=pe=qb=null;break;case "mousedown":oe=!0;break;case "contextmenu":case "mouseup":case "dragend":oe=!1;yg(g,c,e);break;case "selectionchange":if(kj)break;case "keydown":case "keyup":yg(g,c,e)}var Ea;if(ke)b:{switch(a){case "compositionstart":var F=
+"onCompositionStart";break b;case "compositionend":F="onCompositionEnd";break b;case "compositionupdate":F="onCompositionUpdate";break b}F=void 0}else ob?kg(a,c)&&(F="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(F="onCompositionStart");F&&(og&&"ko"!==c.locale&&(ob||"onCompositionStart"!==F?"onCompositionEnd"===F&&ob&&(Ea=ig()):(Ca=e,ie="value"in Ca?Ca.value:Ca.textContent,ob=!0)),da=Tc(d,F),0<da.length&&(F=new Og(F,a,null,c,e),g.push({event:F,listeners:da}),Ea?F.data=Ea:(Ea=lg(c),null!==Ea&&
+(F.data=Ea))));if(Ea=lj?Ri(a,c):Si(a,c))d=Tc(d,"onBeforeInput"),0<d.length&&(e=new mj("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=Ea)}rg(g,b)})}function ac(a,b,c){return{instance:a,listener:b,currentTarget:c}}function Tc(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Pb(a,c),null!=f&&d.unshift(ac(a,f,e)),f=Pb(a,b),null!=f&&d.push(ac(a,f,e)));a=a.return}return d}function sb(a){if(null===a)return null;do a=a.return;while(a&&
+5!==a.tag);return a?a:null}function Mg(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,v=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==v&&(h=v,e?(k=Pb(c,f),null!=k&&g.unshift(ac(c,k,h))):e||(k=Pb(c,f),null!=k&&g.push(ac(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function Vc(){}function Pg(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}function se(a,b){return"textarea"===a||"option"===
+a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function te(a){1===a.nodeType?a.textContent="":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=""))}function tb(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function Qg(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===
+c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}function nj(a){return{$$typeof:ue,toString:a,valueOf:a}}function Wa(a){var b=a[Fa];if(b)return b;for(var c=a.parentNode;c;){if(b=c[rb]||c[Fa]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Qg(a);null!==a;){if(c=a[Fa])return c;a=Qg(a)}return b}a=c;c=a.parentNode}return null}function Ob(a){a=a[Fa]||a[rb];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function pb(a){if(5===a.tag||6===a.tag)return a.stateNode;
+throw Error(m(33));}function Hc(a){return a[Wc]||null}function Ag(a){var b=a[Rg];void 0===b&&(b=a[Rg]=new Set);return b}function Ga(a){return{current:a}}function t(a,b){0>ub||(a.current=ve[ub],ve[ub]=null,ub--)}function A(a,b,c){ub++;ve[ub]=a.current;a.current=b}function vb(a,b){var c=a.type.contextTypes;if(!c)return Ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=
+b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function S(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Sg(a,b,c){if(D.current!==Ha)throw Error(m(168));A(D,b);A(J,c)}function Tg(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(m(108,hb(b)||"Unknown",e));return B({},c,d)}function Xc(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ha;Ya=D.current;
+A(D,a);A(J,J.current);return!0}function Ug(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=Tg(a,b,Ya),d.__reactInternalMemoizedMergedChildContext=a,t(J),t(D),A(D,a)):t(J);A(J,c)}function wb(){switch(oj()){case Yc:return 99;case Vg:return 98;case Wg:return 97;case Xg:return 96;case Yg:return 95;default:throw Error(m(332));}}function Zg(a){switch(a){case 99:return Yc;case 98:return Vg;case 97:return Wg;case 96:return Xg;case 95:return Yg;default:throw Error(m(332));}}function Za(a,b){a=Zg(a);
+return pj(a,b)}function bc(a,b,c){a=Zg(a);return we(a,b,c)}function ja(){if(null!==Zc){var a=Zc;Zc=null;xe(a)}$g()}function $g(){if(!ye&&null!==pa){ye=!0;var a=0;try{var b=pa;Za(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});pa=null}catch(c){throw null!==pa&&(pa=pa.slice(a+1)),we(Yc,ja),c;}finally{ye=!1}}}function ea(a,b){if(a&&a.defaultProps){b=B({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function ze(){$c=xb=ad=null}function Ae(a){var b=
+bd.current;t(bd);a.type._context._currentValue=b}function ah(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function yb(a,b){ad=a;$c=xb=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(fa=!0),a.firstContext=null)}function Y(a,b){if($c!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)$c=a,b=1073741823;b={context:a,observedBits:b,
+next:null};if(null===xb){if(null===ad)throw Error(m(308));xb=b;ad.dependencies={lanes:0,firstContext:b,responders:null}}else xb=xb.next=b}return a._currentValue}function Be(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function bh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ia(a,b){return{eventTime:a,
+lane:b,tag:0,payload:null,callback:null,next:null}}function Ja(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}function ch(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=
+f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=b;c.lastBaseUpdate=b}function cc(a,b,c,d){var e=a.updateQueue;Ka=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,v=k.next;k.next=null;null===g?f=v:g.next=v;g=k;var m=a.alternate;if(null!==m){m=m.updateQueue;var l=m.lastBaseUpdate;l!==g&&(null===l?m.firstBaseUpdate=
+v:l.next=v,m.lastBaseUpdate=k)}}if(null!==f){l=e.baseState;g=0;m=v=k=null;do{h=f.lane;var r=f.eventTime;if((d&h)===h){null!==m&&(m=m.next={eventTime:r,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});a:{var n=a,t=f;h=b;r=c;switch(t.tag){case 1:n=t.payload;if("function"===typeof n){l=n.call(r,l,h);break a}l=n;break a;case 3:n.flags=n.flags&-4097|64;case 0:n=t.payload;h="function"===typeof n?n.call(r,l,h):n;if(null===h||void 0===h)break a;l=B({},l,h);break a;case 2:Ka=!0}}null!==f.callback&&
+(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else r={eventTime:r,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===m?(v=m=r,k=l):m=m.next=r,g|=h;f=f.next;if(null===f)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===m&&(k=l);e.baseState=k;e.firstBaseUpdate=v;e.lastBaseUpdate=m;La|=g;a.lanes=g;a.memoizedState=l}}function dh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=
+a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(m(191,e));e.call(d)}}}function cd(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:B({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}function eh(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Zb(c,d)||!Zb(e,f):!0}function fh(a,b,c){var d=!1,e=Ha;var f=b.contextType;"object"===
+typeof f&&null!==f?f=Y(f):(e=S(b)?Ya:D.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?vb(a,e):Ha);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=dd;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}function gh(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&
+b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&dd.enqueueReplaceState(b,b.state,null)}function Ce(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=hh;Be(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=Y(f):(f=S(b)?Ya:D.current,e.context=vb(a,f));cc(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(cd(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||
+"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&dd.enqueueReplaceState(e,e.state,null),cc(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4)}function dc(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==
+c.tag)throw Error(m(309));var d=c.stateNode}if(!d)throw Error(m(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===hh&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(m(284));if(!c._owner)throw Error(m(290,a));}return a}function ed(a,b){if("textarea"!==a.type)throw Error(m(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+
+"}":b));}function ih(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Ma(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=
+2,c):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=De(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=dc(a,b,c),d.return=a,d;d=fd(c.type,c.key,c.props,null,a.mode,d);d.ref=dc(a,b,c);d.return=a;return d}function v(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
+Ee(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function l(a,b,c,d,f){if(null===b||7!==b.tag)return b=zb(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function n(a,b,c){if("string"===typeof b||"number"===typeof b)return b=De(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case ec:return c=fd(b.type,b.key,b.props,null,a.mode,c),c.ref=dc(a,null,b),c.return=a,c;case Ua:return b=Ee(b,a.mode,c),b.return=a,b}if(gd(b)||Jb(b))return b=zb(b,
+a.mode,c,null),b.return=a,b;ed(a,b)}return null}function r(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case ec:return c.key===e?c.type===wa?l(a,b,c.props.children,d,e):k(a,b,c,d):null;case Ua:return c.key===e?v(a,b,c,d):null}if(gd(c)||Jb(c))return null!==e?null:l(a,b,c,d,null);ed(a,c)}return null}function t(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||
+null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case ec:return a=a.get(null===d.key?c:d.key)||null,d.type===wa?l(b,a,d.props.children,e,d.key):k(b,a,d,e);case Ua:return a=a.get(null===d.key?c:d.key)||null,v(b,a,d,e)}if(gd(d)||Jb(d))return a=a.get(c)||null,l(b,a,d,e,null);ed(b,d)}return null}function w(e,g,h,k){for(var m=null,v=null,l=g,p=g=0,x=null;null!==l&&p<h.length;p++){l.index>p?(x=l,l=null):x=l.sibling;var C=r(e,l,h[p],k);if(null===C){null===l&&(l=x);break}a&&l&&null===
+C.alternate&&b(e,l);g=f(C,g,p);null===v?m=C:v.sibling=C;v=C;l=x}if(p===h.length)return c(e,l),m;if(null===l){for(;p<h.length;p++)l=n(e,h[p],k),null!==l&&(g=f(l,g,p),null===v?m=l:v.sibling=l,v=l);return m}for(l=d(e,l);p<h.length;p++)x=t(l,e,p,h[p],k),null!==x&&(a&&null!==x.alternate&&l.delete(null===x.key?p:x.key),g=f(x,g,p),null===v?m=x:v.sibling=x,v=x);a&&l.forEach(function(a){return b(e,a)});return m}function z(e,g,h,k){var l=Jb(h);if("function"!==typeof l)throw Error(m(150));h=l.call(h);if(null==
+h)throw Error(m(151));for(var v=l=null,p=g,x=g=0,C=null,q=h.next();null!==p&&!q.done;x++,q=h.next()){p.index>x?(C=p,p=null):C=p.sibling;var Da=r(e,p,q.value,k);if(null===Da){null===p&&(p=C);break}a&&p&&null===Da.alternate&&b(e,p);g=f(Da,g,x);null===v?l=Da:v.sibling=Da;v=Da;p=C}if(q.done)return c(e,p),l;if(null===p){for(;!q.done;x++,q=h.next())q=n(e,q.value,k),null!==q&&(g=f(q,g,x),null===v?l=q:v.sibling=q,v=q);return l}for(p=d(e,p);!q.done;x++,q=h.next())q=t(p,e,x,q.value,k),null!==q&&(a&&null!==
+q.alternate&&p.delete(null===q.key?x:q.key),g=f(q,g,x),null===v?l=q:v.sibling=q,v=q);a&&p.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===wa&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case ec:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===wa){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,
+k.sibling);d=e(k,f.props);d.ref=dc(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===wa?(d=zb(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=fd(f.type,f.key,f.props,null,a.mode,h),h.ref=dc(a,d,f),h.return=a,a=h)}return g(a);case Ua:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=
+d.sibling}d=Ee(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=De(f,a.mode,h),d.return=a,a=d),g(a);if(gd(f))return w(a,d,f,h);if(Jb(f))return z(a,d,f,h);l&&ed(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(m(152,hb(a.type)||"Component"));}return c(a,d)}}function $a(a){if(a===fc)throw Error(m(174));return a}function Fe(a,b){A(gc,
+b);A(hc,a);A(ka,fc);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Rd(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Rd(b,a)}t(ka);A(ka,b)}function Ab(a){t(ka);t(hc);t(gc)}function jh(a){$a(gc.current);var b=$a(ka.current);var c=Rd(b,a.type);b!==c&&(A(hc,a),A(ka,c))}function Ge(a){hc.current===a&&(t(ka),t(hc))}function hd(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||
+"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function kh(a,b){var c=Z(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=
+a.lastEffect=c}function lh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}function He(a){if(la){var b=Na;if(b){var c=b;if(!lh(a,b)){b=tb(c.nextSibling);if(!b||!lh(a,b)){a.flags=a.flags&-1025|2;la=!1;ra=a;return}kh(ra,c)}ra=a;Na=tb(b.firstChild)}else a.flags=a.flags&-1025|2,la=!1,
+ra=a}}function mh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;ra=a}function id(a){if(a!==ra)return!1;if(!la)return mh(a),la=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!se(b,a.memoizedProps))for(b=Na;b;)kh(a,b),b=tb(b.nextSibling);mh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(m(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){Na=tb(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==
+c&&"$?"!==c||b++}a=a.nextSibling}Na=null}}else Na=ra?tb(a.stateNode.nextSibling):null;return!0}function Ie(){Na=ra=null;la=!1}function Je(){for(var a=0;a<Bb.length;a++)Bb[a]._workInProgressVersionPrimary=null;Bb.length=0}function T(){throw Error(m(321));}function Ke(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!X(a[c],b[c]))return!1;return!0}function Le(a,b,c,d,e,f){ic=f;y=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;jc.current=null===a||null===a.memoizedState?qj:rj;
+a=c(d,e);if(kc){f=0;do{kc=!1;if(!(25>f))throw Error(m(301));f+=1;K=N=null;b.updateQueue=null;jc.current=sj;a=c(d,e)}while(kc)}jc.current=jd;b=null!==N&&null!==N.next;ic=0;K=N=y=null;kd=!1;if(b)throw Error(m(300));return a}function ab(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===K?y.memoizedState=K=a:K=K.next=a;return K}function bb(){if(null===N){var a=y.alternate;a=null!==a?a.memoizedState:null}else a=N.next;var b=null===K?y.memoizedState:K.next;if(null!==
+b)K=b,N=a;else{if(null===a)throw Error(m(310));N=a;a={memoizedState:N.memoizedState,baseState:N.baseState,baseQueue:N.baseQueue,queue:N.queue,next:null};null===K?y.memoizedState=K=a:K=K.next=a}return K}function ma(a,b){return"function"===typeof b?b(a):b}function lc(a,b,c){b=bb();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=N,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;
+var h=g=f=null,k=e;do{var l=k.lane;if((ic&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;y.lanes|=l;La|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;X(d,b.memoizedState)||(fa=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=
+d}return[b.memoizedState,c.dispatch]}function mc(a,b,c){b=bb();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);X(f,b.memoizedState)||(fa=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function nh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,
+a=(ic&a)===a)b._workInProgressVersionPrimary=d,Bb.push(b);if(a)return c(b._source);Bb.push(b);throw Error(m(350));}function oh(a,b,c,d){var e=R;if(null===e)throw Error(m(349));var f=b._getVersion,g=f(b._source),h=jc.current,k=h.useState(function(){return nh(e,b,c)}),l=k[1],n=k[0];k=K;var t=a.memoizedState,r=t.refs,w=r.getSnapshot,z=t.source;t=t.subscribe;var B=y;a.memoizedState={refs:r,source:b,subscribe:d};h.useEffect(function(){r.getSnapshot=c;r.setSnapshot=l;var a=f(b._source);if(!X(g,a)){a=c(b._source);
+X(n,a)||(l(a),a=Oa(B),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=e.entanglements,h=a;0<h;){var k=31-Ba(h),m=1<<k;d[k]|=a;h&=~m}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=r.getSnapshot,c=r.setSnapshot;try{c(a(b._source));var d=Oa(B);e.mutableReadLanes|=d&e.pendingLanes}catch(q){c(function(){throw q;})}})},[b,d]);X(w,c)&&X(z,b)&&X(t,d)||(a={pending:null,dispatch:null,lastRenderedReducer:ma,lastRenderedState:n},a.dispatch=l=Me.bind(null,
+y,a),k.queue=a,k.baseQueue=null,n=nh(e,b,c),k.memoizedState=k.baseState=n);return n}function ph(a,b,c){var d=bb();return oh(d,a,b,c)}function nc(a){var b=ab();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:ma,lastRenderedState:a};a=a.dispatch=Me.bind(null,y,a);return[b.memoizedState,a]}function ld(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=y.updateQueue;null===b?(b={lastEffect:null},y.updateQueue=b,b.lastEffect=
+a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function qh(a){var b=ab();a={current:a};return b.memoizedState=a}function md(a){return bb().memoizedState}function Ne(a,b,c,d){var e=ab();y.flags|=a;e.memoizedState=ld(1|b,c,void 0,void 0===d?null:d)}function Oe(a,b,c,d){var e=bb();d=void 0===d?null:d;var f=void 0;if(null!==N){var g=N.memoizedState;f=g.destroy;if(null!==d&&Ke(d,g.deps)){ld(b,c,f,d);return}}y.flags|=a;e.memoizedState=ld(1|
+b,c,f,d)}function rh(a,b){return Ne(516,4,a,b)}function nd(a,b){return Oe(516,4,a,b)}function sh(a,b){return Oe(4,2,a,b)}function th(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function uh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Oe(4,2,th.bind(null,b,a),c)}function Pe(a,b){}function vh(a,b){var c=bb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Ke(b,d[1]))return d[0];
+c.memoizedState=[a,b];return a}function wh(a,b){var c=bb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Ke(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function tj(a,b){var c=wb();Za(98>c?98:c,function(){a(!0)});Za(97<c?97:c,function(){var c=aa.transition;aa.transition=1;try{a(!1),b()}finally{aa.transition=c}})}function Me(a,b,c){var d=W(),e=Oa(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);
+b.pending=f;g=a.alternate;if(a===y||null!==g&&g===y)kc=kd=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(X(k,h))return}catch(v){}finally{}Pa(a,e,d)}}function U(a,b,c,d){b.child=null===a?xh(b,null,c,d):od(b,a.child,c,d)}function yh(a,b,c,d,e){c=c.render;var f=b.ref;yb(b,e);d=Le(a,b,c,d,f,e);if(null!==a&&!fa)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,sa(a,b,e);b.flags|=1;
+U(a,b,d,e);return b.child}function zh(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!Qe(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,Ah(a,b,g,d,e,f);a=fd(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Zb,c(e,d)&&a.ref===b.ref))return sa(a,b,f);b.flags|=1;a=Ma(g,d);a.ref=b.ref;a.return=b;return b.child=a}function Ah(a,b,c,d,e,f){if(null!==a&&Zb(a.memoizedProps,
+d)&&a.ref===b.ref)if(fa=!1,0!==(f&e))0!==(a.flags&16384)&&(fa=!0);else return b.lanes=a.lanes,sa(a,b,f);return Re(a,b,c,d,f)}function Se(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode||"unstable-defer-without-hiding"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},pd(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},pd(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState=
+{baseLanes:a},pd(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,pd(b,d);U(a,b,e,c);return b.child}function Bh(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function Re(a,b,c,d,e){var f=S(c)?Ya:D.current;f=vb(b,f);yb(b,e);c=Le(a,b,c,d,f,e);if(null!==a&&!fa)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,sa(a,b,e);b.flags|=1;U(a,b,c,e);return b.child}function Ch(a,b,c,d,e){if(S(c)){var f=!0;Xc(b)}else f=!1;yb(b,e);if(null===b.stateNode)null!==
+a&&(a.alternate=null,b.alternate=null,b.flags|=2),fh(b,c,d),Ce(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=Y(l):(l=S(c)?Ya:D.current,l=vb(b,l));var m=c.getDerivedStateFromProps,n="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;n||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&gh(b,g,d,l);Ka=!1;var r=b.memoizedState;
+g.state=r;cc(b,d,g,e);k=b.memoizedState;h!==d||r!==k||J.current||Ka?("function"===typeof m&&(cd(b,c,m,d),k=b.memoizedState),(h=Ka||eh(b,c,h,d,r,k,l))?(n||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4)):("function"===typeof g.componentDidMount&&(b.flags|=4),
+b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;bh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:ea(b.type,h);g.props=l;n=b.pendingProps;r=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=Y(k):(k=S(c)?Ya:D.current,k=vb(b,k));var t=c.getDerivedStateFromProps;(m="function"===typeof t||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
+"function"!==typeof g.componentWillReceiveProps||(h!==n||r!==k)&&gh(b,g,d,k);Ka=!1;r=b.memoizedState;g.state=r;cc(b,d,g,e);var w=b.memoizedState;h!==n||r!==w||J.current||Ka?("function"===typeof t&&(cd(b,c,t,d),w=b.memoizedState),(l=Ka||eh(b,c,l,d,r,w,k))?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,w,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,
+w,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=w),g.props=d,g.state=w,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==
+typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=256),d=!1)}return Te(a,b,c,d,f,e)}function Te(a,b,c,d,e,f){Bh(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Ug(b,c,!1),sa(a,b,f);d=b.stateNode;uj.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=od(b,a.child,null,f),b.child=od(b,null,h,f)):U(a,b,h,f);b.memoizedState=d.state;e&&Ug(b,c,!0);return b.child}function Dh(a){var b=a.stateNode;b.pendingContext?
+Sg(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Sg(a,b.context,!1);Fe(a,b.containerInfo)}function Eh(a,b,c){var d=b.pendingProps,e=E.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);A(E,e&1);if(null===a){void 0!==d.fallback&&He(b);a=d.children;e=d.fallback;if(f)return a=Fh(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=
+qd,a;if("number"===typeof d.unstable_expectedLoadTime)return a=Fh(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=qd,b.lanes=33554432,a;c=Ue({mode:"visible",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=Gh(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=qd,d;c=Hh(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=
+Gh(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=qd,d;c=Hh(a,b,d.children,c);b.memoizedState=null;return c}function Fh(a,b,c,d){var e=a.mode,f=a.child;b={mode:"hidden",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b):f=Ue(b,e,0,null);c=zb(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}function Hh(a,b,c,d){var e=a.child;a=e.sibling;c=Ma(e,
+{mode:"visible",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}function Gh(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:"hidden",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Ma(g,h);null!==a?d=Ma(a,d):(d=zb(d,f,e,null),d.flags|=
+2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function Ih(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);ah(a.return,b)}function Ve(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}function Jh(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;U(a,b,d.children,c);d=E.current;
+if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&Ih(a,c);else if(19===a.tag)Ih(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}A(E,d);if(0===(b.mode&2))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===
+hd(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ve(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===hd(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ve(b,!0,c,null,f,b.lastEffect);break;case "together":Ve(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}function sa(a,b,c){null!==a&&(b.dependencies=a.dependencies);La|=b.lanes;if(0!==(c&
+b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(m(153));if(null!==b.child){a=b.child;c=Ma(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Ma(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}function oc(a,b){if(!la)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&
+(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}function vj(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return S(b.type)&&(t(J),t(D)),null;case 3:Ab();t(J);t(D);Je();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)id(b)?b.flags|=4:d.hydrate||(b.flags|=256);Kh(b);return null;case 5:Ge(b);var e=$a(gc.current);
+c=b.type;if(null!==a&&null!=b.stateNode)wj(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===b.stateNode)throw Error(m(166));return null}a=$a(ka.current);if(id(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Fa]=b;d[Wc]=f;switch(c){case "dialog":z("cancel",d);z("close",d);break;case "iframe":case "object":case "embed":z("load",d);break;case "video":case "audio":for(a=0;a<pc.length;a++)z(pc[a],d);break;case "source":z("error",d);break;case "img":case "image":case "link":z("error",d);
+z("load",d);break;case "details":z("toggle",d);break;case "input":Gf(d,f);z("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};z("invalid",d);break;case "textarea":Jf(d,f),z("invalid",d)}Sd(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],"children"===g?"string"===typeof e?d.textContent!==e&&(a=["children",e]):"number"===typeof e&&d.textContent!==""+e&&(a=["children",""+e]):Ib.hasOwnProperty(g)&&null!=e&&"onScroll"===g&&z("scroll",d));switch(c){case "input":Fc(d);If(d,
+f,!0);break;case "textarea":Fc(d);Lf(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=Vc)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===a&&(a=Mf(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?
+g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Fa]=b;a[Wc]=d;xj(a,b,!1,!1);b.stateNode=a;g=Td(c,d);switch(c){case "dialog":z("cancel",a);z("close",a);e=d;break;case "iframe":case "object":case "embed":z("load",a);e=d;break;case "video":case "audio":for(e=0;e<pc.length;e++)z(pc[e],a);e=d;break;case "source":z("error",a);e=d;break;case "img":case "image":case "link":z("error",a);z("load",a);e=d;break;case "details":z("toggle",a);e=d;break;case "input":Gf(a,d);e=Md(a,d);z("invalid",
+a);break;case "option":e=Pd(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=B({},d,{value:void 0});z("invalid",a);break;case "textarea":Jf(a,d);e=Qd(a,d);z("invalid",a);break;default:e=d}Sd(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?Of(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&Lh(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&qc(a,k):"number"===typeof k&&qc(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==
+f&&"autoFocus"!==f&&(Ib.hasOwnProperty(f)?null!=k&&"onScroll"===f&&z("scroll",a):null!=k&&Ed(a,f,k,g))}switch(c){case "input":Fc(a);If(a,d,!1);break;case "textarea":Fc(a);Lf(a);break;case "option":null!=d.value&&a.setAttribute("value",""+xa(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?ib(a,!!d.multiple,f,!1):null!=d.defaultValue&&ib(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=Vc)}Pg(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=
+128)}return null;case 6:if(a&&null!=b.stateNode)yj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(m(166));c=$a(gc.current);$a(ka.current);id(b)?(d=b.stateNode,c=b.memoizedProps,d[Fa]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Fa]=b,b.stateNode=d)}return null;case 13:t(E);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&id(b):c=null!==a.memoizedState;
+if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(E.current&1))0===L&&(L=3);else{if(0===L||3===L)L=4;null===R||0===(La&134217727)&&0===(Cb&134217727)||Db(R,O)}if(d||c)b.flags|=4;return null;case 4:return Ab(),Kh(b),null===a&&Cg(b.stateNode.containerInfo),null;case 10:return Ae(b),null;case 17:return S(b.type)&&(t(J),t(D)),null;case 19:t(E);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)oc(d,!1);else{if(0!==L||null!==
+a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=hd(a);if(null!==g){b.flags|=64;oc(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=
+g.lanes,f.child=g.child,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;A(E,E.current&1|2);return b.child}a=a.sibling}null!==d.tail&&P()>We&&(b.flags|=64,f=!0,oc(d,!1),b.lanes=33554432)}else{if(!f)if(a=hd(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),oc(d,!0),null===d.tail&&"hidden"===d.tailMode&&
+!g.alternate&&!la)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*P()-d.renderingStartTime>We&&1073741824!==c&&(b.flags|=64,f=!0,oc(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=P(),c.sibling=null,b=E.current,A(E,f?b&1|2:b&1),c):null;case 23:case 24:return ta=cb.current,t(cb),null!==a&&null!==
+a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(m(156,b.tag));}function zj(a,b){switch(a.tag){case 1:return S(a.type)&&(t(J),t(D)),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 3:Ab();t(J);t(D);Je();b=a.flags;if(0!==(b&64))throw Error(m(285));a.flags=b&-4097|64;return a;case 5:return Ge(a),null;case 13:return t(E),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return t(E),null;case 4:return Ab(),null;case 10:return Ae(a),
+null;case 23:case 24:return ta=cb.current,t(cb),null;default:return null}}function Xe(a,b){try{var c="",d=b;do c+=pi(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e}}function Ye(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function Mh(a,b,c){c=Ia(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){rd||(rd=!0,Ze=d);Ye(a,b)};return c}function Nh(a,b,c){c=Ia(-1,c);c.tag=
+3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ye(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===na?na=new Set([this]):na.add(this),Ye(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}function Oh(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Qa(a,c)}else b.current=null}function Aj(a,
+b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ea(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&te(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(m(163));}function Bj(a,b,c,d){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;
+do 3===(a.tag&3)&&(d=a.create,a.destroy=d()),a=a.next;while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Ph(c,a),Cj(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:ea(c.type,b.memoizedProps),a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&dh(c,b,a);return;case 3:b=c.updateQueue;
+if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}dh(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&Pg(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&bg(c))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(m(163));}function Qh(a,b){for(var c=a;;){if(5===
+c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=Nf("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===a)break;for(;null===c.sibling;){if(null===
+c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}function Rh(a,b,c){if(db&&"function"===typeof db.onCommitFiberUnmount)try{db.onCommitFiberUnmount($e,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Ph(b,c);else{d=b;try{e()}catch(f){Qa(d,f)}}c=c.next}while(c!==a)}break;case 1:Oh(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=
+b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Qa(b,f)}break;case 5:Oh(b);break;case 4:Sh(a,b)}}function Th(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function Uh(a){return 5===a.tag||3===a.tag||4===a.tag}function Vh(a){a:{for(var b=a.return;null!==b;){if(Uh(b))break a;b=b.return}throw Error(m(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=
+!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(m(161));}c.flags&16&&(qc(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Uh(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?af(a,c,b):bf(a,c,b)}function af(a,b,c){var d=
+a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Vc));else if(4!==d&&(a=a.child,null!==a))for(af(a,b,c),a=a.sibling;null!==a;)af(a,b,c),a=a.sibling}function bf(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);
+else if(4!==d&&(a=a.child,null!==a))for(bf(a,b,c),a=a.sibling;null!==a;)bf(a,b,c),a=a.sibling}function Sh(a,b,c){c=b;for(var d=!1,e,f;;){if(!d){e=c.return;a:for(;;){if(null===e)throw Error(m(160));f=e.stateNode;switch(e.tag){case 5:e=f;f=!1;break a;case 3:e=f.containerInfo;f=!0;break a;case 4:e=f.containerInfo;f=!0;break a}e=e.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(Rh(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===
+k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(Rh(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=
+c.sibling}}function cf(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Wc]=d;"input"===a&&"radio"===d.type&&null!=d.name&&Hf(c,d);Td(a,e);b=Td(a,d);for(e=0;e<f.length;e+=
+2){var g=f[e],h=f[e+1];"style"===g?Of(c,h):"dangerouslySetInnerHTML"===g?Lh(c,h):"children"===g?qc(c,h):Ed(c,g,h,b)}switch(a){case "input":Nd(c,d);break;case "textarea":Kf(c,d);break;case "select":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?ib(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?ib(c,!!d.multiple,d.defaultValue,!0):ib(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(m(162));b.stateNode.nodeValue=
+b.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,bg(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(df=P(),Qh(b.child,!0));Wh(b);return;case 19:Wh(b);return;case 17:return;case 23:case 24:Qh(b,null!==b.memoizedState);return}throw Error(m(163));}function Wh(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Dj);b.forEach(function(b){var d=Ej.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}function Fj(a,
+b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}function Eb(){We=P()+500}function W(){return 0!==(n&48)?P():-1!==sd?sd:sd=P()}function Oa(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===wb()?1:2;0===ua&&(ua=Fb);if(0!==Gj.transition){0!==td&&(td=null!==ef?ef.pendingLanes:0);a=ua;var b=4186112&~td;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=wb();0!==(n&4)&&98===a?a=Nc(12,ua):(a=Fi(a),a=Nc(a,ua));
+return a}function Pa(a,b,c){if(50<rc)throw rc=0,ff=null,Error(m(185));a=ud(a,b);if(null===a)return null;Oc(a,b,c);a===R&&(Cb|=b,4===L&&Db(a,O));var d=wb();1===b?0!==(n&8)&&0===(n&48)?gf(a):(ba(a,c),0===n&&(Eb(),ja())):(0===(n&4)||98!==d&&99!==d||(null===va?va=new Set([a]):va.add(a)),ba(a,c));ef=a}function ud(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}
+function ba(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Ba(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;mb(k);var m=w;f[h]=10<=m?l+250:6<=m?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Wb(a,a===R?O:0);b=w;if(0===d)null!==c&&(c!==hf&&xe(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==hf&&xe(c)}15===b?(c=gf.bind(null,a),null===pa?(pa=[c],Zc=we(Yc,$g)):pa.push(c),
+c=hf):14===b?c=bc(99,gf.bind(null,a)):(c=Gi(b),c=bc(c,Xh.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}function Xh(a){sd=-1;td=ua=0;if(0!==(n&48))throw Error(m(327));var b=a.callbackNode;if(Ra()&&a.callbackNode!==b)return null;var c=Wb(a,a===R?O:0);if(0===c)return null;var d=c;var e=n;n|=16;var f=Yh();if(R!==a||O!==d)Eb(),Gb(a,d);do try{Hj();break}catch(h){Zh(a,h)}while(1);ze();vd.current=f;n=e;null!==G?d=0:(R=null,O=0,d=L);if(0!==(Fb&Cb))Gb(a,0);else if(0!==d){2===d&&(n|=64,a.hydrate&&(a.hydrate=
+!1,te(a.containerInfo)),c=eg(a),0!==c&&(d=sc(a,c)));if(1===d)throw b=wd,Gb(a,0),Db(a,c),ba(a,P()),b;a.finishedWork=a.current.alternate;a.finishedLanes=c;switch(d){case 0:case 1:throw Error(m(345));case 2:eb(a);break;case 3:Db(a,c);if((c&62914560)===c&&(d=df+500-P(),10<d)){if(0!==Wb(a,0))break;e=a.suspendedLanes;if((e&c)!==c){W();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=$h(eb.bind(null,a),d);break}eb(a);break;case 4:Db(a,c);if((c&4186112)===c)break;d=a.eventTimes;for(e=-1;0<c;){var g=
+31-Ba(c);f=1<<g;g=d[g];g>e&&(e=g);c&=~f}c=e;c=P()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>c?4320:1960*Ij(c/1960))-c;if(10<c){a.timeoutHandle=$h(eb.bind(null,a),c);break}eb(a);break;case 5:eb(a);break;default:throw Error(m(329));}}ba(a,P());return a.callbackNode===b?Xh.bind(null,a):null}function Db(a,b){b&=~jf;b&=~Cb;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Ba(b),d=1<<c;a[c]=-1;b&=~d}}function gf(a){if(0!==(n&48))throw Error(m(327));Ra();
+if(a===R&&0!==(a.expiredLanes&O)){var b=O;var c=sc(a,b);0!==(Fb&Cb)&&(b=Wb(a,b),c=sc(a,b))}else b=Wb(a,0),c=sc(a,b);0!==a.tag&&2===c&&(n|=64,a.hydrate&&(a.hydrate=!1,te(a.containerInfo)),b=eg(a),0!==b&&(c=sc(a,b)));if(1===c)throw c=wd,Gb(a,0),Db(a,b),ba(a,P()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;eb(a);ba(a,P());return null}function Jj(){if(null!==va){var a=va;va=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;ba(a,P())})}ja()}function ai(a,b){var c=n;n|=1;try{return a(b)}finally{n=
+c,0===n&&(Eb(),ja())}}function bi(a,b){var c=n;n&=-2;n|=8;try{return a(b)}finally{n=c,0===n&&(Eb(),ja())}}function pd(a,b){A(cb,ta);ta|=b;Fb|=b}function Gb(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Kj(c));if(null!==G)for(c=G.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&(t(J),t(D));break;case 3:Ab();t(J);t(D);Je();break;case 5:Ge(d);break;case 4:Ab();break;case 13:t(E);break;case 19:t(E);break;case 10:Ae(d);
+break;case 23:case 24:ta=cb.current,t(cb)}c=c.return}R=a;G=Ma(a.current,null);O=ta=Fb=b;L=0;wd=null;jf=Cb=La=0}function Zh(a,b){do{var c=G;try{ze();jc.current=jd;if(kd){for(var d=y.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}kd=!1}ic=0;K=N=y=null;kc=!1;kf.current=null;if(null===c||null===c.return){L=1;wd=b;G=null;break}a:{var f=a,g=c.return,h=c,k=b;b=O;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k;
+if(0===(h.mode&2)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var n=0!==(E.current&1),r=g;do{var t;if(t=13===r.tag){var w=r.memoizedState;if(null!==w)t=null!==w.dehydrated?!0:!1;else{var z=r.memoizedProps;t=void 0===z.fallback?!1:!0!==z.unstable_avoidThisFallback?!0:n?!1:!0}}if(t){var C=r.updateQueue;if(null===C){var x=new Set;x.add(l);r.updateQueue=x}else C.add(l);if(0===(r.mode&2)){r.flags|=64;h.flags|=
+16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var p=Ia(-1,1);p.tag=2;Ja(h,p)}h.lanes|=1;break a}k=void 0;h=b;var q=f.pingCache;null===q?(q=f.pingCache=new Lj,k=new Set,q.set(l,k)):(k=q.get(l),void 0===k&&(k=new Set,q.set(l,k)));if(!k.has(h)){k.add(h);var u=Mj.bind(null,f,l,h);l.then(u,u)}r.flags|=4096;r.lanes=b;break a}r=r.return}while(null!==r);k=Error((hb(h.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==
+L&&(L=2);k=Xe(k,h);r=g;do{switch(r.tag){case 3:f=k;r.flags|=4096;b&=-b;r.lanes|=b;var B=Mh(r,f,b);ch(r,B);break a;case 1:f=k;var A=r.type,D=r.stateNode;if(0===(r.flags&64)&&("function"===typeof A.getDerivedStateFromError||null!==D&&"function"===typeof D.componentDidCatch&&(null===na||!na.has(D)))){r.flags|=4096;b&=-b;r.lanes|=b;var F=Nh(r,f,b);ch(r,F);break a}}r=r.return}while(null!==r)}ci(c)}catch(qa){b=qa;G===c&&null!==c&&(G=c=c.return);continue}break}while(1)}function Yh(){var a=vd.current;vd.current=
+jd;return null===a?jd:a}function sc(a,b){var c=n;n|=16;var d=Yh();R===a&&O===b||Gb(a,b);do try{Nj();break}catch(e){Zh(a,e)}while(1);ze();n=c;vd.current=d;if(null!==G)throw Error(m(261));R=null;O=0;return L}function Nj(){for(;null!==G;)di(G)}function Hj(){for(;null!==G&&!Oj();)di(G)}function di(a){var b=Pj(a.alternate,a,ta);a.memoizedProps=a.pendingProps;null===b?ci(a):G=b;kf.current=null}function ci(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=vj(c,b,ta);if(null!==c){G=c;return}c=
+b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(ta&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==a.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=zj(b);if(null!==c){c.flags&=2047;G=c;
+return}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){G=b;return}G=b=a}while(null!==b);0===L&&(L=5)}function eb(a){var b=wb();Za(99,Qj.bind(null,a,b));return null}function Qj(a,b){do Ra();while(null!==tc);if(0!==(n&48))throw Error(m(327));var c=a.finishedWork;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(m(177));a.callbackNode=null;var d=c.lanes|c.childLanes,e=d,f=a.pendingLanes&~e;a.pendingLanes=e;a.suspendedLanes=0;
+a.pingedLanes=0;a.expiredLanes&=e;a.mutableReadLanes&=e;a.entangledLanes&=e;e=a.entanglements;for(var g=a.eventTimes,h=a.expirationTimes;0<f;){var k=31-Ba(f),v=1<<k;e[k]=0;g[k]=-1;h[k]=-1;f&=~v}null!==va&&0===(d&24)&&va.has(a)&&va.delete(a);a===R&&(G=R=null,O=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,d=c.firstEffect):d=c:d=c.firstEffect;if(null!==d){e=n;n|=32;kf.current=null;lf=Pc;g=xg();if(ne(g)){if("selectionStart"in g)h={start:g.selectionStart,end:g.selectionEnd};else a:if(h=
+(h=g.ownerDocument)&&h.defaultView||window,(v=h.getSelection&&h.getSelection())&&0!==v.rangeCount){h=v.anchorNode;f=v.anchorOffset;k=v.focusNode;v=v.focusOffset;try{h.nodeType,k.nodeType}catch(qa){h=null;break a}var t=0,w=-1,r=-1,z=0,B=0,y=g,C=null;b:for(;;){for(var x;;){y!==h||0!==f&&3!==y.nodeType||(w=t+f);y!==k||0!==v&&3!==y.nodeType||(r=t+v);3===y.nodeType&&(t+=y.nodeValue.length);if(null===(x=y.firstChild))break;C=y;y=x}for(;;){if(y===g)break b;C===h&&++z===f&&(w=t);C===k&&++B===v&&(r=t);if(null!==
+(x=y.nextSibling))break;y=C;C=y.parentNode}y=x}h=-1===w||-1===r?null:{start:w,end:r}}else h=null;h=h||{start:0,end:0}}else h=null;mf={focusedElem:g,selectionRange:h};Pc=!1;uc=null;xd=!1;l=d;do try{Rj()}catch(qa){if(null===l)throw Error(m(330));Qa(l,qa);l=l.nextEffect}while(null!==l);uc=null;l=d;do try{for(g=a;null!==l;){var p=l.flags;p&16&&qc(l.stateNode,"");if(p&128){var q=l.alternate;if(null!==q){var u=q.ref;null!==u&&("function"===typeof u?u(null):u.current=null)}}switch(p&1038){case 2:Vh(l);l.flags&=
+-3;break;case 6:Vh(l);l.flags&=-3;cf(l.alternate,l);break;case 1024:l.flags&=-1025;break;case 1028:l.flags&=-1025;cf(l.alternate,l);break;case 4:cf(l.alternate,l);break;case 8:h=l;Sh(g,h);var A=h.alternate;Th(h);null!==A&&Th(A)}l=l.nextEffect}}catch(qa){if(null===l)throw Error(m(330));Qa(l,qa);l=l.nextEffect}while(null!==l);u=mf;q=xg();p=u.focusedElem;g=u.selectionRange;if(q!==p&&p&&p.ownerDocument&&wg(p.ownerDocument.documentElement,p)){null!==g&&ne(p)&&(q=g.start,u=g.end,void 0===u&&(u=q),"selectionStart"in
+p?(p.selectionStart=q,p.selectionEnd=Math.min(u,p.value.length)):(u=(q=p.ownerDocument||document)&&q.defaultView||window,u.getSelection&&(u=u.getSelection(),h=p.textContent.length,A=Math.min(g.start,h),g=void 0===g.end?A:Math.min(g.end,h),!u.extend&&A>g&&(h=g,g=A,A=h),h=vg(p,A),f=vg(p,g),h&&f&&(1!==u.rangeCount||u.anchorNode!==h.node||u.anchorOffset!==h.offset||u.focusNode!==f.node||u.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),u.removeAllRanges(),A>g?(u.addRange(q),u.extend(f.node,
+f.offset)):(q.setEnd(f.node,f.offset),u.addRange(q))))));q=[];for(u=p;u=u.parentNode;)1===u.nodeType&&q.push({element:u,left:u.scrollLeft,top:u.scrollTop});"function"===typeof p.focus&&p.focus();for(p=0;p<q.length;p++)u=q[p],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}Pc=!!lf;mf=lf=null;a.current=c;l=d;do try{for(p=a;null!==l;){var D=l.flags;D&36&&Bj(p,l.alternate,l);if(D&128){q=void 0;var E=l.ref;if(null!==E){var F=l.stateNode;switch(l.tag){case 5:q=F;break;default:q=F}"function"===typeof E?
+E(q):E.current=q}}l=l.nextEffect}}catch(qa){if(null===l)throw Error(m(330));Qa(l,qa);l=l.nextEffect}while(null!==l);l=null;Sj();n=e}else a.current=c;if(Sa)Sa=!1,tc=a,vc=b;else for(l=d;null!==l;)b=l.nextEffect,l.nextEffect=null,l.flags&8&&(D=l,D.sibling=null,D.stateNode=null),l=b;d=a.pendingLanes;0===d&&(na=null);1===d?a===ff?rc++:(rc=0,ff=a):rc=0;c=c.stateNode;if(db&&"function"===typeof db.onCommitFiberRoot)try{db.onCommitFiberRoot($e,c,void 0,64===(c.current.flags&64))}catch(qa){}ba(a,P());if(rd)throw rd=
+!1,a=Ze,Ze=null,a;if(0!==(n&8))return null;ja();return null}function Rj(){for(;null!==l;){var a=l.alternate;xd||null===uc||(0!==(l.flags&8)?Wf(l,uc)&&(xd=!0):13===l.tag&&Fj(a,l)&&Wf(l,uc)&&(xd=!0));var b=l.flags;0!==(b&256)&&Aj(a,l);0===(b&512)||Sa||(Sa=!0,bc(97,function(){Ra();return null}));l=l.nextEffect}}function Ra(){if(90!==vc){var a=97<vc?97:vc;vc=90;return Za(a,Tj)}return!1}function Cj(a,b){nf.push(b,a);Sa||(Sa=!0,bc(97,function(){Ra();return null}))}function Ph(a,b){of.push(b,a);Sa||(Sa=
+!0,bc(97,function(){Ra();return null}))}function Tj(){if(null===tc)return!1;var a=tc;tc=null;if(0!==(n&48))throw Error(m(331));var b=n;n|=32;var c=of;of=[];for(var d=0;d<c.length;d+=2){var e=c[d],f=c[d+1],g=e.destroy;e.destroy=void 0;if("function"===typeof g)try{g()}catch(k){if(null===f)throw Error(m(330));Qa(f,k)}}c=nf;nf=[];for(d=0;d<c.length;d+=2){e=c[d];f=c[d+1];try{var h=e.create;e.destroy=h()}catch(k){if(null===f)throw Error(m(330));Qa(f,k)}}for(h=a.current.firstEffect;null!==h;)a=h.nextEffect,
+h.nextEffect=null,h.flags&8&&(h.sibling=null,h.stateNode=null),h=a;n=b;ja();return!0}function ei(a,b,c){b=Xe(c,b);b=Mh(a,b,1);Ja(a,b);b=W();a=ud(a,1);null!==a&&(Oc(a,1,b),ba(a,b))}function Qa(a,b){if(3===a.tag)ei(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){ei(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===na||!na.has(d))){a=Xe(b,a);var e=Nh(c,a,1);Ja(c,e);e=W();c=ud(c,1);if(null!==
+c)Oc(c,1,e),ba(c,e);else if("function"===typeof d.componentDidCatch&&(null===na||!na.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}function Mj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=W();a.pingedLanes|=a.suspendedLanes&c;R===a&&(O&c)===c&&(4===L||3===L&&(O&62914560)===O&&500>P()-df?Gb(a,0):jf|=c);ba(a,b)}function Ej(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===wb()?1:2:(0===ua&&(ua=Fb),b=nb(62914560&~ua),0===b&&(b=4194304)));
+c=W();a=ud(a,b);null!==a&&(Oc(a,b,c),ba(a,c))}function Uj(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null}function Qe(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Vj(a){if("function"===
+typeof a)return Qe(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Dc)return 11;if(a===Ec)return 14}return 2}function Ma(a,b){var c=a.alternate;null===c?(c=Z(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=
+a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}function fd(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Qe(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case wa:return zb(c.children,e,f,b);case fi:g=8;e|=16;break;case Hd:g=8;e|=1;break;case Lb:return a=Z(12,c,b,e|8),a.elementType=Lb,a.type=Lb,a.lanes=f,a;case Mb:return a=Z(13,c,b,e),a.type=Mb,a.elementType=Mb,a.lanes=
+f,a;case Cc:return a=Z(19,c,b,e),a.elementType=Cc,a.lanes=f,a;case pf:return Ue(c,e,f,b);case qf:return a=Z(24,c,b,e),a.elementType=qf,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Jd:g=10;break a;case Id:g=9;break a;case Dc:g=11;break a;case Ec:g=14;break a;case Ld:g=16;d=null;break a;case Kd:g=22;break a}throw Error(m(130,null==a?a:typeof a,""));}b=Z(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function zb(a,b,c,d){a=Z(7,a,d,b);a.lanes=c;return a}function Ue(a,
+b,c,d){a=Z(23,a,d,b);a.elementType=pf;a.lanes=c;return a}function De(a,b,c){a=Z(6,a,null,b);a.lanes=c;return a}function Ee(a,b,c){b=Z(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Wj(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=
+null;this.callbackPriority=0;this.eventTimes=ge(0);this.expirationTimes=ge(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=ge(0);this.mutableSourceEagerHydrationData=null}function Xj(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ua,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function yd(a,b,c,d){var e=b.current,f=W(),g=Oa(e);
+a:if(c){c=c._reactInternals;b:{if(Va(c)!==c||1!==c.tag)throw Error(m(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(S(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(m(171));}if(1===c.tag){var k=c.type;if(S(k)){c=Tg(c,k,h);break a}}c=h}else c=Ha;null===b.context?b.context=c:b.pendingContext=c;b=Ia(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);Ja(e,b);Pa(e,g,f);return g}function rf(a){a=
+a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function gi(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function sf(a,b){gi(a,b);(a=a.alternate)&&gi(a,b)}function Yj(a){a=Vf(a);return null===a?null:a.stateNode}function Zj(a){return null}function tf(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new Wj(a,b,null!=c&&!0===c.hydrate);
+b=Z(3,null,null,2===b?7:1===b?3:0);c.current=b;b.stateNode=c;Be(b);a[rb]=c.current;Cg(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}function wc(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function ak(a,b){b||(b=a?9===
+a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new tf(a,0,b?{hydrate:!0}:void 0)}function zd(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=rf(g);h.call(a)}}yd(b,g,a,e)}else{f=c._reactRootContainer=ak(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=rf(g);k.call(a)}}bi(function(){yd(b,
+g,a,e)})}return rf(g)}function hi(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!wc(b))throw Error(m(200));return Xj(a,b,null,c)}if(!ha)throw Error(m(227));var zf=new Set,Ib={},oa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),mi=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
+Af=Object.prototype.hasOwnProperty,Cf={},Bf={},I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){I[a]=new Q(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];I[b]=new Q(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){I[a]=
+new Q(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){I[a]=new Q(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){I[a]=new Q(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple",
+"muted","selected"].forEach(function(a){I[a]=new Q(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){I[a]=new Q(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){I[a]=new Q(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){I[a]=new Q(a,5,!1,a.toLowerCase(),null,!1,!1)});var uf=/[\-:]([a-z])/g,vf=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
+a.replace(uf,vf);I[b]=new Q(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(uf,vf);I[b]=new Q(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(uf,vf);I[b]=new Q(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){I[a]=new Q(a,1,!1,a.toLowerCase(),null,!1,!1)});I.xlinkHref=new Q("xlinkHref",
+1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){I[a]=new Q(a,1,!1,a.toLowerCase(),null,!0,!0)});var B=ha.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,fb=ha.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ec=60103,Ua=60106,wa=60107,Hd=60108,Lb=60114,Jd=60109,Id=60110,Dc=60112,Mb=60113,Cc=60120,Ec=60115,Ld=60116,Kd=60121,ue=60128,fi=60129,pf=60130,qf=60131;if("function"===typeof Symbol&&Symbol.for){var H=Symbol.for;ec=
+H("react.element");Ua=H("react.portal");wa=H("react.fragment");Hd=H("react.strict_mode");Lb=H("react.profiler");Jd=H("react.provider");Id=H("react.context");Dc=H("react.forward_ref");Mb=H("react.suspense");Cc=H("react.suspense_list");Ec=H("react.memo");Ld=H("react.lazy");Kd=H("react.block");H("react.scope");ue=H("react.opaque.id");fi=H("react.debug_trace_mode");pf=H("react.offscreen");qf=H("react.legacy_hidden")}var Df="function"===typeof Symbol&&Symbol.iterator,Fd,Gd=!1,Ad,Lh=function(a){return"undefined"!==
+typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Ad=Ad||document.createElement("div");Ad.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Ad.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),qc=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=
+b;return}}a.textContent=b},Nb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,
+zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bk=["Webkit","ms","Moz","O"];Object.keys(Nb).forEach(function(a){bk.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Nb[b]=Nb[a]})});var si=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Vd=null,jb=null,kb=null,me=function(a,b){return a(b)},fg=function(a,
+b,c,d,e){return a(b,c,d,e)},Xd=function(){},Sf=me,Xa=!1,Yd=!1,qe=!1;if(oa)try{var xc={};Object.defineProperty(xc,"passive",{get:function(){qe=!0}});window.addEventListener("test",xc,xc);window.removeEventListener("test",xc,xc)}catch(a){qe=!1}var vi=function(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(Da){this.onError(Da)}},Qb=!1,Ic=null,Jc=!1,Zd=null,wi={onError:function(a){Qb=!0;Ic=a}},ca=ha.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,
+ck=ca.unstable_cancelCallback,Bd=ca.unstable_now,$f=ca.unstable_scheduleCallback,dk=ca.unstable_shouldYield,ii=ca.unstable_requestPaint,ae=ca.unstable_runWithPriority,ek=ca.unstable_getCurrentPriorityLevel,fk=ca.unstable_ImmediatePriority,ji=ca.unstable_UserBlockingPriority,ag=ca.unstable_NormalPriority,gk=ca.unstable_LowPriority,hk=ca.unstable_IdlePriority,ce=!1,ia=[],ya=null,za=null,Aa=null,Rb=new Map,Sb=new Map,Vb=[],gg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "),
+lb={animationend:Lc("Animation","AnimationEnd"),animationiteration:Lc("Animation","AnimationIteration"),animationstart:Lc("Animation","AnimationStart"),transitionend:Lc("Transition","TransitionEnd")},de={},cg={};oa&&(cg=document.createElement("div").style,"AnimationEvent"in window||(delete lb.animationend.animation,delete lb.animationiteration.animation,delete lb.animationstart.animation),"TransitionEvent"in window||delete lb.transitionend.transition);var Hg=Mc("animationend"),Ig=Mc("animationiteration"),
+Jg=Mc("animationstart"),Kg=Mc("transitionend"),dg=new Map,fe=new Map,ik=["abort","abort",Hg,"animationEnd",Ig,"animationIteration",Jg,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing",
+"playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Kg,"transitionEnd","waiting","waiting"];Bd();var w=8,Ba=Math.clz32?Math.clz32:Hi,Ii=Math.log,Ji=Math.LN2,Ni=ji,Mi=ae,Pc=!0,Ca=null,ie=null,Qc=null,Hb={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},le=V(Hb),yc=B({},Hb,{view:0,detail:0}),hj=V(yc),wf,xf,zc,Cd=B({},yc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,
+pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:je,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==zc&&(zc&&"mousemove"===a.type?(wf=a.screenX-zc.screenX,xf=a.screenY-zc.screenY):xf=wf=0,zc=a);return wf},movementY:function(a){return"movementY"in a?a.movementY:xf}}),Gg=V(Cd),jk=B({},Cd,{dataTransfer:0}),dj=V(jk),kk=B({},
+yc,{relatedTarget:0}),re=V(kk),lk=B({},Hb,{animationName:0,elapsedTime:0,pseudoElement:0}),fj=V(lk),mk=B({},Hb,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),jj=V(mk),nk=B({},Hb,{data:0}),Og=V(nk),mj=Og,ok={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",
+16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Pi={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},qk=B({},yc,{key:function(a){if(a.key){var b=ok[a.key]||a.key;if("Unidentified"!==
+b)return b}return"keypress"===a.type?(a=Rc(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?pk[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:je,charCode:function(a){return"keypress"===a.type?Rc(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?Rc(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),cj=V(qk),rk=B({},
+Cd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lg=V(rk),sk=B({},yc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:je}),ej=V(sk),tk=B({},Hb,{propertyName:0,elapsedTime:0,pseudoElement:0}),gj=V(tk),uk=B({},Cd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in
+a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),ij=V(uk),Qi=[9,13,27,32],ke=oa&&"CompositionEvent"in window,Ac=null;oa&&"documentMode"in document&&(Ac=document.documentMode);var lj=oa&&"TextEvent"in window&&!Ac,og=oa&&(!ke||Ac&&8<Ac&&11>=Ac),ng=String.fromCharCode(32),mg=!1,ob=!1,Ti={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Xb=null,Yb=null,Ng=!1;oa&&(Ng=Ui("input")&&(!document.documentMode||9<document.documentMode));
+var X="function"===typeof Object.is?Object.is:aj,bj=Object.prototype.hasOwnProperty,kj=oa&&"documentMode"in document&&11>=document.documentMode,qb=null,pe=null,$b=null,oe=!1;ee("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
+0);ee("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ee(ik,2);(function(a,b){for(var c=0;c<a.length;c++)fe.set(a[c],b)})("change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),0);gb("onMouseEnter",["mouseout","mouseover"]);
+gb("onMouseLeave",["mouseout","mouseover"]);gb("onPointerEnter",["pointerout","pointerover"]);gb("onPointerLeave",["pointerout","pointerover"]);Ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ta("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));
+Ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Eg=new Set("cancel close invalid load scroll toggle".split(" ").concat(pc)),
+Dg="_reactListening"+Math.random().toString(36).slice(2),lf=null,mf=null,$h="function"===typeof setTimeout?setTimeout:void 0,Kj="function"===typeof clearTimeout?clearTimeout:void 0,yf=0,Dd=Math.random().toString(36).slice(2),Fa="__reactFiber$"+Dd,Wc="__reactProps$"+Dd,rb="__reactContainer$"+Dd,Rg="__reactEvents$"+Dd,ve=[],ub=-1,Ha={},D=Ga(Ha),J=Ga(!1),Ya=Ha,$e=null,db=null,pj=ae,we=$f,xe=ck,oj=ek,Yc=fk,Vg=ji,Wg=ag,Xg=gk,Yg=hk,hf={},Oj=dk,Sj=void 0!==ii?ii:function(){},pa=null,Zc=null,ye=!1,ki=Bd(),
+P=1E4>ki?Bd:function(){return Bd()-ki},Gj=fb.ReactCurrentBatchConfig,bd=Ga(null),ad=null,xb=null,$c=null,Ka=!1,hh=(new ha.Component).refs,dd={isMounted:function(a){return(a=a._reactInternals)?Va(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=W(),e=Oa(a),f=Ia(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ja(a,f);Pa(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=W(),e=Oa(a),f=Ia(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ja(a,f);
+Pa(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=W(),d=Oa(a),e=Ia(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);Ja(a,e);Pa(a,d,c)}},gd=Array.isArray,od=ih(!0),xh=ih(!1),fc={},ka=Ga(fc),hc=Ga(fc),gc=Ga(fc),E=Ga(0),ra=null,Na=null,la=!1,Bb=[],jc=fb.ReactCurrentDispatcher,aa=fb.ReactCurrentBatchConfig,ic=0,y=null,N=null,K=null,kd=!1,kc=!1,jd={readContext:Y,useCallback:T,useContext:T,useEffect:T,useImperativeHandle:T,useLayoutEffect:T,useMemo:T,useReducer:T,useRef:T,useState:T,
+useDebugValue:T,useDeferredValue:T,useTransition:T,useMutableSource:T,useOpaqueIdentifier:T,unstable_isNewReconciler:!1},qj={readContext:Y,useCallback:function(a,b){ab().memoizedState=[a,void 0===b?null:b];return a},useContext:Y,useEffect:rh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ne(4,2,th.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Ne(4,2,a,b)},useMemo:function(a,b){var c=ab();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,
+b,c){var d=ab();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Me.bind(null,y,a);return[d.memoizedState,a]},useRef:qh,useState:nc,useDebugValue:Pe,useDeferredValue:function(a){var b=nc(a),c=b[0],d=b[1];rh(function(){var b=aa.transition;aa.transition=1;try{d(a)}finally{aa.transition=b}},[a]);return c},useTransition:function(){var a=nc(!1),b=a[0];a=tj.bind(null,a[1]);qh(a);return[a,b]},useMutableSource:function(a,
+b,c){var d=ab();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return oh(d,a,b,c)},useOpaqueIdentifier:function(){if(la){var a=!1,b=nj(function(){a||(a=!0,c("r:"+(yf++).toString(36)));throw Error(m(355));}),c=nc(b)[1];0===(y.mode&2)&&(y.flags|=516,ld(5,function(){c("r:"+(yf++).toString(36))},void 0,null));return b}b="r:"+(yf++).toString(36);nc(b);return b},unstable_isNewReconciler:!1},rj={readContext:Y,useCallback:vh,useContext:Y,useEffect:nd,useImperativeHandle:uh,useLayoutEffect:sh,
+useMemo:wh,useReducer:lc,useRef:md,useState:function(a){return lc(ma)},useDebugValue:Pe,useDeferredValue:function(a){var b=lc(ma),c=b[0],d=b[1];nd(function(){var b=aa.transition;aa.transition=1;try{d(a)}finally{aa.transition=b}},[a]);return c},useTransition:function(){var a=lc(ma)[0];return[md().current,a]},useMutableSource:ph,useOpaqueIdentifier:function(){return lc(ma)[0]},unstable_isNewReconciler:!1},sj={readContext:Y,useCallback:vh,useContext:Y,useEffect:nd,useImperativeHandle:uh,useLayoutEffect:sh,
+useMemo:wh,useReducer:mc,useRef:md,useState:function(a){return mc(ma)},useDebugValue:Pe,useDeferredValue:function(a){var b=mc(ma),c=b[0],d=b[1];nd(function(){var b=aa.transition;aa.transition=1;try{d(a)}finally{aa.transition=b}},[a]);return c},useTransition:function(){var a=mc(ma)[0];return[md().current,a]},useMutableSource:ph,useOpaqueIdentifier:function(){return mc(ma)[0]},unstable_isNewReconciler:!1},uj=fb.ReactCurrentOwner,fa=!1,qd={dehydrated:null,retryLane:0};var xj=function(a,b,c,d){for(c=
+b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};var Kh=function(a){};var wj=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){a=b.stateNode;$a(ka.current);e=null;switch(c){case "input":f=Md(a,f);d=Md(a,d);e=[];break;case "option":f=Pd(a,f);d=Pd(a,d);e=[];break;case "select":f=
+B({},f,{value:void 0});d=B({},d,{value:void 0});e=[];break;case "textarea":f=Qd(a,f);d=Qd(a,d);e=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(a.onclick=Vc)}Sd(c,d);var g;c=null;for(l in f)if(!d.hasOwnProperty(l)&&f.hasOwnProperty(l)&&null!=f[l])if("style"===l){var h=f[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(Ib.hasOwnProperty(l)?
+e||(e=[]):(e=e||[]).push(l,null));for(l in d){var k=d[l];h=null!=f?f[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(e||(e=[]),e.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(e=e||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(e=
+e||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(Ib.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&z("scroll",a),e||h===k||(e=[])):"object"===typeof k&&null!==k&&k.$$typeof===ue?k.toString():(e=e||[]).push(l,k))}c&&(e=e||[]).push("style",c);var l=e;if(b.updateQueue=l)b.flags|=4}};var yj=function(a,b,c,d){c!==d&&(b.flags|=4)};var Lj="function"===typeof WeakMap?WeakMap:Map,Dj="function"===typeof WeakSet?WeakSet:Set,Ij=Math.ceil,vd=fb.ReactCurrentDispatcher,kf=
+fb.ReactCurrentOwner,n=0,R=null,G=null,O=0,ta=0,cb=Ga(0),L=0,wd=null,Fb=0,La=0,Cb=0,jf=0,ef=null,df=0,We=Infinity,l=null,rd=!1,Ze=null,na=null,Sa=!1,tc=null,vc=90,nf=[],of=[],va=null,rc=0,ff=null,sd=-1,ua=0,td=0,uc=null,xd=!1;var Pj=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||J.current)fa=!0;else if(0!==(c&d))fa=0!==(a.flags&16384)?!0:!1;else{fa=!1;switch(b.tag){case 3:Dh(b);Ie();break;case 5:jh(b);break;case 1:S(b.type)&&Xc(b);break;case 4:Fe(b,b.stateNode.containerInfo);
+break;case 10:d=b.memoizedProps.value;var e=b.type._context;A(bd,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return Eh(a,b,c);A(E,E.current&1);b=sa(a,b,c);return null!==b?b.sibling:null}A(E,E.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Jh(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);A(E,E.current);if(d)break;else return null;case 23:case 24:return b.lanes=
+0,Se(a,b,c)}return sa(a,b,c)}else fa=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=vb(b,D.current);yb(b,c);e=Le(null,b,d,a,e,c);b.flags|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(S(d)){var f=!0;Xc(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;Be(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&
+cd(b,d,g,a);e.updater=dd;b.stateNode=e;e._reactInternals=b;Ce(b,d,a,c);b=Te(null,b,d,!0,f,c)}else b.tag=0,U(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=Vj(e);a=ea(e,a);switch(f){case 0:b=Re(null,b,e,a,c);break a;case 1:b=Ch(null,b,e,a,c);break a;case 11:b=yh(null,b,e,a,c);break a;case 14:b=zh(null,b,e,ea(e.type,a),d,c);break a}throw Error(m(306,e,""));}return b;case 0:return d=
+b.type,e=b.pendingProps,e=b.elementType===d?e:ea(d,e),Re(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ea(d,e),Ch(a,b,d,e,c);case 3:Dh(b);d=b.updateQueue;if(null===a||null===d)throw Error(m(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;bh(a,b);cc(b,d,null,c);d=b.memoizedState.element;if(d===e)Ie(),b=sa(a,b,c);else{e=b.stateNode;if(f=e.hydrate)Na=tb(b.stateNode.containerInfo.firstChild),ra=b,f=la=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=
+a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],Bb.push(f);c=xh(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else U(a,b,d,c),Ie();b=b.child}return b;case 5:return jh(b),null===a&&He(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,se(d,e)?g=null:null!==f&&se(d,f)&&(b.flags|=16),Bh(a,b),U(a,b,g,c),b.child;case 6:return null===a&&He(b),null;case 13:return Eh(a,b,c);case 4:return Fe(b,b.stateNode.containerInfo),d=b.pendingProps,null===
+a?b.child=od(b,null,d,c):U(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ea(d,e),yh(a,b,d,e,c);case 7:return U(a,b,b.pendingProps,c),b.child;case 8:return U(a,b,b.pendingProps.children,c),b.child;case 12:return U(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;A(bd,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=X(h,f)?0:("function"===typeof d._calculateChangedBits?
+d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!J.current){b=sa(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Ia(-1,c&-c),l.tag=2,Ja(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);ah(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=
+h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}U(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,yb(b,c),e=Y(e,f.unstable_observedBits),d=d(e),b.flags|=1,U(a,b,d,c),b.child;case 14:return e=b.type,f=ea(e,b.pendingProps),f=ea(e.type,f),zh(a,b,e,f,d,c);case 15:return Ah(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ea(d,e),null!==a&&(a.alternate=null,b.alternate=
+null,b.flags|=2),b.tag=1,S(d)?(a=!0,Xc(b)):a=!1,yb(b,c),fh(b,d,e),Ce(b,d,e,c),Te(null,b,d,!0,a,c);case 19:return Jh(a,b,c);case 23:return Se(a,b,c);case 24:return Se(a,b,c)}throw Error(m(156,b.tag));};var Z=function(a,b,c,d){return new Uj(a,b,c,d)};tf.prototype.render=function(a){yd(a,this._internalRoot,null,null)};tf.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;yd(null,a,null,function(){b[rb]=null})};var Ei=function(a){if(13===a.tag){var b=W();Pa(a,4,b);sf(a,4)}};var Yf=
+function(a){if(13===a.tag){var b=W();Pa(a,67108864,b);sf(a,67108864)}};var Ci=function(a){if(13===a.tag){var b=W(),c=Oa(a);Pa(a,c,b);sf(a,c)}};var Bi=function(a,b){return b()};Vd=function(a,b,c){switch(b){case "input":Nd(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Hc(d);if(!e)throw Error(m(90));Ff(d);Nd(d,e)}}}break;case "textarea":Kf(a,
+c);break;case "select":b=c.value,null!=b&&ib(a,!!c.multiple,b,!1)}};(function(a,b,c,d){me=a;fg=b;Xd=c;Sf=d})(ai,function(a,b,c,d,e){var f=n;n|=4;try{return Za(98,a.bind(null,b,c,d,e))}finally{n=f,0===n&&(Eb(),ja())}},function(){0===(n&49)&&(Jj(),Ra())},function(a,b){var c=n;n|=2;try{return a(b)}finally{n=c,0===n&&(Eb(),ja())}});var vk={Events:[Ob,pb,Hc,Qf,Rf,Ra,{current:!1}]};(function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,
+overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:fb.ReactCurrentDispatcher,findHostInstanceByFiber:Yj,findFiberByHostInstance:a.findFiberByHostInstance||Zj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=
+!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!b.isDisabled&&b.supportsFiber)try{$e=b.inject(a),db=b}catch(c){}a=!0}return a})({findFiberByHostInstance:Wa,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"});M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;M.createPortal=hi;M.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(m(188));throw Error(m(268,Object.keys(a)));
+}a=Vf(b);a=null===a?null:a.stateNode;return a};M.flushSync=function(a,b){var c=n;if(0!==(c&48))return a(b);n|=1;try{if(a)return Za(99,a.bind(null,b))}finally{n=c,ja()}};M.hydrate=function(a,b,c){if(!wc(b))throw Error(m(200));return zd(null,a,b,!0,c)};M.render=function(a,b,c){if(!wc(b))throw Error(m(200));return zd(null,a,b,!1,c)};M.unmountComponentAtNode=function(a){if(!wc(a))throw Error(m(40));return a._reactRootContainer?(bi(function(){zd(null,null,a,!1,function(){a._reactRootContainer=null;a[rb]=
+null})}),!0):!1};M.unstable_batchedUpdates=ai;M.unstable_createPortal=function(a,b){return hi(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};M.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!wc(c))throw Error(m(200));if(null==a||void 0===a._reactInternals)throw Error(m(38));return zd(a,b,c,!1,d)};M.version="17.0.2"});
+})();
diff --git a/node_modules/react-dom/umd/react-dom.profiling.min.js b/node_modules/react-dom/umd/react-dom.profiling.min.js
index b18526a..eae41ca 100644
--- a/node_modules/react-dom/umd/react-dom.profiling.min.js
+++ b/node_modules/react-dom/umd/react-dom.profiling.min.js
@@ -1,4 +1,4 @@
-/** @license React v16.14.0
+/** @license React v17.0.2
* react-dom.profiling.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
@@ -6,242 +6,247 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
-/*
+(function(){/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
-'use strict';(function(I,Z){"object"===typeof exports&&"undefined"!==typeof module?Z(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],Z):(I=I||self,Z(I.ReactDOM={},I.React))})(this,function(I,Z){function l(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-function Bi(a,b,c,d,e,f,g,h,k){Cb=!1;mc=null;Ci.apply(Di,arguments)}function Ei(a,b,c,d,e,f,g,h,k){Bi.apply(this,arguments);if(Cb){if(Cb){var n=mc;Cb=!1;mc=null}else throw Error(l(198));nc||(nc=!0,zd=n)}}function yf(a,b,c){var d=a.type||"unknown-event";a.currentTarget=zf(c);Ei(d,b,void 0,a);a.currentTarget=null}function Af(){if(oc)for(var a in fb){var b=fb[a],c=oc.indexOf(a);if(!(-1<c))throw Error(l(96,a));if(!pc[c]){if(!b.extractEvents)throw Error(l(97,a));pc[c]=b;c=b.eventTypes;for(var d in c){var e=
-void 0;var f=c[d],g=b,h=d;if(Ad.hasOwnProperty(h))throw Error(l(99,h));Ad[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&Bf(k[e],g,h);e=!0}else f.registrationName?(Bf(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(l(98,d,a));}}}}function Bf(a,b,c){if(gb[a])throw Error(l(100,a));gb[a]=b;Bd[a]=b.eventTypes[c].dependencies}function Cf(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!fb.hasOwnProperty(c)||fb[c]!==d){if(fb[c])throw Error(l(102,c));fb[c]=
-d;b=!0}}b&&Af()}function Df(a){if(a=Ef(a)){if("function"!==typeof Cd)throw Error(l(280));var b=a.stateNode;b&&(b=Dd(b),Cd(a.stateNode,a.type,b))}}function Ff(a){hb?ib?ib.push(a):ib=[a]:hb=a}function Gf(){if(hb){var a=hb,b=ib;ib=hb=null;Df(a);if(b)for(a=0;a<b.length;a++)Df(b[a])}}function Ed(){if(null!==hb||null!==ib)Fd(),Gf()}function Hf(a,b,c){if(Gd)return a(b,c);Gd=!0;try{return If(a,b,c)}finally{Gd=!1,Ed()}}function Fi(a){if(Jf.call(Kf,a))return!0;if(Jf.call(Lf,a))return!1;if(Gi.test(a))return Kf[a]=
-!0;Lf[a]=!0;return!1}function Hi(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function Ii(a,b,c,d){if(null===b||"undefined"===typeof b||Hi(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function M(a,
-b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}function Hd(a,b,c,d){var e=E.hasOwnProperty(b)?E[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Ii(b,c,e,d)&&(c=null),d||null===e?Fi(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,
-d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}function Db(a){if(null===a||"object"!==typeof a)return null;a=Mf&&a[Mf]||a["@@iterator"];return"function"===typeof a?a:null}function Ji(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}function la(a){if(null==a)return null;
-if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Ma:return"Fragment";case jb:return"Portal";case qc:return"Profiler";case Nf:return"StrictMode";case rc:return"Suspense";case Id:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Of:return"Context.Consumer";case Pf:return"Context.Provider";case Jd:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Kd:return la(a.type);
-case Qf:return la(a.render);case Rf:if(a=1===a._status?a._result:null)return la(a)}return null}function Ld(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=a._debugSource,f=la(a.type);c=null;d&&(c=la(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(Ki,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}function ua(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;
-default:return""}}function Sf(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function Li(a){var b=Sf(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,
-b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}}function sc(a){a._valueTracker||(a._valueTracker=Li(a))}function Tf(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Sf(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Md(a,b){var c=b.checked;return N({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=
-c?c:a._wrapperState.initialChecked})}function Uf(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=ua(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Vf(a,b){b=b.checked;null!=b&&Hd(a,"checked",b,!1)}function Nd(a,b){Vf(a,b);var c=ua(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==
-""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Od(a,b.type,c):b.hasOwnProperty("defaultValue")&&Od(a,b.type,ua(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function Wf(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=
-b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function Od(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Mi(a){var b="";Z.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Pd(a,b){a=N({children:void 0},b);if(b=Mi(b.children))a.children=b;return a}function kb(a,b,c,d){a=a.options;if(b){b={};for(var e=
-0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+ua(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function Qd(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(l(91));return N({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}
-function Xf(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(l(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(l(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:ua(c)}}function Yf(a,b){var c=ua(b.value),d=ua(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Zf(a,b){b=a.textContent;b===a._wrapperState.initialValue&&""!==
-b&&null!==b&&(a.value=b)}function $f(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Rd(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?$f(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function tc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function uc(a){if(Sd[a])return Sd[a];
-if(!lb[a])return a;var b=lb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in ag)return Sd[a]=b[c];return a}function Td(a){var b=bg.get(a);void 0===b&&(b=new Map,bg.set(a,b));return b}function Na(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function cg(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function dg(a){if(Na(a)!==
-a)throw Error(l(188));}function Ni(a){var b=a.alternate;if(!b){b=Na(a);if(null===b)throw Error(l(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return dg(e),a;if(f===d)return dg(e),b;f=f.sibling}throw Error(l(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=
-f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(l(189));}}if(c.alternate!==d)throw Error(l(190));}if(3!==c.tag)throw Error(l(188));return c.stateNode.current===c?a:b}function eg(a){a=Ni(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}function mb(a,b){if(null==
-b)throw Error(l(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function Ud(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function vc(a){null!==a&&(Eb=mb(Eb,a));a=Eb;Eb=null;if(a){Ud(a,Oi);if(Eb)throw Error(l(95));if(nc)throw a=zd,nc=!1,zd=null,a;}}function Vd(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:
-a}function fg(a){if(!va)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function gg(a){a.topLevelType=null;a.nativeEvent=null;a.targetInst=null;a.ancestors.length=0;10>wc.length&&wc.push(a)}function hg(a,b,c,d){if(wc.length){var e=wc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}function ig(a){var b=
-a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=Fb(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=Vd(a.nativeEvent);d=a.topLevelType;var f=a.nativeEvent,g=a.eventSystemFlags;0===c&&(g|=64);for(var h=null,k=0;k<pc.length;k++){var n=pc[k];n&&(n=n.extractEvents(d,b,f,e,g))&&(h=mb(h,n))}vc(h)}}function Wd(a,
-b,c){if(!c.has(a)){switch(a){case "scroll":Gb(b,"scroll",!0);break;case "focus":case "blur":Gb(b,"focus",!0);Gb(b,"blur",!0);c.set("blur",null);c.set("focus",null);break;case "cancel":case "close":fg(a)&&Gb(b,a,!0);break;case "invalid":case "submit":case "reset":break;default:-1===Hb.indexOf(a)&&w(a,b)}c.set(a,null)}}function Pi(a,b){var c=Td(b);Xd.forEach(function(a){Wd(a,b,c)});Qi.forEach(function(a){Wd(a,b,c)})}function Yd(a,b,c,d,e){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:e,
-container:d}}function jg(a,b){switch(a){case "focus":case "blur":wa=null;break;case "dragenter":case "dragleave":xa=null;break;case "mouseover":case "mouseout":ya=null;break;case "pointerover":case "pointerout":Ib.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Jb.delete(b.pointerId)}}function Kb(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=Yd(b,c,d,e,f),null!==b&&(b=Lb(b),null!==b&&kg(b)),a;a.eventSystemFlags|=d;return a}function Ri(a,b,c,d,e){switch(b){case "focus":return wa=
-Kb(wa,a,b,c,d,e),!0;case "dragenter":return xa=Kb(xa,a,b,c,d,e),!0;case "mouseover":return ya=Kb(ya,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Ib.set(f,Kb(Ib.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Jb.set(f,Kb(Jb.get(f)||null,a,b,c,d,e)),!0}return!1}function Si(a){var b=Fb(a.target);if(null!==b){var c=Na(b);if(null!==c)if(b=c.tag,13===b){if(b=cg(c),null!==b){a.blockedOn=b;Zd(a.priority,function(){Ti(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=
-3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function xc(a){if(null!==a.blockedOn)return!1;var b=$d(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);if(null!==b){var c=Lb(b);null!==c&&kg(c);a.blockedOn=b;return!1}return!0}function lg(a,b,c){xc(a)&&c.delete(b)}function Ui(){for(ae=!1;0<da.length;){var a=da[0];if(null!==a.blockedOn){a=Lb(a.blockedOn);null!==a&&Vi(a);break}var b=$d(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);null!==b?a.blockedOn=b:da.shift()}null!==
-wa&&xc(wa)&&(wa=null);null!==xa&&xc(xa)&&(xa=null);null!==ya&&xc(ya)&&(ya=null);Ib.forEach(lg);Jb.forEach(lg)}function Mb(a,b){a.blockedOn===b&&(a.blockedOn=null,ae||(ae=!0,mg(ng,Ui)))}function og(a){if(0<da.length){Mb(da[0],a);for(var b=1;b<da.length;b++){var c=da[b];c.blockedOn===a&&(c.blockedOn=null)}}null!==wa&&Mb(wa,a);null!==xa&&Mb(xa,a);null!==ya&&Mb(ya,a);b=function(b){return Mb(b,a)};Ib.forEach(b);Jb.forEach(b);for(b=0;b<Nb.length;b++)c=Nb[b],c.blockedOn===a&&(c.blockedOn=null);for(;0<Nb.length&&
-(b=Nb[0],null===b.blockedOn);)Si(b),null===b.blockedOn&&Nb.shift()}function be(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f="on"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+"Capture"},dependencies:[d],eventPriority:b};ce.set(d,b);pg.set(d,f);qg[e]=f}}function w(a,b){Gb(b,a,!1)}function Gb(a,b,c){var d=ce.get(b);switch(void 0===d?2:d){case 0:d=Wi.bind(null,b,1,a);break;case 1:d=Xi.bind(null,b,1,a);break;default:d=yc.bind(null,b,1,a)}c?a.addEventListener(b,
-d,!0):a.addEventListener(b,d,!1)}function Wi(a,b,c,d){Oa||Fd();var e=yc,f=Oa;Oa=!0;try{rg(e,a,b,c,d)}finally{(Oa=f)||Ed()}}function Xi(a,b,c,d){Yi(Zi,yc.bind(null,a,b,c,d))}function yc(a,b,c,d){if(zc)if(0<da.length&&-1<Xd.indexOf(a))a=Yd(null,a,b,c,d),da.push(a);else{var e=$d(a,b,c,d);if(null===e)jg(a,d);else if(-1<Xd.indexOf(a))a=Yd(e,a,b,c,d),da.push(a);else if(!Ri(e,a,b,c,d)){jg(a,d);a=hg(a,d,null,b);try{Hf(ig,a)}finally{gg(a)}}}}function $d(a,b,c,d){c=Vd(d);c=Fb(c);if(null!==c){var e=Na(c);if(null===
-e)c=null;else{var f=e.tag;if(13===f){c=cg(e);if(null!==c)return c;c=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null}else e!==c&&(c=null)}}a=hg(a,d,c,b);try{Hf(ig,a)}finally{gg(a)}return null}function sg(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Ob.hasOwnProperty(a)&&Ob[a]?(""+b).trim():b+"px"}function tg(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=sg(c,b[c],d);"float"===
-c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function de(a,b){if(b){if($i[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(l(137,a,""));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(l(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(l(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(l(62,""));}}function ee(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;
-default:return!0}}function ma(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Td(a);b=Bd[b];for(var d=0;d<b.length;d++)Wd(b[d],a,c)}function Ac(){}function fe(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function ug(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function vg(a,b){var c=ug(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,
-offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ug(c)}}function wg(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wg(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xg(){for(var a=window,b=fe();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=fe(a.document)}return b}
-function ge(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function yg(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}function he(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&
-null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function nb(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function zg(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===Ag||c===ie||c===je){if(0===b)return a;b--}else c===Bg&&b++}a=a.previousSibling}return null}function Fb(a){var b=a[za];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Pb]||c[za]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=zg(a);null!==
-a;){if(c=a[za])return c;a=zg(a)}return b}a=c;c=a.parentNode}return null}function Lb(a){a=a[za]||a[Pb];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pa(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(l(33));}function ke(a){return a[Bc]||null}function na(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function Cg(a,b){var c=a.stateNode;if(!c)return null;var d=Dd(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=
-!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(l(231,b,typeof c));return c}function Dg(a,b,c){if(b=Cg(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=mb(c._dispatchListeners,b),c._dispatchInstances=mb(c._dispatchInstances,a)}function aj(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=na(b);for(b=c.length;0<b--;)Dg(c[b],
-"captured",a);for(b=0;b<c.length;b++)Dg(c[b],"bubbled",a)}}function le(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Cg(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=mb(c._dispatchListeners,b),c._dispatchInstances=mb(c._dispatchInstances,a))}function bj(a){a&&a.dispatchConfig.registrationName&&le(a._targetInst,null,a)}function ob(a){Ud(a,aj)}function Eg(){if(Cc)return Cc;var a,b=me,c=b.length,d,e="value"in Aa?Aa.value:Aa.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=
-c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Cc=e.slice(a,1<d?1-d:void 0)}function Dc(){return!0}function Ec(){return!1}function Q(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?Dc:Ec;this.isPropagationStopped=Ec;return this}function cj(a,b,c,d){if(this.eventPool.length){var e=
-this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}function dj(a){if(!(a instanceof this))throw Error(l(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function Fg(a){a.eventPool=[];a.getPooled=cj;a.release=dj}function Gg(a,b){switch(a){case "keyup":return-1!==ej.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function Hg(a){a=a.detail;return"object"===typeof a&&"data"in
-a?a.data:null}function fj(a,b){switch(a){case "compositionend":return Hg(b);case "keypress":if(32!==b.which)return null;Ig=!0;return Jg;case "textInput":return a=b.data,a===Jg&&Ig?null:a;default:return null}}function gj(a,b){if(pb)return"compositionend"===a||!ne&&Gg(a,b)?(a=Eg(),Cc=me=Aa=null,pb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;
-case "compositionend":return Kg&&"ko"!==b.locale?null:b.data;default:return null}}function Lg(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!hj[a.type]:"textarea"===b?!0:!1}function Mg(a,b,c){a=Q.getPooled(Ng.change,a,b,c);a.type="change";Ff(c);ob(a);return a}function ij(a){vc(a)}function Fc(a){var b=Pa(a);if(Tf(b))return a}function jj(a,b){if("change"===a)return b}function Og(){Qb&&(Qb.detachEvent("onpropertychange",Pg),Rb=Qb=null)}function Pg(a){if("value"===a.propertyName&&
-Fc(Rb))if(a=Mg(Rb,a,Vd(a)),Oa)vc(a);else{Oa=!0;try{oe(ij,a)}finally{Oa=!1,Ed()}}}function kj(a,b,c){"focus"===a?(Og(),Qb=b,Rb=c,Qb.attachEvent("onpropertychange",Pg)):"blur"===a&&Og()}function lj(a,b){if("selectionchange"===a||"keyup"===a||"keydown"===a)return Fc(Rb)}function mj(a,b){if("click"===a)return Fc(b)}function nj(a,b){if("input"===a||"change"===a)return Fc(b)}function oj(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=pj[a])?!!b[a]:!1}function pe(a){return oj}
-function qj(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function Sb(a,b){if(Qa(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!rj.call(b,c[d])||!Qa(a[c[d]],b[c[d]]))return!1;return!0}function Qg(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(qe||null==qb||qb!==fe(c))return null;c=qb;"selectionStart"in c&&ge(c)?c={start:c.selectionStart,
-end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return Tb&&Sb(Tb,c)?null:(Tb=c,a=Q.getPooled(Rg.select,re,a,b),a.type="select",a.target=qb,ob(a),a)}function Gc(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function t(a,b){0>rb||(a.current=se[rb],se[rb]=null,rb--)}function z(a,b,c){rb++;
-se[rb]=a.current;a.current=b}function sb(a,b){var c=a.type.contextTypes;if(!c)return Ba;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function O(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Sg(a,b,c){if(y.current!==Ba)throw Error(l(168));z(y,b);z(C,c)}
-function Tg(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(l(108,la(b)||"Unknown",e));return N({},c,{},d)}function Hc(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ba;Ra=y.current;z(y,a);z(C,C.current);return!0}function Ug(a,b,c){var d=a.stateNode;if(!d)throw Error(l(169));c?(a=Tg(a,b,Ra),d.__reactInternalMemoizedMergedChildContext=a,t(C),t(y),z(y,a)):t(C);z(C,c)}function Ic(){switch(sj()){case Jc:return 99;
-case Vg:return 98;case Wg:return 97;case Xg:return 96;case Yg:return 95;default:throw Error(l(332));}}function Zg(a){switch(a){case 99:return Jc;case 98:return Vg;case 97:return Wg;case 96:return Xg;case 95:return Yg;default:throw Error(l(332));}}function Ca(a,b){a=Zg(a);return tj(a,b)}function Ub(a,b,c){a=Zg(a);return te(a,b,c)}function $g(a){null===oa?(oa=[a],Kc=te(Jc,ah)):oa.push(a);return bh}function ea(){if(null!==Kc){var a=Kc;Kc=null;ch(a)}ah()}function ah(){if(!ue&&null!==oa){ue=!0;var a=0;
-try{var b=oa;Ca(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});oa=null}catch(c){throw null!==oa&&(oa=oa.slice(a+1)),te(Jc,ea),c;}finally{ue=!1}}}function Lc(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function dh(a,b){if(1073741823===b)return 99;if(1===b||2===b)return 95;a=10*(1073741821-b)-10*(1073741821-a);return 0>=a?99:250>=a?98:5250>=a?97:95}function aa(a,b){if(a&&a.defaultProps){b=N({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}
-function ve(){Mc=tb=Nc=null}function we(a){var b=Oc.current;t(Oc);a.type._context._currentValue=b}function eh(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function ub(a,b){Nc=a;Mc=tb=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(fa=!0),a.firstContext=null)}function W(a,b){if(Mc!==
-a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)Mc=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===tb){if(null===Nc)throw Error(l(308));tb=b;Nc.dependencies={expirationTime:0,firstContext:b,responders:null}}else tb=tb.next=b}return a._currentValue}function xe(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function ye(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,
-effects:a.effects})}function Da(a,b){a={expirationTime:a,suspenseConfig:b,tag:fh,payload:null,callback:null,next:null};return a.next=a}function Ea(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}function gh(a,b){var c=a.alternate;null!==c&&ye(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}function Vb(a,b,c,d){var e=a.updateQueue;Fa=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==
-g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,n=0,l=null,Wb=null,m=null;if(null!==h){var p=h;do{g=p.expirationTime;if(g<d){var r={expirationTime:p.expirationTime,suspenseConfig:p.suspenseConfig,tag:p.tag,payload:p.payload,callback:p.callback,next:null};null===m?(Wb=m=r,l=k):m=m.next=r;g>n&&(n=g)}else{null!==m&&(m=m.next={expirationTime:1073741823,suspenseConfig:p.suspenseConfig,
-tag:p.tag,payload:p.payload,callback:p.callback,next:null});hh(g,p.suspenseConfig);a:{var t=a,x=p;g=b;r=c;switch(x.tag){case 1:t=x.payload;if("function"===typeof t){k=t.call(r,k,g);break a}k=t;break a;case 3:t.effectTag=t.effectTag&-4097|64;case fh:t=x.payload;g="function"===typeof t?t.call(r,k,g):t;if(null===g||void 0===g)break a;k=N({},k,g);break a;case Pc:Fa=!0}}null!==p.callback&&(a.effectTag|=32,g=e.effects,null===g?e.effects=[p]:g.push(p))}p=p.next;if(null===p||p===h)if(g=e.shared.pending,null===
-g)break;else p=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===m?l=k:m.next=Wb;e.baseState=l;e.baseQueue=m;Qc(n);a.expirationTime=n;a.memoizedState=k}}function ih(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=e;e=c;if("function"!==typeof d)throw Error(l(191,d));d.call(e)}}}function Rc(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:N({},b,c);a.memoizedState=c;0===a.expirationTime&&
-(a.updateQueue.baseState=c)}function jh(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Sb(c,d)||!Sb(e,f):!0}function kh(a,b,c){var d=!1,e=Ba;var f=b.contextType;"object"===typeof f&&null!==f?f=W(f):(e=O(b)?Ra:y.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?sb(a,e):Ba);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Sc;a.stateNode=b;b._reactInternalFiber=
-a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}function lh(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Sc.enqueueReplaceState(b,b.state,null)}function ze(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=mh;xe(a);var f=b.contextType;"object"===
-typeof f&&null!==f?e.context=W(f):(f=O(b)?Ra:y.current,e.context=sb(a,f));Vb(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Rc(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&
-e.UNSAFE_componentWillMount(),b!==e.state&&Sc.enqueueReplaceState(e,e.state,null),Vb(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.effectTag|=4)}function Xb(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(l(309));var d=c.stateNode}if(!d)throw Error(l(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===mh&&
-(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(l(284));if(!c._owner)throw Error(l(290,a));}return a}function Tc(a,b){if("textarea"!==a.type)throw Error(l(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,""));}function nh(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;
-for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Sa(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Ae(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=
-a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Xb(a,b,c),d.return=a,d;d=Uc(c.type,c.key,c.props,null,a.mode,d);d.ref=Xb(a,b,c);d.return=a;return d}function n(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=Be(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Ga(c,a.mode,d,f),b.return=a,b;b=e(b,c);
-b.return=a;return b}function Wb(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Ae(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Vc:return c=Uc(b.type,b.key,b.props,null,a.mode,c),c.ref=Xb(a,null,b),c.return=a,c;case jb:return b=Be(b,a.mode,c),b.return=a,b}if(Wc(b)||Db(b))return b=Ga(b,a.mode,c,null),b.return=a,b;Tc(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,
-b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Vc:return c.key===e?c.type===Ma?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case jb:return c.key===e?n(a,b,c,d):null}if(Wc(c)||Db(c))return null!==e?null:m(a,b,c,d,null);Tc(a,c)}return null}function r(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Vc:return a=a.get(null===d.key?c:d.key)||null,d.type===Ma?m(b,a,d.props.children,
-e,d.key):k(b,a,d,e);case jb:return a=a.get(null===d.key?c:d.key)||null,n(b,a,d,e)}if(Wc(d)||Db(d))return a=a.get(c)||null,m(b,a,d,e,null);Tc(b,d)}return null}function t(e,g,h,k){for(var n=null,l=null,q=g,m=g=0,v=null;null!==q&&m<h.length;m++){q.index>m?(v=q,q=null):v=q.sibling;var u=p(e,q,h[m],k);if(null===u){null===q&&(q=v);break}a&&q&&null===u.alternate&&b(e,q);g=f(u,g,m);null===l?n=u:l.sibling=u;l=u;q=v}if(m===h.length)return c(e,q),n;if(null===q){for(;m<h.length;m++)q=Wb(e,h[m],k),null!==q&&(g=
-f(q,g,m),null===l?n=q:l.sibling=q,l=q);return n}for(q=d(e,q);m<h.length;m++)v=r(q,e,m,h[m],k),null!==v&&(a&&null!==v.alternate&&q.delete(null===v.key?m:v.key),g=f(v,g,m),null===l?n=v:l.sibling=v,l=v);a&&q.forEach(function(a){return b(e,a)});return n}function w(e,g,h,k){var n=Db(h);if("function"!==typeof n)throw Error(l(150));h=n.call(h);if(null==h)throw Error(l(151));for(var m=n=null,q=g,u=g=0,v=null,x=h.next();null!==q&&!x.done;u++,x=h.next()){q.index>u?(v=q,q=null):v=q.sibling;var vb=p(e,q,x.value,
-k);if(null===vb){null===q&&(q=v);break}a&&q&&null===vb.alternate&&b(e,q);g=f(vb,g,u);null===m?n=vb:m.sibling=vb;m=vb;q=v}if(x.done)return c(e,q),n;if(null===q){for(;!x.done;u++,x=h.next())x=Wb(e,x.value,k),null!==x&&(g=f(x,g,u),null===m?n=x:m.sibling=x,m=x);return n}for(q=d(e,q);!x.done;u++,x=h.next())x=r(q,e,u,x.value,k),null!==x&&(a&&null!==x.alternate&&q.delete(null===x.key?u:x.key),g=f(x,g,u),null===m?n=x:m.sibling=x,m=x);a&&q.forEach(function(a){return b(e,a)});return n}return function(a,d,f,
-h){var k="object"===typeof f&&null!==f&&f.type===Ma&&null===f.key;k&&(f=f.props.children);var n="object"===typeof f&&null!==f;if(n)switch(f.$$typeof){case Vc:a:{n=f.key;for(k=d;null!==k;){if(k.key===n){switch(k.tag){case 7:if(f.type===Ma){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);d=e(k,f.props);d.ref=Xb(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===Ma?(d=Ga(f.props.children,a.mode,h,f.key),d.return=
-a,a=d):(h=Uc(f.type,f.key,f.props,null,a.mode,h),h.ref=Xb(a,d,f),h.return=a,a=h)}return g(a);case jb:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Be(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=
-a,a=d):(c(a,d),d=Ae(f,a.mode,h),d.return=a,a=d),g(a);if(Wc(f))return t(a,d,f,h);if(Db(f))return w(a,d,f,h);n&&Tc(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(l(152,a.displayName||a.name||"Component"));}return c(a,d)}}function Ta(a){if(a===Yb)throw Error(l(174));return a}function Ce(a,b){z(Zb,b);z($b,a);z(ha,Yb);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Rd(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,
-a=a.tagName,b=Rd(b,a)}t(ha);z(ha,b)}function xb(a){t(ha);t($b);t(Zb)}function oh(a){Ta(Zb.current);var b=Ta(ha.current);var c=Rd(b,a.type);b!==c&&(z($b,a),z(ha,c))}function De(a){$b.current===a&&(t(ha),t($b))}function Xc(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===je||c.data===ie))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===
-a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function Ee(a,b){return{responder:a,props:b}}function R(){throw Error(l(321));}function Fe(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!Qa(a[c],b[c]))return!1;return!0}function Ge(a,b,c,d,e,f){Ha=f;B=b;b.memoizedState=null;b.updateQueue=null;b.expirationTime=0;Yc.current=null===a||null===a.memoizedState?vj:wj;a=c(d,e);if(b.expirationTime===
-Ha){f=0;do{b.expirationTime=0;if(!(25>f))throw Error(l(301));f+=1;J=K=null;b.updateQueue=null;Yc.current=xj;a=c(d,e)}while(b.expirationTime===Ha)}Yc.current=Zc;b=null!==K&&null!==K.next;Ha=0;J=K=B=null;$c=!1;if(b)throw Error(l(300));return a}function yb(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===J?B.memoizedState=J=a:J=J.next=a;return J}function zb(){if(null===K){var a=B.alternate;a=null!==a?a.memoizedState:null}else a=K.next;var b=null===J?B.memoizedState:
-J.next;if(null!==b)J=b,K=a;else{if(null===a)throw Error(l(310));K=a;a={memoizedState:K.memoizedState,baseState:K.baseState,baseQueue:K.baseQueue,queue:K.queue,next:null};null===J?B.memoizedState=J=a:J=J.next=a}return J}function Ua(a,b){return"function"===typeof b?b(a):b}function ad(a,b,c){b=zb();c=b.queue;if(null===c)throw Error(l(311));c.lastRenderedReducer=a;var d=K,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=
-e.next;d=d.baseState;var h=g=f=null,k=e;do{var n=k.expirationTime;if(n<Ha){var m={expirationTime:k.expirationTime,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=m,f=d):h=h.next=m;n>B.expirationTime&&(B.expirationTime=n,Qc(n))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),hh(n,k.suspenseConfig),d=k.eagerReducer===
-a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;Qa(d,b.memoizedState)||(fa=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}function bd(a,b,c){b=zb();c=b.queue;if(null===c)throw Error(l(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);Qa(f,b.memoizedState)||(fa=!0);b.memoizedState=f;null===b.baseQueue&&
-(b.baseState=f);c.lastRenderedState=f}return[f,d]}function He(a){var b=yb();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:a};a=a.dispatch=ph.bind(null,B,a);return[b.memoizedState,a]}function Ie(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=B.updateQueue;null===b?(b={lastEffect:null},B.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=
-d,b.lastEffect=a));return a}function qh(a){return zb().memoizedState}function Je(a,b,c,d){var e=yb();B.effectTag|=a;e.memoizedState=Ie(1|b,c,void 0,void 0===d?null:d)}function Ke(a,b,c,d){var e=zb();d=void 0===d?null:d;var f=void 0;if(null!==K){var g=K.memoizedState;f=g.destroy;if(null!==d&&Fe(d,g.deps)){Ie(b,c,f,d);return}}B.effectTag|=a;e.memoizedState=Ie(1|b,c,f,d)}function rh(a,b){return Je(516,4,a,b)}function cd(a,b){return Ke(516,4,a,b)}function sh(a,b){return Ke(4,2,a,b)}function th(a,b){if("function"===
-typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function uh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ke(4,2,th.bind(null,b,a),c)}function Le(a,b){}function vh(a,b){yb().memoizedState=[a,void 0===b?null:b];return a}function dd(a,b){var c=zb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Fe(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function wh(a,b){var c=zb();b=void 0===b?null:b;var d=
-c.memoizedState;if(null!==d&&null!==b&&Fe(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Me(a,b,c){var d=Ic();Ca(98>d?98:d,function(){a(!0)});Ca(97<d?97:d,function(){var d=X.suspense;X.suspense=void 0===b?null:b;try{a(!1),c()}finally{X.suspense=d}})}function ph(a,b,c){var d=ia(),e=ac.suspense;d=Va(d,a,e);e={expirationTime:d,suspenseConfig:e,action:c,eagerReducer:null,eagerState:null,next:null};var f=b.pending;null===f?e.next=e:(e.next=f.next,f.next=e);b.pending=e;f=a.alternate;
-if(a===B||null!==f&&f===B)$c=!0,e.expirationTime=Ha,B.expirationTime=Ha;else{if(0===a.expirationTime&&(null===f||0===f.expirationTime)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.eagerReducer=f;e.eagerState=h;if(Qa(h,g))return}catch(k){}finally{}Ia(a,d)}}function ed(a,b){if(0<=Wa){var c=Xa()-Wa;a.actualDuration+=c;b&&(a.selfBaseDuration=c);Wa=-1}}function xh(a,b){var c=ja(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=
-8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function yh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}function Ne(a){if(Ya){var b=Ja;if(b){var c=b;if(!yh(a,b)){b=nb(c.nextSibling);if(!b||!yh(a,b)){a.effectTag=a.effectTag&-1025|
-2;Ya=!1;pa=a;return}xh(pa,c)}pa=a;Ja=nb(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,Ya=!1,pa=a}}function zh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;pa=a}function fd(a){if(a!==pa)return!1;if(!Ya)return zh(a),Ya=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!he(b,a.memoizedProps))for(b=Ja;b;)xh(a,b),b=nb(b.nextSibling);zh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(l(317));a:{a=a.nextSibling;for(b=0;a;){if(8===
-a.nodeType){var c=a.data;if(c===Bg){if(0===b){Ja=nb(a.nextSibling);break a}b--}else c!==Ag&&c!==ie&&c!==je||b++}a=a.nextSibling}Ja=null}}else Ja=pa?nb(a.stateNode.nextSibling):null;return!0}function Oe(){Ja=pa=null;Ya=!1}function S(a,b,c,d){b.child=null===a?Pe(b,null,c,d):Ab(b,a.child,c,d)}function Ah(a,b,c,d,e){c=c.render;var f=b.ref;ub(b,e);d=Ge(a,b,c,d,f,e);if(null!==a&&!fa)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),qa(a,b,e);b.effectTag|=1;S(a,
-b,d,e);return b.child}function Bh(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!Qe(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,Ch(a,b,g,d,e,f);a=Uc(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Sb,c(e,d)&&a.ref===b.ref))return qa(a,b,f);b.effectTag|=1;a=Sa(g,d);a.ref=b.ref;a.return=b;return b.child=a}function Ch(a,b,c,d,e,f){return null!==a&&
-Sb(a.memoizedProps,d)&&a.ref===b.ref&&(fa=!1,e<f)?(b.expirationTime=a.expirationTime,qa(a,b,f)):Re(a,b,c,d,f)}function Dh(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function Re(a,b,c,d,e){var f=O(c)?Ra:y.current;f=sb(b,f);ub(b,e);c=Ge(a,b,c,d,f,e);if(null!==a&&!fa)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),qa(a,b,e);b.effectTag|=1;S(a,b,c,e);return b.child}function Eh(a,b,c,d,e){if(O(c)){var f=!0;Hc(b)}else f=!1;
-ub(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),kh(b,c,d),ze(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,n=c.contextType;"object"===typeof n&&null!==n?n=W(n):(n=O(c)?Ra:y.current,n=sb(b,n));var l=c.getDerivedStateFromProps,m="function"===typeof l||"function"===typeof g.getSnapshotBeforeUpdate;m||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||
-k!==n)&&lh(b,g,d,n);Fa=!1;var p=b.memoizedState;g.state=p;Vb(b,d,g,e);k=b.memoizedState;h!==d||p!==k||C.current||Fa?("function"===typeof l&&(Rc(b,c,l,d),k=b.memoizedState),(h=Fa||jh(b,c,h,d,p,k,n))?(m||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.effectTag|=4)):("function"===
-typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=n,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,ye(a,b),h=b.memoizedProps,g.props=b.type===b.elementType?h:aa(b.type,h),k=g.context,n=c.contextType,"object"===typeof n&&null!==n?n=W(n):(n=O(c)?Ra:y.current,n=sb(b,n)),l=c.getDerivedStateFromProps,(m="function"===typeof l||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
-"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==n)&&lh(b,g,d,n),Fa=!1,k=b.memoizedState,g.state=k,Vb(b,d,g,e),p=b.memoizedState,h!==d||k!==p||C.current||Fa?("function"===typeof l&&(Rc(b,c,l,d),p=b.memoizedState),(l=Fa||jh(b,c,h,d,k,p,n))?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,p,n),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,
-p,n)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=p),g.props=d,g.state=p,g.context=n,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||
-(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return Se(a,b,c,d,f,e)}function Se(a,b,c,d,e,f){Dh(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Ug(b,c,!1),qa(a,b,f);d=b.stateNode;yj.current=b;if(g&&"function"!==typeof c.getDerivedStateFromError){var h=null;Wa=-1}else h=d.render();b.effectTag|=1;null!==a&&g?(g=h,b.child=Ab(b,a.child,null,f),b.child=Ab(b,null,g,f)):S(a,b,h,f);b.memoizedState=d.state;e&&Ug(b,c,
-!0);return b.child}function Fh(a){var b=a.stateNode;b.pendingContext?Sg(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Sg(a,b.context,!1);Ce(a,b.containerInfo)}function Gh(a,b,c){var d=b.mode,e=b.pendingProps,f=F.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);z(F,f&1);if(null===a){void 0!==e.fallback&&Ne(b);if(g){g=e.fallback;
-e=Ga(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Ga(g,d,c,null);c.return=b;e.sibling=c;b.memoizedState=Te;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Pe(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=Sa(a,a.pendingProps);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,
-g=g.sibling;if(b.mode&8){g=0;for(a=c.child;null!==a;)g+=a.treeBaseDuration,a=a.sibling;c.treeBaseDuration=g}d=Sa(d,e);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=Te;b.child=c;return d}c=Ab(b,a.child,e.children,c);b.memoizedState=null;return b.child=c}a=a.child;if(g){g=e.fallback;e=Ga(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;if(b.mode&8){a=0;for(f=e.child;null!==
-f;)a+=f.treeBaseDuration,f=f.sibling;e.treeBaseDuration=a}c=Ga(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=Te;b.child=e;return c}b.memoizedState=null;return b.child=Ab(b,a,e.children,c)}function Hh(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);eh(a.return,b)}function Ue(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,
-tail:c,tailExpiration:0,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}function Ih(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;S(a,b,d.children,c);d=F.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&Hh(a,c);else if(19===a.tag)Hh(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===
-b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}z(F,d);if(0===(b.mode&2))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===Xc(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ue(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===Xc(a)){b.child=
-e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ue(b,!0,c,null,f,b.lastEffect);break;case "together":Ue(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}function qa(a,b,c){null!==a&&(b.dependencies=a.dependencies);Wa=-1;var d=b.expirationTime;0!==d&&Qc(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(l(153));if(null!==b.child){a=b.child;c=Sa(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Sa(a,a.pendingProps),
-c.return=b;c.sibling=null}return b.child}function gd(a,b){switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}function Jh(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;
-case 1:return O(b.type)&&(t(C),t(y)),null;case 3:return xb(),t(C),t(y),c=b.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==a&&null!==a.child||!fd(b)||(b.effectTag|=4),Kh(b),null;case 5:De(b);c=Ta(Zb.current);var e=b.type;if(null!==a&&null!=b.stateNode)zj(a,b,e,d,c),a.ref!==b.ref&&(b.effectTag|=128);else{if(!d){if(null===b.stateNode)throw Error(l(166));return null}a=Ta(ha.current);if(fd(b)){d=b.stateNode;e=b.type;var f=b.memoizedProps;d[za]=b;d[Bc]=f;switch(e){case "iframe":case "object":case "embed":w("load",
-d);break;case "video":case "audio":for(a=0;a<Hb.length;a++)w(Hb[a],d);break;case "source":w("error",d);break;case "img":case "image":case "link":w("error",d);w("load",d);break;case "form":w("reset",d);w("submit",d);break;case "details":w("toggle",d);break;case "input":Uf(d,f);w("invalid",d);ma(c,"onChange");break;case "select":d._wrapperState={wasMultiple:!!f.multiple};w("invalid",d);ma(c,"onChange");break;case "textarea":Xf(d,f),w("invalid",d),ma(c,"onChange")}de(e,f);a=null;for(var g in f)if(f.hasOwnProperty(g)){var h=
-f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(a=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(a=["children",""+h]):gb.hasOwnProperty(g)&&null!=h&&ma(c,g)}switch(e){case "input":sc(d);Wf(d,f,!0);break;case "textarea":sc(d);Zf(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=Ac)}c=a;b.updateQueue=c;null!==c&&(b.effectTag|=4)}else{g=9===c.nodeType?c:c.ownerDocument;"http://www.w3.org/1999/xhtml"===a&&(a=$f(e));"http://www.w3.org/1999/xhtml"===
-a?"script"===e?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),"select"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[za]=b;a[Bc]=d;Aj(a,b,!1,!1);b.stateNode=a;g=ee(e,d);switch(e){case "iframe":case "object":case "embed":w("load",a);h=d;break;case "video":case "audio":for(h=0;h<Hb.length;h++)w(Hb[h],a);h=d;break;case "source":w("error",a);
-h=d;break;case "img":case "image":case "link":w("error",a);w("load",a);h=d;break;case "form":w("reset",a);w("submit",a);h=d;break;case "details":w("toggle",a);h=d;break;case "input":Uf(a,d);h=Md(a,d);w("invalid",a);ma(c,"onChange");break;case "option":h=Pd(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};h=N({},d,{value:void 0});w("invalid",a);ma(c,"onChange");break;case "textarea":Xf(a,d);h=Qd(a,d);w("invalid",a);ma(c,"onChange");break;default:h=d}de(e,h);var k=h;for(f in k)if(k.hasOwnProperty(f)){var n=
-k[f];"style"===f?tg(a,n):"dangerouslySetInnerHTML"===f?(n=n?n.__html:void 0,null!=n&&Lh(a,n)):"children"===f?"string"===typeof n?("textarea"!==e||""!==n)&&bc(a,n):"number"===typeof n&&bc(a,""+n):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(gb.hasOwnProperty(f)?null!=n&&ma(c,f):null!=n&&Hd(a,f,n,g))}switch(e){case "input":sc(a);Wf(a,d,!1);break;case "textarea":sc(a);Zf(a);break;case "option":null!=d.value&&a.setAttribute("value",""+ua(d.value));break;case "select":a.multiple=
-!!d.multiple;c=d.value;null!=c?kb(a,!!d.multiple,c,!1):null!=d.defaultValue&&kb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof h.onClick&&(a.onclick=Ac)}yg(e,d)&&(b.effectTag|=4)}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)Bj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(l(166));c=Ta(Zb.current);Ta(ha.current);fd(b)?(c=b.stateNode,d=b.memoizedProps,c[za]=b,c.nodeValue!==d&&(b.effectTag|=4)):(c=(9===c.nodeType?
-c:c.ownerDocument).createTextNode(d),c[za]=b,b.stateNode=c)}return null;case 13:t(F);d=b.memoizedState;if(0!==(b.effectTag&64))return b.expirationTime=c,b;c=null!==d;d=!1;null===a?void 0!==b.memoizedProps.fallback&&fd(b):(e=a.memoizedState,d=null!==e,c||null===e||(e=a.child.sibling,null!==e&&(f=b.firstEffect,null!==f?(b.firstEffect=e,e.nextEffect=f):(b.firstEffect=b.lastEffect=e,e.nextEffect=null),e.effectTag=8)));if(c&&!d&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||
-0!==(F.current&1))G===Za&&(G=hd);else{if(G===Za||G===hd)G=id;0!==cc&&null!==T&&($a(T,L),Mh(T,cc))}if(c||d)b.effectTag|=4;return null;case 4:return xb(),Kh(b),null;case 10:return we(b),null;case 17:return O(b.type)&&(t(C),t(y)),null;case 19:t(F);d=b.memoizedState;if(null===d)return null;e=0!==(b.effectTag&64);f=d.rendering;if(null===f)if(e)gd(d,!1);else{if(G!==Za||null!==a&&0!==(a.effectTag&64))for(f=b.child;null!==f;){a=Xc(f);if(null!==a){b.effectTag|=64;gd(d,!1);e=a.updateQueue;null!==e&&(b.updateQueue=
-e,b.effectTag|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;for(d=b.child;null!==d;)e=d,a=c,e.effectTag&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null,f=e.alternate,null===f?(e.childExpirationTime=0,e.expirationTime=a,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childExpirationTime=f.childExpirationTime,e.expirationTime=f.expirationTime,e.child=f.child,e.memoizedProps=
-f.memoizedProps,e.memoizedState=f.memoizedState,e.updateQueue=f.updateQueue,a=f.dependencies,e.dependencies=null===a?null:{expirationTime:a.expirationTime,firstContext:a.firstContext,responders:a.responders},e.selfBaseDuration=f.selfBaseDuration,e.treeBaseDuration=f.treeBaseDuration),d=d.sibling;z(F,F.current&1|2);return b.child}f=f.sibling}}else{if(!e)if(a=Xc(f),null!==a){if(b.effectTag|=64,e=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),gd(d,!0),null===d.tail&&"hidden"===d.tailMode&&
-!f.alternate)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*U()-d.renderingStartTime>d.tailExpiration&&1<c&&(b.effectTag|=64,e=!0,gd(d,!1),--c,b.expirationTime=b.childExpirationTime=c,Ve(c));d.isBackwards?(f.sibling=b.child,b.child=f):(c=d.last,null!==c?c.sibling=f:b.child=f,d.last=f)}return null!==d.tail?(0===d.tailExpiration&&(d.tailExpiration=U()+500),c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=U(),c.sibling=null,b=F.current,
-z(F,e?b&1|2:b&1),c):null}throw Error(l(156,b.tag));}function Cj(a,b){switch(a.tag){case 1:return O(a.type)&&(t(C),t(y)),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 3:xb();t(C);t(y);b=a.effectTag;if(0!==(b&64))throw Error(l(285));a.effectTag=b&-4097|64;return a;case 5:return De(a),null;case 13:return t(F),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return t(F),null;case 4:return xb(),null;case 10:return we(a),null;default:return null}}function We(a,b){return{value:a,
-source:b,stack:Ld(b)}}function Xe(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=Ld(c));null!==c&&la(c.type);b=b.value;null!==a&&1===a.tag&&la(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Dj(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){ab(a,c)}}function Nh(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){ab(a,c)}else b.current=null}function Ej(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;
-case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:aa(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(l(163));}function Oh(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.destroy;c.destroy=void 0;void 0!==d&&d()}c=c.next}while(c!==b)}}function Ph(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:
-null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Fj(a,b,c,d){switch(c.tag){case 0:case 11:case 15:case 22:Ph(3,c);return;case 1:a=c.stateNode;c.effectTag&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:aa(c.type,b.memoizedProps),a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&ih(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=
-c.child.stateNode;break;case 1:a=c.child.stateNode}ih(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.effectTag&4&&yg(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:d=c.memoizedProps.onRender;"function"===typeof d&&d(c.memoizedProps.id,null===b?"mount":"update",c.actualDuration,c.treeBaseDuration,c.actualStartTime,Ye,a.memoizedInteractions);return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&og(c))));
-return;case 19:case 17:case 20:case 21:return}throw Error(l(163));}function Qh(a,b,c){"function"===typeof Ze&&Ze(b);switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;Ca(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){ab(g,h)}}a=a.next}while(a!==d)})}break;case 1:Nh(b);c=b.stateNode;"function"===typeof c.componentWillUnmount&&Dj(b,c);break;case 5:Nh(b);break;case 4:Rh(a,b,c)}}function Sh(a){var b=
-a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;a.stateNode=null;null!==b&&Sh(b)}function Th(a){return 5===a.tag||3===a.tag||4===a.tag}function Uh(a){a:{for(var b=a.return;null!==b;){if(Th(b)){var c=b;break a}b=b.return}throw Error(l(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;
-break;default:throw Error(l(161));}c.effectTag&16&&(bc(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Th(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}d?$e(a,c,b):af(a,c,b)}function $e(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,
-b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Ac));else if(4!==d&&(a=a.child,null!==a))for($e(a,b,c),a=a.sibling;null!==a;)$e(a,b,c),a=a.sibling}function af(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(af(a,b,c),a=a.sibling;null!==
-a;)af(a,b,c),a=a.sibling}function Rh(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(l(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,n=c,m=k;;)if(Qh(h,m,n),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break a;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=
-m.return;m=m.sibling}g?(h=f,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Qh(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}function bf(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:Oh(3,
-b);return;case 1:return;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Bc]=d;"input"===a&&"radio"===d.type&&null!=d.name&&Vf(c,d);ee(a,e);b=ee(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?tg(c,h):"dangerouslySetInnerHTML"===g?Lh(c,h):"children"===g?bc(c,h):Hd(c,g,h,b)}switch(a){case "input":Nd(c,d);break;case "textarea":Yf(c,d);break;case "select":b=c._wrapperState.wasMultiple,
-c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?kb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?kb(c,!!d.multiple,d.defaultValue,!0):kb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(l(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,og(b.containerInfo));return;case 12:return;case 13:c=b;null===b.memoizedState?d=!1:(d=!0,c=b.child,cf=U());if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,
-d?(f=f.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null,f.style.display=sg("display",e));else if(6===a.tag)a.stateNode.nodeValue=d?"":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=f;continue}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===c)break;
-for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}Vh(b);return;case 19:Vh(b);return;case 17:return}throw Error(l(163));}function Vh(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Gj);b.forEach(function(b){var d=Hj.bind(null,a,b);c.has(b)||(!0!==b.__reactDoNotTraceInteractions&&(d=Ij(d)),c.add(b),b.then(d,d))})}}function Wh(a,b,c){c=Da(c,null);c.tag=3;c.payload={element:null};var d=
-b.value;c.callback=function(){jd||(jd=!0,df=d);Xe(a,b)};return c}function Xh(a,b,c){c=Da(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Xe(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===Ka?Ka=new Set([this]):Ka.add(this),Xe(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}function ia(){return(r&
-(ba|ka))!==H?1073741821-(U()/10|0):0!==kd?kd:kd=1073741821-(U()/10|0)}function Va(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=Ic();if(0===(b&4))return 99===d?1073741823:1073741822;if((r&ba)!==H)return L;if(null!==c)a=Lc(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=Lc(a,150,100);break;case 97:case 96:a=Lc(a,5E3,250);break;case 95:a=2;break;default:throw Error(l(326));}null!==T&&a===L&&--a;return a}function ld(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=
-a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(T===e&&(Qc(b),G===id&&$a(e,L)),Mh(e,b));return e}function md(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Yh(a,b))return b;var c=a.lastPingedTime;
-a=a.nextKnownPendingLevel;a=c>a?c:a;return 2>=a&&b!==a?0:a}function V(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=$g(ef.bind(null,a));else{var b=md(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=ia();d=dh(d,b);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==bh&&ch(c)}a.callbackExpirationTime=b;a.callbackPriority=d;b=1073741823===
-b?$g(ef.bind(null,a)):Ub(d,Zh.bind(null,a),{timeout:10*(1073741821-b)-U()});a.callbackNode=b}}}function Zh(a,b){kd=0;if(b)return b=ia(),ff(a,b),V(a),null;var c=md(a);if(0!==c){b=a.callbackNode;if((r&(ba|ka))!==H)throw Error(l(327));Bb();if(a!==T||c!==L)bb(a,c),$h(a,c);if(null!==p){var d=r;r|=ba;var e=ai(),f=nd(a);do try{Jj();break}catch(h){bi(a,h)}while(1);ve();r=d;od.current=e;ra.current=f;if(G===pd)throw b=qd,bb(a,c),$a(a,c),V(a),b;if(null===p)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=
-c,d=G,T=null,d){case Za:case pd:throw Error(l(345));case ci:ff(a,2<c?2:c);break;case hd:$a(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=gf(e));if(1073741823===sa&&(e=cf+di-U(),10<e)){if(rd&&(f=a.lastPingedTime,0===f||f>=c)){a.lastPingedTime=c;bb(a,c);break}f=md(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=hf(cb.bind(null,a),e);break}cb(a);break;case id:$a(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=gf(e));if(rd&&(e=a.lastPingedTime,
-0===e||e>=c)){a.lastPingedTime=c;bb(a,c);break}e=md(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}1073741823!==dc?d=10*(1073741821-dc)-U():1073741823===sa?d=0:(d=10*(1073741821-sa)-5E3,e=U(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*Kj(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=hf(cb.bind(null,a),d);break}cb(a);break;case jf:if(1073741823!==sa&&null!==sd){f=sa;var g=sd;d=g.busyMinDurationMs|0;0>=d?d=0:
-(e=g.busyDelayMs|0,f=U()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10<d){$a(a,c);a.timeoutHandle=hf(cb.bind(null,a),d);break}}cb(a);break;default:throw Error(l(329));}V(a);if(a.callbackNode===b)return Zh.bind(null,a)}}return null}function ef(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if((r&(ba|ka))!==H)throw Error(l(327));Bb();if(a!==T||b!==L)bb(a,b),$h(a,b);if(null!==p){var c=r;r|=ba;var d=ai(),e=nd(a);do try{Lj();break}catch(f){bi(a,f)}while(1);ve();r=c;od.current=d;ra.current=
-e;if(G===pd)throw c=qd,bb(a,b),$a(a,b),V(a),c;if(null!==p)throw Error(l(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;T=null;cb(a);V(a)}return null}function Mj(){if(null!==db){var a=db;db=null;a.forEach(function(a,c){ff(c,a);V(c)});ea()}}function ei(a,b){var c=r;r|=1;try{return a(b)}finally{r=c,r===H&&ea()}}function fi(a,b){var c=r;r&=-2;r|=kf;try{return a(b)}finally{r=c,r===H&&ea()}}function bb(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&
-(a.timeoutHandle=-1,Nj(c));if(null!==p)for(c=p.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&(t(C),t(y));break;case 3:xb();t(C);t(y);break;case 5:De(d);break;case 4:xb();break;case 13:t(F);break;case 19:t(F);break;case 10:we(d)}c=c.return}T=a;p=Sa(a.current,null);L=b;G=Za;qd=null;dc=sa=1073741823;sd=null;cc=0;rd=!1;eb=null}function bi(a,b){do{try{ve();Yc.current=Zc;if($c)for(var c=B.memoizedState;null!==c;){var d=c.queue;null!==d&&(d.pending=null);
-c=c.next}Ha=0;J=K=B=null;$c=!1;if(null===p||null===p.return)return G=pd,qd=b,p=null;p.mode&8&&ed(p,!0);a:{var e=a,f=p.return,g=p,h=b;b=L;g.effectTag|=2048;g.firstEffect=g.lastEffect=null;if(null!==h&&"object"===typeof h&&"function"===typeof h.then){var k=h;if(0===(g.mode&2)){var n=g.alternate;n?(g.updateQueue=n.updateQueue,g.memoizedState=n.memoizedState,g.expirationTime=n.expirationTime):(g.updateQueue=null,g.memoizedState=null)}var m=0!==(F.current&1),l=f;do{var r;if(r=13===l.tag){var t=l.memoizedState;
-if(null!==t)r=null!==t.dehydrated?!0:!1;else{var w=l.memoizedProps;r=void 0===w.fallback?!1:!0!==w.unstable_avoidThisFallback?!0:m?!1:!0}}if(r){var z=l.updateQueue;if(null===z){var x=new Set;x.add(k);l.updateQueue=x}else z.add(k);if(0===(l.mode&2)){l.effectTag|=64;g.effectTag&=-2981;if(1===g.tag)if(null===g.alternate)g.tag=17;else{var v=Da(1073741823,null);v.tag=Pc;Ea(g,v)}g.expirationTime=1073741823;break a}h=void 0;g=b;var y=e.pingCache;null===y?(y=e.pingCache=new Oj,h=new Set,y.set(k,h)):(h=y.get(k),
-void 0===h&&(h=new Set,y.set(k,h)));if(!h.has(g)){h.add(g);var H=Pj.bind(null,e,k,g);k.then(H,H)}l.effectTag|=4096;l.expirationTime=b;break a}l=l.return}while(null!==l);h=Error((la(g.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+Ld(g))}G!==jf&&(G=ci);h=We(h,g);l=f;do{switch(l.tag){case 3:k=h;l.effectTag|=4096;l.expirationTime=b;var A=
-Wh(l,k,b);gh(l,A);break a;case 1:k=h;var D=l.type,q=l.stateNode;if(0===(l.effectTag&64)&&("function"===typeof D.getDerivedStateFromError||null!==q&&"function"===typeof q.componentDidCatch&&(null===Ka||!Ka.has(q)))){l.effectTag|=4096;l.expirationTime=b;var E=Xh(l,k,b);gh(l,E);break a}}l=l.return}while(null!==l)}p=gi(p)}catch(uj){b=uj;continue}break}while(1)}function ai(a){a=od.current;od.current=Zc;return null===a?Zc:a}function nd(a){var b=ra.current;ra.current=a.memoizedInteractions;return b}function hh(a,
-b){a<sa&&2<a&&(sa=a);null!==b&&a<dc&&2<a&&(dc=a,sd=b)}function Qc(a){a>cc&&(cc=a)}function Lj(){for(;null!==p;)p=hi(p)}function Jj(){for(;null!==p&&!Qj();)p=hi(p)}function hi(a){var b=a.alternate;0!==(a.mode&8)?(Wa=Xa(),0>a.actualStartTime&&(a.actualStartTime=Xa()),b=ii(b,a,L),ed(a,!0)):b=ii(b,a,L);a.memoizedProps=a.pendingProps;null===b&&(b=gi(a));ji.current=null;return b}function gi(a){p=a;do{var b=p.alternate;a=p.return;if(0===(p.effectTag&2048)){if(0===(p.mode&8))b=Jh(b,p,L);else{var c=p;Wa=Xa();
-0>c.actualStartTime&&(c.actualStartTime=Xa());b=Jh(b,p,L);ed(p,!1)}c=p;if(1===L||1!==c.childExpirationTime){var d=0;if(0!==(c.mode&8)){for(var e=c.actualDuration,f=c.selfBaseDuration,g=null===c.alternate||c.child!==c.alternate.child,h=c.child;null!==h;){var k=h.expirationTime,n=h.childExpirationTime;k>d&&(d=k);n>d&&(d=n);g&&(e+=h.actualDuration);f+=h.treeBaseDuration;h=h.sibling}c.actualDuration=e;c.treeBaseDuration=f}else for(e=c.child;null!==e;)f=e.expirationTime,g=e.childExpirationTime,f>d&&(d=
-f),g>d&&(d=g),e=e.sibling;c.childExpirationTime=d}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=p.firstEffect),null!==p.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=p.firstEffect),a.lastEffect=p.lastEffect),1<p.effectTag&&(null!==a.lastEffect?a.lastEffect.nextEffect=p:a.firstEffect=p,a.lastEffect=p))}else{b=Cj(p);if(0!==(p.mode&8)){ed(p,!1);c=p.actualDuration;for(d=p.child;null!==d;)c+=d.actualDuration,d=d.sibling;p.actualDuration=c}if(null!==
-b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=p.sibling;if(null!==b)return b;p=a}while(null!==p);G===Za&&(G=jf);return null}function gf(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function cb(a){var b=Ic();Ca(99,Rj.bind(null,a,b));return null}function Rj(a,b){do Bb();while(null!==ec);if((r&(ba|ka))!==H)throw Error(l(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=
-0;if(c===a.current)throw Error(l(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=gf(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(p=T=null,L=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=
-c.firstEffect;if(null!==e){var f=r;r|=ka;var g=nd(a);ji.current=null;lf=zc;var h=xg();if(ge(h)){if("selectionStart"in h)var k={start:h.selectionStart,end:h.selectionEnd};else a:{k=(k=h.ownerDocument)&&k.defaultView||window;var n=k.getSelection&&k.getSelection();if(n&&0!==n.rangeCount){k=n.anchorNode;var u=n.anchorOffset,t=n.focusNode;n=n.focusOffset;try{k.nodeType,t.nodeType}catch(wb){k=null;break a}var w=0,y=-1,z=-1,F=0,x=0,v=h,B=null;b:for(;;){for(var E;;){v!==k||0!==u&&3!==v.nodeType||(y=w+u);
-v!==t||0!==n&&3!==v.nodeType||(z=w+n);3===v.nodeType&&(w+=v.nodeValue.length);if(null===(E=v.firstChild))break;B=v;v=E}for(;;){if(v===h)break b;B===k&&++F===u&&(y=w);B===t&&++x===n&&(z=w);if(null!==(E=v.nextSibling))break;v=B;B=v.parentNode}v=E}k=-1===y||-1===z?null:{start:y,end:z}}else k=null}k=k||{start:0,end:0}}else k=null;mf={activeElementDetached:null,focusedElem:h,selectionRange:k};zc=!1;m=e;do try{Sj()}catch(wb){if(null===m)throw Error(l(330));ab(m,wb);m=m.nextEffect}while(null!==m);Ye=Xa();
-m=e;do try{for(h=a,k=b;null!==m;){var A=m.effectTag;A&16&&bc(m.stateNode,"");if(A&128){var D=m.alternate;if(null!==D){var q=D.ref;null!==q&&("function"===typeof q?q(null):q.current=null)}}switch(A&1038){case 2:Uh(m);m.effectTag&=-3;break;case 6:Uh(m);m.effectTag&=-3;bf(m.alternate,m);break;case 1024:m.effectTag&=-1025;break;case 1028:m.effectTag&=-1025;bf(m.alternate,m);break;case 4:bf(m.alternate,m);break;case 8:u=m,Rh(h,u,k),Sh(u)}m=m.nextEffect}}catch(wb){if(null===m)throw Error(l(330));ab(m,wb);
-m=m.nextEffect}while(null!==m);q=mf;D=xg();A=q.focusedElem;k=q.selectionRange;if(D!==A&&A&&A.ownerDocument&&wg(A.ownerDocument.documentElement,A)){null!==k&&ge(A)&&(D=k.start,q=k.end,void 0===q&&(q=D),"selectionStart"in A?(A.selectionStart=D,A.selectionEnd=Math.min(q,A.value.length)):(q=(D=A.ownerDocument||document)&&D.defaultView||window,q.getSelection&&(q=q.getSelection(),u=A.textContent.length,h=Math.min(k.start,u),k=void 0===k.end?h:Math.min(k.end,u),!q.extend&&h>k&&(u=k,k=h,h=u),u=vg(A,h),t=
-vg(A,k),u&&t&&(1!==q.rangeCount||q.anchorNode!==u.node||q.anchorOffset!==u.offset||q.focusNode!==t.node||q.focusOffset!==t.offset)&&(D=D.createRange(),D.setStart(u.node,u.offset),q.removeAllRanges(),h>k?(q.addRange(D),q.extend(t.node,t.offset)):(D.setEnd(t.node,t.offset),q.addRange(D))))));D=[];for(q=A;q=q.parentNode;)1===q.nodeType&&D.push({element:q,left:q.scrollLeft,top:q.scrollTop});"function"===typeof A.focus&&A.focus();for(A=0;A<D.length;A++)q=D[A],q.element.scrollLeft=q.left,q.element.scrollTop=
-q.top}zc=!!lf;mf=lf=null;a.current=c;m=e;do try{for(A=a;null!==m;){var G=m.effectTag;G&36&&Fj(A,m.alternate,m);if(G&128){D=void 0;var C=m.ref;if(null!==C){var I=m.stateNode;switch(m.tag){case 5:D=I;break;default:D=I}"function"===typeof C?C(D):C.current=D}}m=m.nextEffect}}catch(wb){if(null===m)throw Error(l(330));ab(m,wb);m=m.nextEffect}while(null!==m);m=null;Tj();ra.current=g;r=f}else a.current=c,Ye=Xa();if(G=td)td=!1,ec=a,nf=d,fc=b;else for(m=e;null!==m;)b=m.nextEffect,m.nextEffect=null,m=b;b=a.firstPendingTime;
-if(0!==b){if(null!==eb)for(e=eb,eb=null,C=0;C<e.length;C++)ki(a,e[C],a.memoizedInteractions);La(a,b)}else Ka=null;G||li(a,d);1073741823===b?a===of?gc++:(gc=0,of=a):gc=0;"function"===typeof pf&&pf(c.stateNode,d);V(a);if(jd)throw jd=!1,a=df,df=null,a;if((r&kf)!==H)return null;ea();return null}function Sj(){for(;null!==m;){var a=m.effectTag;0!==(a&256)&&Ej(m.alternate,m);0===(a&512)||td||(td=!0,Ub(97,function(){Bb();return null}));m=m.nextEffect}}function Bb(){if(90!==fc){var a=97<fc?97:fc;fc=90;return Ca(a,
-Uj)}}function Uj(){if(null===ec)return!1;var a=ec,b=nf;ec=null;nf=0;if((r&(ba|ka))!==H)throw Error(l(331));var c=r;r|=ka;for(var d=nd(a),e=a.current.firstEffect;null!==e;){try{var f=e;if(0!==(f.effectTag&512))switch(f.tag){case 0:case 11:case 15:case 22:Oh(5,f),Ph(5,f)}}catch(g){if(null===e)throw Error(l(330));ab(e,g)}f=e.nextEffect;e.nextEffect=null;e=f}ra.current=d;li(a,b);r=c;ea();return!0}function mi(a,b,c){b=We(c,b);b=Wh(a,b,1073741823);Ea(a,b);a=ld(a,1073741823);null!==a&&(V(a),La(a,1073741823))}
-function ab(a,b){if(3===a.tag)mi(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){mi(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Ka||!Ka.has(d))){a=We(b,a);a=Xh(c,a,1073741823);Ea(c,a);c=ld(c,1073741823);null!==c&&(V(c),La(c,1073741823));break}}c=c.return}}function Pj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);T===a&&L===c?G===id||G===hd&&1073741823===sa&&U()-cf<di?bb(a,L):rd=
-!0:Yh(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,V(a),La(a,c)))}function Hj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=ia(),b=Va(b,a,null));a=ld(a,b);null!==a&&(V(a),La(a,b))}function Ve(a){null===eb?eb=[a]:eb.push(a)}function ki(a,b,c){if(0<c.size){var d=a.pendingInteractionMap,e=d.get(b);null!=e?c.forEach(function(a){e.has(a)||a.__count++;e.add(a)}):(d.set(b,new Set(c)),c.forEach(function(a){a.__count++}));d=qf.current;if(null!==d)d.onWorkScheduled(c,1E3*b+a.interactionThreadID)}}
-function La(a,b){ki(a,b,ra.current)}function $h(a,b){var c=new Set;a.pendingInteractionMap.forEach(function(a,d){d>=b&&a.forEach(function(a){return c.add(a)})});a.memoizedInteractions=c;if(0<c.size){var d=qf.current;if(null!==d){a=1E3*b+a.interactionThreadID;try{d.onWorkStarted(c,a)}catch(e){Ub(99,function(){throw e;})}}}}function li(a,b){var c=a.firstPendingTime;try{var d=qf.current;if(null!==d&&0<a.memoizedInteractions.size)d.onWorkStopped(a.memoizedInteractions,1E3*b+a.interactionThreadID)}catch(f){Ub(99,
-function(){throw f;})}finally{var e=a.pendingInteractionMap;e.forEach(function(a,b){b>c&&(e.delete(b),a.forEach(function(a){a.__count--;if(null!==d&&0===a.__count)try{d.onInteractionScheduledWorkCompleted(a)}catch(k){Ub(99,function(){throw k;})}}))})}}function Vj(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);pf=function(a,e){try{var d=64===(a.current.effectTag&64),g=1073741821-
-(U()/10|0),h=dh(g,e);b.onCommitFiberRoot(c,a,h,d)}catch(k){}};Ze=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}function Wj(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=
-0;this.alternate=null;this.actualDuration=0;this.actualStartTime=-1;this.treeBaseDuration=this.selfBaseDuration=0}function Qe(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Xj(a){if("function"===typeof a)return Qe(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Jd)return 11;if(a===Kd)return 14}return 2}function Sa(a,b){var c=a.alternate;null===c?(c=ja(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=
-b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null,c.actualDuration=0,c.actualStartTime=-1);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,firstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;c.selfBaseDuration=a.selfBaseDuration;
-c.treeBaseDuration=a.treeBaseDuration;return c}function Uc(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Qe(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case Ma:return Ga(c.children,e,f,b);case Yj:g=8;e|=7;break;case Nf:g=8;e|=1;break;case qc:return a=ja(12,c,b,e|8),a.elementType=qc,a.type=qc,a.expirationTime=f,a;case rc:return a=ja(13,c,b,e),a.type=rc,a.elementType=rc,a.expirationTime=f,a;case Id:return a=ja(19,c,b,e),a.elementType=Id,a.expirationTime=f,a;default:if("object"===
-typeof a&&null!==a)switch(a.$$typeof){case Pf:g=10;break a;case Of:g=9;break a;case Jd:g=11;break a;case Kd:g=14;break a;case Rf:g=16;d=null;break a;case Qf:g=22;break a}throw Error(l(130,null==a?a:typeof a,""));}b=ja(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Ga(a,b,c,d){a=ja(7,a,d,b);a.expirationTime=c;return a}function Ae(a,b,c){a=ja(6,a,null,b);a.expirationTime=c;return a}function Be(a,b,c){b=ja(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode=
-{containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Zj(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=
-0;this.interactionThreadID=ak();this.memoizedInteractions=new Set;this.pendingInteractionMap=new Map}function Yh(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function $a(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}function Mh(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==
-c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function ff(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}function ud(a,b,c,d){var e=b.current,f=ia(),g=ac.suspense;f=Va(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(Na(c)!==c||1!==c.tag)throw Error(l(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(O(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;
-break b}}h=h.return}while(null!==h);throw Error(l(171));}if(1===c.tag){var k=c.type;if(O(k)){c=Tg(c,k,h);break a}}c=h}else c=Ba;null===b.context?b.context=c:b.pendingContext=c;b=Da(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);Ea(e,b);Ia(e,f);return f}function rf(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function ni(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=
-b)}function sf(a,b){ni(a,b);(a=a.alternate)&&ni(a,b)}function tf(a,b,c){c=null!=c&&!0===c.hydrate;var d=new Zj(a,b,c);var e=2===b?7:1===b?3:0;bk&&(e|=8);e=ja(3,null,null,e);d.current=e;e.stateNode=d;xe(e);a[Pb]=d.current;c&&0!==b&&Pi(a,9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}function hc(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function ck(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:
-null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new tf(a,0,b?{hydrate:!0}:void 0)}function vd(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=rf(g);h.call(a)}}ud(b,g,a,e)}else{f=c._reactRootContainer=ck(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=rf(g);k.call(a)}}fi(function(){ud(b,g,a,e)})}return rf(g)}function dk(a,b,c){var d=
-3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:jb,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function oi(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!hc(b))throw Error(l(200));return dk(a,b,null,c)}if(!Z)throw Error(l(227));var Ci=function(a,b,c,d,e,f,g,h,k){var n=Array.prototype.slice.call(arguments,3);try{b.apply(c,n)}catch(u){this.onError(u)}},Cb=!1,mc=null,nc=!1,zd=null,Di={onError:function(a){Cb=!0;mc=a}},Dd=null,
-Ef=null,zf=null,oc=null,fb={},pc=[],Ad={},gb={},Bd={},va=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),N=Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,Cd=null,hb=null,ib=null,oe=function(a,b){return a(b)},rg=function(a,b,c,d,e){return a(b,c,d,e)},Fd=function(){},If=oe,Oa=!1,Gd=!1,Y=Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,ek=Y.unstable_cancelCallback,wd=Y.unstable_now,mg=Y.unstable_scheduleCallback,
-fk=Y.unstable_shouldYield,pi=Y.unstable_requestPaint,Zd=Y.unstable_runWithPriority,gk=Y.unstable_getCurrentPriorityLevel,hk=Y.unstable_ImmediatePriority,qi=Y.unstable_UserBlockingPriority,ng=Y.unstable_NormalPriority,ik=Y.unstable_LowPriority,jk=Y.unstable_IdlePriority,Gi=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
-Jf=Object.prototype.hasOwnProperty,Lf={},Kf={},E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){E[a]=new M(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];E[b]=new M(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){E[a]=new M(a,
-2,!1,a.toLowerCase(),null,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){E[a]=new M(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){E[a]=new M(a,3,!1,a.toLowerCase(),null,!1)});["checked","multiple","muted","selected"].forEach(function(a){E[a]=
-new M(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){E[a]=new M(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){E[a]=new M(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){E[a]=new M(a,5,!1,a.toLowerCase(),null,!1)});var uf=/[\-:]([a-z])/g,vf=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
-a.replace(uf,vf);E[b]=new M(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(uf,vf);E[b]=new M(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(uf,vf);E[b]=new M(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){E[a]=new M(a,1,!1,a.toLowerCase(),null,!1)});E.xlinkHref=new M("xlinkHref",1,
-!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){E[a]=new M(a,1,!1,a.toLowerCase(),null,!0)});var ca=Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ca.hasOwnProperty("ReactCurrentDispatcher")||(ca.ReactCurrentDispatcher={current:null});ca.hasOwnProperty("ReactCurrentBatchConfig")||(ca.ReactCurrentBatchConfig={suspense:null});var Ki=/^(.*)[\\\/]/,P="function"===typeof Symbol&&Symbol.for,Vc=P?Symbol.for("react.element"):60103,jb=P?Symbol.for("react.portal"):
-60106,Ma=P?Symbol.for("react.fragment"):60107,Nf=P?Symbol.for("react.strict_mode"):60108,qc=P?Symbol.for("react.profiler"):60114,Pf=P?Symbol.for("react.provider"):60109,Of=P?Symbol.for("react.context"):60110,Yj=P?Symbol.for("react.concurrent_mode"):60111,Jd=P?Symbol.for("react.forward_ref"):60112,rc=P?Symbol.for("react.suspense"):60113,Id=P?Symbol.for("react.suspense_list"):60120,Kd=P?Symbol.for("react.memo"):60115,Rf=P?Symbol.for("react.lazy"):60116,Qf=P?Symbol.for("react.block"):60121,Mf="function"===
-typeof Symbol&&Symbol.iterator,xd,Lh=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{xd=xd||document.createElement("div");xd.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=xd.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),bc=function(a,
-b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b},lb={animationend:tc("Animation","AnimationEnd"),animationiteration:tc("Animation","AnimationIteration"),animationstart:tc("Animation","AnimationStart"),transitionend:tc("Transition","TransitionEnd")},Sd={},ag={};va&&(ag=document.createElement("div").style,"AnimationEvent"in window||(delete lb.animationend.animation,delete lb.animationiteration.animation,delete lb.animationstart.animation),"TransitionEvent"in
-window||delete lb.transitionend.transition);var ri=uc("animationend"),si=uc("animationiteration"),ti=uc("animationstart"),ui=uc("transitionend"),Hb="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bg=new ("function"===typeof WeakMap?WeakMap:Map),Eb=null,Oi=function(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;
-if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)yf(a,b[d],c[d]);else b&&yf(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}},wc=[],ae=!1,da=[],wa=null,xa=null,ya=null,Ib=new Map,Jb=new Map,Nb=[],Xd="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),
-Qi="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" "),qg={},pg=new Map,ce=new Map,kk=["abort","abort",ri,"animationEnd",si,"animationIteration",ti,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata",
-"loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",ui,"transitionEnd","waiting","waiting"];be("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
-0);be("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);be(kk,2);(function(a,b){for(var c=0;c<a.length;c++)ce.set(a[c],b)})("change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),0);var Zi=qi,Yi=Zd,zc=!0,Ob={animationIterationCount:!0,
-borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,
-strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lk=["Webkit","ms","Moz","O"];Object.keys(Ob).forEach(function(a){lk.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Ob[b]=Ob[a]})});var $i=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Ag="$",Bg="/$",je="$?",ie="$!",lf=null,mf=null,hf="function"===typeof setTimeout?setTimeout:void 0,Nj="function"===
-typeof clearTimeout?clearTimeout:void 0,wf=Math.random().toString(36).slice(2),za="__reactInternalInstance$"+wf,Bc="__reactEventHandlers$"+wf,Pb="__reactContainere$"+wf,Aa=null,me=null,Cc=null;N(Q.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=Dc)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==
-typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=Dc)},persist:function(){this.isPersistent=Dc},isPersistent:Ec,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=Ec;this._dispatchInstances=this._dispatchListeners=null}});Q.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||
-Date.now()},defaultPrevented:null,isTrusted:null};Q.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,d=function(){};d.prototype=c.prototype;d=new d;N(d,b.prototype);b.prototype=d;b.prototype.constructor=b;b.Interface=N({},c.Interface,a);b.extend=c.extend;Fg(b);return b};Fg(Q);var mk=Q.extend({data:null}),nk=Q.extend({data:null}),ej=[9,13,27,32],ne=va&&"CompositionEvent"in window,ic=null;va&&"documentMode"in document&&(ic=document.documentMode);var ok=va&&"TextEvent"in window&&
-!ic,Kg=va&&(!ne||ic&&8<ic&&11>=ic),Jg=String.fromCharCode(32),ta={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},
-dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ig=!1,pb=!1,pk={eventTypes:ta,extractEvents:function(a,b,c,d,e){var f;if(ne)b:{switch(a){case "compositionstart":var g=ta.compositionStart;break b;case "compositionend":g=ta.compositionEnd;break b;case "compositionupdate":g=
-ta.compositionUpdate;break b}g=void 0}else pb?Gg(a,c)&&(g=ta.compositionEnd):"keydown"===a&&229===c.keyCode&&(g=ta.compositionStart);g?(Kg&&"ko"!==c.locale&&(pb||g!==ta.compositionStart?g===ta.compositionEnd&&pb&&(f=Eg()):(Aa=d,me="value"in Aa?Aa.value:Aa.textContent,pb=!0)),e=mk.getPooled(g,b,c,d),f?e.data=f:(f=Hg(c),null!==f&&(e.data=f)),ob(e),f=e):f=null;(a=ok?fj(a,c):gj(a,c))?(b=nk.getPooled(ta.beforeInput,b,c,d),b.data=a,ob(b)):b=null;return null===f?b:null===b?f:[f,b]}},hj={color:!0,date:!0,
-datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Ng={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},Qb=null,Rb=null,xf=!1;va&&(xf=fg("input")&&(!document.documentMode||9<document.documentMode));var qk={eventTypes:Ng,_isInputEventSupported:xf,extractEvents:function(a,b,c,d,e){e=b?Pa(b):window;var f=
-e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=jj;else if(Lg(e))if(xf)g=nj;else{g=lj;var h=kj}else(f=e.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(g=mj);if(g&&(g=g(a,b)))return Mg(g,c,d);h&&h(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Od(e,"number",e.value)}},jc=Q.extend({view:null,detail:null}),pj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},vi=0,wi=0,xi=!1,yi=!1,kc=jc.extend({screenX:null,
-screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:pe,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=vi;vi=a.screenX;return xi?"mousemove"===a.type?a.screenX-b:0:(xi=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;var b=wi;wi=a.screenY;return yi?"mousemove"===
-a.type?a.screenY-b:0:(yi=!0,0)}}),zi=kc.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),lc={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout",
-"pointerover"]}},rk={eventTypes:lc,extractEvents:function(a,b,c,d,e){var f="mouseover"===a||"pointerover"===a,g="mouseout"===a||"pointerout"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?Fb(b):null,null!==b){var h=Na(b);if(b!==h||5!==b.tag&&6!==b.tag)b=null}}else g=null;if(g===b)return null;if("mouseout"===a||"mouseover"===a){var k=kc;var n=lc.mouseLeave;
-var l=lc.mouseEnter;var m="mouse"}else if("pointerout"===a||"pointerover"===a)k=zi,n=lc.pointerLeave,l=lc.pointerEnter,m="pointer";a=null==g?f:Pa(g);f=null==b?f:Pa(b);n=k.getPooled(n,g,c,d);n.type=m+"leave";n.target=a;n.relatedTarget=f;c=k.getPooled(l,b,c,d);c.type=m+"enter";c.target=f;c.relatedTarget=a;d=g;m=b;if(d&&m)a:{k=d;l=m;g=0;for(a=k;a;a=na(a))g++;a=0;for(b=l;b;b=na(b))a++;for(;0<g-a;)k=na(k),g--;for(;0<a-g;)l=na(l),a--;for(;g--;){if(k===l||k===l.alternate)break a;k=na(k);l=na(l)}k=null}else k=
-null;l=k;for(k=[];d&&d!==l;){g=d.alternate;if(null!==g&&g===l)break;k.push(d);d=na(d)}for(d=[];m&&m!==l;){g=m.alternate;if(null!==g&&g===l)break;d.push(m);m=na(m)}for(m=0;m<k.length;m++)le(k[m],"bubbled",n);for(m=d.length;0<m--;)le(d[m],"captured",c);return 0===(e&64)?[n]:[n,c]}},Qa="function"===typeof Object.is?Object.is:qj,rj=Object.prototype.hasOwnProperty,sk=va&&"documentMode"in document&&11>=document.documentMode,Rg={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},
-dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},qb=null,re=null,Tb=null,qe=!1,tk={eventTypes:Rg,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=Td(e);f=Bd.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?Pa(b):window;switch(a){case "focus":if(Lg(e)||"true"===e.contentEditable)qb=e,re=b,Tb=null;break;case "blur":Tb=re=qb=null;
-break;case "mousedown":qe=!0;break;case "contextmenu":case "mouseup":case "dragend":return qe=!1,Qg(c,d);case "selectionchange":if(sk)break;case "keydown":case "keyup":return Qg(c,d)}return null}},uk=Q.extend({animationName:null,elapsedTime:null,pseudoElement:null}),vk=Q.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),wk=jc.extend({relatedTarget:null}),xk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",
-Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",
-224:"Meta"},zk=jc.extend({key:function(a){if(a.key){var b=xk[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Gc(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?yk[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:pe,charCode:function(a){return"keypress"===a.type?Gc(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
-a.type?Gc(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Ak=kc.extend({dataTransfer:null}),Bk=jc.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:pe}),Ck=Q.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),Dk=kc.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?
--a.wheelDelta:0},deltaZ:null,deltaMode:null}),Ek={eventTypes:qg,extractEvents:function(a,b,c,d,e){e=pg.get(a);if(!e)return null;switch(a){case "keypress":if(0===Gc(c))return null;case "keydown":case "keyup":a=zk;break;case "blur":case "focus":a=wk;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=kc;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=
-Ak;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=Bk;break;case ri:case si:case ti:a=uk;break;case ui:a=Ck;break;case "scroll":a=jc;break;case "wheel":a=Dk;break;case "copy":case "cut":case "paste":a=vk;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=zi;break;default:a=Q}b=a.getPooled(e,b,c,d);ob(b);return b}};(function(a){if(oc)throw Error(l(101));
-oc=Array.prototype.slice.call(a);Af()})("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));(function(a,b,c){Dd=a;Ef=b;zf=c})(ke,Lb,Pa);Cf({SimpleEventPlugin:Ek,EnterLeaveEventPlugin:rk,ChangeEventPlugin:qk,SelectEventPlugin:tk,BeforeInputEventPlugin:pk});var se=[],rb=-1,Ba={},y={current:Ba},C={current:!1},Ra=Ba,yd=Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing,ra=yd.__interactionsRef,qf=yd.__subscriberRef,
-ak=yd.unstable_getThreadID,Ij=yd.unstable_wrap,tj=Zd,te=mg,ch=ek,sj=gk,Jc=hk,Vg=qi,Wg=ng,Xg=ik,Yg=jk;if(null==ra||null==ra.current)throw Error(l(302));var bh={},Qj=fk,Tj=void 0!==pi?pi:function(){},oa=null,Kc=null,ue=!1,Ai=wd(),U=1E4>Ai?wd:function(){return wd()-Ai},Oc={current:null},Nc=null,tb=null,Mc=null,fh=0,Pc=2,Fa=!1,ac=ca.ReactCurrentBatchConfig,mh=(new Z.Component).refs,Sc={isMounted:function(a){return(a=a._reactInternalFiber)?Na(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;
-var d=ia(),e=ac.suspense;d=Va(d,a,e);e=Da(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Ea(a,e);Ia(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=ia(),e=ac.suspense;d=Va(d,a,e);e=Da(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Ea(a,e);Ia(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=ia(),d=ac.suspense;c=Va(c,a,d);d=Da(c,d);d.tag=Pc;void 0!==b&&null!==b&&(d.callback=b);Ea(a,d);Ia(a,c)}},Wc=Array.isArray,Ab=nh(!0),Pe=nh(!1),Yb=
-{},ha={current:Yb},$b={current:Yb},Zb={current:Yb},F={current:0},Yc=ca.ReactCurrentDispatcher,X=ca.ReactCurrentBatchConfig,Ha=0,B=null,K=null,J=null,$c=!1,Zc={readContext:W,useCallback:R,useContext:R,useEffect:R,useImperativeHandle:R,useLayoutEffect:R,useMemo:R,useReducer:R,useRef:R,useState:R,useDebugValue:R,useResponder:R,useDeferredValue:R,useTransition:R},vj={readContext:W,useCallback:vh,useContext:W,useEffect:rh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Je(4,
-2,th.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Je(4,2,a,b)},useMemo:function(a,b){var c=yb();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=yb();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=ph.bind(null,B,a);return[d.memoizedState,a]},useRef:function(a){var b=yb();a={current:a};return b.memoizedState=a},useState:He,useDebugValue:Le,useResponder:Ee,
-useDeferredValue:function(a,b){var c=He(a),d=c[0],e=c[1];rh(function(){var c=X.suspense;X.suspense=void 0===b?null:b;try{e(a)}finally{X.suspense=c}},[a,b]);return d},useTransition:function(a){var b=He(!1),c=b[0];b=b[1];return[vh(Me.bind(null,b,a),[b,a]),c]}},wj={readContext:W,useCallback:dd,useContext:W,useEffect:cd,useImperativeHandle:uh,useLayoutEffect:sh,useMemo:wh,useReducer:ad,useRef:qh,useState:function(a){return ad(Ua)},useDebugValue:Le,useResponder:Ee,useDeferredValue:function(a,b){var c=
-ad(Ua),d=c[0],e=c[1];cd(function(){var c=X.suspense;X.suspense=void 0===b?null:b;try{e(a)}finally{X.suspense=c}},[a,b]);return d},useTransition:function(a){var b=ad(Ua),c=b[0];b=b[1];return[dd(Me.bind(null,b,a),[b,a]),c]}},xj={readContext:W,useCallback:dd,useContext:W,useEffect:cd,useImperativeHandle:uh,useLayoutEffect:sh,useMemo:wh,useReducer:bd,useRef:qh,useState:function(a){return bd(Ua)},useDebugValue:Le,useResponder:Ee,useDeferredValue:function(a,b){var c=bd(Ua),d=c[0],e=c[1];cd(function(){var c=
-X.suspense;X.suspense=void 0===b?null:b;try{e(a)}finally{X.suspense=c}},[a,b]);return d},useTransition:function(a){var b=bd(Ua),c=b[0];b=b[1];return[dd(Me.bind(null,b,a),[b,a]),c]}},Xa=wd,Ye=0,Wa=-1,pa=null,Ja=null,Ya=!1,yj=ca.ReactCurrentOwner,fa=!1,Te={dehydrated:null,retryTime:0};var Aj=function(a,b,c,d){for(c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===
-c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};var Kh=function(a){};var zj=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;Ta(ha.current);a=null;switch(c){case "input":f=Md(g,f);d=Md(g,d);a=[];break;case "option":f=Pd(g,f);d=Pd(g,d);a=[];break;case "select":f=N({},f,{value:void 0});d=N({},d,{value:void 0});a=[];break;case "textarea":f=Qd(g,f);d=Qd(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=
-Ac)}de(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if("style"===h)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]="");else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(gb.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if("style"===h)if(g){for(k in g)!g.hasOwnProperty(k)||
-l&&l.hasOwnProperty(k)||(c||(c={}),c[k]="");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),c[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else"dangerouslySetInnerHTML"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,l)):"children"===h?g===l||"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(h,""+l):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(gb.hasOwnProperty(h)?(null!=l&&ma(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=
-a||[]).push("style",c);e=a;if(b.updateQueue=e)b.effectTag|=4}};var Bj=function(a,b,c,d){c!==d&&(b.effectTag|=4)};var Gj="function"===typeof WeakSet?WeakSet:Set,Oj="function"===typeof WeakMap?WeakMap:Map,Kj=Math.ceil,od=ca.ReactCurrentDispatcher,ji=ca.ReactCurrentOwner,H=0,kf=8,ba=16,ka=32,Za=0,pd=1,ci=2,hd=3,id=4,jf=5,r=H,T=null,p=null,L=0,G=Za,qd=null,sa=1073741823,dc=1073741823,sd=null,cc=0,rd=!1,cf=0,di=500,m=null,jd=!1,df=null,Ka=null,td=!1,ec=null,fc=90,nf=0,db=null,gc=0,of=null,eb=null,kd=0,
-Ia=function(a,b){if(50<gc)throw gc=0,of=null,Error(l(185));a=ld(a,b);if(null!==a){var c=Ic();1073741823===b?(r&kf)!==H&&(r&(ba|ka))===H?(La(a,b),ef(a)):(V(a),La(a,b),r===H&&ea()):(V(a),La(a,b));(r&4)===H||98!==c&&99!==c||(null===db?db=new Map([[a,b]]):(c=db.get(a),(void 0===c||c>b)&&db.set(a,b)))}};var ii=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||C.current)fa=!0;else{if(d<c){fa=!1;switch(b.tag){case 3:Fh(b);Oe();break;case 5:oh(b);if(b.mode&4&&
-1!==c&&e.hidden)return Ve(1),b.expirationTime=b.childExpirationTime=1,null;break;case 1:O(b.type)&&Hc(b);break;case 4:Ce(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;e=b.type._context;z(Oc,e._currentValue);e._currentValue=d;break;case 12:b.childExpirationTime>=c&&(b.effectTag|=4);break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;if(0!==d&&d>=c)return Gh(a,b,c);z(F,F.current&1);b=qa(a,b,c);return null!==b?b.sibling:null}z(F,F.current&1);break;case 19:d=b.childExpirationTime>=
-c;if(0!==(a.effectTag&64)){if(d)return Ih(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);z(F,F.current);if(!d)return null}return qa(a,b,c)}fa=!1}}else fa=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=sb(b,y.current);ub(b,c);e=Ge(null,b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=
-null;if(O(d)){var f=!0;Hc(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xe(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Rc(b,d,g,a);e.updater=Sc;b.stateNode=e;e._reactInternalFiber=b;ze(b,d,a,c);b=Se(null,b,d,!0,f,c)}else b.tag=0,S(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;Ji(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=aa(e,a);switch(f){case 0:b=
-Re(null,b,e,a,c);break a;case 1:b=Eh(null,b,e,a,c);break a;case 11:b=Ah(null,b,e,a,c);break a;case 14:b=Bh(null,b,e,aa(e.type,a),d,c);break a}throw Error(l(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:aa(d,e),Re(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:aa(d,e),Eh(a,b,d,e,c);case 3:Fh(b);d=b.updateQueue;if(null===a||null===d)throw Error(l(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;ye(a,b);Vb(b,d,null,c);d=
-b.memoizedState.element;if(d===e)Oe(),b=qa(a,b,c);else{if(e=b.stateNode.hydrate)Ja=nb(b.stateNode.containerInfo.firstChild),pa=b,e=Ya=!0;if(e)for(c=Pe(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else S(a,b,d,c),Oe();b=b.child}return b;case 5:return oh(b),null===a&&Ne(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,he(d,e)?g=null:null!==f&&he(d,f)&&(b.effectTag|=16),Dh(a,b),b.mode&4&&1!==c&&e.hidden?(Ve(1),b.expirationTime=b.childExpirationTime=1,
-b=null):(S(a,b,g,c),b=b.child),b;case 6:return null===a&&Ne(b),null;case 13:return Gh(a,b,c);case 4:return Ce(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Ab(b,null,d,c):S(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:aa(d,e),Ah(a,b,d,e,c);case 7:return S(a,b,b.pendingProps,c),b.child;case 8:return S(a,b,b.pendingProps.children,c),b.child;case 12:return b.effectTag|=4,S(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;
-g=b.memoizedProps;f=e.value;var h=b.type._context;z(Oc,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=Qa(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!C.current){b=qa(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var m=k.firstContext;null!==m;){if(m.context===d&&0!==(m.observedBits&f)){1===h.tag&&(m=Da(c,null),m.tag=Pc,Ea(h,m));
-h.expirationTime<c&&(h.expirationTime=c);m=h.alternate;null!==m&&m.expirationTime<c&&(m.expirationTime=c);eh(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}m=m.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}S(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,ub(b,c),e=W(e,f.unstable_observedBits),
-d=d(e),b.effectTag|=1,S(a,b,d,c),b.child;case 14:return e=b.type,f=aa(e,b.pendingProps),f=aa(e.type,f),Bh(a,b,e,f,d,c);case 15:return Ch(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:aa(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,O(d)?(a=!0,Hc(b)):a=!1,ub(b,c),kh(b,d,e),ze(b,d,e,c),Se(null,b,d,!0,a,c);case 19:return Ih(a,b,c)}throw Error(l(156,b.tag));};var pf=null,Ze=null,bk="undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__,
-ja=function(a,b,c,d){return new Wj(a,b,c,d)};tf.prototype.render=function(a){ud(a,this._internalRoot,null,null)};tf.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;ud(null,a,null,function(){b[Pb]=null})};var Vi=function(a){if(13===a.tag){var b=Lc(ia(),150,100);Ia(a,b);sf(a,b)}};var kg=function(a){13===a.tag&&(Ia(a,3),sf(a,3))};var Ti=function(a){if(13===a.tag){var b=ia();b=Va(b,a,null);Ia(a,b);sf(a,b)}};Cd=function(a,b,c){switch(b){case "input":Nd(a,c);b=c.name;if("radio"===
-c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=ke(d);if(!e)throw Error(l(90));Tf(d);Nd(d,e)}}}break;case "textarea":Yf(a,c);break;case "select":b=c.value,null!=b&&kb(a,!!c.multiple,b,!1)}};(function(a,b,c,d){oe=a;rg=b;Fd=c;If=d})(ei,function(a,b,c,d,e){var f=r;r|=4;try{return Ca(98,a.bind(null,b,c,d,e))}finally{r=f,r===H&&ea()}},function(){(r&(1|ba|
-ka))===H&&(Mj(),Bb())},function(a,b){var c=r;r|=2;try{return a(b)}finally{r=c,r===H&&ea()}});var Fk={Events:[Lb,Pa,ke,Cf,Ad,ob,function(a){Ud(a,bj)},Ff,Gf,yc,vc,Bb,{current:!1}]};(function(a){var b=a.findFiberByHostInstance;return Vj(N({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ca.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=eg(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):
-null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:Fb,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"});I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fk;I.createPortal=oi;I.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if("function"===typeof a.render)throw Error(l(188));throw Error(l(268,Object.keys(a)));
-}a=eg(b);a=null===a?null:a.stateNode;return a};I.flushSync=function(a,b){if((r&(ba|ka))!==H)throw Error(l(187));var c=r;r|=1;try{return Ca(99,a.bind(null,b))}finally{r=c,ea()}};I.hydrate=function(a,b,c){if(!hc(b))throw Error(l(200));return vd(null,a,b,!0,c)};I.render=function(a,b,c){if(!hc(b))throw Error(l(200));return vd(null,a,b,!1,c)};I.unmountComponentAtNode=function(a){if(!hc(a))throw Error(l(40));return a._reactRootContainer?(fi(function(){vd(null,null,a,!1,function(){a._reactRootContainer=
-null;a[Pb]=null})}),!0):!1};I.unstable_batchedUpdates=ei;I.unstable_createPortal=function(a,b){return oi(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};I.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!hc(c))throw Error(l(200));if(null==a||void 0===a._reactInternalFiber)throw Error(l(38));return vd(a,b,c,!1,d)};I.version="16.14.0"});
+'use strict';(function(N,fa){"object"===typeof exports&&"undefined"!==typeof module?fa(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],fa):(N=N||self,fa(N.ReactDOM={},N.React))})(this,function(N,fa){function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
+function Va(a,b){mb(a,b);mb(a+"Capture",b)}function mb(a,b){Ob[a]=b;for(a=0;a<b.length;a++)Mf.add(b[a])}function Di(a){if(Nf.call(Of,a))return!0;if(Nf.call(Pf,a))return!1;if(Ei.test(a))return Of[a]=!0;Pf[a]=!0;return!1}function Fi(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function Gi(a,b,c,d){if(null===
+b||"undefined"===typeof b||Fi(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function R(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}function Nd(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||
+"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Gi(b,c,e,d)&&(c=null),d||null===e?Di(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}function Pb(a){if(null===a||"object"!==typeof a)return null;a=Qf&&a[Qf]||a["@@iterator"];return"function"===typeof a?a:null}
+function Qb(a,b,c){if(void 0===Od)try{throw Error();}catch(d){Od=(b=d.stack.trim().match(/\n( *(at )?)/))&&b[1]||""}return"\n"+Od+a}function Hc(a,b){if(!a||Pd)return"";Pd=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();
+}catch(k){d=k}a()}}catch(k){if(k&&d&&"string"===typeof k.stack){for(var e=k.stack.split("\n"),f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return"\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Pd=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Qb(a):""}function Hi(a){switch(a.tag){case 5:return Qb(a.type);case 16:return Qb("Lazy");case 13:return Qb("Suspense");
+case 19:return Qb("SuspenseList");case 0:case 2:case 15:return a=Hc(a.type,!1),a;case 11:return a=Hc(a.type.render,!1),a;case 22:return a=Hc(a.type._render,!1),a;case 1:return a=Hc(a.type,!0),a;default:return""}}function nb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case xa:return"Fragment";case Wa:return"Portal";case Rb:return"Profiler";case Qd:return"StrictMode";case Sb:return"Suspense";case Ic:return"SuspenseList"}if("object"===
+typeof a)switch(a.$$typeof){case Rd:return(a.displayName||"Context")+".Consumer";case Sd:return(a._context.displayName||"Context")+".Provider";case Jc:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Kc:return nb(a.type);case Td:return nb(a._render);case Ud:b=a._payload;a=a._init;try{return nb(a(b))}catch(c){}}return null}function ya(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;
+default:return""}}function Rf(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function Ii(a){var b=Rf(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,
+b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}}function Lc(a){a._valueTracker||(a._valueTracker=Ii(a))}function Sf(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Rf(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Mc(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||
+a.body}catch(b){return a.body}}function Vd(a,b){var c=b.checked;return C({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Tf(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=ya(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Uf(a,b){b=b.checked;null!=b&&Nd(a,"checked",
+b,!1)}function Wd(a,b){Uf(a,b);var c=ya(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Xd(a,b.type,c):b.hasOwnProperty("defaultValue")&&Xd(a,b.type,ya(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function Vf(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=
+b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function Xd(a,b,c){if("number"!==b||Mc(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Ji(a){var b="";fa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}
+function Yd(a,b){a=C({children:void 0},b);if(b=Ji(b.children))a.children=b;return a}function ob(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+ya(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function Zd(a,b){if(null!=
+b.dangerouslySetInnerHTML)throw Error(m(91));return C({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Wf(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(m(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(m(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:ya(c)}}function Xf(a,b){var c=ya(b.value),d=ya(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==
+c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Yf(a,b){b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function Zf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $d(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Zf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function $f(a,b,c){return null==
+b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Tb.hasOwnProperty(a)&&Tb[a]?(""+b).trim():b+"px"}function ag(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=$f(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function ae(a,b){if(b){if(Ki[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(m(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(m(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&
+"__html"in b.dangerouslySetInnerHTML))throw Error(m(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(m(62));}}function be(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function ce(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);
+return 3===a.nodeType?a.parentNode:a}function bg(a){if(a=Ub(a)){if("function"!==typeof de)throw Error(m(280));var b=a.stateNode;b&&(b=Nc(b),de(a.stateNode,a.type,b))}}function cg(a){pb?qb?qb.push(a):qb=[a]:pb=a}function dg(){if(pb){var a=pb,b=qb;qb=pb=null;bg(a);if(b)for(a=0;a<b.length;a++)bg(b[a])}}function ee(){if(null!==pb||null!==qb)fe(),dg()}function Li(a,b,c){if(ge)return a(b,c);ge=!0;try{return eg(a,b,c)}finally{ge=!1,ee()}}function Vb(a,b){var c=a.stateNode;if(null===c)return null;var d=Nc(c);
+if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(m(231,b,typeof c));return c}function Mi(a,b,c,d,e,
+f,g,h,k){Wb=!1;Oc=null;Ni.apply(Oi,arguments)}function Pi(a,b,c,d,e,f,g,h,k){Mi.apply(this,arguments);if(Wb){if(Wb){var q=Oc;Wb=!1;Oc=null}else throw Error(m(198));Pc||(Pc=!0,he=q)}}function Xa(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function fg(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function gg(a){if(Xa(a)!==
+a)throw Error(m(188));}function Qi(a){var b=a.alternate;if(!b){b=Xa(a);if(null===b)throw Error(m(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return gg(e),a;if(f===d)return gg(e),b;f=f.sibling}throw Error(m(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=
+f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(m(189));}}if(c.alternate!==d)throw Error(m(190));}if(3!==c.tag)throw Error(m(188));return c.stateNode.current===c?a:b}function hg(a){a=Qi(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}function ig(a,b){for(var c=
+a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}function ie(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function jg(a,b){switch(a){case "focusin":case "focusout":za=null;break;case "dragenter":case "dragleave":Aa=null;break;case "mouseover":case "mouseout":Ba=null;break;case "pointerover":case "pointerout":Xb.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Yb.delete(b.pointerId)}}function Zb(a,
+b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=ie(b,c,d,e,f),null!==b&&(b=Ub(b),null!==b&&kg(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}function Ri(a,b,c,d,e){switch(b){case "focusin":return za=Zb(za,a,b,c,d,e),!0;case "dragenter":return Aa=Zb(Aa,a,b,c,d,e),!0;case "mouseover":return Ba=Zb(Ba,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Xb.set(f,Zb(Xb.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Yb.set(f,
+Zb(Yb.get(f)||null,a,b,c,d,e)),!0}return!1}function Si(a){var b=Ya(a.target);if(null!==b){var c=Xa(b);if(null!==c)if(b=c.tag,13===b){if(b=fg(c),null!==b){a.blockedOn=b;Ti(a.lanePriority,function(){je(a.priority,function(){Ui(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Qc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=ke(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);
+if(null!==c)return b=Ub(c),null!==b&&kg(b),a.blockedOn=c,!1;b.shift()}return!0}function lg(a,b,c){Qc(a)&&c.delete(b)}function Vi(){for(le=!1;0<la.length;){var a=la[0];if(null!==a.blockedOn){a=Ub(a.blockedOn);null!==a&&Wi(a);break}for(var b=a.targetContainers;0<b.length;){var c=ke(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&la.shift()}null!==za&&Qc(za)&&(za=null);null!==Aa&&Qc(Aa)&&(Aa=null);null!==Ba&&Qc(Ba)&&(Ba=null);Xb.forEach(lg);
+Yb.forEach(lg)}function $b(a,b){a.blockedOn===b&&(a.blockedOn=null,le||(le=!0,mg(ng,Vi)))}function og(a){if(0<la.length){$b(la[0],a);for(var b=1;b<la.length;b++){var c=la[b];c.blockedOn===a&&(c.blockedOn=null)}}null!==za&&$b(za,a);null!==Aa&&$b(Aa,a);null!==Ba&&$b(Ba,a);b=function(b){return $b(b,a)};Xb.forEach(b);Yb.forEach(b);for(b=0;b<ac.length;b++)c=ac[b],c.blockedOn===a&&(c.blockedOn=null);for(;0<ac.length&&(b=ac[0],null===b.blockedOn);)Si(b),null===b.blockedOn&&ac.shift()}function Rc(a,b){var c=
+{};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function Sc(a){if(me[a])return me[a];if(!rb[a])return a;var b=rb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in pg)return me[a]=b[c];return a}function ne(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e="on"+(e[0].toUpperCase()+e.slice(1));oe.set(d,b);qg.set(d,e);Va(e,[d])}}function sb(a){if(0!==(1&a))return v=15,1;if(0!==(2&a))return v=14,2;if(0!==(4&a))return v=13,4;var b=24&a;if(0!==b)return v=12,b;
+if(0!==(a&32))return v=11,32;b=192&a;if(0!==b)return v=10,b;if(0!==(a&256))return v=9,256;b=3584&a;if(0!==b)return v=8,b;if(0!==(a&4096))return v=7,4096;b=4186112&a;if(0!==b)return v=6,b;b=62914560&a;if(0!==b)return v=5,b;if(a&67108864)return v=4,67108864;if(0!==(a&134217728))return v=3,134217728;b=805306368&a;if(0!==b)return v=2,b;if(0!==(1073741824&a))return v=1,1073741824;v=8;return a}function Xi(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}
+function Yi(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(m(358,a));}}function bc(a,b){var c=a.pendingLanes;if(0===c)return v=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=v=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=sb(k),e=v):(h&=f,0!==h&&(d=sb(h),e=v))}else f=c&~g,0!==f?(d=sb(f),e=v):0!==h&&(d=sb(h),
+e=v);if(0===d)return 0;d=31-Ca(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){sb(b);if(e<=v)return b;v=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Ca(b),e=1<<c,d|=a[c],b&=~e;return d}function rg(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Tc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=tb(24&~b),0===a?Tc(10,b):a;case 10:return a=tb(192&~b),0===a?Tc(8,b):a;case 8:return a=tb(3584&~b),0===a&&(a=tb(4186112&~b),
+0===a&&(a=512)),a;case 2:return b=tb(805306368&~b),0===b&&(b=268435456),b}throw Error(m(358,a));}function tb(a){return a&-a}function pe(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}function Uc(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Ca(b);a[b]=c}function Zi(a){return 0===a?32:31-($i(a)/aj|0)|0}function bj(a,b,c,d){Za||fe();var e=qe,f=Za;Za=!0;try{sg(e,a,b,c,d)}finally{(Za=f)||ee()}}function cj(a,b,c,d){dj(ej,qe.bind(null,a,b,c,d))}function qe(a,
+b,c,d){if(Vc){var e;if((e=0===(b&4))&&0<la.length&&-1<tg.indexOf(a))a=ie(null,a,b,c,d),la.push(a);else{var f=ke(a,b,c,d);if(null===f)e&&jg(a,d);else{if(e){if(-1<tg.indexOf(a)){a=ie(f,a,b,c,d);la.push(a);return}if(Ri(f,a,b,c,d))return;jg(a,d)}ug(a,b,d,null,c)}}}}function ke(a,b,c,d){var e=ce(d);e=Ya(e);if(null!==e){var f=Xa(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=fg(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==
+e&&(e=null)}}ug(a,b,d,e,c);return null}function vg(){if(Wc)return Wc;var a,b=re,c=b.length,d,e="value"in Da?Da.value:Da.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Wc=e.slice(a,1<d?1-d:void 0)}function Xc(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function Yc(){return!0}function wg(){return!1}function W(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=
+d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?Yc:wg;this.isPropagationStopped=wg;return this}C(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=Yc)},stopPropagation:function(){var a=
+this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=Yc)},persist:function(){},isPersistent:Yc});return b}function fj(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=gj[a])?!!b[a]:!1}function se(a){return fj}function xg(a,b){switch(a){case "keyup":return-1!==hj.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}
+function yg(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}function ij(a,b){switch(a){case "compositionend":return yg(b);case "keypress":if(32!==b.which)return null;zg=!0;return Ag;case "textInput":return a=b.data,a===Ag&&zg?null:a;default:return null}}function jj(a,b){if(ub)return"compositionend"===a||!te&&xg(a,b)?(a=vg(),Wc=re=Da=null,ub=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;
+if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return Bg&&"ko"!==b.locale?null:b.data;default:return null}}function Cg(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!kj[a.type]:"textarea"===b?!0:!1}function lj(a){if(!ra)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function Dg(a,b,c,d){cg(d);b=Zc(b,"onChange");0<b.length&&(c=new ue("onChange","change",
+null,c,d),a.push({event:c,listeners:b}))}function mj(a){Eg(a,0)}function $c(a){var b=vb(a);if(Sf(b))return a}function nj(a,b){if("change"===a)return b}function Fg(){cc&&(cc.detachEvent("onpropertychange",Gg),dc=cc=null)}function Gg(a){if("value"===a.propertyName&&$c(dc)){var b=[];Dg(b,dc,a,ce(a));a=mj;if(Za)a(b);else{Za=!0;try{ve(a,b)}finally{Za=!1,ee()}}}}function oj(a,b,c){"focusin"===a?(Fg(),cc=b,dc=c,cc.attachEvent("onpropertychange",Gg)):"focusout"===a&&Fg()}function pj(a,b){if("selectionchange"===
+a||"keyup"===a||"keydown"===a)return $c(dc)}function qj(a,b){if("click"===a)return $c(b)}function rj(a,b){if("input"===a||"change"===a)return $c(b)}function sj(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function ec(a,b){if(Y(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!tj.call(b,c[d])||!Y(a[c[d]],b[c[d]]))return!1;return!0}function Hg(a){for(;a&&a.firstChild;)a=
+a.firstChild;return a}function Ig(a,b){var c=Hg(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Hg(c)}}function Jg(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Jg(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function Kg(){for(var a=window,b=Mc();b instanceof a.HTMLIFrameElement;){try{var c=
+"string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Mc(a.document)}return b}function we(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function Lg(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;xe||null==wb||wb!==Mc(d)||(d=wb,"selectionStart"in d&&we(d)?d={start:d.selectionStart,
+end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),fc&&ec(fc,d)||(fc=d,d=Zc(ye,"onSelect"),0<d.length&&(b=new ue("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=wb)))}function Mg(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;Pi(d,b,void 0,a);a.currentTarget=null}function Eg(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=
+a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,q=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Mg(e,h,q);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;q=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Mg(e,h,q);f=k}}}if(Pc)throw a=he,Pc=!1,he=null,a;}function z(a,b){var c=Ng(b),d=a+"__bubble";c.has(d)||(Og(b,a,2,!1),c.add(d))}function Pg(a){a[Qg]||(a[Qg]=!0,Mf.forEach(function(b){Rg.has(b)||
+Sg(b,!1,a,null);Sg(b,!0,a,null)}))}function Sg(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;"selectionchange"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Rg.has(a)){if("scroll"!==a)return;e|=2;f=d}var g=Ng(f),h=a+"__"+(b?"capture":"bubble");g.has(h)||(b&&(e|=4),Og(f,a,e,b),g.add(h))}function Og(a,b,c,d,e){e=oe.get(b);switch(void 0===e?2:e){case 0:e=bj;break;case 1:e=cj;break;default:e=qe}c=e.bind(null,b,c,a);e=void 0;!ze||"touchstart"!==b&&"touchmove"!==
+b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}function ug(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&
+k.parentNode===e)return;g=g.return}for(;null!==h;){g=Ya(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Li(function(){var d=f,e=ce(c),g=[];a:{var h=qg.get(a);if(void 0!==h){var k=ue,m=a;switch(a){case "keypress":if(0===Xc(c))break a;case "keydown":case "keyup":k=uj;break;case "focusin":m="focus";k=Ae;break;case "focusout":m="blur";k=Ae;break;case "beforeblur":case "afterblur":k=Ae;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=
+Tg;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=vj;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=wj;break;case Ug:case Vg:case Wg:k=xj;break;case Xg:k=yj;break;case "scroll":k=zj;break;case "wheel":k=Aj;break;case "copy":case "cut":case "paste":k=Bj;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=
+Yg}var l=0!==(b&4),H=!l&&"scroll"===a,r=l?null!==h?h+"Capture":null:h;l=[];for(var x=d,u;null!==x;){u=x;var y=u.stateNode;5===u.tag&&null!==y&&(u=y,null!==r&&(y=Vb(x,r),null!=y&&l.push(gc(x,y,u))));if(H)break;x=x.return}0<l.length&&(h=new k(h,m,null,c,e),g.push({event:h,listeners:l}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&0===(b&16)&&(m=c.relatedTarget||c.fromElement)&&(Ya(m)||m[xb]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||
+h.parentWindow:window;if(k){if(m=c.relatedTarget||c.toElement,k=d,m=m?Ya(m):null,null!==m&&(H=Xa(m),m!==H||5!==m.tag&&6!==m.tag))m=null}else k=null,m=d;if(k!==m){l=Tg;y="onMouseLeave";r="onMouseEnter";x="mouse";if("pointerout"===a||"pointerover"===a)l=Yg,y="onPointerLeave",r="onPointerEnter",x="pointer";H=null==k?h:vb(k);u=null==m?h:vb(m);h=new l(y,x+"leave",k,c,e);h.target=H;h.relatedTarget=u;y=null;Ya(e)===d&&(l=new l(r,x+"enter",m,c,e),l.target=u,l.relatedTarget=H,y=l);H=y;if(k&&m)b:{l=k;r=m;x=
+0;for(u=l;u;u=yb(u))x++;u=0;for(y=r;y;y=yb(y))u++;for(;0<x-u;)l=yb(l),x--;for(;0<u-x;)r=yb(r),u--;for(;x--;){if(l===r||null!==r&&l===r.alternate)break b;l=yb(l);r=yb(r)}l=null}else l=null;null!==k&&Zg(g,h,k,l,!1);null!==m&&null!==H&&Zg(g,H,m,l,!0)}}}a:{h=d?vb(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var A=nj;else if(Cg(h))if($g)A=rj;else{A=pj;var w=oj}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(A=qj);
+if(A&&(A=A(a,d))){Dg(g,A,c,e);break a}w&&w(a,h,d);"focusout"===a&&(w=h._wrapperState)&&w.controlled&&"number"===h.type&&Xd(h,"number",h.value)}w=d?vb(d):window;switch(a){case "focusin":if(Cg(w)||"true"===w.contentEditable)wb=w,ye=d,fc=null;break;case "focusout":fc=ye=wb=null;break;case "mousedown":xe=!0;break;case "contextmenu":case "mouseup":case "dragend":xe=!1;Lg(g,c,e);break;case "selectionchange":if(Cj)break;case "keydown":case "keyup":Lg(g,c,e)}var Ea;if(te)b:{switch(a){case "compositionstart":var n=
+"onCompositionStart";break b;case "compositionend":n="onCompositionEnd";break b;case "compositionupdate":n="onCompositionUpdate";break b}n=void 0}else ub?xg(a,c)&&(n="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(n="onCompositionStart");n&&(Bg&&"ko"!==c.locale&&(ub||"onCompositionStart"!==n?"onCompositionEnd"===n&&ub&&(Ea=vg()):(Da=e,re="value"in Da?Da.value:Da.textContent,ub=!0)),w=Zc(d,n),0<w.length&&(n=new ah(n,a,null,c,e),g.push({event:n,listeners:w}),Ea?n.data=Ea:(Ea=yg(c),null!==Ea&&(n.data=
+Ea))));if(Ea=Dj?ij(a,c):jj(a,c))d=Zc(d,"onBeforeInput"),0<d.length&&(e=new Ej("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=Ea)}Eg(g,b)})}function gc(a,b,c){return{instance:a,listener:b,currentTarget:c}}function Zc(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Vb(a,c),null!=f&&d.unshift(gc(a,f,e)),f=Vb(a,b),null!=f&&d.push(gc(a,f,e)));a=a.return}return d}function yb(a){if(null===a)return null;do a=a.return;while(a&&5!==
+a.tag);return a?a:null}function Zg(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,q=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==q&&(h=q,e?(k=Vb(c,f),null!=k&&g.unshift(gc(c,k,h))):e||(k=Vb(c,f),null!=k&&g.push(gc(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function ad(){}function bh(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}function Be(a,b){return"textarea"===a||"option"===a||
+"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function Ce(a){1===a.nodeType?a.textContent="":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=""))}function zb(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function ch(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===
+c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}function Fj(a){return{$$typeof:De,toString:a,valueOf:a}}function Ya(a){var b=a[Fa];if(b)return b;for(var c=a.parentNode;c;){if(b=c[xb]||c[Fa]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=ch(a);null!==a;){if(c=a[Fa])return c;a=ch(a)}return b}a=c;c=a.parentNode}return null}function Ub(a){a=a[Fa]||a[xb];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function vb(a){if(5===a.tag||6===a.tag)return a.stateNode;
+throw Error(m(33));}function Nc(a){return a[bd]||null}function Ng(a){var b=a[dh];void 0===b&&(b=a[dh]=new Set);return b}function Ga(a){return{current:a}}function t(a,b){0>Ab||(a.current=Ee[Ab],Ee[Ab]=null,Ab--)}function B(a,b,c){Ab++;Ee[Ab]=a.current;a.current=b}function Bb(a,b){var c=a.type.contextTypes;if(!c)return Ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=
+b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function T(a){a=a.childContextTypes;return null!==a&&void 0!==a}function eh(a,b,c){if(D.current!==Ha)throw Error(m(168));B(D,b);B(K,c)}function fh(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(m(108,nb(b)||"Unknown",e));return C({},c,d)}function cd(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ha;$a=D.current;
+B(D,a);B(K,K.current);return!0}function gh(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=fh(a,b,$a),d.__reactInternalMemoizedMergedChildContext=a,t(K),t(D),B(D,a)):t(K);B(K,c)}function Cb(){switch(Gj()){case dd:return 99;case hh:return 98;case ih:return 97;case jh:return 96;case kh:return 95;default:throw Error(m(332));}}function lh(a){switch(a){case 99:return dd;case 98:return hh;case 97:return ih;case 96:return jh;case 95:return kh;default:throw Error(m(332));}}function ab(a,b){a=lh(a);
+return Hj(a,b)}function Ia(a,b,c){a=lh(a);return Fe(a,b,c)}function ma(){if(null!==ed){var a=ed;ed=null;Ge(a)}mh()}function mh(){if(!He&&null!==sa){He=!0;var a=0;try{var b=sa;ab(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});sa=null}catch(c){throw null!==sa&&(sa=sa.slice(a+1)),Fe(dd,ma),c;}finally{He=!1}}}function ha(a,b){if(a&&a.defaultProps){b=C({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function Ie(){fd=Db=gd=null}function Je(a){var b=
+hd.current;t(hd);a.type._context._currentValue=b}function nh(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function Eb(a,b){gd=a;fd=Db=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ia=!0),a.firstContext=null)}function aa(a,b){if(fd!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)fd=a,b=1073741823;b={context:a,observedBits:b,
+next:null};if(null===Db){if(null===gd)throw Error(m(308));Db=b;gd.dependencies={lanes:0,firstContext:b,responders:null}}else Db=Db.next=b}return a._currentValue}function Ke(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function oh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ja(a,b){return{eventTime:a,
+lane:b,tag:0,payload:null,callback:null,next:null}}function Ka(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}function ph(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=
+f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=b;c.lastBaseUpdate=b}function hc(a,b,c,d){var e=a.updateQueue;La=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,q=k.next;k.next=null;null===g?f=q:g.next=q;g=k;var m=a.alternate;if(null!==m){m=m.updateQueue;var l=m.lastBaseUpdate;l!==g&&(null===l?m.firstBaseUpdate=
+q:l.next=q,m.lastBaseUpdate=k)}}if(null!==f){l=e.baseState;g=0;m=q=k=null;do{h=f.lane;var p=f.eventTime;if((d&h)===h){null!==m&&(m=m.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});a:{var n=a,t=f;h=b;p=c;switch(t.tag){case 1:n=t.payload;if("function"===typeof n){l=n.call(p,l,h);break a}l=n;break a;case 3:n.flags=n.flags&-4097|64;case 0:n=t.payload;h="function"===typeof n?n.call(p,l,h):n;if(null===h||void 0===h)break a;l=C({},l,h);break a;case 2:La=!0}}null!==f.callback&&
+(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else p={eventTime:p,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===m?(q=m=p,k=l):m=m.next=p,g|=h;f=f.next;if(null===f)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===m&&(k=l);e.baseState=k;e.firstBaseUpdate=q;e.lastBaseUpdate=m;Ma|=g;a.lanes=g;a.memoizedState=l}}function qh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=
+a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(m(191,e));e.call(d)}}}function id(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:C({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}function rh(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!ec(c,d)||!ec(e,f):!0}function sh(a,b,c){var d=!1,e=Ha;var f=b.contextType;"object"===
+typeof f&&null!==f?f=aa(f):(e=T(b)?$a:D.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Bb(a,e):Ha);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=jd;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}function th(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&
+b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&jd.enqueueReplaceState(b,b.state,null)}function Le(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=uh;Ke(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=aa(f):(f=T(b)?$a:D.current,e.context=Bb(a,f));hc(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(id(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||
+"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&jd.enqueueReplaceState(e,e.state,null),hc(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4)}function ic(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==
+c.tag)throw Error(m(309));var d=c.stateNode}if(!d)throw Error(m(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===uh&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(m(284));if(!c._owner)throw Error(m(290,a));}return a}function kd(a,b){if("textarea"!==a.type)throw Error(m(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+
+"}":b));}function vh(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Na(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=
+2,c):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Me(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=ic(a,b,c),d.return=a,d;d=ld(c.type,c.key,c.props,null,a.mode,d);d.ref=ic(a,b,c);d.return=a;return d}function q(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
+Ne(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function l(a,b,c,d,f){if(null===b||7!==b.tag)return b=Fb(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function n(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Me(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case jc:return c=ld(b.type,b.key,b.props,null,a.mode,c),c.ref=ic(a,null,b),c.return=a,c;case Wa:return b=Ne(b,a.mode,c),b.return=a,b}if(md(b)||Pb(b))return b=Fb(b,
+a.mode,c,null),b.return=a,b;kd(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case jc:return c.key===e?c.type===xa?l(a,b,c.props.children,d,e):k(a,b,c,d):null;case Wa:return c.key===e?q(a,b,c,d):null}if(md(c)||Pb(c))return null!==e?null:l(a,b,c,d,null);kd(a,c)}return null}function t(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||
+null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case jc:return a=a.get(null===d.key?c:d.key)||null,d.type===xa?l(b,a,d.props.children,e,d.key):k(b,a,d,e);case Wa:return a=a.get(null===d.key?c:d.key)||null,q(b,a,d,e)}if(md(d)||Pb(d))return a=a.get(c)||null,l(b,a,d,e,null);kd(b,d)}return null}function v(e,g,h,k){for(var m=null,q=null,l=g,r=g=0,x=null;null!==l&&r<h.length;r++){l.index>r?(x=l,l=null):x=l.sibling;var H=p(e,l,h[r],k);if(null===H){null===l&&(l=x);break}a&&l&&null===
+H.alternate&&b(e,l);g=f(H,g,r);null===q?m=H:q.sibling=H;q=H;l=x}if(r===h.length)return c(e,l),m;if(null===l){for(;r<h.length;r++)l=n(e,h[r],k),null!==l&&(g=f(l,g,r),null===q?m=l:q.sibling=l,q=l);return m}for(l=d(e,l);r<h.length;r++)x=t(l,e,r,h[r],k),null!==x&&(a&&null!==x.alternate&&l.delete(null===x.key?r:x.key),g=f(x,g,r),null===q?m=x:q.sibling=x,q=x);a&&l.forEach(function(a){return b(e,a)});return m}function z(e,g,h,k){var q=Pb(h);if("function"!==typeof q)throw Error(m(150));h=q.call(h);if(null==
+h)throw Error(m(151));for(var l=q=null,r=g,x=g=0,H=null,u=h.next();null!==r&&!u.done;x++,u=h.next()){r.index>x?(H=r,r=null):H=r.sibling;var Z=p(e,r,u.value,k);if(null===Z){null===r&&(r=H);break}a&&r&&null===Z.alternate&&b(e,r);g=f(Z,g,x);null===l?q=Z:l.sibling=Z;l=Z;r=H}if(u.done)return c(e,r),q;if(null===r){for(;!u.done;x++,u=h.next())u=n(e,u.value,k),null!==u&&(g=f(u,g,x),null===l?q=u:l.sibling=u,l=u);return q}for(r=d(e,r);!u.done;x++,u=h.next())u=t(r,e,x,u.value,k),null!==u&&(a&&null!==u.alternate&&
+r.delete(null===u.key?x:u.key),g=f(u,g,x),null===l?q=u:l.sibling=u,l=u);a&&r.forEach(function(a){return b(e,a)});return q}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===xa&&null===f.key;k&&(f=f.props.children);var q="object"===typeof f&&null!==f;if(q)switch(f.$$typeof){case jc:a:{q=f.key;for(k=d;null!==k;){if(k.key===q){switch(k.tag){case 7:if(f.type===xa){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);
+d=e(k,f.props);d.ref=ic(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===xa?(d=Fb(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=ld(f.type,f.key,f.props,null,a.mode,h),h.ref=ic(a,d,f),h.return=a,a=h)}return g(a);case Wa:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=
+Ne(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Me(f,a.mode,h),d.return=a,a=d),g(a);if(md(f))return v(a,d,f,h);if(Pb(f))return z(a,d,f,h);q&&kd(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(m(152,nb(a.type)||"Component"));}return c(a,d)}}function cb(a){if(a===kc)throw Error(m(174));return a}function Oe(a,b){B(lc,b);B(mc,a);
+B(na,kc);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:$d(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=$d(b,a)}t(na);B(na,b)}function Gb(a){t(na);t(mc);t(lc)}function wh(a){cb(lc.current);var b=cb(na.current);var c=$d(b,a.type);b!==c&&(B(mc,a),B(na,c))}function Pe(a){mc.current===a&&(t(na),t(mc))}function nd(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===
+c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function xh(a,b){var c=ba(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=
+a.lastEffect=c}function yh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}function Qe(a){if(oa){var b=Oa;if(b){var c=b;if(!yh(a,b)){b=zb(c.nextSibling);if(!b||!yh(a,b)){a.flags=a.flags&-1025|2;oa=!1;ta=a;return}xh(ta,c)}ta=a;Oa=zb(b.firstChild)}else a.flags=a.flags&-1025|2,oa=!1,
+ta=a}}function zh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;ta=a}function od(a){if(a!==ta)return!1;if(!oa)return zh(a),oa=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Be(b,a.memoizedProps))for(b=Oa;b;)xh(a,b),b=zb(b.nextSibling);zh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(m(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){Oa=zb(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==
+c&&"$?"!==c||b++}a=a.nextSibling}Oa=null}}else Oa=ta?zb(a.stateNode.nextSibling):null;return!0}function Re(){Oa=ta=null;oa=!1}function Se(){for(var a=0;a<Hb.length;a++)Hb[a]._workInProgressVersionPrimary=null;Hb.length=0}function U(){throw Error(m(321));}function Te(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!Y(a[c],b[c]))return!1;return!0}function Ue(a,b,c,d,e,f){nc=f;F=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;oc.current=null===a||null===a.memoizedState?Jj:Kj;
+a=c(d,e);if(pc){f=0;do{pc=!1;if(!(25>f))throw Error(m(301));f+=1;L=O=null;b.updateQueue=null;oc.current=Lj;a=c(d,e)}while(pc)}oc.current=pd;b=null!==O&&null!==O.next;nc=0;L=O=F=null;qd=!1;if(b)throw Error(m(300));return a}function db(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===L?F.memoizedState=L=a:L=L.next=a;return L}function eb(){if(null===O){var a=F.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===L?F.memoizedState:L.next;if(null!==
+b)L=b,O=a;else{if(null===a)throw Error(m(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===L?F.memoizedState=L=a:L=L.next=a}return L}function pa(a,b){return"function"===typeof b?b(a):b}function qc(a,b,c){b=eb();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;
+var h=g=f=null,k=e;do{var q=k.lane;if((nc&q)===q)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var l={lane:q,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=l,f=d):h=h.next=l;F.lanes|=q;Ma|=q}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;Y(d,b.memoizedState)||(ia=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=
+d}return[b.memoizedState,c.dispatch]}function rc(a,b,c){b=eb();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);Y(f,b.memoizedState)||(ia=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function Ah(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,
+a=(nc&a)===a)b._workInProgressVersionPrimary=d,Hb.push(b);if(a)return c(b._source);Hb.push(b);throw Error(m(350));}function Bh(a,b,c,d){var e=S;if(null===e)throw Error(m(349));var f=b._getVersion,g=f(b._source),h=oc.current,k=h.useState(function(){return Ah(e,b,c)}),q=k[1],l=k[0];k=L;var n=a.memoizedState,p=n.refs,t=p.getSnapshot,v=n.source;n=n.subscribe;var z=F;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=q;var a=f(b._source);if(!Y(g,a)){a=c(b._source);
+Y(l,a)||(q(a),a=Pa(z),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=e.entanglements,h=a;0<h;){var k=31-Ca(h),m=1<<k;d[k]|=a;h&=~m}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=p.getSnapshot,c=p.setSnapshot;try{c(a(b._source));var d=Pa(z);e.mutableReadLanes|=d&e.pendingLanes}catch(u){c(function(){throw u;})}})},[b,d]);Y(t,c)&&Y(v,b)&&Y(n,d)||(a={pending:null,dispatch:null,lastRenderedReducer:pa,lastRenderedState:l},a.dispatch=q=Ve.bind(null,
+F,a),k.queue=a,k.baseQueue=null,l=Ah(e,b,c),k.memoizedState=k.baseState=l);return l}function Ch(a,b,c){var d=eb();return Bh(d,a,b,c)}function sc(a){var b=db();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:pa,lastRenderedState:a};a=a.dispatch=Ve.bind(null,F,a);return[b.memoizedState,a]}function rd(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=F.updateQueue;null===b?(b={lastEffect:null},F.updateQueue=b,b.lastEffect=
+a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Dh(a){var b=db();a={current:a};return b.memoizedState=a}function sd(a){return eb().memoizedState}function We(a,b,c,d){var e=db();F.flags|=a;e.memoizedState=rd(1|b,c,void 0,void 0===d?null:d)}function Xe(a,b,c,d){var e=eb();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&Te(d,g.deps)){rd(b,c,f,d);return}}F.flags|=a;e.memoizedState=rd(1|
+b,c,f,d)}function Eh(a,b){return We(516,4,a,b)}function td(a,b){return Xe(516,4,a,b)}function Fh(a,b){return Xe(4,2,a,b)}function Gh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Hh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Xe(4,2,Gh.bind(null,b,a),c)}function Ye(a,b){}function Ih(a,b){var c=eb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Te(b,d[1]))return d[0];
+c.memoizedState=[a,b];return a}function Jh(a,b){var c=eb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Te(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Mj(a,b){var c=Cb();ab(98>c?98:c,function(){a(!0)});ab(97<c?97:c,function(){var c=ca.transition;ca.transition=1;try{a(!1),b()}finally{ca.transition=c}})}function Ve(a,b,c){var d=X(),e=Pa(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);
+b.pending=f;g=a.alternate;if(a===F||null!==g&&g===F)pc=qd=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(Y(k,h))return}catch(q){}finally{}Qa(a,e,d)}}function ud(a,b){if(0<=fb){var c=gb()-fb;a.actualDuration+=c;b&&(a.selfBaseDuration=c);fb=-1}}function Ze(a){for(var b=a.child;b;)a.actualDuration+=b.actualDuration,b=b.sibling}function V(a,b,c,d){b.child=null===a?Kh(b,null,c,d):vd(b,a.child,
+c,d)}function Lh(a,b,c,d,e){c=c.render;var f=b.ref;Eb(b,e);d=Ue(a,b,c,d,f,e);if(null!==a&&!ia)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,ua(a,b,e);b.flags|=1;V(a,b,d,e);return b.child}function Mh(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!$e(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,Nh(a,b,g,d,e,f);a=ld(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,
+c=c.compare,c=null!==c?c:ec,c(e,d)&&a.ref===b.ref))return ua(a,b,f);b.flags|=1;a=Na(g,d);a.ref=b.ref;a.return=b;return b.child=a}function Nh(a,b,c,d,e,f){if(null!==a&&ec(a.memoizedProps,d)&&a.ref===b.ref)if(ia=!1,0!==(f&e))0!==(a.flags&16384)&&(ia=!0);else return b.lanes=a.lanes,ua(a,b,f);return af(a,b,c,d,f)}function bf(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode||"unstable-defer-without-hiding"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},
+wd(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},wd(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,xd(1073741824),b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},wd(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,wd(b,d);V(a,b,e,c);return b.child}function Oh(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function af(a,b,c,d,e){var f=T(c)?$a:D.current;f=Bb(b,f);Eb(b,e);c=Ue(a,b,c,d,f,e);if(null!==a&&!ia)return b.updateQueue=
+a.updateQueue,b.flags&=-517,a.lanes&=~e,ua(a,b,e);b.flags|=1;V(a,b,c,e);return b.child}function Ph(a,b,c,d,e){if(T(c)){var f=!0;cd(b)}else f=!1;Eb(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),sh(b,c,d),Le(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=aa(l):(l=T(c)?$a:D.current,l=Bb(b,l));var m=c.getDerivedStateFromProps,n="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;
+n||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&th(b,g,d,l);La=!1;var p=b.memoizedState;g.state=p;hc(b,d,g,e);k=b.memoizedState;h!==d||p!==k||K.current||La?("function"===typeof m&&(id(b,c,m,d),k=b.memoizedState),(h=La||rh(b,c,h,d,p,k,l))?(n||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&
+g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4)):("function"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;oh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:ha(b.type,h);g.props=l;n=b.pendingProps;p=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=aa(k):(k=T(c)?$a:D.current,k=Bb(b,k));var t=c.getDerivedStateFromProps;
+(m="function"===typeof t||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==n||p!==k)&&th(b,g,d,k);La=!1;p=b.memoizedState;g.state=p;hc(b,d,g,e);var v=b.memoizedState;h!==n||p!==v||K.current||La?("function"===typeof t&&(id(b,c,t,d),v=b.memoizedState),(l=La||rh(b,c,l,d,p,v,k))?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&
+g.componentWillUpdate(d,v,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,v,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=v),g.props=d,g.state=v,g.context=
+k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),d=!1)}return cf(a,b,c,d,f,e)}function cf(a,b,c,d,e,f){Oh(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&gh(b,c,!1),ua(a,b,f);d=b.stateNode;Nj.current=b;if(g&&"function"!==typeof c.getDerivedStateFromError){var h=null;fb=-1}else h=d.render();b.flags|=1;null!==a&&g?(g=h,b.child=vd(b,a.child,null,
+f),b.child=vd(b,null,g,f)):V(a,b,h,f);b.memoizedState=d.state;e&&gh(b,c,!0);return b.child}function Qh(a){var b=a.stateNode;b.pendingContext?eh(a,b.pendingContext,b.pendingContext!==b.context):b.context&&eh(a,b.context,!1);Oe(a,b.containerInfo)}function Rh(a,b,c){var d=b.pendingProps,e=G.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);B(G,e&
+1);if(null===a){void 0!==d.fallback&&Qe(b);a=d.children;e=d.fallback;if(f)return a=Sh(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=yd,a;if("number"===typeof d.unstable_expectedLoadTime)return a=Sh(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=yd,b.lanes=33554432,xd(33554432),a;c=df({mode:"visible",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=Th(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=
+null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=yd,d;c=Uh(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=Th(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=yd,d;c=Uh(a,b,d.children,c);b.memoizedState=null;return c}function Sh(a,b,c,d){var e=a.mode,f=a.child;b={mode:"hidden",children:b};0===(e&2)&&null!==f?(f.childLanes=
+0,f.pendingProps=b,a.mode&8&&(f.actualDuration=0,f.actualStartTime=-1,f.selfBaseDuration=0,f.treeBaseDuration=0)):f=df(b,e,0,null);c=Fb(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}function Uh(a,b,c,d){var e=a.child;a=e.sibling;c=Na(e,{mode:"visible",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}function Th(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:"hidden",
+children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,b.mode&8&&(c.actualDuration=0,c.actualStartTime=-1,c.selfBaseDuration=g.selfBaseDuration,c.treeBaseDuration=g.treeBaseDuration),g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Na(g,h);null!==a?d=Na(a,d):(d=Fb(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function Vh(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=
+b);nh(a.return,b)}function ef(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}function Wh(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;V(a,b,d.children,c);d=G.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&
+Vh(a,c);else if(19===a.tag)Vh(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}B(G,d);if(0===(b.mode&2))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===nd(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);ef(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=
+null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===nd(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}ef(b,!0,c,null,f,b.lastEffect);break;case "together":ef(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}function ua(a,b,c){null!==a&&(b.dependencies=a.dependencies);fb=-1;Ma|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(m(153));if(null!==b.child){a=b.child;c=Na(a,a.pendingProps);b.child=c;for(c.return=
+b;null!==a.sibling;)a=a.sibling,c=c.sibling=Na(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}function tc(a,b){if(!oa)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}function Xh(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;
+case 1:return T(b.type)&&(t(K),t(D)),null;case 3:Gb();t(K);t(D);Se();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)od(b)?b.flags|=4:d.hydrate||(b.flags|=256);Yh(b);return null;case 5:Pe(b);var e=cb(lc.current);c=b.type;if(null!==a&&null!=b.stateNode)Oj(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===b.stateNode)throw Error(m(166));return null}a=cb(na.current);if(od(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Fa]=
+b;d[bd]=f;switch(c){case "dialog":z("cancel",d);z("close",d);break;case "iframe":case "object":case "embed":z("load",d);break;case "video":case "audio":for(a=0;a<uc.length;a++)z(uc[a],d);break;case "source":z("error",d);break;case "img":case "image":case "link":z("error",d);z("load",d);break;case "details":z("toggle",d);break;case "input":Tf(d,f);z("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};z("invalid",d);break;case "textarea":Wf(d,f),z("invalid",d)}ae(c,f);a=null;
+for(var g in f)f.hasOwnProperty(g)&&(e=f[g],"children"===g?"string"===typeof e?d.textContent!==e&&(a=["children",e]):"number"===typeof e&&d.textContent!==""+e&&(a=["children",""+e]):Ob.hasOwnProperty(g)&&null!=e&&"onScroll"===g&&z("scroll",d));switch(c){case "input":Lc(d);Vf(d,f,!0);break;case "textarea":Lc(d);Yf(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=ad)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===
+a&&(a=Zf(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Fa]=b;a[bd]=d;Pj(a,b,!1,!1);b.stateNode=a;g=be(c,d);switch(c){case "dialog":z("cancel",a);z("close",a);e=d;break;case "iframe":case "object":case "embed":z("load",a);e=d;break;
+case "video":case "audio":for(e=0;e<uc.length;e++)z(uc[e],a);e=d;break;case "source":z("error",a);e=d;break;case "img":case "image":case "link":z("error",a);z("load",a);e=d;break;case "details":z("toggle",a);e=d;break;case "input":Tf(a,d);e=Vd(a,d);z("invalid",a);break;case "option":e=Yd(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=C({},d,{value:void 0});z("invalid",a);break;case "textarea":Wf(a,d);e=Zd(a,d);z("invalid",a);break;default:e=d}ae(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=
+h[f];"style"===f?ag(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&Zh(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&vc(a,k):"number"===typeof k&&vc(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(Ob.hasOwnProperty(f)?null!=k&&"onScroll"===f&&z("scroll",a):null!=k&&Nd(a,f,k,g))}switch(c){case "input":Lc(a);Vf(a,d,!1);break;case "textarea":Lc(a);Yf(a);break;case "option":null!=d.value&&a.setAttribute("value",""+ya(d.value));
+break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?ob(a,!!d.multiple,f,!1):null!=d.defaultValue&&ob(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=ad)}bh(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Qj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(m(166));c=cb(lc.current);cb(na.current);od(b)?(d=b.stateNode,c=b.memoizedProps,d[Fa]=b,d.nodeValue!==c&&(b.flags|=4)):
+(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Fa]=b,b.stateNode=d)}return null;case 13:t(G);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,0!==(b.mode&8)&&Ze(b),b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&od(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(G.current&1))0===M&&(M=3);else{if(0===M||3===M)M=4;null===S||0===(Ma&134217727)&&0===(Ib&134217727)||Jb(S,P)}if(d||c)b.flags|=4;return null;
+case 4:return Gb(),Yh(b),null===a&&Pg(b.stateNode.containerInfo),null;case 10:return Je(b),null;case 17:return T(b.type)&&(t(K),t(D)),null;case 19:t(G);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)tc(d,!1);else{if(0!==M||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=nd(a);if(null!==g){b.flags|=64;tc(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==
+c;)f=c,g=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,a=f.alternate,null===a?(f.childLanes=0,f.lanes=g,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null,f.selfBaseDuration=0,f.treeBaseDuration=0):(f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,f.type=a.type,g=a.dependencies,f.dependencies=null===g?null:{lanes:g.lanes,
+firstContext:g.firstContext},f.selfBaseDuration=a.selfBaseDuration,f.treeBaseDuration=a.treeBaseDuration),c=c.sibling;B(G,G.current&1|2);return b.child}a=a.sibling}null!==d.tail&&Q()>ff&&(b.flags|=64,f=!0,tc(d,!1),b.lanes=33554432,xd(33554432))}else{if(!f)if(a=nd(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),tc(d,!0),null===d.tail&&"hidden"===d.tailMode&&!g.alternate&&!oa)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*Q()-d.renderingStartTime>
+ff&&1073741824!==c&&(b.flags|=64,f=!0,tc(d,!1),b.lanes=33554432,xd(33554432));d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=Q(),c.sibling=null,b=G.current,B(G,f?b&1|2:b&1),c):null;case 23:case 24:return ja=hb.current,t(hb),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(m(156,
+b.tag));}function Rj(a,b){switch(a.tag){case 1:return T(a.type)&&(t(K),t(D)),b=a.flags,b&4096?(a.flags=b&-4097|64,0!==(a.mode&8)&&Ze(a),a):null;case 3:Gb();t(K);t(D);Se();b=a.flags;if(0!==(b&64))throw Error(m(285));a.flags=b&-4097|64;return a;case 5:return Pe(a),null;case 13:return t(G),b=a.flags,b&4096?(a.flags=b&-4097|64,0!==(a.mode&8)&&Ze(a),a):null;case 19:return t(G),null;case 4:return Gb(),null;case 10:return Je(a),null;case 23:case 24:return ja=hb.current,t(hb),null;default:return null}}function gf(a,
+b){try{var c="",d=b;do c+=Hi(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e}}function hf(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function $h(a,b,c){c=Ja(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){zd||(zd=!0,jf=d);hf(a,b)};return c}function ai(a,b,c){c=Ja(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=
+function(){hf(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===qa?qa=new Set([this]):qa.add(this),hf(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}function bi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Ra(a,c)}else b.current=null}function Sj(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=
+a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ha(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&Ce(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(m(163));}function Tj(a,b,c,d){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do 3===(a.tag&3)&&(d=a.create,a.destroy=d()),a=a.next;while(a!==b)}b=c.updateQueue;b=null!==
+b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(ci(c,a),Uj(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:ha(c.type,b.memoizedProps),a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&qh(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;
+case 1:a=c.child.stateNode}qh(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&bh(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:d=c.memoizedProps.onRender;e=kf;"function"===typeof d&&d(c.memoizedProps.id,null===b?"mount":"update",c.actualDuration,c.treeBaseDuration,c.actualStartTime,e,a.memoizedInteractions);return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&og(c))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(m(163));
+}function di(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=$f("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===
+a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}function ei(a,b,c){if(ib&&"function"===typeof ib.onCommitFiberUnmount)try{ib.onCommitFiberUnmount(lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))ci(b,c);else{d=b;try{e()}catch(f){Ra(d,f)}}c=c.next}while(c!==a)}break;case 1:bi(b);a=b.stateNode;
+if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Ra(b,f)}break;case 5:bi(b);break;case 4:fi(a,b)}}function gi(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function hi(a){return 5===a.tag||3===a.tag||4===a.tag}function ii(a){a:{for(var b=a.return;null!==b;){if(hi(b))break a;b=b.return}throw Error(m(160));
+}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(m(161));}c.flags&16&&(vc(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||hi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?
+mf(a,c,b):nf(a,c,b)}function mf(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=ad));else if(4!==d&&(a=a.child,null!==a))for(mf(a,b,c),a=a.sibling;null!==a;)mf(a,b,c),a=a.sibling}function nf(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,
+b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(nf(a,b,c),a=a.sibling;null!==a;)nf(a,b,c),a=a.sibling}function fi(a,b,c){c=b;for(var d=!1,e,f;;){if(!d){e=c.return;a:for(;;){if(null===e)throw Error(m(160));f=e.stateNode;switch(e.tag){case 5:e=f;f=!1;break a;case 3:e=f.containerInfo;f=!0;break a;case 4:e=f.containerInfo;f=!0;break a}e=e.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(ei(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===
+h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(ei(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===
+c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}function of(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[bd]=d;"input"===a&&"radio"===d.type&&null!=d.name&&
+Uf(c,d);be(a,e);b=be(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?ag(c,h):"dangerouslySetInnerHTML"===g?Zh(c,h):"children"===g?vc(c,h):Nd(c,g,h,b)}switch(a){case "input":Wd(c,d);break;case "textarea":Xf(c,d);break;case "select":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?ob(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?ob(c,!!d.multiple,d.defaultValue,!0):ob(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===
+b.stateNode)throw Error(m(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,og(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(pf=Q(),di(b.child,!0));ji(b);return;case 19:ji(b);return;case 17:return;case 23:case 24:di(b,null!==b.memoizedState);return}throw Error(m(163));}function ji(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Vj);b.forEach(function(b){var d=Wj.bind(null,
+a,b);c.has(b)||(!0!==b.__reactDoNotTraceInteractions&&(d=Xj(d)),c.add(b),b.then(d,d))})}}function Yj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}function Kb(){ff=Q()+500}function X(){return 0!==(n&48)?Q():-1!==Ad?Ad:Ad=Q()}function Pa(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===Cb()?1:2;0===va&&(va=Lb);if(0!==Zj.transition){0!==Bd&&(Bd=null!==qf?qf.pendingLanes:0);a=va;var b=4186112&~Bd;b&=-b;0===b&&(a=
+4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=Cb();0!==(n&4)&&98===a?a=Tc(12,va):(a=Xi(a),a=Tc(a,va));return a}function Qa(a,b,c){if(50<wc)throw wc=0,rf=null,Error(m(185));a=Cd(a,b);if(null===a)return null;Uc(a,b,c);a===S&&(Ib|=b,4===M&&Jb(a,P));var d=Cb();1===b?0!==(n&8)&&0===(n&48)?(Sa(a,b),sf(a)):(da(a,c),Sa(a,b),0===n&&(Kb(),ma())):(0===(n&4)||98!==d&&99!==d||(null===wa?wa=new Set([a]):wa.add(a)),da(a,c),Sa(a,b));qf=a}function Cd(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=
+a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}function da(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Ca(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;sb(k);var m=v;f[h]=10<=m?l+250:6<=m?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=bc(a,a===S?P:0);b=v;if(0===d)null!==c&&(c!==tf&&Ge(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==
+c){if(a.callbackPriority===b)return;c!==tf&&Ge(c)}15===b?(c=sf.bind(null,a),null===sa?(sa=[c],ed=Fe(dd,mh)):sa.push(c),c=tf):14===b?c=Ia(99,sf.bind(null,a)):(c=Yi(b),c=Ia(c,ki.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}function ki(a){Ad=-1;Bd=va=0;if(0!==(n&48))throw Error(m(327));var b=a.callbackNode;if(Ta()&&a.callbackNode!==b)return null;var c=bc(a,a===S?P:0);if(0===c)return null;var d=c;var e=n;n|=16;var f=li();if(S!==a||P!==d)Kb(),Mb(a,d),mi(a,d);d=Dd(a);do try{ak();break}catch(h){ni(a,
+h)}while(1);Ie();ka.current=d;Ed.current=f;n=e;null!==I?e=0:(S=null,P=0,e=M);if(0!==(Lb&Ib))Mb(a,0);else if(0!==e){2===e&&(n|=64,a.hydrate&&(a.hydrate=!1,Ce(a.containerInfo)),c=rg(a),0!==c&&(e=xc(a,c)));if(1===e)throw b=Fd,Mb(a,0),Jb(a,c),da(a,Q()),b;a.finishedWork=a.current.alternate;a.finishedLanes=c;switch(e){case 0:case 1:throw Error(m(345));case 2:jb(a);break;case 3:Jb(a,c);if((c&62914560)===c&&(e=pf+500-Q(),10<e)){if(0!==bc(a,0))break;f=a.suspendedLanes;if((f&c)!==c){X();a.pingedLanes|=a.suspendedLanes&
+f;break}a.timeoutHandle=oi(jb.bind(null,a),e);break}jb(a);break;case 4:Jb(a,c);if((c&4186112)===c)break;e=a.eventTimes;for(f=-1;0<c;){var g=31-Ca(c);d=1<<g;g=e[g];g>f&&(f=g);c&=~d}c=f;c=Q()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>c?4320:1960*bk(c/1960))-c;if(10<c){a.timeoutHandle=oi(jb.bind(null,a),c);break}jb(a);break;case 5:jb(a);break;default:throw Error(m(329));}}da(a,Q());return a.callbackNode===b?ki.bind(null,a):null}function Jb(a,b){b&=~uf;b&=~Ib;a.suspendedLanes|=b;
+a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Ca(b),d=1<<c;a[c]=-1;b&=~d}}function sf(a){if(0!==(n&48))throw Error(m(327));Ta();if(a===S&&0!==(a.expiredLanes&P)){var b=P;var c=xc(a,b);0!==(Lb&Ib)&&(b=bc(a,b),c=xc(a,b))}else b=bc(a,0),c=xc(a,b);0!==a.tag&&2===c&&(n|=64,a.hydrate&&(a.hydrate=!1,Ce(a.containerInfo)),b=rg(a),0!==b&&(c=xc(a,b)));if(1===c)throw c=Fd,Mb(a,0),Jb(a,b),da(a,Q()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;jb(a);da(a,Q());return null}function ck(){if(null!==
+wa){var a=wa;wa=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;da(a,Q())})}ma()}function pi(a,b){var c=n;n|=1;try{return a(b)}finally{n=c,0===n&&(Kb(),ma())}}function qi(a,b){var c=n;n&=-2;n|=8;try{return a(b)}finally{n=c,0===n&&(Kb(),ma())}}function wd(a,b){B(hb,ja);ja|=b;Lb|=b}function Mb(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,dk(c));if(null!==I)for(c=I.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==
+d&&void 0!==d&&(t(K),t(D));break;case 3:Gb();t(K);t(D);Se();break;case 5:Pe(d);break;case 4:Gb();break;case 13:t(G);break;case 19:t(G);break;case 10:Je(d);break;case 23:case 24:ja=hb.current,t(hb)}c=c.return}S=a;I=Na(a.current,null);P=ja=Lb=b;M=0;Fd=null;uf=Ib=Ma=0;kb=null}function ni(a,b){do{var c=I;try{Ie();oc.current=pd;if(qd){for(var d=F.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}qd=!1}nc=0;L=O=F=null;pc=!1;vf.current=null;if(null===c||null===c.return){M=1;Fd=b;
+I=null;break}c.mode&8&&ud(c,!0);a:{var f=a,g=c.return,h=c,k=b;b=P;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k;if(0===(h.mode&2)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var n=0!==(G.current&1),p=g;do{var t;if(t=13===p.tag){var v=p.memoizedState;if(null!==v)t=null!==v.dehydrated?!0:!1;else{var z=p.memoizedProps;t=void 0===z.fallback?
+!1:!0!==z.unstable_avoidThisFallback?!0:n?!1:!0}}if(t){var H=p.updateQueue;if(null===H){var r=new Set;r.add(l);p.updateQueue=r}else H.add(l);if(0===(p.mode&2)){p.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var x=Ja(-1,1);x.tag=2;Ka(h,x)}h.lanes|=1;break a}k=void 0;h=b;var u=f.pingCache;null===u?(u=f.pingCache=new ek,k=new Set,u.set(l,k)):(k=u.get(l),void 0===k&&(k=new Set,u.set(l,k)));if(!k.has(h)){k.add(h);var y=fk.bind(null,f,l,h);l.then(y,y)}p.flags|=
+4096;p.lanes=b;break a}p=p.return}while(null!==p);k=Error((nb(h.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==M&&(M=2);k=gf(k,h);p=g;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var A=$h(p,f,b);ph(p,A);break a;case 1:f=k;var w=p.type,C=p.stateNode;if(0===(p.flags&64)&&("function"===typeof w.getDerivedStateFromError||
+null!==C&&"function"===typeof C.componentDidCatch&&(null===qa||!qa.has(C)))){p.flags|=4096;b&=-b;p.lanes|=b;var B=ai(p,f,b);ph(p,B);break a}}p=p.return}while(null!==p)}ri(c)}catch(Ij){b=Ij;I===c&&null!==c&&(I=c=c.return);continue}break}while(1)}function li(){var a=Ed.current;Ed.current=pd;return null===a?pd:a}function Dd(a){var b=ka.current;ka.current=a.memoizedInteractions;return b}function xc(a,b){var c=n;n|=16;var d=li();if(S!==a||P!==b)Mb(a,b),mi(a,b);b=Dd(a);do try{gk();break}catch(e){ni(a,e)}while(1);
+Ie();ka.current=b;n=c;Ed.current=d;if(null!==I)throw Error(m(261));S=null;P=0;return M}function gk(){for(;null!==I;)si(I)}function ak(){for(;null!==I&&!hk();)si(I)}function si(a){var b=a.alternate;0!==(a.mode&8)?(fb=gb(),0>a.actualStartTime&&(a.actualStartTime=gb()),b=ti(b,a,ja),ud(a,!0)):b=ti(b,a,ja);a.memoizedProps=a.pendingProps;null===b?ri(a):I=b;vf.current=null}function ri(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){if(0===(b.mode&8))c=Xh(c,b,ja);else{var d=b;fb=gb();0>
+d.actualStartTime&&(d.actualStartTime=gb());c=Xh(c,b,ja);ud(b,!1)}if(null!==c){I=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(ja&1073741824)||0===(c.mode&4)){d=0;if(0!==(c.mode&8)){for(var e=c.actualDuration,f=c.selfBaseDuration,g=null===c.alternate||c.child!==c.alternate.child,h=c.child;null!==h;)d|=h.lanes|h.childLanes,g&&(e+=h.actualDuration),f+=h.treeBaseDuration,h=h.sibling;13===c.tag&&null!==c.memoizedState&&(g=c.child,null!==g&&(f-=g.treeBaseDuration));c.actualDuration=
+e;c.treeBaseDuration=f}else for(e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==a.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=Rj(b);if(null!==c){c.flags&=2047;I=c;return}if(0!==(b.mode&8)){ud(b,!1);c=b.actualDuration;for(d=b.child;null!==
+d;)c+=d.actualDuration,d=d.sibling;b.actualDuration=c}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){I=b;return}I=b=a}while(null!==b);0===M&&(M=5)}function jb(a){var b=Cb();ab(99,ik.bind(null,a,b));return null}function ik(a,b){do Ta();while(null!==yc);if(0!==(n&48))throw Error(m(327));var c=a.finishedWork,d=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(m(177));a.callbackNode=null;var e=c.lanes|c.childLanes,
+f=e,g=a.pendingLanes&~f;a.pendingLanes=f;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=f;a.mutableReadLanes&=f;a.entangledLanes&=f;f=a.entanglements;for(var h=a.eventTimes,k=a.expirationTimes;0<g;){var q=31-Ca(g),t=1<<q;f[q]=0;h[q]=-1;k[q]=-1;g&=~t}null!==wa&&0===(e&24)&&wa.has(a)&&wa.delete(a);a===S&&(I=S=null,P=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){f=n;n|=32;h=Dd(a);vf.current=null;wf=Vc;k=Kg();if(we(k)){if("selectionStart"in
+k)g={start:k.selectionStart,end:k.selectionEnd};else a:{g=(g=k.ownerDocument)&&g.defaultView||window;var v=g.getSelection&&g.getSelection();if(v&&0!==v.rangeCount){g=v.anchorNode;q=v.anchorOffset;t=v.focusNode;v=v.focusOffset;try{g.nodeType,t.nodeType}catch(bb){g=null;break a}var p=0,z=-1,C=-1,F=0,H=0,r=k,x=null;b:for(;;){for(var u;;){r!==g||0!==q&&3!==r.nodeType||(z=p+q);r!==t||0!==v&&3!==r.nodeType||(C=p+v);3===r.nodeType&&(p+=r.nodeValue.length);if(null===(u=r.firstChild))break;x=r;r=u}for(;;){if(r===
+k)break b;x===g&&++F===q&&(z=p);x===t&&++H===v&&(C=p);if(null!==(u=r.nextSibling))break;r=x;x=r.parentNode}r=u}g=-1===z||-1===C?null:{start:z,end:C}}else g=null}g=g||{start:0,end:0}}else g=null;xf={focusedElem:k,selectionRange:g};Vc=!1;zc=null;Gd=!1;l=e;do try{jk()}catch(bb){if(null===l)throw Error(m(330));Ra(l,bb);l=l.nextEffect}while(null!==l);zc=null;kf=gb();l=e;do try{for(k=a;null!==l;){var y=l.flags;y&16&&vc(l.stateNode,"");if(y&128){var A=l.alternate;if(null!==A){var w=A.ref;null!==w&&("function"===
+typeof w?w(null):w.current=null)}}switch(y&1038){case 2:ii(l);l.flags&=-3;break;case 6:ii(l);l.flags&=-3;of(l.alternate,l);break;case 1024:l.flags&=-1025;break;case 1028:l.flags&=-1025;of(l.alternate,l);break;case 4:of(l.alternate,l);break;case 8:g=l;fi(k,g);var B=g.alternate;gi(g);null!==B&&gi(B)}l=l.nextEffect}}catch(bb){if(null===l)throw Error(m(330));Ra(l,bb);l=l.nextEffect}while(null!==l);w=xf;A=Kg();y=w.focusedElem;k=w.selectionRange;if(A!==y&&y&&y.ownerDocument&&Jg(y.ownerDocument.documentElement,
+y)){null!==k&&we(y)&&(A=k.start,w=k.end,void 0===w&&(w=A),"selectionStart"in y?(y.selectionStart=A,y.selectionEnd=Math.min(w,y.value.length)):(w=(A=y.ownerDocument||document)&&A.defaultView||window,w.getSelection&&(w=w.getSelection(),g=y.textContent.length,B=Math.min(k.start,g),k=void 0===k.end?B:Math.min(k.end,g),!w.extend&&B>k&&(g=k,k=B,B=g),g=Ig(y,B),q=Ig(y,k),g&&q&&(1!==w.rangeCount||w.anchorNode!==g.node||w.anchorOffset!==g.offset||w.focusNode!==q.node||w.focusOffset!==q.offset)&&(A=A.createRange(),
+A.setStart(g.node,g.offset),w.removeAllRanges(),B>k?(w.addRange(A),w.extend(q.node,q.offset)):(A.setEnd(q.node,q.offset),w.addRange(A))))));A=[];for(w=y;w=w.parentNode;)1===w.nodeType&&A.push({element:w,left:w.scrollLeft,top:w.scrollTop});"function"===typeof y.focus&&y.focus();for(y=0;y<A.length;y++)w=A[y],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}Vc=!!wf;xf=wf=null;a.current=c;l=e;do try{for(y=a;null!==l;){var G=l.flags;G&36&&Tj(y,l.alternate,l);if(G&128){A=void 0;var D=l.ref;if(null!==
+D){var E=l.stateNode;switch(l.tag){case 5:A=E;break;default:A=E}"function"===typeof D?D(A):D.current=A}}l=l.nextEffect}}catch(bb){if(null===l)throw Error(m(330));Ra(l,bb);l=l.nextEffect}while(null!==l);l=null;kk();ka.current=h;n=f}else a.current=c,kf=gb();if(G=Ua)Ua=!1,yc=a,yf=d,Ac=b;else for(l=e;null!==l;)D=l.nextEffect,l.nextEffect=null,l.flags&8&&(E=l,E.sibling=null,E.stateNode=null),l=D;e=a.pendingLanes;if(0!==e){if(null!==kb)for(D=kb,kb=null,E=0;E<D.length;E++)ui(a,D[E],a.memoizedInteractions);
+Sa(a,e)}else qa=null;G||vi(a,d);1===e?a===rf?wc++:(wc=0,rf=a):wc=0;c=c.stateNode;if(ib&&"function"===typeof ib.onCommitFiberRoot)try{ib.onCommitFiberRoot(lf,c,b,64===(c.current.flags&64))}catch(bb){}da(a,Q());if(zd)throw zd=!1,a=jf,jf=null,a;if(0!==(n&8))return null;ma();return null}function jk(){for(;null!==l;){var a=l.alternate;Gd||null===zc||(0!==(l.flags&8)?ig(l,zc)&&(Gd=!0):13===l.tag&&Yj(a,l)&&ig(l,zc)&&(Gd=!0));var b=l.flags;0!==(b&256)&&Sj(a,l);0===(b&512)||Ua||(Ua=!0,Ia(97,function(){Ta();
+return null}));l=l.nextEffect}}function Ta(){if(90!==Ac){var a=97<Ac?97:Ac;Ac=90;return ab(a,lk)}return!1}function Uj(a,b){zf.push(b,a);Ua||(Ua=!0,Ia(97,function(){Ta();return null}))}function ci(a,b){Af.push(b,a);Ua||(Ua=!0,Ia(97,function(){Ta();return null}))}function lk(){if(null===yc)return!1;var a=yc,b=yf;yc=null;yf=0;if(0!==(n&48))throw Error(m(331));var c=n;n|=32;var d=Dd(a),e=Af;Af=[];for(var f=0;f<e.length;f+=2){var g=e[f],h=e[f+1],k=g.destroy;g.destroy=void 0;if("function"===typeof k)try{k()}catch(Z){if(null===
+h)throw Error(m(330));Ra(h,Z)}}e=zf;zf=[];for(f=0;f<e.length;f+=2){g=e[f];h=e[f+1];try{var l=g.create;g.destroy=l()}catch(Z){if(null===h)throw Error(m(330));Ra(h,Z)}}for(e=a.current.firstEffect;null!==e;)l=e.nextEffect,e.nextEffect=null,e.flags&8&&(e.sibling=null,e.stateNode=null),e=l;ka.current=d;vi(a,b);n=c;ma();return!0}function wi(a,b,c){b=gf(c,b);b=$h(a,b,1);Ka(a,b);b=X();a=Cd(a,1);null!==a&&(Uc(a,1,b),da(a,b),Sa(a,1))}function Ra(a,b){if(3===a.tag)wi(a,a,b);else for(var c=a.return;null!==c;){if(3===
+c.tag){wi(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===qa||!qa.has(d))){a=gf(b,a);var e=ai(c,a,1);Ka(c,e);e=X();c=Cd(c,1);if(null!==c)Uc(c,1,e),da(c,e),Sa(c,1);else if("function"===typeof d.componentDidCatch&&(null===qa||!qa.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}function fk(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=X();a.pingedLanes|=a.suspendedLanes&c;S===
+a&&(P&c)===c&&(4===M||3===M&&(P&62914560)===P&&500>Q()-pf?Mb(a,0):uf|=c);da(a,b);Sa(a,c)}function Wj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===Cb()?1:2:(0===va&&(va=Lb),b=tb(62914560&~va),0===b&&(b=4194304)));c=X();a=Cd(a,b);null!==a&&(Uc(a,b,c),da(a,c),Sa(a,b))}function xd(a){null===kb?kb=[a]:kb.push(a)}function ui(a,b,c){if(0<c.size){var d=a.pendingInteractionMap,e=d.get(b);null!=e?c.forEach(function(a){e.has(a)||a.__count++;e.add(a)}):(d.set(b,
+new Set(c)),c.forEach(function(a){a.__count++}));d=Bf.current;if(null!==d)d.onWorkScheduled(c,1E3*b+a.interactionThreadID)}}function Sa(a,b){ui(a,b,ka.current)}function mi(a,b){var c=new Set;a.pendingInteractionMap.forEach(function(a,d){0!==(b&d)&&a.forEach(function(a){return c.add(a)})});a.memoizedInteractions=c;if(0<c.size){var d=Bf.current;if(null!==d){a=1E3*b+a.interactionThreadID;try{d.onWorkStarted(c,a)}catch(e){Ia(99,function(){throw e;})}}}}function vi(a,b){var c=a.pendingLanes;try{var d=
+Bf.current;if(null!==d&&0<a.memoizedInteractions.size)d.onWorkStopped(a.memoizedInteractions,1E3*b+a.interactionThreadID)}catch(f){Ia(99,function(){throw f;})}finally{var e=a.pendingInteractionMap;e.forEach(function(a,b){0===(c&b)&&(e.delete(b),a.forEach(function(a){a.__count--;if(null!==d&&0===a.__count)try{d.onInteractionScheduledWorkCompleted(a)}catch(k){Ia(99,function(){throw k;})}}))})}}function mk(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=
+null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null;this.actualDuration=0;this.actualStartTime=-1;this.treeBaseDuration=this.selfBaseDuration=0}function $e(a){a=a.prototype;return!(!a||!a.isReactComponent)}function nk(a){if("function"===typeof a)return $e(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;
+if(a===Jc)return 11;if(a===Kc)return 14}return 2}function Na(a,b){var c=a.alternate;null===c?(c=ba(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null,c.actualDuration=0,c.actualStartTime=-1);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;
+b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;c.selfBaseDuration=a.selfBaseDuration;c.treeBaseDuration=a.treeBaseDuration;return c}function ld(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)$e(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case xa:return Fb(c.children,e,f,b);case xi:g=8;e|=16;break;case Qd:g=8;e|=1;break;case Rb:return a=ba(12,c,b,e|8),a.elementType=Rb,a.type=Rb,a.lanes=f,a.stateNode=
+{effectDuration:0,passiveEffectDuration:0},a;case Sb:return a=ba(13,c,b,e),a.type=Sb,a.elementType=Sb,a.lanes=f,a;case Ic:return a=ba(19,c,b,e),a.elementType=Ic,a.lanes=f,a;case Cf:return df(c,e,f,b);case Df:return a=ba(24,c,b,e),a.elementType=Df,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Sd:g=10;break a;case Rd:g=9;break a;case Jc:g=11;break a;case Kc:g=14;break a;case Ud:g=16;d=null;break a;case Td:g=22;break a}throw Error(m(130,null==a?a:typeof a,""));}b=ba(g,
+c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Fb(a,b,c,d){a=ba(7,a,d,b);a.lanes=c;return a}function df(a,b,c,d){a=ba(23,a,d,b);a.elementType=Cf;a.lanes=c;return a}function Me(a,b,c){a=ba(6,a,null,b);a.lanes=c;return a}function Ne(a,b,c){b=ba(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function ok(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=
+this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=pe(0);this.expirationTimes=pe(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=pe(0);this.mutableSourceEagerHydrationData=null;this.interactionThreadID=pk();this.memoizedInteractions=new Set;this.pendingInteractionMap=new Map}function qk(a,
+b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Wa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function Hd(a,b,c,d){var e=b.current,f=X(),g=Pa(e);a:if(c){c=c._reactInternals;b:{if(Xa(c)!==c||1!==c.tag)throw Error(m(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(T(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(m(171));}if(1===c.tag){var k=c.type;
+if(T(k)){c=fh(c,k,h);break a}}c=h}else c=Ha;null===b.context?b.context=c:b.pendingContext=c;b=Ja(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);Ka(e,b);Qa(e,g,f);return g}function Ef(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function yi(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function Ff(a,b){yi(a,b);(a=a.alternate)&&yi(a,b)}function rk(a){a=
+hg(a);return null===a?null:a.stateNode}function sk(a){return null}function Gf(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new ok(a,b,null!=c&&!0===c.hydrate);b=2===b?7:1===b?3:0;tk&&(b|=8);b=ba(3,null,null,b);c.current=b;b.stateNode=c;Ke(b);a[xb]=c.current;Pg(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,
+e)}this._internalRoot=c}function Bc(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function uk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new Gf(a,0,b?{hydrate:!0}:void 0)}function Id(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;
+e=function(){var a=Ef(g);h.call(a)}}Hd(b,g,a,e)}else{f=c._reactRootContainer=uk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=Ef(g);k.call(a)}}qi(function(){Hd(b,g,a,e)})}return Ef(g)}function zi(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Bc(b))throw Error(m(200));return qk(a,b,null,c)}if(!fa)throw Error(m(227));var Mf=new Set,Ob={},ra=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),
+Ei=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Nf=Object.prototype.hasOwnProperty,Pf={},Of={},J={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){J[a]=
+new R(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];J[b]=new R(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){J[a]=new R(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){J[a]=new R(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){J[a]=
+new R(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){J[a]=new R(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){J[a]=new R(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){J[a]=new R(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){J[a]=new R(a,5,!1,a.toLowerCase(),null,!1,!1)});var Hf=/[\-:]([a-z])/g,If=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
+a.replace(Hf,If);J[b]=new R(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Hf,If);J[b]=new R(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Hf,If);J[b]=new R(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){J[a]=new R(a,1,!1,a.toLowerCase(),null,!1,!1)});J.xlinkHref=new R("xlinkHref",
+1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){J[a]=new R(a,1,!1,a.toLowerCase(),null,!0,!0)});var C=fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,lb=fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,jc=60103,Wa=60106,xa=60107,Qd=60108,Rb=60114,Sd=60109,Rd=60110,Jc=60112,Sb=60113,Ic=60120,Kc=60115,Ud=60116,Td=60121,De=60128,xi=60129,Cf=60130,Df=60131;if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;jc=
+E("react.element");Wa=E("react.portal");xa=E("react.fragment");Qd=E("react.strict_mode");Rb=E("react.profiler");Sd=E("react.provider");Rd=E("react.context");Jc=E("react.forward_ref");Sb=E("react.suspense");Ic=E("react.suspense_list");Kc=E("react.memo");Ud=E("react.lazy");Td=E("react.block");E("react.scope");De=E("react.opaque.id");xi=E("react.debug_trace_mode");Cf=E("react.offscreen");Df=E("react.legacy_hidden")}var Qf="function"===typeof Symbol&&Symbol.iterator,Od,Pd=!1,Jd,Zh=function(a){return"undefined"!==
+typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Jd=Jd||document.createElement("div");Jd.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Jd.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),vc=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=
+b;return}}a.textContent=b},Tb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,
+zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vk=["Webkit","ms","Moz","O"];Object.keys(Tb).forEach(function(a){vk.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Tb[b]=Tb[a]})});var Ki=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),de=null,pb=null,qb=null,ve=function(a,b){return a(b)},sg=function(a,
+b,c,d,e){return a(b,c,d,e)},fe=function(){},eg=ve,Za=!1,ge=!1,ze=!1;if(ra)try{var Cc={};Object.defineProperty(Cc,"passive",{get:function(){ze=!0}});window.addEventListener("test",Cc,Cc);window.removeEventListener("test",Cc,Cc)}catch(a){ze=!1}var Ni=function(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(Z){this.onError(Z)}},Wb=!1,Oc=null,Pc=!1,he=null,Oi={onError:function(a){Wb=!0;Oc=a}},ea=fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,wk=
+ea.unstable_cancelCallback,Dc=ea.unstable_now,mg=ea.unstable_scheduleCallback,xk=ea.unstable_shouldYield,Ai=ea.unstable_requestPaint,je=ea.unstable_runWithPriority,yk=ea.unstable_getCurrentPriorityLevel,zk=ea.unstable_ImmediatePriority,Bi=ea.unstable_UserBlockingPriority,ng=ea.unstable_NormalPriority,Ak=ea.unstable_LowPriority,Bk=ea.unstable_IdlePriority,le=!1,la=[],za=null,Aa=null,Ba=null,Xb=new Map,Yb=new Map,ac=[],tg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "),
+rb={animationend:Rc("Animation","AnimationEnd"),animationiteration:Rc("Animation","AnimationIteration"),animationstart:Rc("Animation","AnimationStart"),transitionend:Rc("Transition","TransitionEnd")},me={},pg={};ra&&(pg=document.createElement("div").style,"AnimationEvent"in window||(delete rb.animationend.animation,delete rb.animationiteration.animation,delete rb.animationstart.animation),"TransitionEvent"in window||delete rb.transitionend.transition);var Ug=Sc("animationend"),Vg=Sc("animationiteration"),
+Wg=Sc("animationstart"),Xg=Sc("transitionend"),qg=new Map,oe=new Map,Ck=["abort","abort",Ug,"animationEnd",Vg,"animationIteration",Wg,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing",
+"playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Xg,"transitionEnd","waiting","waiting"],Kd=fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing,ka=Kd.__interactionsRef,Bf=Kd.__subscriberRef,pk=Kd.unstable_getThreadID,Xj=Kd.unstable_wrap;if(null==ka||null==ka.current)throw Error(m(302));Dc();var v=8,Ca=Math.clz32?Math.clz32:Zi,$i=Math.log,aj=Math.LN2,ej=Bi,dj=je,Vc=!0,Da=null,re=null,Wc=null,Nb={eventPhase:0,bubbles:0,
+cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ue=W(Nb),Ec=C({},Nb,{view:0,detail:0}),zj=W(Ec),Jf,Kf,Fc,Ld=C({},Ec,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:se,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==Fc&&
+(Fc&&"mousemove"===a.type?(Jf=a.screenX-Fc.screenX,Kf=a.screenY-Fc.screenY):Kf=Jf=0,Fc=a);return Jf},movementY:function(a){return"movementY"in a?a.movementY:Kf}}),Tg=W(Ld),Dk=C({},Ld,{dataTransfer:0}),vj=W(Dk),Ek=C({},Ec,{relatedTarget:0}),Ae=W(Ek),Fk=C({},Nb,{animationName:0,elapsedTime:0,pseudoElement:0}),xj=W(Fk),Gk=C({},Nb,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Bj=W(Gk),Hk=C({},Nb,{data:0}),ah=W(Hk),Ej=ah,Ik={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",
+Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",
+122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Kk=C({},Ec,{key:function(a){if(a.key){var b=Ik[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Xc(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Jk[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:se,charCode:function(a){return"keypress"===
+a.type?Xc(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?Xc(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),uj=W(Kk),Lk=C({},Ld,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yg=W(Lk),Mk=C({},Ec,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:se}),wj=W(Mk),Nk=C({},Nb,{propertyName:0,elapsedTime:0,
+pseudoElement:0}),yj=W(Nk),Ok=C({},Ld,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Aj=W(Ok),hj=[9,13,27,32],te=ra&&"CompositionEvent"in window,Gc=null;ra&&"documentMode"in document&&(Gc=document.documentMode);var Dj=ra&&"TextEvent"in window&&!Gc,Bg=ra&&(!te||Gc&&8<Gc&&11>=Gc),Ag=String.fromCharCode(32),zg=!1,ub=!1,kj={color:!0,
+date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},cc=null,dc=null,$g=!1;ra&&($g=lj("input")&&(!document.documentMode||9<document.documentMode));var Y="function"===typeof Object.is?Object.is:sj,tj=Object.prototype.hasOwnProperty,Cj=ra&&"documentMode"in document&&11>=document.documentMode,wb=null,ye=null,fc=null,xe=!1;ne("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
+0);ne("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ne(Ck,2);(function(a,b){for(var c=0;c<a.length;c++)oe.set(a[c],b)})("change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),0);mb("onMouseEnter",["mouseout","mouseover"]);
+mb("onMouseLeave",["mouseout","mouseover"]);mb("onPointerEnter",["pointerout","pointerover"]);mb("onPointerLeave",["pointerout","pointerover"]);Va("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Va("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Va("onBeforeInput",["compositionend","keypress","textInput","paste"]);Va("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));
+Va("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Va("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rg=new Set("cancel close invalid load scroll toggle".split(" ").concat(uc)),
+Qg="_reactListening"+Math.random().toString(36).slice(2),wf=null,xf=null,oi="function"===typeof setTimeout?setTimeout:void 0,dk="function"===typeof clearTimeout?clearTimeout:void 0,Lf=0,Md=Math.random().toString(36).slice(2),Fa="__reactFiber$"+Md,bd="__reactProps$"+Md,xb="__reactContainer$"+Md,dh="__reactEvents$"+Md,Ee=[],Ab=-1,Ha={},D=Ga(Ha),K=Ga(!1),$a=Ha,lf=null,ib=null,tk="undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__,Hj=je,Fe=mg,Ge=wk,Gj=yk,dd=zk,hh=Bi,ih=ng,jh=Ak,kh=Bk;if(null==ka||null==
+ka.current)throw Error(m(302));var tf={},hk=xk,kk=void 0!==Ai?Ai:function(){},sa=null,ed=null,He=!1,Ci=Dc(),Q=1E4>Ci?Dc:function(){return Dc()-Ci},Zj=lb.ReactCurrentBatchConfig,hd=Ga(null),gd=null,Db=null,fd=null,La=!1,uh=(new fa.Component).refs,jd={isMounted:function(a){return(a=a._reactInternals)?Xa(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=X(),e=Pa(a),f=Ja(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ka(a,f);Qa(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;
+var d=X(),e=Pa(a),f=Ja(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ka(a,f);Qa(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=X(),d=Pa(a),e=Ja(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);Ka(a,e);Qa(a,d,c)}},md=Array.isArray,vd=vh(!0),Kh=vh(!1),kc={},na=Ga(kc),mc=Ga(kc),lc=Ga(kc),G=Ga(0),ta=null,Oa=null,oa=!1,Hb=[],oc=lb.ReactCurrentDispatcher,ca=lb.ReactCurrentBatchConfig,nc=0,F=null,O=null,L=null,qd=!1,pc=!1,pd={readContext:aa,useCallback:U,useContext:U,
+useEffect:U,useImperativeHandle:U,useLayoutEffect:U,useMemo:U,useReducer:U,useRef:U,useState:U,useDebugValue:U,useDeferredValue:U,useTransition:U,useMutableSource:U,useOpaqueIdentifier:U,unstable_isNewReconciler:!1},Jj={readContext:aa,useCallback:function(a,b){db().memoizedState=[a,void 0===b?null:b];return a},useContext:aa,useEffect:Eh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return We(4,2,Gh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return We(4,2,a,b)},
+useMemo:function(a,b){var c=db();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=db();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Ve.bind(null,F,a);return[d.memoizedState,a]},useRef:Dh,useState:sc,useDebugValue:Ye,useDeferredValue:function(a){var b=sc(a),c=b[0],d=b[1];Eh(function(){var b=ca.transition;ca.transition=1;try{d(a)}finally{ca.transition=b}},[a]);
+return c},useTransition:function(){var a=sc(!1),b=a[0];a=Mj.bind(null,a[1]);Dh(a);return[a,b]},useMutableSource:function(a,b,c){var d=db();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Bh(d,a,b,c)},useOpaqueIdentifier:function(){if(oa){var a=!1,b=Fj(function(){a||(a=!0,c("r:"+(Lf++).toString(36)));throw Error(m(355));}),c=sc(b)[1];0===(F.mode&2)&&(F.flags|=516,rd(5,function(){c("r:"+(Lf++).toString(36))},void 0,null));return b}b="r:"+(Lf++).toString(36);sc(b);
+return b},unstable_isNewReconciler:!1},Kj={readContext:aa,useCallback:Ih,useContext:aa,useEffect:td,useImperativeHandle:Hh,useLayoutEffect:Fh,useMemo:Jh,useReducer:qc,useRef:sd,useState:function(a){return qc(pa)},useDebugValue:Ye,useDeferredValue:function(a){var b=qc(pa),c=b[0],d=b[1];td(function(){var b=ca.transition;ca.transition=1;try{d(a)}finally{ca.transition=b}},[a]);return c},useTransition:function(){var a=qc(pa)[0];return[sd().current,a]},useMutableSource:Ch,useOpaqueIdentifier:function(){return qc(pa)[0]},
+unstable_isNewReconciler:!1},Lj={readContext:aa,useCallback:Ih,useContext:aa,useEffect:td,useImperativeHandle:Hh,useLayoutEffect:Fh,useMemo:Jh,useReducer:rc,useRef:sd,useState:function(a){return rc(pa)},useDebugValue:Ye,useDeferredValue:function(a){var b=rc(pa),c=b[0],d=b[1];td(function(){var b=ca.transition;ca.transition=1;try{d(a)}finally{ca.transition=b}},[a]);return c},useTransition:function(){var a=rc(pa)[0];return[sd().current,a]},useMutableSource:Ch,useOpaqueIdentifier:function(){return rc(pa)[0]},
+unstable_isNewReconciler:!1},gb=Dc,kf=0,fb=-1,Nj=lb.ReactCurrentOwner,ia=!1,yd={dehydrated:null,retryLane:0};var Pj=function(a,b,c,d){for(c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};var Yh=function(a){};var Oj=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){a=b.stateNode;
+cb(na.current);e=null;switch(c){case "input":f=Vd(a,f);d=Vd(a,d);e=[];break;case "option":f=Yd(a,f);d=Yd(a,d);e=[];break;case "select":f=C({},f,{value:void 0});d=C({},d,{value:void 0});e=[];break;case "textarea":f=Zd(a,f);d=Zd(a,d);e=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(a.onclick=ad)}ae(c,d);var g;c=null;for(l in f)if(!d.hasOwnProperty(l)&&f.hasOwnProperty(l)&&null!=f[l])if("style"===l){var h=f[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==
+l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(Ob.hasOwnProperty(l)?e||(e=[]):(e=e||[]).push(l,null));for(l in d){var k=d[l];h=null!=f?f[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(e||(e=[]),e.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:
+void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(e=e||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(e=e||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(Ob.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&z("scroll",a),e||h===k||(e=[])):"object"===typeof k&&null!==k&&k.$$typeof===De?k.toString():(e=e||[]).push(l,k))}c&&(e=e||[]).push("style",c);var l=e;if(b.updateQueue=l)b.flags|=4}};var Qj=function(a,b,c,d){c!==d&&(b.flags|=4)};var ek="function"===
+typeof WeakMap?WeakMap:Map,Vj="function"===typeof WeakSet?WeakSet:Set,bk=Math.ceil,Ed=lb.ReactCurrentDispatcher,vf=lb.ReactCurrentOwner,n=0,S=null,I=null,P=0,ja=0,hb=Ga(0),M=0,Fd=null,Lb=0,Ma=0,Ib=0,uf=0,qf=null,pf=0,ff=Infinity,l=null,zd=!1,jf=null,qa=null,Ua=!1,yc=null,Ac=90,yf=0,zf=[],Af=[],wa=null,wc=0,rf=null,kb=null,Ad=-1,va=0,Bd=0,zc=null,Gd=!1;var ti=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||K.current)ia=!0;else if(0!==(c&d))ia=0!==(a.flags&16384)?!0:!1;
+else{ia=!1;switch(b.tag){case 3:Qh(b);Re();break;case 5:wh(b);break;case 1:T(b.type)&&cd(b);break;case 4:Oe(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;B(hd,e._currentValue);e._currentValue=d;break;case 12:0!==(c&b.childLanes)&&(b.flags|=4);d=b.stateNode;d.effectDuration=0;d.passiveEffectDuration=0;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return Rh(a,b,c);B(G,G.current&1);b=ua(a,b,c);return null!==b?b.sibling:null}B(G,G.current&
+1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Wh(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);B(G,G.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,bf(a,b,c)}return ua(a,b,c)}else ia=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Bb(b,D.current);Eb(b,c);e=Ue(null,b,d,a,e,c);b.flags|=1;if("object"===typeof e&&null!==e&&"function"===
+typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(T(d)){var f=!0;cd(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;Ke(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&id(b,d,g,a);e.updater=jd;b.stateNode=e;e._reactInternals=b;Le(b,d,a,c);b=cf(null,b,d,!0,f,c)}else b.tag=0,V(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;f=e._init;e=f(e._payload);
+b.type=e;f=b.tag=nk(e);a=ha(e,a);switch(f){case 0:b=af(null,b,e,a,c);break a;case 1:b=Ph(null,b,e,a,c);break a;case 11:b=Lh(null,b,e,a,c);break a;case 14:b=Mh(null,b,e,ha(e.type,a),d,c);break a}throw Error(m(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ha(d,e),af(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ha(d,e),Ph(a,b,d,e,c);case 3:Qh(b);d=b.updateQueue;if(null===a||null===d)throw Error(m(282));d=b.pendingProps;e=b.memoizedState;
+e=null!==e?e.element:null;oh(a,b);hc(b,d,null,c);d=b.memoizedState.element;if(d===e)Re(),b=ua(a,b,c);else{e=b.stateNode;if(f=e.hydrate)Oa=zb(b.stateNode.containerInfo.firstChild),ta=b,f=oa=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],Hb.push(f);c=Kh(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else V(a,b,d,c),Re();b=b.child}return b;case 5:return wh(b),null===a&&Qe(b),d=b.type,e=b.pendingProps,f=null!==
+a?a.memoizedProps:null,g=e.children,Be(d,e)?g=null:null!==f&&Be(d,f)&&(b.flags|=16),Oh(a,b),V(a,b,g,c),b.child;case 6:return null===a&&Qe(b),null;case 13:return Rh(a,b,c);case 4:return Oe(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=vd(b,null,d,c):V(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ha(d,e),Lh(a,b,d,e,c);case 7:return V(a,b,b.pendingProps,c),b.child;case 8:return V(a,b,b.pendingProps.children,c),b.child;case 12:return b.flags|=4,d=b.stateNode,
+d.effectDuration=0,d.passiveEffectDuration=0,V(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;B(hd,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=Y(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=ua(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=
+h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Ja(-1,c&-c),l.tag=2,Ka(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);nh(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}V(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,
+Eb(b,c),e=aa(e,f.unstable_observedBits),d=d(e),b.flags|=1,V(a,b,d,c),b.child;case 14:return e=b.type,f=ha(e,b.pendingProps),f=ha(e.type,f),Mh(a,b,e,f,d,c);case 15:return Nh(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ha(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),b.tag=1,T(d)?(a=!0,cd(b)):a=!1,Eb(b,c),sh(b,d,e),Le(b,d,e,c),cf(null,b,d,!0,a,c);case 19:return Wh(a,b,c);case 23:return bf(a,b,c);case 24:return bf(a,b,c)}throw Error(m(156,
+b.tag));};var ba=function(a,b,c,d){return new mk(a,b,c,d)};Gf.prototype.render=function(a){Hd(a,this._internalRoot,null,null)};Gf.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;Hd(null,a,null,function(){b[xb]=null})};var Wi=function(a){if(13===a.tag){var b=X();Qa(a,4,b);Ff(a,4)}};var kg=function(a){if(13===a.tag){var b=X();Qa(a,67108864,b);Ff(a,67108864)}};var Ui=function(a){if(13===a.tag){var b=X(),c=Pa(a);Qa(a,c,b);Ff(a,c)}};var Ti=function(a,b){return b()};de=function(a,
+b,c){switch(b){case "input":Wd(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Nc(d);if(!e)throw Error(m(90));Sf(d);Wd(d,e)}}}break;case "textarea":Xf(a,c);break;case "select":b=c.value,null!=b&&ob(a,!!c.multiple,b,!1)}};(function(a,b,c,d){ve=a;sg=b;fe=c;eg=d})(pi,function(a,b,c,d,e){var f=n;n|=4;try{return ab(98,a.bind(null,
+b,c,d,e))}finally{n=f,0===n&&(Kb(),ma())}},function(){0===(n&49)&&(ck(),Ta())},function(a,b){var c=n;n|=2;try{return a(b)}finally{n=c,0===n&&(Kb(),ma())}});var Pk={Events:[Ub,vb,Nc,cg,dg,Ta,{current:!1}]};(function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,
+setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:lb.ReactCurrentDispatcher,findHostInstanceByFiber:rk,findFiberByHostInstance:a.findFiberByHostInstance||sk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!b.isDisabled&&b.supportsFiber)try{lf=b.inject(a),ib=b}catch(c){}a=!0}return a})({findFiberByHostInstance:Ya,
+bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"});N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pk;N.createPortal=zi;N.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(m(188));throw Error(m(268,Object.keys(a)));}a=hg(b);a=null===a?null:a.stateNode;return a};N.flushSync=function(a,b){var c=n;if(0!==(c&48))return a(b);n|=1;try{if(a)return ab(99,a.bind(null,b))}finally{n=
+c,ma()}};N.hydrate=function(a,b,c){if(!Bc(b))throw Error(m(200));return Id(null,a,b,!0,c)};N.render=function(a,b,c){if(!Bc(b))throw Error(m(200));return Id(null,a,b,!1,c)};N.unmountComponentAtNode=function(a){if(!Bc(a))throw Error(m(40));return a._reactRootContainer?(qi(function(){Id(null,null,a,!1,function(){a._reactRootContainer=null;a[xb]=null})}),!0):!1};N.unstable_batchedUpdates=pi;N.unstable_createPortal=function(a,b){return zi(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
+N.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Bc(c))throw Error(m(200));if(null==a||void 0===a._reactInternals)throw Error(m(38));return Id(a,b,c,!1,d)};N.version="17.0.2"});
+})();
diff --git a/node_modules/react-dom/unstable-fizz.browser.js b/node_modules/react-dom/unstable-fizz.browser.js
deleted file mode 100644
index 976fac7..0000000
--- a/node_modules/react-dom/unstable-fizz.browser.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-dom-unstable-fizz.browser.production.min.js');
-} else {
- module.exports = require('./cjs/react-dom-unstable-fizz.browser.development.js');
-}
diff --git a/node_modules/react-dom/unstable-fizz.js b/node_modules/react-dom/unstable-fizz.js
deleted file mode 100644
index ca4135d..0000000
--- a/node_modules/react-dom/unstable-fizz.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./unstable-fizz.node');
diff --git a/node_modules/react-dom/unstable-fizz.node.js b/node_modules/react-dom/unstable-fizz.node.js
deleted file mode 100644
index 038a3fd..0000000
--- a/node_modules/react-dom/unstable-fizz.node.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-dom-unstable-fizz.node.production.min.js');
-} else {
- module.exports = require('./cjs/react-dom-unstable-fizz.node.development.js');
-}
diff --git a/node_modules/react-dom/unstable-native-dependencies.js b/node_modules/react-dom/unstable-native-dependencies.js
deleted file mode 100644
index 6a498a3..0000000
--- a/node_modules/react-dom/unstable-native-dependencies.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-dom-unstable-native-dependencies.production.min.js');
-} else {
- module.exports = require('./cjs/react-dom-unstable-native-dependencies.development.js');
-}