GoScrobble/web/node_modules/.cache/babel-loader/3ac5cb3f70efd6a99726f81f4230ffdf.json

1 line
2.5 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"ast":null,"code":"/** @license React v17.0.2\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n var React = require('react');\n\n var _assign = require('object-assign');\n\n var Scheduler = require('scheduler');\n\n var tracing = require('scheduler/tracing');\n\n var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // by calls to these methods by a Babel plugin.\n //\n // In PROD (or in packages without access to React internals),\n // they are left as they are instead.\n\n function warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n }\n\n function error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n\n function printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n }\n\n if (!React) {\n {\n throw Error(\"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.\");\n }\n }\n\n var FunctionComponent = 0;\n var ClassComponent = 1;\n var IndeterminateComponent = 2; // Before we know whether it is function or class\n\n var HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\n var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\n var HostComponent = 5;\n var HostText = 6;\n var Fragment = 7;\n var Mode = 8;\n var ContextConsumer = 9;\n var ContextProvider = 10;\n var ForwardRef = 11;\n var Profiler = 12;\n var SuspenseComponent = 13;\n var MemoComponent = 14;\n var SimpleMemoComponent = 15;\n var LazyComponent = 16;\n var IncompleteClassComponent = 17;\n var DehydratedFragment = 18;\n var SuspenseListComponent = 19;\n var FundamentalComponent = 20;\n var ScopeComponent = 21;\n var Block = 22;\n var OffscreenComponent = 23;\n var LegacyHiddenComponent = 24; // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n\n var enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\n var enableFundamentalAPI = false; // Experimental Scope support.\n\n var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)\n\n var warnAboutStringRefs = false;\n var allNativeEvents = new Set();\n /**\n * Mapping from registration name to event name\n */\n\n var registrationNameDependencies = {};\n /**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\n var possibleRegistrationNames = {}; // Trust the developer to only use possibleRegistrationNames in true\n\n function registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + 'Capture', dependencies);\n }\n\n function registerDirectEvent(registrationName, dependencies) {\n {\n if (registrationNameDependencies[registrationName]) {\n error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n }\n }\n registrationNameDependencies[registrationName] = dependencies;\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n\n for (var i = 0; i < dependencies.length; i++) {\n allNativeEvents.add(dependencies[i]);\n }\n }\n\n var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); // A reserved attribute.\n // It is handled by React separately and shouldn't be written to the DOM.\n\n var RESERVED = 0; // A simple string attribute.\n // Attributes that aren't in the filter are presumed to have this type.\n\n var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n // \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n // When true, it should be set to a \"true\" string.\n // When false, it should be set to a \"false\" string.\n\n var BOOLEANISH_STRING = 2; // A real boolean attribute.\n // When true, it should be present (set either to an empty string or its name).\n // When false, it should be omitted.\n\n var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n // When true, it should be present (set either to an empty string or its name).\n // When false, it should be omitted.\n // For any other value, should be present with that value.\n\n var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n // When falsy, it should be removed.\n\n var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n // When falsy, it should be removed.\n\n var POSITIVE_NUMERIC = 6;\n /* eslint-disable max-len */\n\n var ATTRIBUTE_NAME_START_CHAR = \":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\";\n /* eslint-enable max-len */\n\n var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n var ROOT_ATTRIBUTE_NAME = 'data-reactroot';\n var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n var illegalAttributeNameCache = {};\n var validatedAttributeNameCache = {};\n\n function isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n return false;\n }\n\n function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n\n return false;\n }\n\n function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n }\n\n function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n\n case OVERLOADED_BOOLEAN:\n return value === false;\n\n case NUMERIC:\n return isNaN(value);\n\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n\n return false;\n }\n\n function getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n }\n\n function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n } // When adding attributes to this list, be sure to also add them to\n // the `possibleStandardNames` module to ensure casing and incorrect\n // name warnings.\n\n\n var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\n var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n // elements (not just inputs). Now that ReactDOMInput assigns to the\n // defaultValue property -- do we need this?\n 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n reservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // A few React string attributes have a different name.\n // This is a mapping from React prop names to the attribute names.\n\n [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n // In React, we let users pass `true` and `false` even though technically\n // these aren't boolean attributes (they are coerced to strings).\n\n ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n // In React, we let users pass `true` and `false` even though technically\n // these aren't boolean attributes (they are coerced to strings).\n // Since these are SVG attributes, their attribute names are case-sensitive.\n\n ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // These are HTML boolean attributes.\n\n ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n // on the client side because the browsers are inconsistent. Instead we call focus().\n 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n 'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // These are the few React props that we set as DOM properties\n // rather than attributes. These are all booleans.\n\n ['checked', // Note: `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`. We have special logic for handling this.\n 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // These are HTML attributes that are \"overloaded booleans\": they behave like\n // booleans, but can also accept a string value.\n\n ['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // These are HTML attributes that must be positive numbers.\n\n ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // These are HTML attributes that must be numbers.\n\n ['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n });\n var CAMELIZE = /[\\-\\:]([a-z])/g;\n\n var capitalize = function (token) {\n return token[1].toUpperCase();\n }; // This is a list of all SVG attributes that need special casing, namespacing,\n // or boolean value assignment. Regular attributes that just accept strings\n // and have the same names are omitted, just like in the HTML attribute filter.\n // Some of these attributes can be hard to find. This list was created by\n // scraping the MDN documentation.\n\n\n ['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' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // String SVG attributes with the xlink namespace.\n\n ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL\n false);\n }); // String SVG attributes with the xml namespace.\n\n ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n // you'll need to set attributeName to name.toLowerCase()\n // instead in the assignment below.\n ].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL\n false);\n }); // These attribute exists both in HTML and SVG.\n // The attribute name is case-sensitive in SVG so we can't just use\n // the React name like we do for attributes that exist only in HTML.\n\n ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n }); // These attributes accept URLs. These must not allow javascript: URLS.\n // These will also need to accept Trusted Types object in the future.\n\n var xlinkHref = 'xlinkHref';\n properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL\n false);\n ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true);\n }); // and any newline or tab are filtered out as if they're not part of the URL.\n // https://url.spec.whatwg.org/#url-parsing\n // Tab or newline are defined as \\r\\n\\t:\n // https://infra.spec.whatwg.org/#ascii-tab-or-newline\n // A C0 control is a code point in the range \\u0000 NULL to \\u001F\n // INFORMATION SEPARATOR ONE, inclusive:\n // https://infra.spec.whatwg.org/#c0-control-or-space\n\n /* eslint-disable max-len */\n\n 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;\n var didWarn = false;\n\n function sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n }\n }\n }\n /**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\n\n\n function getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if (propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n /**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\n\n function getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n }\n /**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\n\n function setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n } // If the prop isn't in the special list, treat it as a simple attribute.\n\n\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n node.setAttribute(_attributeName, '' + value);\n }\n }\n\n return;\n }\n\n var mustUseProperty = propertyInfo.mustUseProperty;\n\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n if (value === null) {\n var type = propertyInfo.type;\n node[propertyName] = type === BOOLEAN ? false : '';\n } else {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyName] = value;\n }\n\n return;\n } // The rest are treated as attributes with special cases.\n\n\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n var attributeValue;\n\n if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n // If attribute type is boolean, we know for sure it won't be an execution sink\n // and we won't require Trusted Type here.\n attributeValue = '';\n } else {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n {\n attributeValue = '' + value;\n }\n\n if (propertyInfo.sanitizeURL) {\n sanitizeURL(attributeValue.toString());\n }\n }\n\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n } // ATTENTION\n // When adding new symbols to this file,\n // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n // The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n // nor polyfill, then a plain number is used for performance.\n\n\n var REACT_ELEMENT_TYPE = 0xeac7;\n var REACT_PORTAL_TYPE = 0xeaca;\n var REACT_FRAGMENT_TYPE = 0xeacb;\n var REACT_STRICT_MODE_TYPE = 0xeacc;\n var REACT_PROFILER_TYPE = 0xead2;\n var REACT_PROVIDER_TYPE = 0xeacd;\n var REACT_CONTEXT_TYPE = 0xeace;\n var REACT_FORWARD_REF_TYPE = 0xead0;\n var REACT_SUSPENSE_TYPE = 0xead1;\n var REACT_SUSPENSE_LIST_TYPE = 0xead8;\n var REACT_MEMO_TYPE = 0xead3;\n var REACT_LAZY_TYPE = 0xead4;\n var REACT_BLOCK_TYPE = 0xead9;\n var REACT_SERVER_BLOCK_TYPE = 0xeada;\n var REACT_FUNDAMENTAL_TYPE = 0xead5;\n var REACT_SCOPE_TYPE = 0xead7;\n var REACT_OPAQUE_ID_TYPE = 0xeae0;\n var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\n var REACT_OFFSCREEN_TYPE = 0xeae2;\n var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\n if (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n REACT_FRAGMENT_TYPE = symbolFor('react.fragment');\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_BLOCK_TYPE = symbolFor('react.block');\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n }\n\n var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator';\n\n function getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n } // Helpers to patch console.logs to avoid logging during side-effect free\n // replaying on render function. This currently only patches the object\n // lazily which won't cover if the log function was extracted eagerly.\n // We could also eagerly patch the method.\n\n\n var disabledDepth = 0;\n var prevLog;\n var prevInfo;\n var prevWarn;\n var prevError;\n var prevGroup;\n var prevGroupCollapsed;\n var prevGroupEnd;\n\n function disabledLog() {}\n\n disabledLog.__reactDisabledLog = true;\n\n function disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n }\n\n function reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: _assign({}, props, {\n value: prevLog\n }),\n info: _assign({}, props, {\n value: prevInfo\n }),\n warn: _assign({}, props, {\n value: prevWarn\n }),\n error: _assign({}, props, {\n value: prevError\n }),\n group: _assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: _assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: _assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n }\n\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n var prefix;\n\n function describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n }\n\n var reentry = false;\n var componentFrameCache;\n {\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n }\n\n function describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at ');\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n return syntheticFrame;\n }\n\n function describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n }\n\n function describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n }\n\n function shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n }\n\n function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_BLOCK_TYPE:\n return describeFunctionComponentFrame(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n }\n\n function describeFiber(fiber) {\n var owner = fiber._debugOwner ? fiber._debugOwner.type : null;\n var source = fiber._debugSource;\n\n switch (fiber.tag) {\n case HostComponent:\n return describeBuiltInComponentFrame(fiber.type);\n\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy');\n\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(fiber.type);\n\n case ForwardRef:\n return describeFunctionComponentFrame(fiber.type.render);\n\n case Block:\n return describeFunctionComponentFrame(fiber.type._render);\n\n case ClassComponent:\n return describeClassComponentFrame(fiber.type);\n\n default:\n return '';\n }\n }\n\n function getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n }\n\n function getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n }\n\n function getContextName(type) {\n return type.displayName || 'Context';\n }\n\n function getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentName(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n }\n\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var current = null;\n var isRendering = false;\n\n function getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentName(owner.type);\n }\n }\n return null;\n }\n\n function getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n }\n\n function resetCurrentFiber() {\n {\n ReactDebugCurrentFrame.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n }\n\n function setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n }\n\n function setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n }\n\n function getIsRendering() {\n {\n return isRendering;\n }\n } // Flow does not allow string concatenation of most non-string types. To work\n // around this limitation, we use an opaque type that can only be obtained by\n // passing the value through getToStringValue first.\n\n\n function toString(value) {\n return '' + value;\n }\n\n function getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'object':\n case 'string':\n case 'undefined':\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n }\n\n var hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n };\n\n function checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n 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`.');\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n 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`.');\n }\n }\n }\n\n function isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n }\n\n function getTracker(node) {\n return node._valueTracker;\n }\n\n function detachTracker(node) {\n node._valueTracker = null;\n }\n\n function getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n }\n\n function trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n }\n\n function track(node) {\n if (getTracker(node)) {\n return;\n } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n node._valueTracker = trackValueOnNode(node);\n }\n\n function updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n }\n\n function getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n }\n\n var didWarnValueDefaultValue = false;\n var didWarnCheckedDefaultChecked = false;\n var didWarnControlledToUncontrolled = false;\n var didWarnUncontrolledToControlled = false;\n\n function isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n }\n /**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\n function getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n }\n\n function initWrapperState(element, props) {\n {\n checkControlledValueProps('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n 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);\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n 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);\n didWarnValueDefaultValue = true;\n }\n }\n var node = element;\n var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n controlled: isControlled(props)\n };\n }\n\n function updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n }\n\n function updateWrapper(element, props) {\n var node = element;\n {\n var controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n 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');\n didWarnUncontrolledToControlled = true;\n }\n\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n 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');\n didWarnControlledToUncontrolled = true;\n }\n }\n updateChecked(element, props);\n var value = getToStringValue(props.value);\n var type = props.type;\n\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(value);\n }\n } else if (node.value !== toString(value)) {\n node.value = toString(value);\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n return;\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (props.hasOwnProperty('value')) {\n setDefaultValue(node, props.type, value);\n } else if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n }\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n }\n\n function postMountWrapper(element, props, isHydrating) {\n var node = element; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n var type = props.type;\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (props.value === undefined || props.value === null)) {\n return;\n }\n\n var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var name = node.name;\n\n if (name !== '') {\n node.name = '';\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!node._wrapperState.initialChecked;\n }\n\n if (name !== '') {\n node.name = name;\n }\n }\n\n function restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n }\n\n function updateNamedCousins(rootNode, props) {\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode(otherNode);\n\n if (!otherProps) {\n {\n throw Error(\"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.\");\n }\n } // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n\n\n updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n updateWrapper(otherNode, otherProps);\n }\n }\n } // In Chrome, assigning defaultValue to certain input types triggers input validation.\n // For number inputs, the display value loses trailing decimal points. For email inputs,\n // Chrome raises \"The specified value <x> is not a valid email address\".\n //\n // Here we check to see if the defaultValue has actually changed, avoiding these problems\n // when the user is inputting text\n //\n // https://github.com/facebook/react/issues/7253\n\n\n function setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n }\n\n var didWarnSelectedSetOnOption = false;\n var didWarnInvalidChild = false;\n\n function flattenChildren(children) {\n var content = ''; // Flatten children. We'll warn if they are invalid\n // during validateProps() which runs for hydration too.\n // Note that this would throw on non-element objects.\n // Elements are stringified (which is normally irrelevant\n // but matters for <fbt>).\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child; // Note: we don't warn about invalid children here.\n // Instead, this is done separately below so that\n // it happens during the hydration code path too.\n });\n return content;\n }\n /**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\n\n function validateProps(element, props) {\n {\n // This mirrors the code path above, but runs for hydration too.\n // Warn about invalid children here so that client and hydration are consistent.\n // TODO: this seems like it could cause a DEV-only throw for hydration\n // if children contains a non-element object. We should try to avoid that.\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n\n if (typeof child.type !== 'string') {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n error('Only strings and numbers are supported as <option> children.');\n }\n });\n } // TODO: Remove support for `selected` in <option>.\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n didWarnSelectedSetOnOption = true;\n }\n }\n }\n\n function postMountWrapper$1(element, props) {\n // value=\"\" should make a value attribute (#6219)\n if (props.value != null) {\n element.setAttribute('value', toString(getToStringValue(props.value)));\n }\n }\n\n function getHostProps$1(element, props) {\n var hostProps = _assign({\n children: undefined\n }, props);\n\n var content = flattenChildren(props.children);\n\n if (content) {\n hostProps.children = content;\n }\n\n return hostProps;\n }\n\n var didWarnValueDefaultValue$1;\n {\n didWarnValueDefaultValue$1 = false;\n }\n\n function getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n }\n\n var valuePropNames = ['value', 'defaultValue'];\n /**\n * Validation function for `value` and `defaultValue`.\n */\n\n function checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n }\n\n function updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n }\n /**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\n function getHostProps$2(element, props) {\n return _assign({}, props, {\n value: undefined\n });\n }\n\n function initWrapperState$1(element, props) {\n var node = element;\n {\n checkSelectPropTypes(props);\n }\n node._wrapperState = {\n wasMultiple: !!props.multiple\n };\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n 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');\n didWarnValueDefaultValue$1 = true;\n }\n }\n }\n\n function postMountWrapper$2(element, props) {\n var node = element;\n node.multiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n }\n }\n\n function postUpdateWrapper(element, props) {\n var node = element;\n var wasMultiple = node._wrapperState.wasMultiple;\n node._wrapperState.wasMultiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (wasMultiple !== !!props.multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n }\n }\n }\n\n function restoreControlledState$1(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n }\n\n var didWarnValDefaultVal = false;\n /**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\n\n function getHostProps$3(element, props) {\n var node = element;\n\n if (!(props.dangerouslySetInnerHTML == null)) {\n {\n throw Error(\"`dangerouslySetInnerHTML` does not make sense on <textarea>.\");\n }\n } // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n\n\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n\n return hostProps;\n }\n\n function initWrapperState$2(element, props) {\n var node = element;\n {\n checkControlledValueProps('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n 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');\n didWarnValDefaultVal = true;\n }\n }\n var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n var children = props.children,\n defaultValue = props.defaultValue;\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n {\n if (!(defaultValue == null)) {\n {\n throw Error(\"If you supply `defaultValue` on a <textarea>, do not pass children.\");\n }\n }\n\n if (Array.isArray(children)) {\n if (!(children.length <= 1)) {\n {\n throw Error(\"<textarea> can only have at most one child.\");\n }\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n node._wrapperState = {\n initialValue: getToStringValue(initialValue)\n };\n }\n\n function updateWrapper$1(element, props) {\n var node = element;\n var value = getToStringValue(props.value);\n var defaultValue = getToStringValue(props.defaultValue);\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n }\n\n if (props.defaultValue == null && node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\n }\n }\n\n function postMountWrapper$3(element, props) {\n var node = element; // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === node._wrapperState.initialValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n }\n\n function restoreControlledState$2(element, props) {\n // DOM component is still mounted; update\n updateWrapper$1(element, props);\n }\n\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var Namespaces = {\n html: HTML_NAMESPACE,\n mathml: MATH_NAMESPACE,\n svg: SVG_NAMESPACE\n }; // Assumes there is no parent namespace.\n\n function getIntrinsicNamespace(type) {\n switch (type) {\n case 'svg':\n return SVG_NAMESPACE;\n\n case 'math':\n return MATH_NAMESPACE;\n\n default:\n return HTML_NAMESPACE;\n }\n }\n\n function getChildNamespace(parentNamespace, type) {\n if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n // No (or default) parent namespace: potential entry point.\n return getIntrinsicNamespace(type);\n }\n\n if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n // We're leaving SVG.\n return HTML_NAMESPACE;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n }\n /* globals MSApp */\n\n /**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\n\n\n var createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n };\n\n var reusableSVGContainer;\n /**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\n var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n if (node.namespaceURI === Namespaces.svg) {\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n });\n /**\n * HTML nodeType values that represent the type of the node\n */\n\n var ELEMENT_NODE = 1;\n var TEXT_NODE = 3;\n var COMMENT_NODE = 8;\n var DOCUMENT_NODE = 9;\n var DOCUMENT_FRAGMENT_NODE = 11;\n /**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\n var setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n }; // List derived from Gecko source code:\n // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\n\n\n var shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n };\n /**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\n\n var isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n };\n /**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\n function prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n }\n /**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\n var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n // infinite loop, because it iterates over the newly added props too.\n\n Object.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n });\n /**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\n function dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return ('' + value).trim();\n }\n\n var uppercasePattern = /([A-Z])/g;\n var msPattern = /^ms-/;\n /**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\n function hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n }\n\n var warnValidStyle = function () {};\n\n {\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern$1 = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n }\n var warnValidStyle$1 = warnValidStyle;\n /**\n * Operations for dealing with CSS properties.\n */\n\n /**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\n function createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n }\n /**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\n\n function setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n {\n if (!isCustomProperty) {\n warnValidStyle$1(styleName, styles[styleName]);\n }\n }\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n }\n\n function isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n }\n /**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\n function expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n }\n /**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\n function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n {\n if (!nextStyles) {\n return;\n }\n\n var expandedUpdates = expandShorthandMap(styleUpdates);\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var key in expandedUpdates) {\n var originalKey = expandedUpdates[key];\n var correctOriginalKey = expandedStyles[key];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n } // For HTML, certain tags should omit their close tag. We keep a list for\n // those special-case tags.\n\n\n var omittedCloseTags = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n }; // `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\n var voidElementTags = _assign({\n menuitem: true\n }, omittedCloseTags);\n\n var HTML = '__html';\n\n function assertValidProps(tag, props) {\n if (!props) {\n return;\n } // Note the use of `==` which checks for null or undefined.\n\n\n if (voidElementTags[tag]) {\n if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {\n {\n throw Error(tag + \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\");\n }\n }\n }\n\n if (props.dangerouslySetInnerHTML != null) {\n if (!(props.children == null)) {\n {\n throw Error(\"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\");\n }\n }\n\n if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {\n {\n throw Error(\"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.\");\n }\n }\n }\n\n {\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n\n if (!(props.style == null || typeof props.style === 'object')) {\n {\n 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.\");\n }\n }\n }\n\n function isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n } // When adding attributes to the HTML or SVG allowed attribute list, be sure to\n // also add them to this module to ensure casing and incorrect name\n // warnings.\n\n\n var possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n };\n var ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n };\n var warnedProperties = {};\n var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n var hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n function validateProperty(tagName, name) {\n {\n if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n return true;\n }\n\n function warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n }\n }\n }\n\n function validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n }\n\n var didWarnValueNull = false;\n\n function validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n }\n\n var validateProperty$1 = function () {};\n\n {\n var warnedProperties$1 = {};\n var _hasOwnProperty = Object.prototype.hasOwnProperty;\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, eventRegistry) {\n if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n }\n\n var warnUnknownProperties = function (type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n 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);\n } else if (unknownProps.length > 1) {\n 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);\n }\n }\n };\n\n function validateProperties$2(type, props, eventRegistry) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n }\n\n var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\n var IS_NON_DELEGATED = 1 << 1;\n var IS_CAPTURE_PHASE = 1 << 2;\n var IS_REPLAYED = 1 << 4; // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n // we call willDeferLaterForLegacyFBSupport, thus not bailing out\n // will result in endless cycles like an infinite loop.\n // We also don't want to defer during event replaying.\n\n var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n /**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\n function getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n }\n\n var restoreImpl = null;\n var restoreTarget = null;\n var restoreQueue = null;\n\n function restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n if (!(typeof restoreImpl === 'function')) {\n {\n 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.\");\n }\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var _props = getFiberCurrentPropsFromNode(stateNode);\n\n restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n }\n }\n\n function setRestoreImplementation(impl) {\n restoreImpl = impl;\n }\n\n function enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n }\n\n function needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n }\n\n function restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n } // the renderer. Such as when we're dispatching events or if third party\n // libraries need to call batchedUpdates. Eventually, this API will go away when\n // everything is batched by default. We'll then have a similar API to opt-out of\n // scheduled work and instead do synchronous work.\n // Defaults\n\n\n var batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n };\n\n var discreteUpdatesImpl = function (fn, a, b, c, d) {\n return fn(a, b, c, d);\n };\n\n var flushDiscreteUpdatesImpl = function () {};\n\n var batchedEventUpdatesImpl = batchedUpdatesImpl;\n var isInsideEventHandler = false;\n var isBatchingEventUpdates = false;\n\n function finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n flushDiscreteUpdatesImpl();\n restoreStateIfNeeded();\n }\n }\n\n function batchedUpdates(fn, bookkeeping) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(bookkeeping);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n }\n\n function batchedEventUpdates(fn, a, b) {\n if (isBatchingEventUpdates) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isBatchingEventUpdates = true;\n\n try {\n return batchedEventUpdatesImpl(fn, a, b);\n } finally {\n isBatchingEventUpdates = false;\n finishEventHandler();\n }\n }\n\n function discreteUpdates(fn, a, b, c, d) {\n var prevIsInsideEventHandler = isInsideEventHandler;\n isInsideEventHandler = true;\n\n try {\n return discreteUpdatesImpl(fn, a, b, c, d);\n } finally {\n isInsideEventHandler = prevIsInsideEventHandler;\n\n if (!isInsideEventHandler) {\n finishEventHandler();\n }\n }\n }\n\n function flushDiscreteUpdatesIfNeeded(timeStamp) {\n {\n if (!isInsideEventHandler) {\n flushDiscreteUpdatesImpl();\n }\n }\n }\n\n function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n discreteUpdatesImpl = _discreteUpdatesImpl;\n flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;\n batchedEventUpdatesImpl = _batchedEventUpdatesImpl;\n }\n\n function isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n }\n\n function shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n case 'onMouseEnter':\n return !!(props.disabled && isInteractive(type));\n\n default:\n return false;\n }\n }\n /**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\n function getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n\n if (stateNode === null) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (props === null) {\n // Work in progress.\n return null;\n }\n\n var listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (!(!listener || typeof listener === 'function')) {\n {\n throw Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n }\n }\n\n return listener;\n }\n\n var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\n if (canUseDOM) {\n try {\n var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value\n\n Object.defineProperty(options, 'passive', {\n get: function () {\n passiveBrowserEventsSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (e) {\n passiveBrowserEventsSupported = false;\n }\n }\n\n function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n }\n\n var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\n {\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n\n invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {\n // If document doesn't exist we know for sure we will crash in this method\n // when we call document.createEvent(). However this can cause confusing\n // errors: https://github.com/facebookincubator/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (!(typeof document !== 'undefined')) {\n {\n 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.\");\n }\n }\n\n var evt = document.createEvent('Event');\n var didCall = false; // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');\n\n function restoreAfterDispatch() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n } // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n function callCallback() {\n didCall = true;\n restoreAfterDispatch();\n func.apply(context, funcArgs);\n didError = false;\n } // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n } // Create a fake event type.\n\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n\n if (didCall && didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n 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.');\n } else if (isCrossOriginError) {\n 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.');\n }\n\n this.onError(error);\n } // Remove our event listeners\n\n\n window.removeEventListener('error', handleWindowError);\n\n if (!didCall) {\n // Something went really wrong, and our event was not dispatched.\n // https://github.com/facebook/react/issues/16734\n // https://github.com/facebook/react/issues/16585\n // Fall back to the production implementation.\n restoreAfterDispatch();\n return invokeGuardedCallbackProd.apply(this, arguments);\n }\n };\n }\n }\n var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n var hasError = false;\n var caughtError = null; // Used by event system to capture/rethrow the first error.\n\n var hasRethrowError = false;\n var rethrowError = null;\n var reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n };\n /**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\n function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n }\n /**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\n\n function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n\n if (hasError) {\n var error = clearCaughtError();\n\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n }\n /**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\n\n function rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n }\n\n function hasCaughtError() {\n return hasError;\n }\n\n function clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n {\n {\n throw Error(\"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n }\n /**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\n\n\n function get(key) {\n return key._reactInternals;\n }\n\n function has(key) {\n return key._reactInternals !== undefined;\n }\n\n function set(key, value) {\n key._reactInternals = value;\n } // Don't change these two values. They're used by React Dev Tools.\n\n\n var NoFlags =\n /* */\n 0;\n var PerformedWork =\n /* */\n 1; // You can change the rest (and add more).\n\n var Placement =\n /* */\n 2;\n var Update =\n /* */\n 4;\n var PlacementAndUpdate =\n /* */\n 6;\n var Deletion =\n /* */\n 8;\n var ContentReset =\n /* */\n 16;\n var Callback =\n /* */\n 32;\n var DidCapture =\n /* */\n 64;\n var Ref =\n /* */\n 128;\n var Snapshot =\n /* */\n 256;\n var Passive =\n /* */\n 512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.\n\n var PassiveUnmountPendingDev =\n /* */\n 8192;\n var Hydrating =\n /* */\n 1024;\n var HydratingAndUpdate =\n /* */\n 1028; // Passive & Update & Callback & Ref & Snapshot\n\n var LifecycleEffectMask =\n /* */\n 932; // Union of all host effects\n\n var HostEffectMask =\n /* */\n 2047; // These are not really side effects, but we still reuse this field.\n\n var Incomplete =\n /* */\n 2048;\n var ShouldCapture =\n /* */\n 4096;\n var ForceUpdateForLegacySuspense =\n /* */\n 16384; // Static tags describe aspects of a fiber that are not specific to a render,\n\n var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\n\n function getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.flags & (Placement | Hydrating)) !== NoFlags) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n }\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n }\n\n function getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n }\n\n function getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n }\n\n function isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n }\n\n function isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n 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');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n }\n\n function assertIsMounted(fiber) {\n if (!(getNearestMountedFiber(fiber) === fiber)) {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n }\n\n function findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (!(nearestMounted !== null)) {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n {\n 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.\");\n }\n }\n }\n }\n\n if (!(a.alternate === b)) {\n {\n throw Error(\"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (!(a.tag === HostRoot)) {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n }\n\n function findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n }\n\n function findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI) {\n return node;\n } else if (node.child && node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n }\n\n function doesFiberContain(parentFiber, childFiber) {\n var node = childFiber;\n var parentFiberAlternate = parentFiber.alternate;\n\n while (node !== null) {\n if (node === parentFiber || node === parentFiberAlternate) {\n return true;\n }\n\n node = node.return;\n }\n\n return false;\n }\n\n var attemptUserBlockingHydration;\n\n function setAttemptUserBlockingHydration(fn) {\n attemptUserBlockingHydration = fn;\n }\n\n var attemptContinuousHydration;\n\n function setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n }\n\n var attemptHydrationAtCurrentPriority;\n\n function setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n }\n\n var attemptHydrationAtPriority;\n\n function setAttemptHydrationAtPriority(fn) {\n attemptHydrationAtPriority = fn;\n } // TODO: Upgrade this definition once we're on a newer version of Flow that\n\n\n var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\n var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n // if the last target was dehydrated.\n\n var queuedFocus = null;\n var queuedDrag = null;\n var queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\n var queuedPointers = new Map();\n var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\n var queuedExplicitHydrationTargets = [];\n\n function hasQueuedDiscreteEvents() {\n return queuedDiscreteEvents.length > 0;\n }\n\n var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n 'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];\n\n function isReplayableDiscreteEvent(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n }\n\n function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n return {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags | IS_REPLAYED,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n };\n }\n\n function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n queuedDiscreteEvents.push(queuedEvent);\n } // Resets the replaying for this type of continuous event to no event.\n\n\n function clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'focusin':\n case 'focusout':\n queuedFocus = null;\n break;\n\n case 'dragenter':\n case 'dragleave':\n queuedDrag = null;\n break;\n\n case 'mouseover':\n case 'mouseout':\n queuedMouse = null;\n break;\n\n case 'pointerover':\n case 'pointerout':\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n }\n\n function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode(blockedOn);\n\n if (_fiber2 !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(_fiber2);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags, and the targetContainers, and\n // store a single event to be replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n var targetContainers = existingQueuedEvent.targetContainers;\n\n if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n targetContainers.push(targetContainer);\n }\n\n return existingQueuedEvent;\n }\n\n function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (domEventName) {\n case 'focusin':\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n return true;\n }\n\n case 'dragenter':\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n return true;\n }\n\n case 'mouseover':\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n return true;\n }\n\n case 'pointerover':\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n return true;\n }\n\n case 'gotpointercapture':\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n return true;\n }\n }\n\n return false;\n } // Check if this target is unblocked. Returns true if it's unblocked.\n\n\n function attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with attemptToDispatchEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n attemptHydrationAtPriority(queuedTarget.lanePriority, function () {\n Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n }\n\n function attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var targetContainers = queuedEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode(nextBlockedOn);\n\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n return true;\n }\n\n function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n }\n\n function replayUnblockedEvents() {\n hasScheduledReplayAttempt = false; // First replay discrete events.\n\n while (queuedDiscreteEvents.length > 0) {\n var nextDiscreteEvent = queuedDiscreteEvents[0];\n\n if (nextDiscreteEvent.blockedOn !== null) {\n // We're still blocked.\n // Increase the priority of this boundary to unblock\n // the next discrete event.\n var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);\n\n if (_fiber4 !== null) {\n attemptUserBlockingHydration(_fiber4);\n }\n\n break;\n }\n\n var targetContainers = nextDiscreteEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n nextDiscreteEvent.blockedOn = nextBlockedOn;\n break;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n if (nextDiscreteEvent.blockedOn === null) {\n // We've successfully replayed the first event. Let's try the next one.\n queuedDiscreteEvents.shift();\n }\n } // Next replay any continuous events.\n\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n }\n\n function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n }\n\n function retryIfBlockedOn(unblocked) {\n // Mark anything that was blocked on this as no longer blocked\n // and eligible for a replay.\n if (queuedDiscreteEvents.length > 0) {\n scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n // worth it because we expect very few discrete events to queue up and once\n // we are actually fully unblocked it will be fast to replay them.\n\n for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n var queuedEvent = queuedDiscreteEvents[i];\n\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n }\n }\n }\n\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n }\n\n var DiscreteEvent = 0;\n var UserBlockingEvent = 1;\n var ContinuousEvent = 2;\n /**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\n function makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n }\n /**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\n var vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n /**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\n var prefixedEventNames = {};\n /**\n * Element to check for prefixes on.\n */\n\n var style = {};\n /**\n * Bootstrap if a DOM exists.\n */\n\n if (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n }\n /**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\n function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n }\n\n var ANIMATION_END = getVendorPrefixedEventName('animationend');\n var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\n var ANIMATION_START = getVendorPrefixedEventName('animationstart');\n var TRANSITION_END = getVendorPrefixedEventName('transitionend');\n var topLevelEventsToReactNames = new Map();\n var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use\n // the code required to apply the same logic for event prioritization and that of the\n // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code\n // duplication (for which there would be quite a bit). For the events that are not needed\n // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an\n // array of top level events.\n // Lastly, we ignore prettier so we can keep the formatting sane.\n // prettier-ignore\n\n var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!\n 'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!\n 'focusout', 'blur', // Careful!\n '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'];\n var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];\n 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\n\n 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'];\n /**\n * Turns\n * ['abort', ...]\n *\n * into\n *\n * topLevelEventsToReactNames = new Map([\n * ['abort', 'onAbort'],\n * ]);\n *\n * and registers them.\n */\n\n function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {\n // As the event types are in pairs of two, we need to iterate\n // through in twos. The events are in pairs of two to save code\n // and improve init perf of processing this array, as it will\n // result in far fewer object allocations and property accesses\n // if we only use three arrays to process all the categories of\n // instead of tuples.\n for (var i = 0; i < eventTypes.length; i += 2) {\n var topEvent = eventTypes[i];\n var event = eventTypes[i + 1];\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var reactName = 'on' + capitalizedEvent;\n eventPriorities.set(topEvent, priority);\n topLevelEventsToReactNames.set(topEvent, reactName);\n registerTwoPhaseEvent(reactName, [topEvent]);\n }\n }\n\n function setEventPriorities(eventTypes, priority) {\n for (var i = 0; i < eventTypes.length; i++) {\n eventPriorities.set(eventTypes[i], priority);\n }\n }\n\n function getEventPriorityForPluginSystem(domEventName) {\n var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might\n // want to warn if we can't detect the priority\n // for the event.\n\n return priority === undefined ? ContinuousEvent : priority;\n }\n\n function registerSimpleEvents() {\n registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);\n registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);\n registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);\n setEventPriorities(otherDiscreteEvents, DiscreteEvent);\n }\n\n var Scheduler_now = Scheduler.unstable_now;\n {\n // Provide explicit error message when production+profiling bundle of e.g.\n // react-dom is used with production (non-profiling) bundle of\n // scheduler/tracing\n if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {\n {\n 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\");\n }\n }\n } // ascending numbers so we can compare them like numbers. They start at 90 to\n // avoid clashing with Scheduler's priorities.\n\n var ImmediatePriority = 99;\n var UserBlockingPriority = 98;\n var NormalPriority = 97;\n var LowPriority = 96;\n var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.\n\n var NoPriority = 90;\n var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.\n\n var SyncLanePriority = 15;\n var SyncBatchedLanePriority = 14;\n var InputDiscreteHydrationLanePriority = 13;\n var InputDiscreteLanePriority = 12;\n var InputContinuousHydrationLanePriority = 11;\n var InputContinuousLanePriority = 10;\n var DefaultHydrationLanePriority = 9;\n var DefaultLanePriority = 8;\n var TransitionHydrationPriority = 7;\n var TransitionPriority = 6;\n var RetryLanePriority = 5;\n var SelectiveHydrationLanePriority = 4;\n var IdleHydrationLanePriority = 3;\n var IdleLanePriority = 2;\n var OffscreenLanePriority = 1;\n var NoLanePriority = 0;\n var TotalLanes = 31;\n var NoLanes =\n /* */\n 0;\n var NoLane =\n /* */\n 0;\n var SyncLane =\n /* */\n 1;\n var SyncBatchedLane =\n /* */\n 2;\n var InputDiscreteHydrationLane =\n /* */\n 4;\n var InputDiscreteLanes =\n /* */\n 24;\n var InputContinuousHydrationLane =\n /* */\n 32;\n var InputContinuousLanes =\n /* */\n 192;\n var DefaultHydrationLane =\n /* */\n 256;\n var DefaultLanes =\n /* */\n 3584;\n var TransitionHydrationLane =\n /* */\n 4096;\n var TransitionLanes =\n /* */\n 4186112;\n var RetryLanes =\n /* */\n 62914560;\n var SomeRetryLane =\n /* */\n 33554432;\n var SelectiveHydrationLane =\n /* */\n 67108864;\n var NonIdleLanes =\n /* */\n 134217727;\n var IdleHydrationLane =\n /* */\n 134217728;\n var IdleLanes =\n /* */\n 805306368;\n var OffscreenLane =\n /* */\n 1073741824;\n var NoTimestamp = -1;\n\n function setCurrentUpdateLanePriority(newLanePriority) {} // \"Registers\" used to \"return\" multiple values\n // Used by getHighestPriorityLanes and getNextLanes:\n\n\n var return_highestLanePriority = DefaultLanePriority;\n\n function getHighestPriorityLanes(lanes) {\n if ((SyncLane & lanes) !== NoLanes) {\n return_highestLanePriority = SyncLanePriority;\n return SyncLane;\n }\n\n if ((SyncBatchedLane & lanes) !== NoLanes) {\n return_highestLanePriority = SyncBatchedLanePriority;\n return SyncBatchedLane;\n }\n\n if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {\n return_highestLanePriority = InputDiscreteHydrationLanePriority;\n return InputDiscreteHydrationLane;\n }\n\n var inputDiscreteLanes = InputDiscreteLanes & lanes;\n\n if (inputDiscreteLanes !== NoLanes) {\n return_highestLanePriority = InputDiscreteLanePriority;\n return inputDiscreteLanes;\n }\n\n if ((lanes & InputContinuousHydrationLane) !== NoLanes) {\n return_highestLanePriority = InputContinuousHydrationLanePriority;\n return InputContinuousHydrationLane;\n }\n\n var inputContinuousLanes = InputContinuousLanes & lanes;\n\n if (inputContinuousLanes !== NoLanes) {\n return_highestLanePriority = InputContinuousLanePriority;\n return inputContinuousLanes;\n }\n\n if ((lanes & DefaultHydrationLane) !== NoLanes) {\n return_highestLanePriority = DefaultHydrationLanePriority;\n return DefaultHydrationLane;\n }\n\n var defaultLanes = DefaultLanes & lanes;\n\n if (defaultLanes !== NoLanes) {\n return_highestLanePriority = DefaultLanePriority;\n return defaultLanes;\n }\n\n if ((lanes & TransitionHydrationLane) !== NoLanes) {\n return_highestLanePriority = TransitionHydrationPriority;\n return TransitionHydrationLane;\n }\n\n var transitionLanes = TransitionLanes & lanes;\n\n if (transitionLanes !== NoLanes) {\n return_highestLanePriority = TransitionPriority;\n return transitionLanes;\n }\n\n var retryLanes = RetryLanes & lanes;\n\n if (retryLanes !== NoLanes) {\n return_highestLanePriority = RetryLanePriority;\n return retryLanes;\n }\n\n if (lanes & SelectiveHydrationLane) {\n return_highestLanePriority = SelectiveHydrationLanePriority;\n return SelectiveHydrationLane;\n }\n\n if ((lanes & IdleHydrationLane) !== NoLanes) {\n return_highestLanePriority = IdleHydrationLanePriority;\n return IdleHydrationLane;\n }\n\n var idleLanes = IdleLanes & lanes;\n\n if (idleLanes !== NoLanes) {\n return_highestLanePriority = IdleLanePriority;\n return idleLanes;\n }\n\n if ((OffscreenLane & lanes) !== NoLanes) {\n return_highestLanePriority = OffscreenLanePriority;\n return OffscreenLane;\n }\n\n {\n error('Should have found matching lanes. This is a bug in React.');\n } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n return_highestLanePriority = DefaultLanePriority;\n return lanes;\n }\n\n function schedulerPriorityToLanePriority(schedulerPriorityLevel) {\n switch (schedulerPriorityLevel) {\n case ImmediatePriority:\n return SyncLanePriority;\n\n case UserBlockingPriority:\n return InputContinuousLanePriority;\n\n case NormalPriority:\n case LowPriority:\n // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n return DefaultLanePriority;\n\n case IdlePriority:\n return IdleLanePriority;\n\n default:\n return NoLanePriority;\n }\n }\n\n function lanePriorityToSchedulerPriority(lanePriority) {\n switch (lanePriority) {\n case SyncLanePriority:\n case SyncBatchedLanePriority:\n return ImmediatePriority;\n\n case InputDiscreteHydrationLanePriority:\n case InputDiscreteLanePriority:\n case InputContinuousHydrationLanePriority:\n case InputContinuousLanePriority:\n return UserBlockingPriority;\n\n case DefaultHydrationLanePriority:\n case DefaultLanePriority:\n case TransitionHydrationPriority:\n case TransitionPriority:\n case SelectiveHydrationLanePriority:\n case RetryLanePriority:\n return NormalPriority;\n\n case IdleHydrationLanePriority:\n case IdleLanePriority:\n case OffscreenLanePriority:\n return IdlePriority;\n\n case NoLanePriority:\n return NoPriority;\n\n default:\n {\n {\n throw Error(\"Invalid update priority: \" + lanePriority + \". This is a bug in React.\");\n }\n }\n }\n }\n\n function getNextLanes(root, wipLanes) {\n // Early bailout if there's no pending work left.\n var pendingLanes = root.pendingLanes;\n\n if (pendingLanes === NoLanes) {\n return_highestLanePriority = NoLanePriority;\n return NoLanes;\n }\n\n var nextLanes = NoLanes;\n var nextLanePriority = NoLanePriority;\n var expiredLanes = root.expiredLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes; // Check if any work has expired.\n\n if (expiredLanes !== NoLanes) {\n nextLanes = expiredLanes;\n nextLanePriority = return_highestLanePriority = SyncLanePriority;\n } else {\n // Do not work on any idle work until all the non-idle work has finished,\n // even if the work is suspended.\n var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n if (nonIdlePendingLanes !== NoLanes) {\n var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n if (nonIdleUnblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n nextLanePriority = return_highestLanePriority;\n } else {\n var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n if (nonIdlePingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n nextLanePriority = return_highestLanePriority;\n }\n }\n } else {\n // The only remaining work is Idle.\n var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n if (unblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(unblockedLanes);\n nextLanePriority = return_highestLanePriority;\n } else {\n if (pingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(pingedLanes);\n nextLanePriority = return_highestLanePriority;\n }\n }\n }\n }\n\n if (nextLanes === NoLanes) {\n // This should only be reachable if we're suspended\n // TODO: Consider warning in this path if a fallback timer is not scheduled.\n return NoLanes;\n } // If there are higher priority lanes, we'll include them even if they\n // are suspended.\n\n\n nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt\n // it and we'll lose our progress. We should only do this if the new lanes are\n // higher priority.\n\n if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n // bother waiting until the root is complete.\n (wipLanes & suspendedLanes) === NoLanes) {\n getHighestPriorityLanes(wipLanes);\n var wipLanePriority = return_highestLanePriority;\n\n if (nextLanePriority <= wipLanePriority) {\n return wipLanes;\n } else {\n return_highestLanePriority = nextLanePriority;\n }\n } // Check for entangled lanes and add them to the batch.\n //\n // A lane is said to be entangled with another when it's not allowed to render\n // in a batch that does not also include the other lane. Typically we do this\n // when multiple updates have the same source, and we only want to respond to\n // the most recent event from that source.\n //\n // Note that we apply entanglements *after* checking for partial work above.\n // This means that if a lane is entangled during an interleaved event while\n // it's already rendering, we won't interrupt it. This is intentional, since\n // entanglement is usually \"best effort\": we'll try our best to render the\n // lanes in the same batch, but it's not worth throwing out partially\n // completed work in order to do it.\n //\n // For those exceptions where entanglement is semantically important, like\n // useMutableSource, we should ensure that there is no partial work at the\n // time we apply the entanglement.\n\n\n var entangledLanes = root.entangledLanes;\n\n if (entangledLanes !== NoLanes) {\n var entanglements = root.entanglements;\n var lanes = nextLanes & entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n nextLanes |= entanglements[index];\n lanes &= ~lane;\n }\n }\n\n return nextLanes;\n }\n\n function getMostRecentEventTime(root, lanes) {\n var eventTimes = root.eventTimes;\n var mostRecentEventTime = NoTimestamp;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var eventTime = eventTimes[index];\n\n if (eventTime > mostRecentEventTime) {\n mostRecentEventTime = eventTime;\n }\n\n lanes &= ~lane;\n }\n\n return mostRecentEventTime;\n }\n\n function computeExpirationTime(lane, currentTime) {\n // TODO: Expiration heuristic is constant per lane, so could use a map.\n getHighestPriorityLanes(lane);\n var priority = return_highestLanePriority;\n\n if (priority >= InputContinuousLanePriority) {\n // User interactions should expire slightly more quickly.\n //\n // NOTE: This is set to the corresponding constant as in Scheduler.js. When\n // we made it larger, a product metric in www regressed, suggesting there's\n // a user interaction that's being starved by a series of synchronous\n // updates. If that theory is correct, the proper solution is to fix the\n // starvation. However, this scenario supports the idea that expiration\n // times are an important safeguard when starvation does happen.\n //\n // Also note that, in the case of user input specifically, this will soon no\n // longer be an issue because we plan to make user input synchronous by\n // default (until you enter `startTransition`, of course.)\n //\n // If weren't planning to make these updates synchronous soon anyway, I\n // would probably make this number a configurable parameter.\n return currentTime + 250;\n } else if (priority >= TransitionPriority) {\n return currentTime + 5000;\n } else {\n // Anything idle priority or lower should never expire.\n return NoTimestamp;\n }\n }\n\n function markStarvedLanesAsExpired(root, currentTime) {\n // TODO: This gets called every time we yield. We can optimize by storing\n // the earliest expiration time on the root. Then use that to quickly bail out\n // of this function.\n var pendingLanes = root.pendingLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes;\n var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n // expiration time. If so, we'll assume the update is being starved and mark\n // it as expired to force it to finish.\n\n var lanes = pendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var expirationTime = expirationTimes[index];\n\n if (expirationTime === NoTimestamp) {\n // Found a pending lane with no expiration time. If it's not suspended, or\n // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n // using the current time.\n if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n // Assumes timestamps are monotonically increasing.\n expirationTimes[index] = computeExpirationTime(lane, currentTime);\n }\n } else if (expirationTime <= currentTime) {\n // This lane expired\n root.expiredLanes |= lane;\n }\n\n lanes &= ~lane;\n }\n } // This returns the highest priority pending lanes regardless of whether they\n\n\n function getLanesToRetrySynchronouslyOnError(root) {\n var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n if (everythingButOffscreen !== NoLanes) {\n return everythingButOffscreen;\n }\n\n if (everythingButOffscreen & OffscreenLane) {\n return OffscreenLane;\n }\n\n return NoLanes;\n }\n\n function returnNextLanesPriority() {\n return return_highestLanePriority;\n }\n\n function includesNonIdleWork(lanes) {\n return (lanes & NonIdleLanes) !== NoLanes;\n }\n\n function includesOnlyRetries(lanes) {\n return (lanes & RetryLanes) === lanes;\n }\n\n function includesOnlyTransitions(lanes) {\n return (lanes & TransitionLanes) === lanes;\n } // To ensure consistency across multiple updates in the same event, this should\n // be a pure function, so that it always returns the same lane for given inputs.\n\n\n function findUpdateLane(lanePriority, wipLanes) {\n switch (lanePriority) {\n case NoLanePriority:\n break;\n\n case SyncLanePriority:\n return SyncLane;\n\n case SyncBatchedLanePriority:\n return SyncBatchedLane;\n\n case InputDiscreteLanePriority:\n {\n var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);\n\n if (_lane === NoLane) {\n // Shift to the next priority level\n return findUpdateLane(InputContinuousLanePriority, wipLanes);\n }\n\n return _lane;\n }\n\n case InputContinuousLanePriority:\n {\n var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);\n\n if (_lane2 === NoLane) {\n // Shift to the next priority level\n return findUpdateLane(DefaultLanePriority, wipLanes);\n }\n\n return _lane2;\n }\n\n case DefaultLanePriority:\n {\n var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);\n\n if (_lane3 === NoLane) {\n // If all the default lanes are already being worked on, look for a\n // lane in the transition range.\n _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);\n\n if (_lane3 === NoLane) {\n // All the transition lanes are taken, too. This should be very\n // rare, but as a last resort, pick a default lane. This will have\n // the effect of interrupting the current work-in-progress render.\n _lane3 = pickArbitraryLane(DefaultLanes);\n }\n }\n\n return _lane3;\n }\n\n case TransitionPriority: // Should be handled by findTransitionLane instead\n\n case RetryLanePriority:\n // Should be handled by findRetryLane instead\n break;\n\n case IdleLanePriority:\n var lane = pickArbitraryLane(IdleLanes & ~wipLanes);\n\n if (lane === NoLane) {\n lane = pickArbitraryLane(IdleLanes);\n }\n\n return lane;\n }\n\n {\n {\n throw Error(\"Invalid update priority: \" + lanePriority + \". This is a bug in React.\");\n }\n }\n } // To ensure consistency across multiple updates in the same event, this should\n // be pure function, so that it always returns the same lane for given inputs.\n\n\n function findTransitionLane(wipLanes, pendingLanes) {\n // First look for lanes that are completely unclaimed, i.e. have no\n // pending work.\n var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);\n\n if (lane === NoLane) {\n // If all lanes have pending work, look for a lane that isn't currently\n // being worked on.\n lane = pickArbitraryLane(TransitionLanes & ~wipLanes);\n\n if (lane === NoLane) {\n // If everything is being worked on, pick any lane. This has the\n // effect of interrupting the current work-in-progress.\n lane = pickArbitraryLane(TransitionLanes);\n }\n }\n\n return lane;\n } // To ensure consistency across multiple updates in the same event, this should\n // be pure function, so that it always returns the same lane for given inputs.\n\n\n function findRetryLane(wipLanes) {\n // This is a fork of `findUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n var lane = pickArbitraryLane(RetryLanes & ~wipLanes);\n\n if (lane === NoLane) {\n lane = pickArbitraryLane(RetryLanes);\n }\n\n return lane;\n }\n\n function getHighestPriorityLane(lanes) {\n return lanes & -lanes;\n }\n\n function getLowestPriorityLane(lanes) {\n // This finds the most significant non-zero bit.\n var index = 31 - clz32(lanes);\n return index < 0 ? NoLanes : 1 << index;\n }\n\n function getEqualOrHigherPriorityLanes(lanes) {\n return (getLowestPriorityLane(lanes) << 1) - 1;\n }\n\n function pickArbitraryLane(lanes) {\n // This wrapper function gets inlined. Only exists so to communicate that it\n // doesn't matter which bit is selected; you can pick any bit without\n // affecting the algorithms where its used. Here I'm using\n // getHighestPriorityLane because it requires the fewest operations.\n return getHighestPriorityLane(lanes);\n }\n\n function pickArbitraryLaneIndex(lanes) {\n return 31 - clz32(lanes);\n }\n\n function laneToIndex(lane) {\n return pickArbitraryLaneIndex(lane);\n }\n\n function includesSomeLane(a, b) {\n return (a & b) !== NoLanes;\n }\n\n function isSubsetOfLanes(set, subset) {\n return (set & subset) === subset;\n }\n\n function mergeLanes(a, b) {\n return a | b;\n }\n\n function removeLanes(set, subset) {\n return set & ~subset;\n } // Seems redundant, but it changes the type from a single lane (used for\n // updates) to a group of lanes (used for flushing work).\n\n\n function laneToLanes(lane) {\n return lane;\n }\n\n function higherPriorityLane(a, b) {\n // This works because the bit ranges decrease in priority as you go left.\n return a !== NoLane && a < b ? a : b;\n }\n\n function createLaneMap(initial) {\n // Intentionally pushing one by one.\n // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n var laneMap = [];\n\n for (var i = 0; i < TotalLanes; i++) {\n laneMap.push(initial);\n }\n\n return laneMap;\n }\n\n function markRootUpdated(root, updateLane, eventTime) {\n root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But\n // it's not practical to try every single possible combination. We need a\n // heuristic to decide which lanes to attempt to render, and in which batches.\n // For now, we use the same heuristic as in the old ExpirationTimes model:\n // retry any lane at equal or lower priority, but don't try updates at higher\n // priority without also including the lower priority updates. This works well\n // when considering updates across different priority levels, but isn't\n // sufficient for updates within the same priority, since we want to treat\n // those updates as parallel.\n // Unsuspend any update at equal or lower priority.\n\n var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111\n\n root.suspendedLanes &= higherPriorityLanes;\n root.pingedLanes &= higherPriorityLanes;\n var eventTimes = root.eventTimes;\n var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most\n // recent event, and we assume time is monotonically increasing.\n\n eventTimes[index] = eventTime;\n }\n\n function markRootSuspended(root, suspendedLanes) {\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n var expirationTimes = root.expirationTimes;\n var lanes = suspendedLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n }\n\n function markRootPinged(root, pingedLanes, eventTime) {\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n }\n\n function markDiscreteUpdatesExpired(root) {\n root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;\n }\n\n function hasDiscreteLanes(lanes) {\n return (lanes & InputDiscreteLanes) !== NoLanes;\n }\n\n function markRootMutableRead(root, updateLane) {\n root.mutableReadLanes |= updateLane & root.pendingLanes;\n }\n\n function markRootFinished(root, remainingLanes) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes; // Let's try everything again\n\n root.suspendedLanes = 0;\n root.pingedLanes = 0;\n root.expiredLanes &= remainingLanes;\n root.mutableReadLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n var entanglements = root.entanglements;\n var eventTimes = root.eventTimes;\n var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work\n\n var lanes = noLongerPendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] = NoLanes;\n eventTimes[index] = NoTimestamp;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n }\n\n function markRootEntangled(root, entangledLanes) {\n root.entangledLanes |= entangledLanes;\n var entanglements = root.entanglements;\n var lanes = entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] |= entangledLanes;\n lanes &= ~lane;\n }\n }\n\n var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.\n // Based on:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\n var log = Math.log;\n var LN2 = Math.LN2;\n\n function clz32Fallback(lanes) {\n if (lanes === 0) {\n return 32;\n }\n\n return 31 - (log(lanes) / LN2 | 0) | 0;\n } // Intentionally not named imports because Rollup would use dynamic dispatch for\n\n\n var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority,\n runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?\n\n var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n // We'd like to remove this but it's not clear if this is safe.\n\n function setEnabled(enabled) {\n _enabled = !!enabled;\n }\n\n function isEnabled() {\n return _enabled;\n }\n\n function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n var eventPriority = getEventPriorityForPluginSystem(domEventName);\n var listenerWrapper;\n\n switch (eventPriority) {\n case DiscreteEvent:\n listenerWrapper = dispatchDiscreteEvent;\n break;\n\n case UserBlockingEvent:\n listenerWrapper = dispatchUserBlockingUpdate;\n break;\n\n case ContinuousEvent:\n default:\n listenerWrapper = dispatchEvent;\n break;\n }\n\n return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n }\n\n function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n {\n flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);\n }\n discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);\n }\n\n function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {\n {\n runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));\n }\n }\n\n function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n var allowReplay = true;\n {\n // TODO: replaying capture phase events is currently broken\n // because we used to do it during top-level native bubble handlers\n // but now we use different bubble and capture handlers.\n // In eager mode, we attach capture listeners early, so we need\n // to filter them out until we fix the logic to handle them correctly.\n // This could've been outside the flag but I put it inside to reduce risk.\n allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;\n }\n\n if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {\n // If we already have a queue of discrete events, and this is another discrete\n // event, then we can't dispatch it regardless of its target, since they\n // need to dispatch in order.\n queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.\n domEventName, eventSystemFlags, targetContainer, nativeEvent);\n return;\n }\n\n var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn === null) {\n // We successfully dispatched this event.\n if (allowReplay) {\n clearIfContinuousEvent(domEventName, nativeEvent);\n }\n\n return;\n }\n\n if (allowReplay) {\n if (isReplayableDiscreteEvent(domEventName)) {\n // This this to be replayed later once the target is available.\n queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accummulative.\n\n\n clearIfContinuousEvent(domEventName, nativeEvent);\n } // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.\n\n\n function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // TODO: Warn if _enabled is false.\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.\n\n return null;\n }\n\n function addEventBubbleListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, false);\n return listener;\n }\n\n function addEventCaptureListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, true);\n return listener;\n }\n\n function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n capture: true,\n passive: passive\n });\n return listener;\n }\n\n function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n passive: passive\n });\n return listener;\n }\n /**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\n\n\n var root = null;\n var startText = null;\n var fallbackText = null;\n\n function initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n }\n\n function reset() {\n root = null;\n startText = null;\n fallbackText = null;\n }\n\n function getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start;\n var startValue = startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n }\n\n function getText() {\n if ('value' in root) {\n return root.value;\n }\n\n return root.textContent;\n }\n /**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\n\n\n function getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n }\n\n function functionThatReturnsTrue() {\n return true;\n }\n\n function functionThatReturnsFalse() {\n return false;\n } // This is intentionally a factory so that we have different returned constructors.\n // If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\n function createSyntheticEvent(Interface) {\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */\n function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n\n for (var _propName in Interface) {\n if (!Interface.hasOwnProperty(_propName)) {\n continue;\n }\n\n var normalize = Interface[_propName];\n\n if (normalize) {\n this[_propName] = normalize(nativeEvent);\n } else {\n this[_propName] = nativeEvent[_propName];\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n\n _assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {// Modern event system doesn't use pooling.\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsTrue\n });\n\n return SyntheticBaseEvent;\n }\n /**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\n var EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n };\n var SyntheticEvent = createSyntheticEvent(EventInterface);\n\n var UIEventInterface = _assign({}, EventInterface, {\n view: 0,\n detail: 0\n });\n\n var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\n var lastMovementX;\n var lastMovementY;\n var lastMouseEvent;\n\n function updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n lastMovementX = event.screenX - lastMouseEvent.screenX;\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n\n lastMouseEvent = event;\n }\n }\n /**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\n var MouseEventInterface = _assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n\n return lastMovementY;\n }\n });\n\n var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n /**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var DragEventInterface = _assign({}, MouseEventInterface, {\n dataTransfer: 0\n });\n\n var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n /**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var FocusEventInterface = _assign({}, UIEventInterface, {\n relatedTarget: 0\n });\n\n var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\n var AnimationEventInterface = _assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n });\n\n var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\n var ClipboardEventInterface = _assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n });\n\n var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\n var CompositionEventInterface = _assign({}, EventInterface, {\n data: 0\n });\n\n var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n // Happens to share the same list for now.\n\n var SyntheticInputEvent = SyntheticCompositionEvent;\n /**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\n var normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n };\n /**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\n var translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n };\n /**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\n function getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n\n return '';\n }\n /**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n\n var modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n // getModifierState. If getModifierState is not supported, we map it to a set of\n // modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\n function modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n }\n\n function getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n }\n /**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\n var KeyboardEventInterface = _assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n }\n });\n\n var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n /**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\n var PointerEventInterface = _assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n });\n\n var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n /**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\n var TouchEventInterface = _assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n });\n\n var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n /**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\n var TransitionEventInterface = _assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n });\n\n var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n /**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n var WheelEventInterface = _assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: 0,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: 0\n });\n\n var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\n var START_KEYCODE = 229;\n var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\n var documentMode = null;\n\n if (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n } // Webkit offers a very useful `textInput` event that can be used to\n // directly represent `beforeInput`. The IE `textinput` event is not as\n // useful, so we don't use it.\n\n\n var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n // by the native compositionend event may be incorrect. Japanese ideographic\n // spaces, for instance (\\u3000) are not recorded correctly.\n\n var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\n var SPACEBAR_CODE = 32;\n var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\n function registerEvents() {\n registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n } // Track whether we've ever handled a keypress on the space key.\n\n\n var hasSpaceKeypress = false;\n /**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\n function isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n }\n /**\n * Translate native top level events into event types.\n */\n\n\n function getCompositionEventType(domEventName) {\n switch (domEventName) {\n case 'compositionstart':\n return 'onCompositionStart';\n\n case 'compositionend':\n return 'onCompositionEnd';\n\n case 'compositionupdate':\n return 'onCompositionUpdate';\n }\n }\n /**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\n function isFallbackCompositionStart(domEventName, nativeEvent) {\n return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n }\n /**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\n function isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'keyup':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case 'keydown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n\n case 'keypress':\n case 'mousedown':\n case 'focusout':\n // Events are not possible without cancelling IME.\n return true;\n\n default:\n return false;\n }\n }\n /**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\n function getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n\n return null;\n }\n /**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\n function isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n } // Track the current IME composition status, if any.\n\n\n var isComposing = false;\n /**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\n function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(domEventName);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n eventType = 'onCompositionStart';\n }\n } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n eventType = 'onCompositionEnd';\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === 'onCompositionStart') {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === 'onCompositionEnd') {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n if (listeners.length > 0) {\n var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n\n if (customData !== null) {\n event.data = customData;\n }\n }\n }\n }\n\n function getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'compositionend':\n return getDataFromCustomEvent(nativeEvent);\n\n case 'keypress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'textInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n }\n /**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n */\n\n\n function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n }\n /**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\n function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n\n if (!chars) {\n return null;\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n if (listeners.length > 0) {\n var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.data = chars;\n }\n }\n /**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\n function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n /**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\n\n\n var supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n };\n\n function isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n }\n /**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\n\n function isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = (eventName in document);\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n }\n\n function registerEvents$1() {\n registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n }\n\n function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n }\n /**\n * For IE shims\n */\n\n\n var activeElement = null;\n var activeElementInst = null;\n /**\n * SECTION: handle `change` event\n */\n\n function shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n }\n\n function manualDispatchChangeEvent(nativeEvent) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n\n batchedUpdates(runEventInBatch, dispatchQueue);\n }\n\n function runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n }\n\n function getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n }\n\n function getTargetInstForChangeEvent(domEventName, targetInst) {\n if (domEventName === 'change') {\n return targetInst;\n }\n }\n /**\n * SECTION: handle `input` event\n */\n\n\n var isInputEventSupported = false;\n\n if (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n }\n /**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\n function startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n }\n /**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\n function stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n }\n /**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n\n\n function handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n }\n\n function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n if (domEventName === 'focusin') {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (domEventName === 'focusout') {\n stopWatchingForValueChange();\n }\n } // For IE8 and IE9.\n\n\n function getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst);\n }\n }\n /**\n * SECTION: handle `click` event\n */\n\n\n function shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n }\n\n function getTargetInstForClickEvent(domEventName, targetInst) {\n if (domEventName === 'click') {\n return getInstIfValueChanged(targetInst);\n }\n }\n\n function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (domEventName === 'input' || domEventName === 'change') {\n return getInstIfValueChanged(targetInst);\n }\n }\n\n function handleControlledInputBlur(node) {\n var state = node._wrapperState;\n\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n }\n /**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\n function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(domEventName, targetInst);\n\n if (inst) {\n createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n return;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(domEventName, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (domEventName === 'focusout') {\n handleControlledInputBlur(targetNode);\n }\n }\n\n function registerEvents$2() {\n registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\n }\n /**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n\n\n function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {\n // If this is an over event with a target, we might have already dispatched\n // the event in the out event of the other target. If this is replayed,\n // then it's because we couldn't dispatch against this target previously\n // so we have to do it now instead.\n var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n if (related) {\n // If the related node is managed by React, we can assume that we have\n // already dispatched the corresponding events during its mouseout.\n if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n return;\n }\n }\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return;\n }\n\n var win; // TODO: why is this nullable in the types but we read from it?\n\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n\n if (isOutEvent) {\n var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n from = targetInst;\n to = _related ? getClosestInstanceFromNode(_related) : null;\n\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\n\n if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {\n to = null;\n }\n }\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return;\n }\n\n var SyntheticEventCtor = SyntheticMouseEvent;\n var leaveEventType = 'onMouseLeave';\n var enterEventType = 'onMouseEnter';\n var eventTypePrefix = 'mouse';\n\n if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n SyntheticEventCtor = SyntheticPointerEvent;\n leaveEventType = 'onPointerLeave';\n enterEventType = 'onPointerEnter';\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance(from);\n var toNode = to == null ? win : getNodeFromInstance(to);\n var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = null; // We should only process this nativeEvent if we are processing\n // the first ancestor. Next time, we will ignore the event.\n\n var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (nativeTargetInst === targetInst) {\n var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n enterEvent.target = toNode;\n enterEvent.relatedTarget = fromNode;\n enter = enterEvent;\n }\n\n accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\n }\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n\n\n function is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n }\n\n var objectIs = typeof Object.is === 'function' ? Object.is : is;\n var hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n /**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\n function shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n }\n /**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\n\n function getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n\n return node;\n }\n /**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\n function getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n\n node = node.parentNode;\n }\n }\n /**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\n function getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n }\n /**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\n\n function getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n }\n /**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\n\n function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n\n if ((next = node.nextSibling) !== null) {\n break;\n }\n\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n }\n /**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\n\n function setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n }\n\n function isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n }\n\n function containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n }\n\n function isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n }\n\n function isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n }\n\n function getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n\n element = getActiveElement(win.document);\n }\n\n return element;\n }\n /**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n /**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\n function hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n }\n\n function getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null\n };\n }\n /**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\n\n function restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n } // Focusing a node can change the scroll position, which is undesirable\n\n\n var ancestors = [];\n var ancestor = priorFocusedElem;\n\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n }\n /**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\n\n function getSelection(input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || {\n start: 0,\n end: 0\n };\n }\n /**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n\n\n function setSelection(input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n }\n\n var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\n function registerEvents$3() {\n registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\n }\n\n var activeElement$1 = null;\n var activeElementInst$1 = null;\n var lastSelection = null;\n var mouseDown = false;\n /**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n */\n\n function getSelection$1(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n }\n /**\n * Get document associated with the event target.\n */\n\n\n function getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n }\n /**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\n function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n return;\n } // Only fire when selection has actually changed.\n\n\n var currentSelection = getSelection$1(activeElement$1);\n\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.target = activeElement$1;\n }\n }\n }\n /**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\n function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n switch (domEventName) {\n // Track the input node that has focus.\n case 'focusin':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n\n break;\n\n case 'focusout':\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n\n case 'mousedown':\n mouseDown = true;\n break;\n\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n\n case 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n }\n\n function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n\n if (reactName === undefined) {\n return;\n }\n\n var SyntheticEventCtor = SyntheticEvent;\n var reactEventType = domEventName;\n\n switch (domEventName) {\n case 'keypress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return;\n }\n\n /* falls through */\n\n case 'keydown':\n case 'keyup':\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n\n case 'focusin':\n reactEventType = 'focus';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'focusout':\n reactEventType = 'blur';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'beforeblur':\n case 'afterblur':\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'click':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return;\n }\n\n /* falls through */\n\n case 'auxclick':\n case 'dblclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case 'mouseout':\n case 'mouseover':\n case 'contextmenu':\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n\n case 'drag':\n case 'dragend':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'dragstart':\n case 'drop':\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n\n case 'touchcancel':\n case 'touchend':\n case 'touchmove':\n case 'touchstart':\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n\n case 'scroll':\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n\n case 'wheel':\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n\n case 'copy':\n case 'cut':\n case 'paste':\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'pointerup':\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n }\n\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n {\n // Some events don't bubble in the browser.\n // In the past, React has always bubbled them, but this can be surprising.\n // We're going to try aligning closer to the browser behavior by not bubbling\n // them in React either. We'll start by not bubbling onScroll, and then expand.\n var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from\n // nonDelegatedEvents list in DOMPluginEventSystem.\n // Then we can remove this special list.\n // This is a breaking change that can wait until React 18.\n domEventName === 'scroll';\n\n var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n if (_listeners.length > 0) {\n // Intentionally create event lazily.\n var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n dispatchQueue.push({\n event: _event,\n listeners: _listeners\n });\n }\n }\n } // TODO: remove top-level side effect.\n\n\n registerSimpleEvents();\n registerEvents$2();\n registerEvents$1();\n registerEvents$3();\n registerEvents();\n\n function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n // This is the basic functionality of the event system. All\n // the other plugins are essentially polyfills. So the plugin\n // should probably be inlined somewhere and have its logic\n // be core the to event system. This would potentially allow\n // us to ship builds of React without the polyfilled plugins below.\n extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n // event's native \"bubble\" phase, which means that we're\n // not in the capture phase. That's because we emulate\n // the capture phase here still. This is a trade-off,\n // because in an ideal world we would not emulate and use\n // the phases properly, like we do with the SimpleEvent\n // plugin. However, the plugins below either expect\n // emulation (EnterLeave) or use state localized to that\n // plugin (BeforeInput, Change, Select). The state in\n // these modules complicates things, as you'll essentially\n // get the case where the capture phase event might change\n // state, only for the following bubble event to come in\n // later and not trigger anything as the state now\n // invalidates the heuristics of the event plugin. We\n // could alter all these plugins to work in such ways, but\n // that might cause other unknown side-effects that we\n // can't forsee right now.\n\n if (shouldProcessPolyfillPlugins) {\n extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n } // List of events that need to be individually attached to media elements.\n\n\n 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\n // set them on the actual target element itself. This is primarily\n // because these events do not consistently bubble in the DOM.\n\n var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n\n function executeDispatch(event, listener, currentTarget) {\n var type = event.type || 'unknown-event';\n event.currentTarget = currentTarget;\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n }\n\n function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n var previousInstance;\n\n if (inCapturePhase) {\n for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n var _dispatchListeners$i = dispatchListeners[i],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget,\n listener = _dispatchListeners$i.listener;\n\n if (instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, listener, currentTarget);\n previousInstance = instance;\n }\n } else {\n for (var _i = 0; _i < dispatchListeners.length; _i++) {\n var _dispatchListeners$_i = dispatchListeners[_i],\n _instance = _dispatchListeners$_i.instance,\n _currentTarget = _dispatchListeners$_i.currentTarget,\n _listener = _dispatchListeners$_i.listener;\n\n if (_instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, _listener, _currentTarget);\n previousInstance = _instance;\n }\n }\n }\n\n function processDispatchQueue(dispatchQueue, eventSystemFlags) {\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event,\n listeners = _dispatchQueue$i.listeners;\n processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n }\n\n function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n var dispatchQueue = [];\n extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n }\n\n function listenToNonDelegatedEvent(domEventName, targetElement) {\n var isCapturePhaseListener = false;\n var listenerSet = getEventListenerSet(targetElement);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n if (!listenerSet.has(listenerSetKey)) {\n addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n }\n\n var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\n\n function listenToAllSupportedEvents(rootContainerElement) {\n {\n if (rootContainerElement[listeningMarker]) {\n // Performance optimization: don't iterate through events\n // for the same portal container or root node more than once.\n // TODO: once we remove the flag, we may be able to also\n // remove some of the bookkeeping maps used for laziness.\n return;\n }\n\n rootContainerElement[listeningMarker] = true;\n allNativeEvents.forEach(function (domEventName) {\n if (!nonDelegatedEvents.has(domEventName)) {\n listenToNativeEvent(domEventName, false, rootContainerElement, null);\n }\n\n listenToNativeEvent(domEventName, true, rootContainerElement, null);\n });\n }\n }\n\n function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {\n var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var target = rootContainerElement; // selectionchange needs to be attached to the document\n // otherwise it won't capture incoming events that are only\n // triggered on the document directly.\n\n if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {\n target = rootContainerElement.ownerDocument;\n } // If the event can be delegated (or is capture phase), we can\n // register it to the root container. Otherwise, we should\n // register the event to the target element and mark it as\n // a non-delegated event.\n\n\n if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {\n // For all non-delegated events, apart from scroll, we attach\n // their event listeners to the respective elements that their\n // events fire on. That means we can skip this step, as event\n // listener has already been added previously. However, we\n // special case the scroll event because the reality is that any\n // element can scroll.\n // TODO: ideally, we'd eventually apply the same logic to all\n // events from the nonDelegatedEvents list. Then we can remove\n // this special case and use the same logic for all events.\n if (domEventName !== 'scroll') {\n return;\n }\n\n eventSystemFlags |= IS_NON_DELEGATED;\n target = targetElement;\n }\n\n var listenerSet = getEventListenerSet(target);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then\n // we need to trap an event listener onto the target.\n\n if (!listenerSet.has(listenerSetKey)) {\n if (isCapturePhaseListener) {\n eventSystemFlags |= IS_CAPTURE_PHASE;\n }\n\n addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n }\n\n function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n // active and not passive.\n\n var isPassiveListener = undefined;\n\n if (passiveBrowserEventsSupported) {\n // Browsers introduced an intervention, making these events\n // passive by default on document. React doesn't bind them\n // to document anymore, but changing this now would undo\n // the performance wins from the change. So we emulate\n // the existing behavior manually on the roots now.\n // https://github.com/facebook/react/issues/19651\n if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n isPassiveListener = true;\n }\n }\n\n targetContainer = targetContainer;\n var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we\n\n if (isCapturePhaseListener) {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);\n }\n } else {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);\n }\n }\n }\n\n function isMatchingRootContainer(grandContainer, targetContainer) {\n return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n }\n\n function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var ancestorInst = targetInst;\n\n if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n if (targetInst !== null) {\n // The below logic attempts to work out if we need to change\n // the target fiber to a different ancestor. We had similar logic\n // in the legacy event system, except the big difference between\n // systems is that the modern event system now has an event listener\n // attached to each React Root and React Portal Root. Together,\n // the DOM nodes representing these roots are the \"rootContainer\".\n // To figure out which ancestor instance we should use, we traverse\n // up the fiber tree from the target instance and attempt to find\n // root boundaries that match that of our current \"rootContainer\".\n // If we find that \"rootContainer\", we find the parent fiber\n // sub-tree for that root and make that our ancestor instance.\n var node = targetInst;\n\n mainLoop: while (true) {\n if (node === null) {\n return;\n }\n\n var nodeTag = node.tag;\n\n if (nodeTag === HostRoot || nodeTag === HostPortal) {\n var container = node.stateNode.containerInfo;\n\n if (isMatchingRootContainer(container, targetContainerNode)) {\n break;\n }\n\n if (nodeTag === HostPortal) {\n // The target is a portal, but it's not the rootContainer we're looking for.\n // Normally portals handle their own events all the way down to the root.\n // So we should be able to stop now. However, we don't know if this portal\n // was part of *our* root.\n var grandNode = node.return;\n\n while (grandNode !== null) {\n var grandTag = grandNode.tag;\n\n if (grandTag === HostRoot || grandTag === HostPortal) {\n var grandContainer = grandNode.stateNode.containerInfo;\n\n if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n // This is the rootContainer we're looking for and we found it as\n // a parent of the Portal. That means we can ignore it because the\n // Portal will bubble through to us.\n return;\n }\n }\n\n grandNode = grandNode.return;\n }\n } // Now we need to find it's corresponding host fiber in the other\n // tree. To do this we can use getClosestInstanceFromNode, but we\n // need to validate that the fiber is a host instance, otherwise\n // we need to traverse up through the DOM till we find the correct\n // node that is from the other tree.\n\n\n while (container !== null) {\n var parentNode = getClosestInstanceFromNode(container);\n\n if (parentNode === null) {\n return;\n }\n\n var parentTag = parentNode.tag;\n\n if (parentTag === HostComponent || parentTag === HostText) {\n node = ancestorInst = parentNode;\n continue mainLoop;\n }\n\n container = container.parentNode;\n }\n }\n\n node = node.return;\n }\n }\n }\n\n batchedEventUpdates(function () {\n return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n });\n }\n\n function createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n }\n\n function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {\n var captureName = reactName !== null ? reactName + 'Capture' : null;\n var reactEventName = inCapturePhase ? captureName : reactName;\n var listeners = [];\n var instance = targetFiber;\n var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance2 = instance,\n stateNode = _instance2.stateNode,\n tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n lastHostComponent = stateNode; // createEventHandle listeners\n\n if (reactEventName !== null) {\n var listener = getListener(instance, reactEventName);\n\n if (listener != null) {\n listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n }\n }\n } // If we are only accumulating events for the target, then we don't\n // continue to propagate through the React fiber tree to find other\n // listeners.\n\n\n if (accumulateTargetOnly) {\n break;\n }\n\n instance = instance.return;\n }\n\n return listeners;\n } // We should only use this function for:\n // - BeforeInputEventPlugin\n // - ChangeEventPlugin\n // - SelectEventPlugin\n // This is because we only process these plugins\n // in the bubble phase, so we need to accumulate two\n // phase event listeners (via emulation).\n\n\n function accumulateTwoPhaseListeners(targetFiber, reactName) {\n var captureName = reactName + 'Capture';\n var listeners = [];\n var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance3 = instance,\n stateNode = _instance3.stateNode,\n tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n var captureListener = getListener(instance, captureName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n\n var bubbleListener = getListener(instance, reactName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n\n instance = instance.return;\n }\n\n return listeners;\n }\n\n function getParent(inst) {\n if (inst === null) {\n return null;\n }\n\n do {\n inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent);\n\n if (inst) {\n return inst;\n }\n\n return null;\n }\n /**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\n function getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n }\n\n function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n var registrationName = event._reactName;\n var listeners = [];\n var instance = target;\n\n while (instance !== null) {\n if (instance === common) {\n break;\n }\n\n var _instance4 = instance,\n alternate = _instance4.alternate,\n stateNode = _instance4.stateNode,\n tag = _instance4.tag;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n\n if (inCapturePhase) {\n var captureListener = getListener(instance, registrationName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n } else if (!inCapturePhase) {\n var bubbleListener = getListener(instance, registrationName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n }\n\n instance = instance.return;\n }\n\n if (listeners.length !== 0) {\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n } // We should only use this function for:\n // - EnterLeaveEventPlugin\n // This is because we only process this plugin\n // in the bubble phase, so we need to accumulate two\n // phase event listeners.\n\n\n function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n if (from !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n }\n\n if (to !== null && enterEvent !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n }\n }\n\n function getListenerSetKey(domEventName, capture) {\n return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\n }\n\n var didWarnInvalidHydration = false;\n var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\n var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\n var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\n var AUTOFOCUS = 'autoFocus';\n var CHILDREN = 'children';\n var STYLE = 'style';\n var HTML$1 = '__html';\n var HTML_NAMESPACE$1 = Namespaces.html;\n var warnedUnknownTags;\n var suppressHydrationWarning;\n var validatePropertiesInDevelopment;\n var warnForTextDifference;\n var warnForPropDifference;\n var warnForExtraAttributes;\n var warnForInvalidEventListener;\n var canDiffStyleForHydrationWarning;\n var normalizeMarkupForTextOrAttribute;\n var normalizeHTML;\n {\n warnedUnknownTags = {\n // There are working polyfills for <dialog>. Let people use it.\n dialog: true,\n // Electron ships a custom <webview> tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n };\n\n validatePropertiesInDevelopment = function (type, props) {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props, {\n registrationNameDependencies: registrationNameDependencies,\n possibleRegistrationNames: possibleRegistrationNames\n });\n }; // IE 11 parses & normalizes the style attribute as opposed to other\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n\n\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.\n // It also can turn \\u0000 into \\uFFFD inside attributes.\n // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n // If we have a mismatch, it might be caused by that.\n // We will still patch up in this case but not fire the warning.\n\n var NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\n var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\n normalizeMarkupForTextOrAttribute = function (markup) {\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n };\n\n warnForTextDifference = function (serverText, clientText) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n };\n\n warnForPropDifference = function (propName, serverValue, clientValue) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n };\n\n warnForExtraAttributes = function (attributeNames) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n error('Extra attributes from the server: %s', names);\n };\n\n warnForInvalidEventListener = function (registrationName, listener) {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }; // Parse the HTML and read it back to normalize the HTML string so that it\n // can be used for comparison.\n\n\n normalizeHTML = function (parent, html) {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how <noscript> is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n }\n\n function getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n }\n\n function noop() {}\n\n function trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop;\n }\n\n function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n for (var propKey in nextProps) {\n if (!nextProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = nextProps[propKey];\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n setValueForStyles(domElement, nextProp);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n setInnerHTML(domElement, nextHtml);\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string') {\n // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a <textarea> will cause the placeholder to not\n // show within the <textarea> until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n if (canSetTextContent) {\n setTextContent(domElement, nextProp);\n }\n } else if (typeof nextProp === 'number') {\n setTextContent(domElement, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ;else if (propKey === AUTOFOCUS) ;else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if (nextProp != null) {\n setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n }\n }\n }\n\n function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n // TODO: Handle wasCustomComponentTag\n for (var i = 0; i < updatePayload.length; i += 2) {\n var propKey = updatePayload[i];\n var propValue = updatePayload[i + 1];\n\n if (propKey === STYLE) {\n setValueForStyles(domElement, propValue);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n setInnerHTML(domElement, propValue);\n } else if (propKey === CHILDREN) {\n setTextContent(domElement, propValue);\n } else {\n setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n }\n }\n }\n\n function createElement(type, props, rootContainerElement, parentNamespace) {\n var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n var domElement;\n var namespaceURI = parentNamespace;\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n {\n isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n // allow <SVG> or <mATH>.\n\n if (!isCustomComponentTag && type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n\n if (type === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n // This is guaranteed to yield a script element.\n\n var firstChild = div.firstChild;\n domElement = div.removeChild(firstChild);\n } else if (typeof props.is === 'string') {\n // $FlowIssue `createElement` should be updated for Web Components\n domElement = ownerDocument.createElement(type, {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`\n // attributes on `select`s needs to be added before `option`s are inserted.\n // This prevents:\n // - a bug where the `select` does not scroll to the correct option because singular\n // `select` elements automatically pick the first item #13222\n // - a bug where the `select` set the first item as selected despite the `size` attribute #14239\n // See https://github.com/facebook/react/issues/13222\n // and https://github.com/facebook/react/issues/14239\n\n if (type === 'select') {\n var node = domElement;\n\n if (props.multiple) {\n node.multiple = true;\n } else if (props.size) {\n // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n // it is possible that no option is selected.\n //\n // This is only necessary when a select in \"single selection mode\".\n node.size = props.size;\n }\n }\n }\n } else {\n domElement = ownerDocument.createElementNS(namespaceURI, type);\n }\n\n {\n if (namespaceURI === HTML_NAMESPACE$1) {\n if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {\n warnedUnknownTags[type] = true;\n error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n }\n }\n }\n return domElement;\n }\n\n function createTextNode(text, rootContainerElement) {\n return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\n }\n\n function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {\n var isCustomComponentTag = isCustomComponent(tag, rawProps);\n {\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n var props;\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n props = rawProps;\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n props = rawProps;\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n props = rawProps;\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n props = rawProps;\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n props = getHostProps$1(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n default:\n props = rawProps;\n }\n\n assertValidProps(tag, props);\n setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, false);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'option':\n postMountWrapper$1(domElement, rawProps);\n break;\n\n case 'select':\n postMountWrapper$2(domElement, rawProps);\n break;\n\n default:\n if (typeof props.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n } // Calculate the diff between the two objects.\n\n\n function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n var updatePayload = null;\n var lastProps;\n var nextProps;\n\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n assertValidProps(tag, nextProps);\n var propKey;\n var styleName;\n var styleUpdates = null;\n\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n }\n } 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)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the allowed property list in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n } // Update styles that changed since `lastProp`.\n\n\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n\n updatePayload.push(propKey, styleUpdates);\n }\n\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n var lastHtml = lastProp ? lastProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, nextHtml);\n }\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string' || typeof nextProp === 'number') {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ;else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {\n // If we encounter useOpaqueReference's opaque object, this means we are hydrating.\n // In this case, call the opaque object's toString function which generates a new client\n // ID so client and server IDs match and throws to rerender.\n nextProp.toString();\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the allowed property list during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n }\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n\n return updatePayload;\n } // Apply the diff.\n\n\n function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {\n // Update checked *before* name.\n // In the middle of an update, it is possible to have multiple checked.\n // When a checked radio tries to change name, browser makes another radio's checked false.\n if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {\n updateChecked(domElement, nextRawProps);\n }\n\n var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);\n var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.\n\n updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props\n // changed.\n\n switch (tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n updateWrapper(domElement, nextRawProps);\n break;\n\n case 'textarea':\n updateWrapper$1(domElement, nextRawProps);\n break;\n\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n postUpdateWrapper(domElement, nextRawProps);\n break;\n }\n }\n\n function getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n\n return possibleStandardNames[lowerCasedName] || null;\n }\n }\n\n function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {\n var isCustomComponentTag;\n var extraAttributeNames;\n {\n suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;\n isCustomComponentTag = isCustomComponent(tag, rawProps);\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n break;\n }\n\n assertValidProps(tag, rawProps);\n {\n extraAttributeNames = new Set();\n var attributes = domElement.attributes;\n\n for (var _i = 0; _i < attributes.length; _i++) {\n var name = attributes[_i].name.toLowerCase();\n\n switch (name) {\n // Built-in SSR attribute is allowed\n case 'data-reactroot':\n break;\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n\n case 'value':\n break;\n\n case 'checked':\n break;\n\n case 'selected':\n break;\n\n default:\n // Intentionally use the original name.\n // See discussion in https://github.com/facebook/react/pull/10676.\n extraAttributeNames.add(attributes[_i].name);\n }\n }\n }\n var updatePayload = null;\n\n for (var propKey in rawProps) {\n if (!rawProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = rawProps[propKey];\n\n if (propKey === CHILDREN) {\n // For text content children we compare against textContent. This\n // might match additional HTML that is hidden when we read it using\n // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n // satisfies our requirement. Our requirement is not to produce perfect\n // HTML and attributes. Ideally we should preserve structure but it's\n // ok not to if the visible content is still enough to indicate what\n // even listeners these nodes might be wired up to.\n // TODO: Warn if there is more than a single textNode as a child.\n // TODO: Should we use domElement.firstChild.nodeValue to compare?\n if (typeof nextProp === 'string') {\n if (domElement.textContent !== nextProp) {\n if (!suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, nextProp];\n }\n } else if (typeof nextProp === 'number') {\n if (domElement.textContent !== '' + nextProp) {\n if (!suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, '' + nextProp];\n }\n }\n } else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if (typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)\n typeof isCustomComponentTag === 'boolean') {\n // Validate that the properties correspond to their expected values.\n var serverValue = void 0;\n var propertyInfo = getPropertyInfo(propKey);\n if (suppressHydrationWarning) ;else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n propKey === 'value' || propKey === 'checked' || propKey === 'selected') ;else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var serverHTML = domElement.innerHTML;\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n\n if (expectedHTML !== serverHTML) {\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n }\n } else if (propKey === STYLE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey);\n\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(nextProp);\n serverValue = domElement.getAttribute('style');\n\n if (expectedStyle !== serverValue) {\n warnForPropDifference(propKey, serverValue, expectedStyle);\n }\n }\n } else if (isCustomComponentTag) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n\n if (nextProp !== serverValue) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {\n var isMismatchDueToBadCasing = false;\n\n if (propertyInfo !== null) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propertyInfo.attributeName);\n serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);\n } else {\n var ownNamespace = parentNamespace;\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n ownNamespace = getIntrinsicNamespace(tag);\n }\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\n\n if (standardName !== null && standardName !== propKey) {\n // If an SVG prop is supplied with bad casing, it will\n // be successfully parsed from HTML, but will produce a mismatch\n // (and would be incorrectly rendered on the client).\n // However, we already warn about bad casing elsewhere.\n // So we'll skip the misleading extra mismatch warning in this case.\n isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.\n\n extraAttributeNames.delete(standardName);\n } // $FlowFixMe - Should be inferred as not undefined.\n\n\n extraAttributeNames.delete(propKey);\n }\n\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n }\n\n if (nextProp !== serverValue && !isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n }\n }\n }\n\n {\n // $FlowFixMe - Should be inferred as not undefined.\n if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {\n // $FlowFixMe - Should be inferred as not undefined.\n warnForExtraAttributes(extraAttributeNames);\n }\n }\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, true);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'select':\n case 'option':\n // For input and textarea we current always set the value property at\n // post mount to force it to diverge from attributes. However, for\n // option and select we don't quite do the same thing and select\n // is not resilient to the DOM state changing so we don't do that here.\n // TODO: Consider not doing this for input and textarea.\n break;\n\n default:\n if (typeof rawProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n return updatePayload;\n }\n\n function diffHydratedText(textNode, text) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n }\n\n function warnForUnmatchedText(textNode, text) {\n {\n warnForTextDifference(textNode.nodeValue, text);\n }\n }\n\n function warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n }\n }\n\n function warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n }\n }\n\n function warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n }\n }\n\n function warnForInsertedHydratedText(parentNode, text) {\n {\n if (text === '') {\n // We expect to insert empty text nodes since they're not represented in\n // the HTML.\n // TODO: Remove this special case if we can just avoid inserting empty\n // text nodes.\n return;\n }\n\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n }\n }\n\n function restoreControlledState$3(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledState(domElement, props);\n return;\n\n case 'textarea':\n restoreControlledState$2(domElement, props);\n return;\n\n case 'select':\n restoreControlledState$1(domElement, props);\n return;\n }\n }\n\n var validateDOMNesting = function () {};\n\n var updatedAncestorInfo = function () {};\n\n {\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example, <b><div></div></b> is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n // <p> tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for <title>, including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\n var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n var emptyAncestorInfo = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n\n updatedAncestorInfo = function (oldInfo, tag) {\n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);\n\n var info = {\n tag: tag\n };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n } // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n return ancestorInfo;\n };\n /**\n * Returns whether\n */\n\n\n var isTagValidWithParent = function (tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n case 'html':\n return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n case 'frameset':\n return tag === 'frame';\n\n case '#document':\n return tag === 'html';\n } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frameset':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n };\n /**\n * Returns whether\n */\n\n\n var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n };\n\n var didWarn$1 = {};\n\n validateDOMNesting = function (childTag, childText, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n\n if (childText != null) {\n if (childTag != null) {\n error('validateDOMNesting: when childText is passed, childTag should be null');\n }\n\n childTag = '#text';\n }\n\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n if (!invalidParentOrAncestor) {\n return;\n }\n\n var ancestorTag = invalidParentOrAncestor.tag;\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;\n\n if (didWarn$1[warnKey]) {\n return;\n }\n\n didWarn$1[warnKey] = true;\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n\n if (invalidParent) {\n var info = '';\n\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n\n error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);\n } else {\n error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n }\n };\n }\n var SUPPRESS_HYDRATION_WARNING$1;\n {\n SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';\n }\n var SUSPENSE_START_DATA = '$';\n var SUSPENSE_END_DATA = '/$';\n var SUSPENSE_PENDING_START_DATA = '$?';\n var SUSPENSE_FALLBACK_START_DATA = '$!';\n var STYLE$1 = 'style';\n var eventsEnabled = null;\n var selectionInformation = null;\n\n function shouldAutoFocusHostComponent(type, props) {\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n }\n\n return false;\n }\n\n function getRootHostContext(rootContainerInstance) {\n var type;\n var namespace;\n var nodeType = rootContainerInstance.nodeType;\n\n switch (nodeType) {\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n {\n type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n var root = rootContainerInstance.documentElement;\n namespace = root ? root.namespaceURI : getChildNamespace(null, '');\n break;\n }\n\n default:\n {\n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n var ownNamespace = container.namespaceURI || null;\n type = container.tagName;\n namespace = getChildNamespace(ownNamespace, type);\n break;\n }\n }\n\n {\n var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n }\n\n function getChildHostContext(parentHostContext, type, rootContainerInstance) {\n {\n var parentHostContextDev = parentHostContext;\n var namespace = getChildNamespace(parentHostContextDev.namespace, type);\n var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n }\n\n function getPublicInstance(instance) {\n return instance;\n }\n\n function prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n var activeInstance = null;\n setEnabled(false);\n return activeInstance;\n }\n\n function resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n selectionInformation = null;\n }\n\n function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n var parentNamespace;\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n validateDOMNesting(type, null, hostContextDev.ancestorInfo);\n\n if (typeof props.children === 'string' || typeof props.children === 'number') {\n var string = '' + props.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n\n parentNamespace = hostContextDev.namespace;\n }\n var domElement = createElement(type, props, rootContainerInstance, parentNamespace);\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n return domElement;\n }\n\n function appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n }\n\n function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n setInitialProperties(domElement, type, props, rootContainerInstance);\n return shouldAutoFocusHostComponent(type, props);\n }\n\n function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n {\n var hostContextDev = hostContext;\n\n if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {\n var string = '' + newProps.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n }\n return diffProperties(domElement, type, oldProps, newProps);\n }\n\n function shouldSetTextContent(type, props) {\n 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;\n }\n\n function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n {\n var hostContextDev = hostContext;\n validateDOMNesting(null, text, hostContextDev.ancestorInfo);\n }\n var textNode = createTextNode(text, rootContainerInstance);\n precacheFiberNode(internalInstanceHandle, textNode);\n return textNode;\n } // if a component just imports ReactDOM (e.g. for findDOMNode).\n // Some environments might not have setTimeout or clearTimeout.\n\n\n var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\n var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\n var noTimeout = -1; // -------------------\n\n function commitMount(domElement, type, newProps, internalInstanceHandle) {\n // Despite the naming that might imply otherwise, this method only\n // fires if there is an `Update` effect scheduled during mounting.\n // This happens if `finalizeInitialChildren` returns `true` (which it\n // does to implement the `autoFocus` attribute on the client). But\n // there are also other cases when this might happen (such as patching\n // up text content during hydration mismatch). So we'll check this again.\n if (shouldAutoFocusHostComponent(type, newProps)) {\n domElement.focus();\n }\n }\n\n function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.\n\n updateProperties(domElement, updatePayload, type, oldProps, newProps);\n }\n\n function resetTextContent(domElement) {\n setTextContent(domElement, '');\n }\n\n function commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n }\n\n function appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n }\n\n function appendChildToContainer(container, child) {\n var parentNode;\n\n if (container.nodeType === COMMENT_NODE) {\n parentNode = container.parentNode;\n parentNode.insertBefore(child, container);\n } else {\n parentNode = container;\n parentNode.appendChild(child);\n } // This container might be used for a portal.\n // If something inside a portal is clicked, that click should bubble\n // through the React tree. However, on Mobile Safari the click would\n // never bubble through the *DOM* tree unless an ancestor with onclick\n // event exists. So we wouldn't see it and dispatch it.\n // This is why we ensure that non React root containers have inline onclick\n // defined.\n // https://github.com/facebook/react/issues/11918\n\n\n var reactRootContainer = container._reactRootContainer;\n\n if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(parentNode);\n }\n }\n\n function insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\n }\n\n function insertInContainerBefore(container, child, beforeChild) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.insertBefore(child, beforeChild);\n } else {\n container.insertBefore(child, beforeChild);\n }\n }\n\n function removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n }\n\n function removeChildFromContainer(container, child) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.removeChild(child);\n } else {\n container.removeChild(child);\n }\n }\n\n function hideInstance(instance) {\n // TODO: Does this work for all element types? What about MathML? Should we\n // pass host context to this method?\n instance = instance;\n var style = instance.style;\n\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n }\n\n function hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\n }\n\n function unhideInstance(instance, props) {\n instance = instance;\n var styleProp = props[STYLE$1];\n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n instance.style.display = dangerousStyleValue('display', display);\n }\n\n function unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n }\n\n function clearContainer(container) {\n if (container.nodeType === ELEMENT_NODE) {\n container.textContent = '';\n } else if (container.nodeType === DOCUMENT_NODE) {\n var body = container.body;\n\n if (body != null) {\n body.textContent = '';\n }\n }\n } // -------------------\n\n\n function canHydrateInstance(instance, type, props) {\n if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {\n return null;\n } // This has now been refined to an element node.\n\n\n return instance;\n }\n\n function canHydrateTextInstance(instance, text) {\n if (text === '' || instance.nodeType !== TEXT_NODE) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n return null;\n } // This has now been refined to a text node.\n\n\n return instance;\n }\n\n function isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n }\n\n function isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n }\n\n function getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n }\n\n return node;\n }\n\n function getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n }\n\n function getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n }\n\n function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n // get attached.\n\n updateFiberProps(instance, props);\n var parentNamespace;\n {\n var hostContextDev = hostContext;\n parentNamespace = hostContextDev.namespace;\n }\n return diffHydratedProperties(instance, type, props, parentNamespace);\n }\n\n function hydrateTextInstance(textInstance, text, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, textInstance);\n return diffHydratedText(textInstance, text);\n }\n\n function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n return getNextHydratableSibling(node);\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n depth++;\n }\n }\n\n node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\n\n\n return null;\n } // Returns the SuspenseInstance if this node is a direct child of a\n // SuspenseInstance. I.e. if its previous sibling is a Comment with\n // SUSPENSE_x_START_DATA. Otherwise, null.\n\n\n function getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n }\n\n function commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n }\n\n function commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n }\n\n function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {\n {\n warnForUnmatchedText(textInstance, text);\n }\n }\n\n function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForUnmatchedText(textInstance, text);\n }\n }\n\n function didNotHydrateContainerInstance(parentContainer, instance) {\n {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentContainer, instance);\n } else if (instance.nodeType === COMMENT_NODE) ;else {\n warnForDeletedHydratableText(parentContainer, instance);\n }\n }\n }\n\n function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentInstance, instance);\n } else if (instance.nodeType === COMMENT_NODE) ;else {\n warnForDeletedHydratableText(parentInstance, instance);\n }\n }\n }\n\n function didNotFindHydratableContainerInstance(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n }\n\n function didNotFindHydratableContainerTextInstance(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n }\n\n function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n }\n\n function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n }\n\n function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {\n if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;\n }\n\n var clientId = 0;\n\n function makeClientIdInDEV(warnOnAccessInDEV) {\n var id = 'r:' + (clientId++).toString(36);\n return {\n toString: function () {\n warnOnAccessInDEV();\n return id;\n },\n valueOf: function () {\n warnOnAccessInDEV();\n return id;\n }\n };\n }\n\n function isOpaqueHydratingObject(value) {\n return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;\n }\n\n function makeOpaqueHydratingObject(attemptToReadValue) {\n return {\n $$typeof: REACT_OPAQUE_ID_TYPE,\n toString: attemptToReadValue,\n valueOf: attemptToReadValue\n };\n }\n\n function preparePortalMount(portalInstance) {\n {\n listenToAllSupportedEvents(portalInstance);\n }\n }\n\n var randomKey = Math.random().toString(36).slice(2);\n var internalInstanceKey = '__reactFiber$' + randomKey;\n var internalPropsKey = '__reactProps$' + randomKey;\n var internalContainerInstanceKey = '__reactContainer$' + randomKey;\n var internalEventHandlersKey = '__reactEvents$' + randomKey;\n\n function precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n }\n\n function markContainerAsRoot(hostRoot, node) {\n node[internalContainerInstanceKey] = hostRoot;\n }\n\n function unmarkContainerAsRoot(node) {\n node[internalContainerInstanceKey] = null;\n }\n\n function isContainerMarkedAsRoot(node) {\n return !!node[internalContainerInstanceKey];\n } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n // If the target node is part of a hydrated or not yet rendered subtree, then\n // this may also return a SuspenseComponent or HostRoot to indicate that.\n // Conceptually the HostRoot fiber is a child of the Container node. So if you\n // pass the Container node as the targetNode, you will not actually get the\n // HostRoot back. To get to the HostRoot, you need to pass a child of it.\n // The same thing applies to Suspense boundaries.\n\n\n function getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n }\n /**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\n\n function getInstanceFromNode(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n }\n /**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\n\n function getNodeFromInstance(inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n } // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n\n\n {\n {\n throw Error(\"getNodeFromInstance: Invalid argument.\");\n }\n }\n }\n\n function getFiberCurrentPropsFromNode(node) {\n return node[internalPropsKey] || null;\n }\n\n function updateFiberProps(node, props) {\n node[internalPropsKey] = props;\n }\n\n function getEventListenerSet(node) {\n var elementListenerSet = node[internalEventHandlersKey];\n\n if (elementListenerSet === undefined) {\n elementListenerSet = node[internalEventHandlersKey] = new Set();\n }\n\n return elementListenerSet;\n }\n\n var loggedTypeFailures = {};\n var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\n function setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n }\n\n function checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n 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`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n 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);\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n error('Failed %s type: %s', location, error$1.message);\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n }\n\n var valueStack = [];\n var fiberStack;\n {\n fiberStack = [];\n }\n var index = -1;\n\n function createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n }\n\n function pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n error('Unexpected Fiber popped.');\n }\n }\n cursor.current = valueStack[index];\n valueStack[index] = null;\n {\n fiberStack[index] = null;\n }\n index--;\n }\n\n function push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n {\n fiberStack[index] = fiber;\n }\n cursor.current = value;\n }\n\n var warnedAboutMissingGetChildContext;\n {\n warnedAboutMissingGetChildContext = {};\n }\n var emptyContextObject = {};\n {\n Object.freeze(emptyContextObject);\n } // A cursor to the current merged context object on the stack.\n\n var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\n var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n // We use this to get access to the parent context after we have already\n // pushed the next context provider, and now need to merge their contexts.\n\n var previousContext = emptyContextObject;\n\n function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n {\n if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n // If the fiber is a context provider itself, when we read its context\n // we may have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n\n return contextStackCursor.current;\n }\n }\n\n function cacheContext(workInProgress, unmaskedContext, maskedContext) {\n {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n }\n }\n\n function getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n } // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n var instance = workInProgress.stateNode;\n\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n }\n }\n\n function hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n }\n\n function isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n }\n\n function popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n }\n\n function popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n }\n\n function pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (!(contextStackCursor.current === emptyContextObject)) {\n {\n throw Error(\"Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n }\n }\n\n function processChildContext(fiber, type, parentContext) {\n {\n var instance = fiber.stateNode;\n var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentName(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n {\n throw Error((getComponentName(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n }\n }\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\n }\n return _assign({}, parentContext, childContext);\n }\n }\n\n function pushContextProvider(workInProgress) {\n {\n var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n return true;\n }\n }\n\n function invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n\n if (!instance) {\n {\n throw Error(\"Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, type, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n }\n }\n\n function findCurrentUnmaskedContext(fiber) {\n {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {\n {\n throw Error(\"Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var node = fiber;\n\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n\n case ClassComponent:\n {\n var Component = node.type;\n\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n\n break;\n }\n }\n\n node = node.return;\n } while (node !== null);\n\n {\n {\n throw Error(\"Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n }\n\n var LegacyRoot = 0;\n var BlockingRoot = 1;\n var ConcurrentRoot = 2;\n var rendererID = null;\n var injectedHook = null;\n var hasLoggedError = false;\n var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\n\n function injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n\n if (!hook.supportsFiber) {\n {\n 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');\n } // DevTools exists, even though it doesn't support Fiber.\n\n return true;\n }\n\n try {\n rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n injectedHook = hook;\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n error('React instrumentation encountered an error: %s.', err);\n }\n } // DevTools exists\n\n\n return true;\n }\n\n function onScheduleRoot(root, children) {\n {\n if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n try {\n injectedHook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n\n function onCommitRoot(root, priorityLevel) {\n if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n try {\n var didError = (root.current.flags & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);\n } else {\n injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);\n }\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n\n function onCommitUnmount(fiber) {\n if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n try {\n injectedHook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n }\n\n var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,\n Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,\n Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,\n Scheduler_shouldYield = Scheduler.unstable_shouldYield,\n Scheduler_requestPaint = Scheduler.unstable_requestPaint,\n Scheduler_now$1 = Scheduler.unstable_now,\n Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,\n Scheduler_LowPriority = Scheduler.unstable_LowPriority,\n Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;\n {\n // Provide explicit error message when production+profiling bundle of e.g.\n // react-dom is used with production (non-profiling) bundle of\n // scheduler/tracing\n if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {\n {\n 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\");\n }\n }\n }\n var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use\n // ascending numbers so we can compare them like numbers. They start at 90 to\n // avoid clashing with Scheduler's priorities.\n\n var ImmediatePriority$1 = 99;\n var UserBlockingPriority$2 = 98;\n var NormalPriority$1 = 97;\n var LowPriority$1 = 96;\n var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.\n\n var NoPriority$1 = 90;\n var shouldYield = Scheduler_shouldYield;\n var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.\n Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};\n var syncQueue = null;\n var immediateQueueCallbackNode = null;\n var isFlushingSyncQueue = false;\n var initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.\n // This will be the case for modern browsers that support `performance.now`. In\n // older browsers, Scheduler falls back to `Date.now`, which returns a Unix\n // timestamp. In that case, subtract the module initialization time to simulate\n // the behavior of performance.now and keep our times small enough to fit\n // within 32 bits.\n // TODO: Consider lifting this into Scheduler.\n\n var now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {\n return Scheduler_now$1() - initialTimeMs$1;\n };\n\n function getCurrentPriorityLevel() {\n switch (Scheduler_getCurrentPriorityLevel()) {\n case Scheduler_ImmediatePriority:\n return ImmediatePriority$1;\n\n case Scheduler_UserBlockingPriority:\n return UserBlockingPriority$2;\n\n case Scheduler_NormalPriority:\n return NormalPriority$1;\n\n case Scheduler_LowPriority:\n return LowPriority$1;\n\n case Scheduler_IdlePriority:\n return IdlePriority$1;\n\n default:\n {\n {\n throw Error(\"Unknown priority level.\");\n }\n }\n }\n }\n\n function reactPriorityToSchedulerPriority(reactPriorityLevel) {\n switch (reactPriorityLevel) {\n case ImmediatePriority$1:\n return Scheduler_ImmediatePriority;\n\n case UserBlockingPriority$2:\n return Scheduler_UserBlockingPriority;\n\n case NormalPriority$1:\n return Scheduler_NormalPriority;\n\n case LowPriority$1:\n return Scheduler_LowPriority;\n\n case IdlePriority$1:\n return Scheduler_IdlePriority;\n\n default:\n {\n {\n throw Error(\"Unknown priority level.\");\n }\n }\n }\n }\n\n function runWithPriority$1(reactPriorityLevel, fn) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_runWithPriority(priorityLevel, fn);\n }\n\n function scheduleCallback(reactPriorityLevel, callback, options) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_scheduleCallback(priorityLevel, callback, options);\n }\n\n function scheduleSyncCallback(callback) {\n // Push this callback into an internal queue. We'll flush these either in\n // the next tick, or earlier if something calls `flushSyncCallbackQueue`.\n if (syncQueue === null) {\n syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.\n\n immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);\n } else {\n // Push onto existing queue. Don't need to schedule a callback because\n // we already scheduled one when we created the queue.\n syncQueue.push(callback);\n }\n\n return fakeCallbackNode;\n }\n\n function cancelCallback(callbackNode) {\n if (callbackNode !== fakeCallbackNode) {\n Scheduler_cancelCallback(callbackNode);\n }\n }\n\n function flushSyncCallbackQueue() {\n if (immediateQueueCallbackNode !== null) {\n var node = immediateQueueCallbackNode;\n immediateQueueCallbackNode = null;\n Scheduler_cancelCallback(node);\n }\n\n flushSyncCallbackQueueImpl();\n }\n\n function flushSyncCallbackQueueImpl() {\n if (!isFlushingSyncQueue && syncQueue !== null) {\n // Prevent re-entrancy.\n isFlushingSyncQueue = true;\n var i = 0;\n {\n try {\n var _isSync2 = true;\n var _queue = syncQueue;\n runWithPriority$1(ImmediatePriority$1, function () {\n for (; i < _queue.length; i++) {\n var callback = _queue[i];\n\n do {\n callback = callback(_isSync2);\n } while (callback !== null);\n }\n });\n syncQueue = null;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n if (syncQueue !== null) {\n syncQueue = syncQueue.slice(i + 1);\n } // Resume flushing in the next tick\n\n\n Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);\n throw error;\n } finally {\n isFlushingSyncQueue = false;\n }\n }\n }\n } // TODO: this is special because it gets imported during build.\n\n\n var ReactVersion = '17.0.2';\n var NoMode = 0;\n var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root\n // tag instead\n\n var BlockingMode = 2;\n var ConcurrentMode = 4;\n var ProfileMode = 8;\n var DebugTracingMode = 16;\n var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;\n var NoTransition = 0;\n\n function requestCurrentTransition() {\n return ReactCurrentBatchConfig.transition;\n }\n\n var ReactStrictModeWarnings = {\n recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n flushPendingUnsafeLifecycleWarnings: function () {},\n recordLegacyContextWarning: function (fiber, instance) {},\n flushLegacyContextWarning: function () {},\n discardPendingWarnings: function () {}\n };\n {\n var findStrictRoot = function (fiber) {\n var maybeStrictRoot = null;\n var node = fiber;\n\n while (node !== null) {\n if (node.mode & StrictMode) {\n maybeStrictRoot = node;\n }\n\n node = node.return;\n }\n\n return maybeStrictRoot;\n };\n\n var setToSortedString = function (set) {\n var array = [];\n set.forEach(function (value) {\n array.push(value);\n });\n return array.sort().join(', ');\n };\n\n var pendingComponentWillMountWarnings = [];\n var pendingUNSAFE_ComponentWillMountWarnings = [];\n var pendingComponentWillReceivePropsWarnings = [];\n var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n var pendingComponentWillUpdateWarnings = [];\n var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n var didWarnAboutUnsafeLifecycles = new Set();\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedup strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n\n if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n\n var UNSAFE_componentWillMountUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n\n var componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n\n var componentWillUpdateUniqueNames = new Set();\n\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n } // Finally, we flush all the warnings\n // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n 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);\n }\n\n if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n 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);\n }\n\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n 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);\n }\n\n if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n 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);\n }\n\n if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n 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);\n }\n\n if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n 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);\n }\n };\n\n var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\n\n if (strictRoot === null) {\n error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n return;\n } // Dedup strategy: Warn once per component.\n\n\n if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n if (warningsForRoot === undefined) {\n warningsForRoot = [];\n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n }\n\n warningsForRoot.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n\n try {\n setCurrentFiber(firstFiber);\n 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);\n } finally {\n resetCurrentFiber();\n }\n });\n };\n\n ReactStrictModeWarnings.discardPendingWarnings = function () {\n pendingComponentWillMountWarnings = [];\n pendingUNSAFE_ComponentWillMountWarnings = [];\n pendingComponentWillReceivePropsWarnings = [];\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n pendingComponentWillUpdateWarnings = [];\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n pendingLegacyContextWarning = new Map();\n };\n }\n\n function resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = _assign({}, baseProps);\n\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n } // Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n // Math.pow(2, 30) - 1\n // 0b111111111111111111111111111111\n\n\n var MAX_SIGNED_31_BIT_INT = 1073741823;\n var valueCursor = createCursor(null);\n var rendererSigil;\n {\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n }\n var currentlyRenderingFiber = null;\n var lastContextDependency = null;\n var lastContextWithAllBitsObserved = null;\n var isDisallowedContextReadInDEV = false;\n\n function resetContextDependencies() {\n // This is called right before React yields execution, to ensure `readContext`\n // cannot be called outside the render phase.\n currentlyRenderingFiber = null;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n {\n isDisallowedContextReadInDEV = false;\n }\n }\n\n function enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n }\n\n function exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n }\n\n function pushProvider(providerFiber, nextValue) {\n var context = providerFiber.type._context;\n {\n push(valueCursor, context._currentValue, providerFiber);\n context._currentValue = nextValue;\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n }\n\n function popProvider(providerFiber) {\n var currentValue = valueCursor.current;\n pop(valueCursor, providerFiber);\n var context = providerFiber.type._context;\n {\n context._currentValue = currentValue;\n }\n }\n\n function calculateChangedBits(context, newValue, oldValue) {\n if (objectIs(oldValue, newValue)) {\n // No change\n return 0;\n } else {\n var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n {\n if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {\n error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);\n }\n }\n return changedBits | 0;\n }\n }\n\n function scheduleWorkOnParentPath(parent, renderLanes) {\n // Update the child lanes of all the ancestors, including the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n } else {\n // Neither alternate was updated, which means the rest of the\n // ancestor path already has sufficient priority.\n break;\n }\n\n node = node.return;\n }\n }\n\n function propagateContextChange(workInProgress, context, changedBits, renderLanes) {\n var fiber = workInProgress.child;\n\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {\n // Match! Schedule an update on this fiber.\n if (fiber.tag === ClassComponent) {\n // Schedule a force update on the work-in-progress.\n var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));\n update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n // update to the current fiber, too, which means it will persist even if\n // this render is thrown away. Since it's a race condition, not sure it's\n // worth fixing.\n\n enqueueUpdate(fiber, update);\n }\n\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.\n\n list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n // dependency list.\n\n break;\n }\n\n dependency = dependency.next;\n }\n } else if (fiber.tag === ContextProvider) {\n // Don't scan deeper if this is a matching provider\n nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\n }\n\n if (nextFiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n nextFiber.return = fiber;\n } else {\n // No child. Traverse to next sibling.\n nextFiber = fiber;\n\n while (nextFiber !== null) {\n if (nextFiber === workInProgress) {\n // We're back to the root of this subtree. Exit.\n nextFiber = null;\n break;\n }\n\n var sibling = nextFiber.sibling;\n\n if (sibling !== null) {\n // Set the return pointer of the sibling to the work-in-progress fiber.\n sibling.return = nextFiber.return;\n nextFiber = sibling;\n break;\n } // No more siblings. Traverse up.\n\n\n nextFiber = nextFiber.return;\n }\n }\n\n fiber = nextFiber;\n }\n }\n\n function prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (includesSomeLane(dependencies.lanes, renderLanes)) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n\n dependencies.firstContext = null;\n }\n }\n }\n\n function readContext(context, observedBits) {\n {\n // This warning would fire if you read context inside a Hook like useMemo.\n // Unlike the class check below, it's not enforced in production for perf.\n if (isDisallowedContextReadInDEV) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n if (lastContextWithAllBitsObserved === context) ;else if (observedBits === false || observedBits === 0) ;else {\n var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.\n\n if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {\n // Observe all updates.\n lastContextWithAllBitsObserved = context;\n resolvedObservedBits = MAX_SIGNED_31_BIT_INT;\n } else {\n resolvedObservedBits = observedBits;\n }\n\n var contextItem = {\n context: context,\n observedBits: resolvedObservedBits,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (!(currentlyRenderingFiber !== null)) {\n {\n throw Error(\"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\");\n }\n } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n currentlyRenderingFiber.dependencies = {\n lanes: NoLanes,\n firstContext: contextItem,\n responders: null\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n return context._currentValue;\n }\n\n var UpdateState = 0;\n var ReplaceState = 1;\n var ForceUpdate = 2;\n var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n // It should only be read right after calling `processUpdateQueue`, via\n // `checkHasForceUpdateAfterProcessing`.\n\n var hasForceUpdate = false;\n var didWarnUpdateInsideUpdate;\n var currentlyProcessingQueue;\n {\n didWarnUpdateInsideUpdate = false;\n currentlyProcessingQueue = null;\n }\n\n function initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null\n },\n effects: null\n };\n fiber.updateQueue = queue;\n }\n\n function cloneUpdateQueue(current, workInProgress) {\n // Clone the update queue from current. Unless it's already a clone.\n var queue = workInProgress.updateQueue;\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: currentQueue.firstBaseUpdate,\n lastBaseUpdate: currentQueue.lastBaseUpdate,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = clone;\n }\n }\n\n function createUpdate(eventTime, lane) {\n var update = {\n eventTime: eventTime,\n lane: lane,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n return update;\n }\n\n function enqueueUpdate(fiber, update) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update;\n {\n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n didWarnUpdateInsideUpdate = true;\n }\n }\n }\n\n function enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n // Captured updates are updates that are thrown by a child during the render\n // phase. They should be discarded if the render is aborted. Therefore,\n // we should only put them on the work-in-progress queue, not the current one.\n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n // The work-in-progress queue is the same as current. This happens when\n // we bail out on a parent fiber that then captures an error thrown by\n // a child. Since we want to append the update only to the work-in\n // -progress queue, we need to clone the updates. We usually clone during\n // processUpdateQueue, but that didn't happen in this case because we\n // skipped over the parent when we bailed out.\n var newFirst = null;\n var newLast = null;\n var firstBaseUpdate = queue.firstBaseUpdate;\n\n if (firstBaseUpdate !== null) {\n // Loop through the updates and clone them.\n var update = firstBaseUpdate;\n\n do {\n var clone = {\n eventTime: update.eventTime,\n lane: update.lane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLast === null) {\n newFirst = newLast = clone;\n } else {\n newLast.next = clone;\n newLast = clone;\n }\n\n update = update.next;\n } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n if (newLast === null) {\n newFirst = newLast = capturedUpdate;\n } else {\n newLast.next = capturedUpdate;\n newLast = capturedUpdate;\n }\n } else {\n // There are no base updates.\n newFirst = newLast = capturedUpdate;\n }\n\n queue = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = queue;\n return;\n }\n } // Append the update to the end of the list.\n\n\n var lastBaseUpdate = queue.lastBaseUpdate;\n\n if (lastBaseUpdate === null) {\n queue.firstBaseUpdate = capturedUpdate;\n } else {\n lastBaseUpdate.next = capturedUpdate;\n }\n\n queue.lastBaseUpdate = capturedUpdate;\n }\n\n function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n var nextState = payload.call(instance, prevState, nextProps);\n {\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n payload.call(instance, prevState, nextProps);\n } finally {\n reenableLogs();\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n return nextState;\n } // State object\n\n\n return payload;\n }\n\n case CaptureUpdate:\n {\n workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n partialState = _payload.call(instance, prevState, nextProps);\n {\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n _payload.call(instance, prevState, nextProps);\n } finally {\n reenableLogs();\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\n }\n\n if (partialState === null || partialState === undefined) {\n // Null and undefined are treated as no-ops.\n return prevState;\n } // Merge the partial state and the previous state.\n\n\n return _assign({}, prevState, partialState);\n }\n\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n\n return prevState;\n }\n\n function processUpdateQueue(workInProgress, props, instance, renderLanes) {\n // This is always non-null on a ClassComponent or HostRoot\n var queue = workInProgress.updateQueue;\n hasForceUpdate = false;\n {\n currentlyProcessingQueue = queue.shared;\n }\n var firstBaseUpdate = queue.firstBaseUpdate;\n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n // and last so that it's non-circular.\n\n var lastPendingUpdate = pendingQueue;\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null; // Append pending updates to base queue\n\n if (lastBaseUpdate === null) {\n firstBaseUpdate = firstPendingUpdate;\n } else {\n lastBaseUpdate.next = firstPendingUpdate;\n }\n\n lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n // we need to transfer the updates to that queue, too. Because the base\n // queue is a singly-linked list with no cycles, we can append to both\n // lists and take advantage of structural sharing.\n // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // This is always non-null on a ClassComponent or HostRoot\n var currentQueue = current.updateQueue;\n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n if (currentLastBaseUpdate !== lastBaseUpdate) {\n if (currentLastBaseUpdate === null) {\n currentQueue.firstBaseUpdate = firstPendingUpdate;\n } else {\n currentLastBaseUpdate.next = firstPendingUpdate;\n }\n\n currentQueue.lastBaseUpdate = lastPendingUpdate;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (firstBaseUpdate !== null) {\n // Iterate through the list of updates to compute the result.\n var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n // from the original lanes.\n\n var newLanes = NoLanes;\n var newBaseState = null;\n var newFirstBaseUpdate = null;\n var newLastBaseUpdate = null;\n var update = firstBaseUpdate;\n\n do {\n var updateLane = update.lane;\n var updateEventTime = update.eventTime;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n eventTime: updateEventTime,\n lane: updateLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLastBaseUpdate === null) {\n newFirstBaseUpdate = newLastBaseUpdate = clone;\n newBaseState = newState;\n } else {\n newLastBaseUpdate = newLastBaseUpdate.next = clone;\n } // Update the remaining priority in the queue.\n\n\n newLanes = mergeLanes(newLanes, updateLane);\n } else {\n // This update does have sufficient priority.\n if (newLastBaseUpdate !== null) {\n var _clone = {\n eventTime: updateEventTime,\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n } // Process this update.\n\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null) {\n workInProgress.flags |= Callback;\n var effects = queue.effects;\n\n if (effects === null) {\n queue.effects = [update];\n } else {\n effects.push(update);\n }\n }\n }\n\n update = update.next;\n\n if (update === null) {\n pendingQueue = queue.shared.pending;\n\n if (pendingQueue === null) {\n break;\n } else {\n // An update was scheduled from inside a reducer. Add the new\n // pending updates to the end of the list and keep processing.\n var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n // unravel them when transferring them to the base queue.\n\n var _firstPendingUpdate = _lastPendingUpdate.next;\n _lastPendingUpdate.next = null;\n update = _firstPendingUpdate;\n queue.lastBaseUpdate = _lastPendingUpdate;\n queue.shared.pending = null;\n }\n }\n } while (true);\n\n if (newLastBaseUpdate === null) {\n newBaseState = newState;\n }\n\n queue.baseState = newBaseState;\n queue.firstBaseUpdate = newFirstBaseUpdate;\n queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.\n // This should be fine because the only two other things that contribute to\n // expiration time are props and context. We're already in the middle of the\n // begin phase by the time we start processing the queue, so we've already\n // dealt with the props. Context in components that specify\n // shouldComponentUpdate is tricky; but we'll have to account for\n // that regardless.\n\n markSkippedUpdateLanes(newLanes);\n workInProgress.lanes = newLanes;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n }\n\n function callCallback(callback, context) {\n if (!(typeof callback === 'function')) {\n {\n throw Error(\"Invalid argument passed as callback. Expected a function. Instead received: \" + callback);\n }\n }\n\n callback.call(context);\n }\n\n function resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n }\n\n function checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n }\n\n function commitUpdateQueue(finishedWork, finishedQueue, instance) {\n // Commit the effects\n var effects = finishedQueue.effects;\n finishedQueue.effects = null;\n\n if (effects !== null) {\n for (var i = 0; i < effects.length; i++) {\n var effect = effects[i];\n var callback = effect.callback;\n\n if (callback !== null) {\n effect.callback = null;\n callCallback(callback, instance);\n }\n }\n }\n }\n\n var fakeInternalInstance = {};\n var isArray = Array.isArray; // React.Component uses a shared frozen object by default.\n // We'll use it to determine whether we need to initialize legacy refs.\n\n var emptyRefsObject = new React.Component().refs;\n var didWarnAboutStateAssignmentForComponent;\n var didWarnAboutUninitializedState;\n var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\n var didWarnAboutLegacyLifecyclesAndDerivedState;\n var didWarnAboutUndefinedDerivedState;\n var warnOnUndefinedDerivedState;\n var warnOnInvalidCallback;\n var didWarnAboutDirectlyAssigningPropsToState;\n var didWarnAboutContextTypeAndContextTypes;\n var didWarnAboutInvalidateContextType;\n {\n didWarnAboutStateAssignmentForComponent = new Set();\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n var didWarnOnInvalidCallback = new Set();\n\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + '_' + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n };\n\n warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentName(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }; // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n\n\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n {\n {\n throw Error(\"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).\");\n }\n }\n }\n });\n Object.freeze(fakeInternalInstance);\n }\n\n function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n {\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n getDerivedStateFromProps(nextProps, prevState);\n } finally {\n reenableLogs();\n }\n }\n }\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);\n workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n // base state.\n\n if (workInProgress.lanes === NoLanes) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n }\n\n var classComponentUpdater = {\n isMounted: isMounted,\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'setState');\n }\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ReplaceState;\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'replaceState');\n }\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n },\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ForceUpdate;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'forceUpdate');\n }\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n }\n };\n\n function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n\n if (typeof instance.shouldComponentUpdate === 'function') {\n {\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n instance.shouldComponentUpdate(newProps, newState, nextContext);\n } finally {\n reenableLogs();\n }\n }\n }\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n {\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');\n }\n }\n return shouldUpdate;\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n }\n\n function checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n {\n var name = getComponentName(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var _state = instance.state;\n\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n }\n\n function adoptClassInstance(workInProgress, instance) {\n instance.updater = classComponentUpdater;\n workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n set(instance, workInProgress);\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n }\n\n function constructClassInstance(workInProgress, ctor, props) {\n var isLegacyContextConsumer = false;\n var unmaskedContext = emptyContextObject;\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n var contextTypes = ctor.contextTypes;\n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n } // Instantiate twice to help detect side-effects.\n\n\n {\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n new ctor(props, context); // eslint-disable-line no-new\n } finally {\n reenableLogs();\n }\n }\n }\n var instance = new ctor(props, context);\n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n adoptClassInstance(workInProgress, instance);\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentName(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n 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 : '');\n }\n }\n }\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n if (isLegacyContextConsumer) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n }\n\n function callComponentWillMount(workInProgress, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');\n }\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n }\n\n function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentName(workInProgress.type) || 'Component';\n\n if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n didWarnAboutStateAssignmentForComponent.add(componentName);\n error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n }\n }\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n } // Invokes the mount life-cycles on a previously never rendered instance.\n\n\n function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = emptyRefsObject;\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n {\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n }\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n instance.state = workInProgress.memoizedState;\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n }\n\n function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n var oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n } // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\n function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var unresolvedOldProps = workInProgress.memoizedProps;\n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n instance.props = oldProps;\n var unresolvedNewProps = workInProgress.pendingProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n }\n\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.flags |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.flags |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n }\n\n var didWarnAboutMaps;\n var didWarnAboutGenerators;\n var didWarnAboutStringRefs;\n var ownerHasKeyUseWarning;\n var ownerHasFunctionTypeWarning;\n\n var warnForMissingKey = function (child, returnFiber) {};\n\n {\n didWarnAboutMaps = false;\n didWarnAboutGenerators = false;\n didWarnAboutStringRefs = {};\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n ownerHasKeyUseWarning = {};\n ownerHasFunctionTypeWarning = {};\n\n warnForMissingKey = function (child, returnFiber) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n\n if (!(typeof child._store === 'object')) {\n {\n throw Error(\"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n child._store.validated = true;\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (ownerHasKeyUseWarning[componentName]) {\n return;\n }\n\n ownerHasKeyUseWarning[componentName] = true;\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n };\n }\n var isArray$1 = Array.isArray;\n\n function coerceRef(returnFiber, current, element) {\n var mixedRef = element.ref;\n\n if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n {\n // TODO: Clean this up once we turn on the string ref warning for\n // everyone, because the strict mode case will no longer be relevant\n if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs\n // because these cannot be automatically converted to an arrow function\n // using a codemod. Therefore, we don't have to warn about string refs again.\n !(element._owner && element._self && element._owner.stateNode !== element._self)) {\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n {\n 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);\n }\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n\n if (element._owner) {\n var owner = element._owner;\n var inst;\n\n if (owner) {\n var ownerFiber = owner;\n\n if (!(ownerFiber.tag === ClassComponent)) {\n {\n 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\");\n }\n }\n\n inst = ownerFiber.stateNode;\n }\n\n if (!inst) {\n {\n throw Error(\"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n return current.ref;\n }\n\n var ref = function (value) {\n var refs = inst.refs;\n\n if (refs === emptyRefsObject) {\n // This is a lazy pooled frozen object, so we need to initialize.\n refs = inst.refs = {};\n }\n\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n\n ref._stringRef = stringRef;\n return ref;\n } else {\n if (!(typeof mixedRef === 'string')) {\n {\n throw Error(\"Expected ref to be a function, a string, an object returned by React.createRef(), or null.\");\n }\n }\n\n if (!element._owner) {\n {\n 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.\");\n }\n }\n }\n }\n\n return mixedRef;\n }\n\n function throwOnInvalidObjectType(returnFiber, newChild) {\n if (returnFiber.type !== 'textarea') {\n {\n {\n 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.\");\n }\n }\n }\n }\n\n function warnOnFunctionType(returnFiber) {\n {\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (ownerHasFunctionTypeWarning[componentName]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[componentName] = true;\n 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.');\n }\n } // We avoid inlining this to avoid potential deopts from using try/catch.\n // to be able to optimize each path individually by branching early. This needs\n // a compiler or we can do it manually. Helpers that don't need this branching\n // live outside of this function.\n\n\n function ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element)) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error(\"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error(\"An iterable object provided no iterator.\");\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n }\n\n break;\n }\n\n case Block: // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element)) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n 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.\");\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n }\n\n var reconcileChildFibers = ChildReconciler(true);\n var mountChildFibers = ChildReconciler(false);\n\n function cloneChildFibers(current, workInProgress) {\n if (!(current === null || workInProgress.child === current.child)) {\n {\n throw Error(\"Resuming work not yet implemented.\");\n }\n }\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n\n newChild.sibling = null;\n } // Reset a workInProgress child set to prepare it for a second pass.\n\n\n function resetChildFibers(workInProgress, lanes) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, lanes);\n child = child.sibling;\n }\n }\n\n var NO_CONTEXT = {};\n var contextStackCursor$1 = createCursor(NO_CONTEXT);\n var contextFiberStackCursor = createCursor(NO_CONTEXT);\n var rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\n function requiredContext(c) {\n if (!(c !== NO_CONTEXT)) {\n {\n throw Error(\"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n return c;\n }\n\n function getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n }\n\n function pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n // However, we can't just call getRootHostContext() and push it because\n // we'd have a different number of entries on the stack depending on\n // whether getRootHostContext() throws somewhere in renderer code or not.\n // So we push an empty value first. This lets us safely unwind on errors.\n\n push(contextStackCursor$1, NO_CONTEXT, fiber);\n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n pop(contextStackCursor$1, fiber);\n push(contextStackCursor$1, nextRootContext, fiber);\n }\n\n function popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n }\n\n function getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\n }\n\n function pushHostContext(fiber) {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n var context = requiredContext(contextStackCursor$1.current);\n var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n if (context === nextContext) {\n return;\n } // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\n }\n\n function popHostContext(fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n if (contextFiberStackCursor.current !== fiber) {\n return;\n }\n\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n }\n\n var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is\n // inherited deeply down the subtree. The upper bits only affect\n // this immediate suspense boundary and gets reset each new\n // boundary or suspense list.\n\n var SubtreeSuspenseContextMask = 1; // Subtree Flags:\n // InvisibleParentSuspenseContext indicates that one of our parent Suspense\n // boundaries is not currently showing visible main content.\n // Either because it is already showing a fallback or is not mounted at all.\n // We can use this to determine if it is desirable to trigger a fallback at\n // the parent. If not, then we might need to trigger undesirable boundaries\n // and/or suspend the commit to avoid hiding the parent content.\n\n var InvisibleParentSuspenseContext = 1; // Shallow Flags:\n // ForceSuspenseFallback can be used by SuspenseList to force newly added\n // items into their fallback state during one of the render passes.\n\n var ForceSuspenseFallback = 2;\n var suspenseStackCursor = createCursor(DefaultSuspenseContext);\n\n function hasSuspenseContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n }\n\n function setDefaultShallowSuspenseContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n }\n\n function setShallowSuspenseContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n }\n\n function addSubtreeSuspenseContext(parentContext, subtreeContext) {\n return parentContext | subtreeContext;\n }\n\n function pushSuspenseContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n }\n\n function popSuspenseContext(fiber) {\n pop(suspenseStackCursor, fiber);\n }\n\n function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {\n // If it was the primary children that just suspended, capture and render the\n // fallback. Otherwise, don't capture and bubble to the next boundary.\n var nextState = workInProgress.memoizedState;\n\n if (nextState !== null) {\n if (nextState.dehydrated !== null) {\n // A dehydrated boundary always captures.\n return true;\n }\n\n return false;\n }\n\n var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.\n\n if (props.fallback === undefined) {\n return false;\n } // Regular boundaries always capture.\n\n\n if (props.unstable_avoidThisFallback !== true) {\n return true;\n } // If it's a boundary we should avoid, then we prefer to bubble up to the\n // parent boundary if it is currently invisible.\n\n\n if (hasInvisibleParent) {\n return false;\n } // If the parent is not able to handle it, we must handle it.\n\n\n return true;\n }\n\n function findFirstSuspended(row) {\n var node = row;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n var dehydrated = state.dehydrated;\n\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n // keep track of whether it suspended or not.\n node.memoizedProps.revealOrder !== undefined) {\n var didSuspend = (node.flags & DidCapture) !== NoFlags;\n\n if (didSuspend) {\n return node;\n }\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === row) {\n return null;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n\n return null;\n }\n\n var NoFlags$1 =\n /* */\n 0; // Represents whether effect should fire.\n\n var HasEffect =\n /* */\n 1; // Represents the phase in which the effect (not the clean-up) fires.\n\n var Layout =\n /* */\n 2;\n var Passive$1 =\n /* */\n 4; // This may have been an insertion or a hydration.\n\n var hydrationParentFiber = null;\n var nextHydratableInstance = null;\n var isHydrating = false;\n\n function enterHydrationState(fiber) {\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChild(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n return true;\n }\n\n function deleteHydratableInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);\n break;\n\n case HostComponent:\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);\n break;\n }\n }\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,\n // these children are not part of the reconciliation list of children.\n // Even if we abort and rereconcile the children, that will try to hydrate\n // again and the nodes are still in the host tree so these will be\n // recreated.\n\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n }\n\n function insertNonHydratedInstance(returnFiber, fiber) {\n fiber.flags = fiber.flags & ~Hydrating | Placement;\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n\n switch (fiber.tag) {\n case HostComponent:\n var type = fiber.type;\n var props = fiber.pendingProps;\n didNotFindHydratableContainerInstance(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableContainerTextInstance(parentContainer, text);\n break;\n }\n\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n switch (fiber.tag) {\n case HostComponent:\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);\n break;\n\n case HostText:\n var _text = fiber.pendingProps;\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);\n break;\n\n case SuspenseComponent:\n didNotFindHydratableSuspenseInstance(parentType, parentProps);\n break;\n }\n\n break;\n }\n\n default:\n return;\n }\n }\n }\n\n function tryHydrate(fiber, nextInstance) {\n switch (fiber.tag) {\n case HostComponent:\n {\n var type = fiber.type;\n var props = fiber.pendingProps;\n var instance = canHydrateInstance(nextInstance, type);\n\n if (instance !== null) {\n fiber.stateNode = instance;\n return true;\n }\n\n return false;\n }\n\n case HostText:\n {\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text);\n\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n return true;\n }\n\n return false;\n }\n\n case SuspenseComponent:\n {\n return false;\n }\n\n default:\n return false;\n }\n }\n\n function tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrate(fiber, nextInstance)) {\n // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n\n if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);\n }\n\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(nextInstance);\n }\n\n function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n var instance = fiber.stateNode;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.\n\n fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update.\n\n if (updatePayload !== null) {\n return true;\n }\n\n return false;\n }\n\n function prepareToHydrateHostTextInstance(fiber) {\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n {\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);\n break;\n }\n }\n }\n }\n }\n return shouldUpdate;\n }\n\n function skipPastDehydratedSuspenseInstance(fiber) {\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n {\n throw Error(\"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n }\n\n function popToNextHostParent(fiber) {\n var parent = fiber.return;\n\n while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n parent = parent.return;\n }\n\n hydrationParentFiber = parent;\n }\n\n function popHydrationState(fiber) {\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n }\n\n var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.\n // We only do this deeper than head and body since they tend to have random\n // other nodes in them. We also ignore components with pure text content in\n // side of them.\n // TODO: Better heuristic.\n\n if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n\n popToNextHostParent(fiber);\n\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n\n return true;\n }\n\n function resetHydrationState() {\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n }\n\n function getIsHydrating() {\n return isHydrating;\n } // and should be reset before starting a new render.\n // This tracks which mutable sources need to be reset after a render.\n\n\n var workInProgressSources = [];\n var rendererSigil$1;\n {\n // Used to detect multiple renderers using the same mutable source.\n rendererSigil$1 = {};\n }\n\n function markSourceAsDirty(mutableSource) {\n workInProgressSources.push(mutableSource);\n }\n\n function resetWorkInProgressVersions() {\n for (var i = 0; i < workInProgressSources.length; i++) {\n var mutableSource = workInProgressSources[i];\n {\n mutableSource._workInProgressVersionPrimary = null;\n }\n }\n\n workInProgressSources.length = 0;\n }\n\n function getWorkInProgressVersion(mutableSource) {\n {\n return mutableSource._workInProgressVersionPrimary;\n }\n }\n\n function setWorkInProgressVersion(mutableSource, version) {\n {\n mutableSource._workInProgressVersionPrimary = version;\n }\n workInProgressSources.push(mutableSource);\n }\n\n function warnAboutMultipleRenderersDEV(mutableSource) {\n {\n {\n if (mutableSource._currentPrimaryRenderer == null) {\n mutableSource._currentPrimaryRenderer = rendererSigil$1;\n } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {\n error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');\n }\n }\n }\n } // Eager reads the version of a mutable source and stores it on the root.\n\n\n var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\n var didWarnAboutMismatchedHooksForComponent;\n var didWarnAboutUseOpaqueIdentifier;\n {\n didWarnAboutUseOpaqueIdentifier = {};\n didWarnAboutMismatchedHooksForComponent = new Set();\n } // These are set right before calling the component.\n\n var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from\n // the work-in-progress hook.\n\n var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n // current hook list is the list that belongs to the current fiber. The\n // work-in-progress hook list is a new list that will be added to the\n // work-in-progress fiber.\n\n var currentHook = null;\n var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n // does not get reset if we do another render pass; only when we're completely\n // finished evaluating this component. This is an optimization so we know\n // whether we need to clear render phase updates after a throw.\n\n var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This\n // gets reset after each attempt.\n // TODO: Maybe there's some way to consolidate this with\n // `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\n var didScheduleRenderPhaseUpdateDuringThisPass = false;\n var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\n var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n // The list stores the order of hooks used during the initial render (mount).\n // Subsequent renders (updates) reference this list.\n\n var hookTypesDev = null;\n var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n // the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n // When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\n var ignorePreviousDependencies = false;\n\n function mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n }\n\n function updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n }\n\n function checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !Array.isArray(deps)) {\n // Verify deps, but only on mount to avoid extra checks.\n // It's unlikely their type would change as usually you define them inline.\n error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n }\n }\n }\n\n function warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentName(currentlyRenderingFiber$1.type);\n\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\n\n for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n var oldHookName = hookTypesDev[i];\n var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n // lol @ IE not supporting String#repeat\n\n while (row.length < secondColumnStart) {\n row += ' ';\n }\n\n row += newHookName + '\\n';\n table += row;\n }\n\n 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);\n }\n }\n }\n }\n\n function throwInvalidHookError() {\n {\n {\n 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.\");\n }\n }\n }\n\n function areHookInputsEqual(nextDeps, prevDeps) {\n {\n if (ignorePreviousDependencies) {\n // Only true when this component is being hot reloaded.\n return false;\n }\n }\n\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n }\n }\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n }\n\n function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber$1 = workInProgress;\n {\n hookTypesDev = current !== null ? current._debugHookTypes : null;\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = NoLanes; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // TODO Warn if no hooks are used at all during mount, then some are used during update.\n // Currently we will identify the update render as a mount because memoizedState === null.\n // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n // so memoizedState would be null during updates and mounts.\n\n {\n if (current !== null && current.memoizedState !== null) {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;\n } else if (hookTypesDev !== null) {\n // This dispatcher handles an edge case where a component is updating,\n // but no stateful hooks have been used.\n // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n // This dispatcher does that.\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n }\n var children = Component(props, secondArg); // Check if there was a render phase update\n\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\n // Keep rendering in a loop for as long as render phase updates continue to\n // be scheduled. Use a counter to prevent infinite loops.\n var numberOfReRenders = 0;\n\n do {\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n\n if (!(numberOfReRenders < RE_RENDER_LIMIT)) {\n {\n throw Error(\"Too many re-renders. React limits the number of renders to prevent an infinite loop.\");\n }\n }\n\n numberOfReRenders += 1;\n {\n // Even when hot reloading, allow dependencies to stabilize\n // after first render to prevent infinite render phase updates.\n ignorePreviousDependencies = false;\n } // Start over from the beginning of the list\n\n currentHook = null;\n workInProgressHook = null;\n workInProgress.updateQueue = null;\n {\n // Also validate hook order for cascading updates.\n hookTypesUpdateIndexDev = -1;\n }\n ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n } // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n\n\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n {\n workInProgress._debugHookTypes = hookTypesDev;\n } // This check uses currentHook so that it works the same in DEV and prod bundles.\n // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n }\n didScheduleRenderPhaseUpdate = false;\n\n if (!!didRenderTooFewHooks) {\n {\n throw Error(\"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\");\n }\n }\n\n return children;\n }\n\n function bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.flags &= ~(Passive | Update);\n current.lanes = removeLanes(current.lanes, lanes);\n }\n\n function resetHooksAfterThrow() {\n // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n if (didScheduleRenderPhaseUpdate) {\n // There were render phase updates. These are only valid for this render\n // phase, which we are now aborting. Remove the updates from the queues so\n // they do not persist to the next render. Do not remove updates from hooks\n // that weren't processed.\n //\n // Only reset the updates from the queue if it has a clone. If it does\n // not have a clone, that means it wasn't processed, and the updates were\n // scheduled before we entered the render phase.\n var hook = currentlyRenderingFiber$1.memoizedState;\n\n while (hook !== null) {\n var queue = hook.queue;\n\n if (queue !== null) {\n queue.pending = null;\n }\n\n hook = hook.next;\n }\n\n didScheduleRenderPhaseUpdate = false;\n }\n\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n isUpdatingOpaqueValueInRenderPhase = false;\n }\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n }\n\n function mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n } else {\n // Append to the end of the list\n workInProgressHook = workInProgressHook.next = hook;\n }\n\n return workInProgressHook;\n }\n\n function updateWorkInProgressHook() {\n // This function is used both for updates and for re-renders triggered by a\n // render phase update. It assumes there is either a current hook we can\n // clone, or a work-in-progress hook from a previous render pass that we can\n // use as a base. When we reach the end of the base list, we must switch to\n // the dispatcher used for mounts.\n var nextCurrentHook;\n\n if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n\n var nextWorkInProgressHook;\n\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\n }\n\n if (nextWorkInProgressHook !== null) {\n // There's already a work-in-progress. Reuse it.\n workInProgressHook = nextWorkInProgressHook;\n nextWorkInProgressHook = workInProgressHook.next;\n currentHook = nextCurrentHook;\n } else {\n // Clone from the current hook.\n if (!(nextCurrentHook !== null)) {\n {\n throw Error(\"Rendered more hooks than during the previous render.\");\n }\n }\n\n currentHook = nextCurrentHook;\n var newHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list.\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n } else {\n // Append to the end of the list.\n workInProgressHook = workInProgressHook.next = newHook;\n }\n }\n\n return workInProgressHook;\n }\n\n function createFunctionComponentUpdateQueue() {\n return {\n lastEffect: null\n };\n }\n\n function basicStateReducer(state, action) {\n // $FlowFixMe: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n }\n\n function mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n\n if (init !== undefined) {\n initialState = init(initialArg);\n } else {\n initialState = initialArg;\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n }\n\n function updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error(\"Should have a queue. This is likely a bug in React. Please file an issue.\");\n }\n }\n\n queue.lastRenderedReducer = reducer;\n var current = currentHook; // The last rebase update that is NOT part of the base state.\n\n var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n {\n if (current.baseQueue !== baseQueue) {\n // Internal invariant that should never happen, but feasibly could in\n // the future if we implement resuming, or some form of that.\n error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n }\n }\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n\n if (baseQueue !== null) {\n // We have a queue to process.\n var first = baseQueue.next;\n var newState = current.baseState;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n var update = first;\n\n do {\n var updateLane = update.lane;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n lane: updateLane,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n markSkippedUpdateLanes(updateLane);\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Process this update.\n\n\n if (update.eagerReducer === reducer) {\n // If this update was processed eagerly, and its reducer matches the\n // current reducer, we can use the eagerly computed state.\n newState = update.eagerState;\n } else {\n var action = update.action;\n newState = reducer(newState, action);\n }\n }\n\n update = update.next;\n } while (update !== null && update !== first);\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n } // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n }\n\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n }\n\n function rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error(\"Should have a queue. This is likely a bug in React. Please file an issue.\");\n }\n }\n\n queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n // work-in-progress hook.\n\n var dispatch = queue.dispatch;\n var lastRenderPhaseUpdate = queue.pending;\n var newState = hook.memoizedState;\n\n if (lastRenderPhaseUpdate !== null) {\n // The queue doesn't persist past this render pass.\n queue.pending = null;\n var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n newState = reducer(newState, action);\n update = update.next;\n } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n // the base state unless the queue is empty.\n // TODO: Not sure if this is the desired semantics, but it's what we\n // do for gDSFP. I can't remember why.\n\n if (hook.baseQueue === null) {\n hook.baseState = newState;\n }\n\n queue.lastRenderedState = newState;\n }\n\n return [newState, dispatch];\n }\n\n function readFromUnsubcribedMutableSource(root, source, getSnapshot) {\n {\n warnAboutMultipleRenderersDEV(source);\n }\n var getVersion = source._getVersion;\n var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?\n\n var isSafeToReadFromSource = false; // Check the version first.\n // If this render has already been started with a specific version,\n // we can use it alone to determine if we can safely read from the source.\n\n var currentRenderVersion = getWorkInProgressVersion(source);\n\n if (currentRenderVersion !== null) {\n // It's safe to read if the store hasn't been mutated since the last time\n // we read something.\n isSafeToReadFromSource = currentRenderVersion === version;\n } else {\n // If there's no version, then this is the first time we've read from the\n // source during the current render pass, so we need to do a bit more work.\n // What we need to determine is if there are any hooks that already\n // subscribed to the source, and if so, whether there are any pending\n // mutations that haven't been synchronized yet.\n //\n // If there are no pending mutations, then `root.mutableReadLanes` will be\n // empty, and we know we can safely read.\n //\n // If there *are* pending mutations, we may still be able to safely read\n // if the currently rendering lanes are inclusive of the pending mutation\n // lanes, since that guarantees that the value we're about to read from\n // the source is consistent with the values that we read during the most\n // recent mutation.\n isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);\n\n if (isSafeToReadFromSource) {\n // If it's safe to read from this source during the current render,\n // store the version in case other components read from it.\n // A changed version number will let those components know to throw and restart the render.\n setWorkInProgressVersion(source, version);\n }\n }\n\n if (isSafeToReadFromSource) {\n var snapshot = getSnapshot(source._source);\n {\n if (typeof snapshot === 'function') {\n error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');\n }\n }\n return snapshot;\n } else {\n // This handles the special case of a mutable source being shared between renderers.\n // In that case, if the source is mutated between the first and second renderer,\n // The second renderer don't know that it needs to reset the WIP version during unwind,\n // (because the hook only marks sources as dirty if it's written to their WIP version).\n // That would cause this tear check to throw again and eventually be visible to the user.\n // We can avoid this infinite loop by explicitly marking the source as dirty.\n //\n // This can lead to tearing in the first renderer when it resumes,\n // but there's nothing we can do about that (short of throwing here and refusing to continue the render).\n markSourceAsDirty(source);\n {\n {\n throw Error(\"Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.\");\n }\n }\n }\n }\n\n function useMutableSource(hook, source, getSnapshot, subscribe) {\n var root = getWorkInProgressRoot();\n\n if (!(root !== null)) {\n {\n throw Error(\"Expected a work-in-progress root. This is a bug in React. Please file an issue.\");\n }\n }\n\n var getVersion = source._getVersion;\n var version = getVersion(source._source);\n var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const\n\n var _dispatcher$useState = dispatcher.useState(function () {\n return readFromUnsubcribedMutableSource(root, source, getSnapshot);\n }),\n currentSnapshot = _dispatcher$useState[0],\n setSnapshot = _dispatcher$useState[1];\n\n var snapshot = currentSnapshot; // Grab a handle to the state hook as well.\n // We use it to clear the pending update queue if we have a new source.\n\n var stateHook = workInProgressHook;\n var memoizedState = hook.memoizedState;\n var refs = memoizedState.refs;\n var prevGetSnapshot = refs.getSnapshot;\n var prevSource = memoizedState.source;\n var prevSubscribe = memoizedState.subscribe;\n var fiber = currentlyRenderingFiber$1;\n hook.memoizedState = {\n refs: refs,\n source: source,\n subscribe: subscribe\n }; // Sync the values needed by our subscription handler after each commit.\n\n dispatcher.useEffect(function () {\n refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,\n // but this hook recreates the queue in certain cases to avoid updates from stale sources.\n // handleChange() below needs to reference the dispatch function without re-subscribing,\n // so we use a ref to ensure that it always has the latest version.\n\n refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.\n\n var maybeNewVersion = getVersion(source._source);\n\n if (!objectIs(version, maybeNewVersion)) {\n var maybeNewSnapshot = getSnapshot(source._source);\n {\n if (typeof maybeNewSnapshot === 'function') {\n error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');\n }\n }\n\n if (!objectIs(snapshot, maybeNewSnapshot)) {\n setSnapshot(maybeNewSnapshot);\n var lane = requestUpdateLane(fiber);\n markRootMutableRead(root, lane);\n } // If the source mutated between render and now,\n // there may be state updates already scheduled from the old source.\n // Entangle the updates so that they render in the same batch.\n\n\n markRootEntangled(root, root.mutableReadLanes);\n }\n }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.\n\n dispatcher.useEffect(function () {\n var handleChange = function () {\n var latestGetSnapshot = refs.getSnapshot;\n var latestSetSnapshot = refs.setSnapshot;\n\n try {\n latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.\n\n var lane = requestUpdateLane(fiber);\n markRootMutableRead(root, lane);\n } catch (error) {\n // A selector might throw after a source mutation.\n // e.g. it might try to read from a part of the store that no longer exists.\n // In this case we should still schedule an update with React.\n // Worst case the selector will throw again and then an error boundary will handle it.\n latestSetSnapshot(function () {\n throw error;\n });\n }\n };\n\n var unsubscribe = subscribe(source._source, handleChange);\n {\n if (typeof unsubscribe !== 'function') {\n error('Mutable source subscribe function must return an unsubscribe function.');\n }\n }\n return unsubscribe;\n }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.\n //\n // If either the source or the subscription have changed we can't can't trust the update queue.\n // Maybe the source changed in a way that the old subscription ignored but the new one depends on.\n //\n // If the getSnapshot function changed, we also shouldn't rely on the update queue.\n // It's possible that the underlying source was mutated between the when the last \"change\" event fired,\n // and when the current render (with the new getSnapshot function) is processed.\n //\n // In both cases, we need to throw away pending updates (since they are no longer relevant)\n // and treat reading from the source as we do in the mount case.\n\n if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {\n // Create a new queue and setState method,\n // So if there are interleaved updates, they get pushed to the older queue.\n // When this becomes current, the previous queue and dispatch method will be discarded,\n // including any interleaving updates that occur.\n var newQueue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: snapshot\n };\n newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);\n stateHook.queue = newQueue;\n stateHook.baseQueue = null;\n snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);\n stateHook.memoizedState = stateHook.baseState = snapshot;\n }\n\n return snapshot;\n }\n\n function mountMutableSource(source, getSnapshot, subscribe) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = {\n refs: {\n getSnapshot: getSnapshot,\n setSnapshot: null\n },\n source: source,\n subscribe: subscribe\n };\n return useMutableSource(hook, source, getSnapshot, subscribe);\n }\n\n function updateMutableSource(source, getSnapshot, subscribe) {\n var hook = updateWorkInProgressHook();\n return useMutableSource(hook, source, getSnapshot, subscribe);\n }\n\n function mountState(initialState) {\n var hook = mountWorkInProgressHook();\n\n if (typeof initialState === 'function') {\n // $FlowFixMe: Flow doesn't like mixed types\n initialState = initialState();\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n }\n\n function updateState(initialState) {\n return updateReducer(basicStateReducer);\n }\n\n function rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\n }\n\n function pushEffect(tag, create, destroy, deps) {\n var effect = {\n tag: tag,\n create: create,\n destroy: destroy,\n deps: deps,\n // Circular\n next: null\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var lastEffect = componentUpdateQueue.lastEffect;\n\n if (lastEffect === null) {\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var firstEffect = lastEffect.next;\n lastEffect.next = effect;\n effect.next = firstEffect;\n componentUpdateQueue.lastEffect = effect;\n }\n }\n\n return effect;\n }\n\n function mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n var ref = {\n current: initialValue\n };\n {\n Object.seal(ref);\n }\n hook.memoizedState = ref;\n return ref;\n }\n\n function updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n }\n\n function mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);\n }\n\n function updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var destroy = undefined;\n\n if (currentHook !== null) {\n var prevEffect = currentHook.memoizedState;\n destroy = prevEffect.destroy;\n\n if (nextDeps !== null) {\n var prevDeps = prevEffect.deps;\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n pushEffect(hookFlags, create, destroy, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);\n }\n\n function mountEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n return mountEffectImpl(Update | Passive, Passive$1, create, deps);\n }\n\n function updateEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n return updateEffectImpl(Update | Passive, Passive$1, create, deps);\n }\n\n function mountLayoutEffect(create, deps) {\n return mountEffectImpl(Update, Layout, create, deps);\n }\n\n function updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n }\n\n function imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n\n var _inst = create();\n\n refCallback(_inst);\n return function () {\n refCallback(null);\n };\n } else if (ref !== null && ref !== undefined) {\n var refObject = ref;\n {\n if (!refObject.hasOwnProperty('current')) {\n error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n }\n }\n\n var _inst2 = create();\n\n refObject.current = _inst2;\n return function () {\n refObject.current = null;\n };\n }\n }\n\n function mountImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n }\n\n function updateImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n }\n\n function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n // The react-debug-hooks package injects its own implementation\n // so that e.g. DevTools can display custom hook values.\n }\n\n var updateDebugValue = mountDebugValue;\n\n function mountCallback(callback, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n hook.memoizedState = [callback, nextDeps];\n return callback;\n }\n\n function updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n hook.memoizedState = [callback, nextDeps];\n return callback;\n }\n\n function mountMemo(nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n }\n\n function updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n // Assume these are defined. If they're not, areHookInputsEqual will warn.\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n }\n\n function mountDeferredValue(value) {\n var _mountState = mountState(value),\n prevValue = _mountState[0],\n setValue = _mountState[1];\n\n mountEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n }\n\n function updateDeferredValue(value) {\n var _updateState = updateState(),\n prevValue = _updateState[0],\n setValue = _updateState[1];\n\n updateEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n }\n\n function rerenderDeferredValue(value) {\n var _rerenderState = rerenderState(),\n prevValue = _rerenderState[0],\n setValue = _rerenderState[1];\n\n updateEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n }\n\n function startTransition(setPending, callback) {\n var priorityLevel = getCurrentPriorityLevel();\n {\n runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {\n setPending(true);\n });\n runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setPending(false);\n callback();\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n });\n }\n }\n\n function mountTransition() {\n var _mountState2 = mountState(false),\n isPending = _mountState2[0],\n setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`\n // never changes.\n\n\n var start = startTransition.bind(null, setPending);\n mountRef(start);\n return [start, isPending];\n }\n\n function updateTransition() {\n var _updateState2 = updateState(),\n isPending = _updateState2[0];\n\n var startRef = updateRef();\n var start = startRef.current;\n return [start, isPending];\n }\n\n function rerenderTransition() {\n var _rerenderState2 = rerenderState(),\n isPending = _rerenderState2[0];\n\n var startRef = updateRef();\n var start = startRef.current;\n return [start, isPending];\n }\n\n var isUpdatingOpaqueValueInRenderPhase = false;\n\n function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {\n {\n return isUpdatingOpaqueValueInRenderPhase;\n }\n }\n\n function warnOnOpaqueIdentifierAccessInDEV(fiber) {\n {\n // TODO: Should warn in effects and callbacks, too\n var name = getComponentName(fiber.type) || 'Unknown';\n\n if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {\n error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');\n didWarnAboutUseOpaqueIdentifier[name] = true;\n }\n }\n }\n\n function mountOpaqueIdentifier() {\n var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1));\n\n if (getIsHydrating()) {\n var didUpgrade = false;\n var fiber = currentlyRenderingFiber$1;\n\n var readValue = function () {\n if (!didUpgrade) {\n // Only upgrade once. This works even inside the render phase because\n // the update is added to a shared queue, which outlasts the\n // in-progress render.\n didUpgrade = true;\n {\n isUpdatingOpaqueValueInRenderPhase = true;\n setId(makeId());\n isUpdatingOpaqueValueInRenderPhase = false;\n warnOnOpaqueIdentifierAccessInDEV(fiber);\n }\n }\n\n {\n {\n throw Error(\"The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.\");\n }\n }\n };\n\n var id = makeOpaqueHydratingObject(readValue);\n var setId = mountState(id)[1];\n\n if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {\n currentlyRenderingFiber$1.flags |= Update | Passive;\n pushEffect(HasEffect | Passive$1, function () {\n setId(makeId());\n }, undefined, null);\n }\n\n return id;\n } else {\n var _id = makeId();\n\n mountState(_id);\n return _id;\n }\n }\n\n function updateOpaqueIdentifier() {\n var id = updateState()[0];\n return id;\n }\n\n function rerenderOpaqueIdentifier() {\n var id = rerenderState()[0];\n return id;\n }\n\n function dispatchAction(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n eagerReducer: null,\n eagerState: null,\n next: null\n }; // Append the update to the end of the list.\n\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n var alternate = fiber.alternate;\n\n if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n } else {\n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\n // The queue is currently empty, which means we can eagerly compute the\n // next state before entering the render phase. If the new state is the\n // same as the current state, we may be able to bail out entirely.\n var lastRenderedReducer = queue.lastRenderedReducer;\n\n if (lastRenderedReducer !== null) {\n var prevDispatcher;\n {\n prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n }\n\n try {\n var currentState = queue.lastRenderedState;\n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n // it, on the update object. If the reducer hasn't changed by the\n // time we enter the render phase, then the eager state can be used\n // without calling the reducer again.\n\n update.eagerReducer = lastRenderedReducer;\n update.eagerState = eagerState;\n\n if (objectIs(eagerState, currentState)) {\n // Fast path. We can bail out without scheduling React to re-render.\n // It's still possible that we'll need to rebase this update later,\n // if the component re-renders for a different reason and by that\n // time the reducer has changed.\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n }\n }\n }\n\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotScopedWithMatchingAct(fiber);\n warnIfNotCurrentlyActingUpdatesInDev(fiber);\n }\n }\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n }\n }\n\n var ContextOnlyDispatcher = {\n readContext: readContext,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useMutableSource: throwInvalidHookError,\n useOpaqueIdentifier: throwInvalidHookError,\n unstable_isNewReconciler: enableNewReconciler\n };\n var HooksDispatcherOnMountInDEV = null;\n var HooksDispatcherOnMountWithHookTypesInDEV = null;\n var HooksDispatcherOnUpdateInDEV = null;\n var HooksDispatcherOnRerenderInDEV = null;\n var InvalidNestedHooksDispatcherOnMountInDEV = null;\n var InvalidNestedHooksDispatcherOnUpdateInDEV = null;\n var InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n {\n var warnInvalidContextAccess = function () {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n };\n\n var warnInvalidHookAccess = function () {\n 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');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n mountHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n mountHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return updateOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return rerenderOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n }\n var now$1 = Scheduler.unstable_now;\n var commitTime = 0;\n var profilerStartTime = -1;\n\n function getCommitTime() {\n return commitTime;\n }\n\n function recordCommitTime() {\n commitTime = now$1();\n }\n\n function startProfilerTimer(fiber) {\n profilerStartTime = now$1();\n\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now$1();\n }\n }\n\n function stopProfilerTimerIfRunning(fiber) {\n profilerStartTime = -1;\n }\n\n function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n if (profilerStartTime >= 0) {\n var elapsedTime = now$1() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n\n profilerStartTime = -1;\n }\n }\n\n function transferActualDuration(fiber) {\n // Transfer time spent rendering these children so we don't lose it\n // after we rerender. This is used as a helper in special cases\n // where we should count the work of multiple passes.\n var child = fiber.child;\n\n while (child) {\n fiber.actualDuration += child.actualDuration;\n child = child.sibling;\n }\n }\n\n var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\n var didReceiveUpdate = false;\n var didWarnAboutBadClass;\n var didWarnAboutModulePatternComponent;\n var didWarnAboutContextTypeOnFunctionComponent;\n var didWarnAboutGetDerivedStateOnFunctionComponent;\n var didWarnAboutFunctionRefs;\n var didWarnAboutReassigningProps;\n var didWarnAboutRevealOrder;\n var didWarnAboutTailOptions;\n {\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n }\n\n function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);\n }\n }\n\n function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\n // This function is fork of reconcileChildren. It's used in cases where we\n // want to reconcile without matching against the existing set. This has the\n // effect of all current children being unmounted; even if the type and key\n // are the same, the old child is unmounted and a new child is created.\n //\n // To do this, we're going to go through the reconcile algorithm twice. In\n // the first pass, we schedule a deletion for all the current children by\n // passing null.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we\n // pass null in place of where we usually pass the current child set. This has\n // the effect of remounting all children regardless of whether their\n // identities match.\n\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n }\n\n function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens after the first render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n }\n var render = Component.render;\n var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n var nextChildren;\n prepareToReadContext(workInProgress, renderLanes);\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n\n function updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {\n if (current === null) {\n var type = Component.type;\n\n if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n Component.defaultProps === undefined) {\n var resolvedType = type;\n {\n resolvedType = resolveFunctionForHotReloading(type);\n } // If this is a plain function component without default props,\n // and with only the default shallow comparison, we upgrade it\n // to a SimpleMemoComponent to allow fast path updates.\n\n workInProgress.tag = SimpleMemoComponent;\n workInProgress.type = resolvedType;\n {\n validateFunctionComponentInDev(workInProgress, type);\n }\n return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);\n }\n\n {\n var innerPropTypes = type.propTypes;\n\n if (innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(type));\n }\n }\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n\n {\n var _type = Component.type;\n var _innerPropTypes = _type.propTypes;\n\n if (_innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(_type));\n }\n }\n var currentChild = current.child; // This is always exactly one child\n\n if (!includesSomeLane(updateLanes, renderLanes)) {\n // This will be the props with resolved defaultProps,\n // unlike current.memoizedProps which will be the unresolved ones.\n var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n var compare = Component.compare;\n compare = compare !== null ? compare : shallowEqual;\n\n if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n var newChild = createWorkInProgress(currentChild, nextProps);\n newChild.ref = workInProgress.ref;\n newChild.return = workInProgress;\n workInProgress.child = newChild;\n return newChild;\n }\n\n function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens when the inner render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var outerMemoType = workInProgress.elementType;\n\n if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n // We warn when you define propTypes on lazy()\n // so let's just skip over it to find memo() outer wrapper.\n // Inner props for memo are validated later.\n var lazyComponent = outerMemoType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n outerMemoType = init(payload);\n } catch (x) {\n outerMemoType = null;\n } // Inner propTypes will be validated in the function component path.\n\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentName(outerMemoType));\n }\n }\n }\n }\n\n if (current !== null) {\n var prevProps = current.memoizedProps;\n\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type) {\n didReceiveUpdate = false;\n\n if (!includesSomeLane(renderLanes, updateLanes)) {\n // The pending lanes were cleared at the beginning of beginWork. We're\n // about to bail out, but there might be other lanes that weren't\n // included in the current render. Usually, the priority level of the\n // remaining updates is accumlated during the evaluation of the\n // component (i.e. when processing the update queue). But since since\n // we're bailing out early *without* evaluating the component, we need\n // to account for it here, too. Reset to the value of the current fiber.\n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n // because a MemoComponent fiber does not have hooks or an update queue;\n // rather, it wraps around an inner component, which may or may not\n // contains hooks.\n // TODO: Move the reset at in beginWork out of the common path so that\n // this is no longer necessary.\n workInProgress.lanes = current.lanes;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n }\n\n function updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n var prevState = current !== null ? current.memoizedState : null;\n\n if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy sync mode, don't defer the subtree. Render it now.\n // TODO: Figure out what we should do in Blocking mode.\n var nextState = {\n baseLanes: NoLanes\n };\n workInProgress.memoizedState = nextState;\n pushRenderLanes(workInProgress, renderLanes);\n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n var nextBaseLanes;\n\n if (prevState !== null) {\n var prevBaseLanes = prevState.baseLanes;\n nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);\n } else {\n nextBaseLanes = renderLanes;\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n {\n markSpawnedWork(OffscreenLane);\n }\n workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);\n var _nextState = {\n baseLanes: nextBaseLanes\n };\n workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway\n // to avoid a push/pop misalignment.\n\n pushRenderLanes(workInProgress, nextBaseLanes);\n return null;\n } else {\n // Rendering at offscreen, so we can clear the base lanes.\n var _nextState2 = {\n baseLanes: NoLanes\n };\n workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.\n\n var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;\n pushRenderLanes(workInProgress, subtreeRenderLanes);\n }\n } else {\n var _subtreeRenderLanes;\n\n if (prevState !== null) {\n _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state\n\n workInProgress.memoizedState = null;\n } else {\n // We weren't previously hidden, and we still aren't, so there's nothing\n // special to do. Need to push to the stack regardless, though, to avoid\n // a push/pop misalignment.\n _subtreeRenderLanes = renderLanes;\n }\n\n pushRenderLanes(workInProgress, _subtreeRenderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n } // Note: These happen to have identical begin phases, for now. We shouldn't hold\n // ourselves to this constraint, though. If the behavior diverges, we should\n // fork the function.\n\n\n var updateLegacyHiddenComponent = updateOffscreenComponent;\n\n function updateFragment(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n\n function updateMode(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n\n function updateProfiler(current, workInProgress, renderLanes) {\n {\n workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n\n function markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n\n if (current === null && ref !== null || current !== null && current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.flags |= Ref;\n }\n }\n\n function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n }\n var context;\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n var nextChildren;\n prepareToReadContext(workInProgress, renderLanes);\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n\n function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n } // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n if (current !== null) {\n // A class component without an instance only mounts if it suspended\n // inside a non-concurrent tree, in an inconsistent state. We want to\n // treat it like a new mount, even though an empty version of it already\n // committed. Disconnect the alternate pointers.\n current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n } // In the initial pass we might need to construct the instance.\n\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n shouldUpdate = true;\n } else if (current === null) {\n // In a resume, we'll already have an instance we can reuse.\n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n {\n var inst = workInProgress.stateNode;\n\n if (shouldUpdate && inst.props !== nextProps) {\n if (!didWarnAboutReassigningProps) {\n 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');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n return nextUnitOfWork;\n }\n\n function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$1.current = workInProgress;\n var nextChildren;\n\n if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n // If we captured an error, but getDerivedStateFromError is not defined,\n // unmount all the children. componentDidCatch will schedule an update to\n // re-render a fallback. This is temporary until we migrate everyone to\n // the new API.\n // TODO: Warn in a future release.\n nextChildren = null;\n {\n stopProfilerTimerIfRunning();\n }\n } else {\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n instance.render();\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n if (current !== null && didCaptureError) {\n // If we're recovering from an error, reconcile without reusing any of\n // the existing children. Conceptually, the normal children and the children\n // that are shown on error are two different sets, so we shouldn't reuse\n // normal children even if their identities match.\n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n\n\n workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, true);\n }\n\n return workInProgress.child;\n }\n\n function pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n\n pushHostContainer(workInProgress, root.containerInfo);\n }\n\n function updateHostRoot(current, workInProgress, renderLanes) {\n pushHostRootContext(workInProgress);\n var updateQueue = workInProgress.updateQueue;\n\n if (!(current !== null && updateQueue !== null)) {\n {\n throw Error(\"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState !== null ? prevState.element : null;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n var nextChildren = nextState.element;\n\n if (nextChildren === prevChildren) {\n resetHydrationState();\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var root = workInProgress.stateNode;\n\n if (root.hydrate && enterHydrationState(workInProgress)) {\n // If we don't have any current children this might be the first pass.\n // We always try to hydrate. If this isn't a hydration pass there won't\n // be any children to hydrate which is effectively the same thing as\n // not hydrating.\n {\n var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;\n\n if (mutableSourceEagerHydrationData != null) {\n for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {\n var mutableSource = mutableSourceEagerHydrationData[i];\n var version = mutableSourceEagerHydrationData[i + 1];\n setWorkInProgressVersion(mutableSource, version);\n }\n }\n }\n var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n workInProgress.child = child;\n var node = child;\n\n while (node) {\n // Mark each child as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n node.flags = node.flags & ~Placement | Hydrating;\n node = node.sibling;\n }\n } else {\n // Otherwise reset hydration state in case we aborted and resumed another\n // root.\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n resetHydrationState();\n }\n\n return workInProgress.child;\n }\n\n function updateHostComponent(current, workInProgress, renderLanes) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n var type = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n var prevProps = current !== null ? current.memoizedProps : null;\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also has access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.flags |= ContentReset;\n }\n\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n }\n\n function updateHostText(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n } // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n\n\n return null;\n }\n\n function mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) {\n if (_current !== null) {\n // A lazy component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n\n var props = workInProgress.pendingProps;\n var lazyComponent = elementType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\n\n switch (resolvedTag) {\n case FunctionComponent:\n {\n {\n validateFunctionComponentInDev(workInProgress, Component);\n workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n }\n child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case MemoComponent:\n {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = Component.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n 'prop', getComponentName(Component));\n }\n }\n }\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n updateLanes, renderLanes);\n return child;\n }\n }\n\n var hint = '';\n {\n if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n hint = ' Did you wrap a component in React.lazy() more than once?';\n }\n } // This message intentionally doesn't mention ForwardRef or MemoComponent\n // because the fact that it's a separate type of work is an\n // implementation detail.\n\n {\n {\n throw Error(\"Element type is invalid. Received a promise that resolves to: \" + Component + \". Lazy element type must resolve to a class or function.\" + hint);\n }\n }\n }\n\n function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n if (_current !== null) {\n // An incomplete component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n } // Promote the fiber to a class and try rendering again.\n\n\n workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n }\n\n function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n if (_current !== null) {\n // An indeterminate component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n\n var props = workInProgress.pendingProps;\n var context;\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n prepareToReadContext(workInProgress, renderLanes);\n var value;\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n didWarnAboutBadClass[componentName] = true;\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$1.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n workInProgress.flags |= PerformedWork;\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n 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.', _componentName, _componentName, _componentName);\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n 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);\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n } // Proceed under the assumption that this is a class instance\n\n workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext = false;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);\n }\n\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n {\n if (workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n }\n reconcileChildren(null, workInProgress, value, renderLanes);\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n return workInProgress.child;\n }\n }\n\n function validateFunctionComponentInDev(workInProgress, Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = ownerName || workInProgress._debugID || '';\n var debugSource = workInProgress._debugSource;\n\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n }\n\n if (!didWarnAboutFunctionRefs[warningKey]) {\n didWarnAboutFunctionRefs[warningKey] = true;\n error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n }\n\n var SUSPENDED_MARKER = {\n dehydrated: null,\n retryLane: NoLane\n };\n\n function mountSuspenseOffscreenState(renderLanes) {\n return {\n baseLanes: renderLanes\n };\n }\n\n function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n return {\n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)\n };\n } // TODO: Probably should inline this back\n\n\n function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {\n // If we're already showing a fallback, there are cases where we need to\n // remain on that fallback regardless of whether the content has resolved.\n // For example, SuspenseList coordinates when nested content appears.\n if (current !== null) {\n var suspenseState = current.memoizedState;\n\n if (suspenseState === null) {\n // Currently showing content. Don't hide it, even if ForceSuspenseFallack\n // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n // Note: This is a factoring smell. Can't remain on a fallback if there's\n // no fallback to remain on.\n return false;\n }\n } // Not currently showing content. Consult the Suspense context.\n\n\n return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n }\n\n function getRemainingWorkInPrimaryTree(current, renderLanes) {\n // TODO: Should not remove render lanes that were pinged during this render\n return removeLanes(current.childLanes, renderLanes);\n }\n\n function updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.flags |= DidCapture;\n }\n }\n var suspenseContext = suspenseStackCursor.current;\n var showFallback = false;\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n showFallback = true;\n workInProgress.flags &= ~DidCapture;\n } else {\n // Attempting the main content\n if (current === null || current.memoizedState !== null) {\n // This is a new mount or this boundary is already showing a fallback state.\n // Mark this subtree context as having at least one invisible parent that could\n // handle the fallback state.\n // Boundaries without fallbacks or should be avoided are not considered since\n // they cannot handle preferred fallback states.\n if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {\n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n }\n }\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense\n // boundary's children. This involves some custom reconcilation logic. Two\n // main reasons this is so complicated.\n //\n // First, Legacy Mode has different semantics for backwards compatibility. The\n // primary tree will commit in an inconsistent state, so when we do the\n // second pass to render the fallback, we do some exceedingly, uh, clever\n // hacks to make that not totally break. Like transferring effects and\n // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n // because we bailout on the primary tree completely and leave it in its old\n // state, no effects. Same as what we do for Offscreen (except that\n // Offscreen doesn't have the first render pass).\n //\n // Second is hydration. During hydration, the Suspense fiber has a slightly\n // different layout, where the child points to a dehydrated fragment, which\n // contains the DOM rendered by the server.\n //\n // Third, even if you set all that aside, Suspense is like error boundaries in\n // that we first we try to render one tree, and if that fails, we render again\n // and switch to a different tree. Like a try/catch block. So we have to track\n // which branch we're currently rendering. Ideally we would model this using\n // a stack.\n\n if (current === null) {\n // Initial mount\n // If we're currently hydrating, try to hydrate this boundary.\n // But only if this has a fallback.\n if (nextProps.fallback !== undefined) {\n tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n }\n\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n\n if (showFallback) {\n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var primaryChildFragment = workInProgress.child;\n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackFragment;\n } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {\n // This is a CPU-bound tree. Skip this tree and show a placeholder to\n // unblock the surrounding content. Then immediately retry after the\n // initial commit.\n var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n\n var _primaryChildFragment = workInProgress.child;\n _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to\n // get it started back up to attempt the next item. While in terms of\n // priority this work has the same priority as this current render, it's\n // not part of the same transition once the transition has committed. If\n // it's sync, we still want to yield so that it can be painted.\n // Conceptually, this is really the same as pinging. We can use any\n // RetryLane even if it's the one currently rendering since we're leaving\n // it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n {\n markSpawnedWork(SomeRetryLane);\n }\n return _fallbackFragment;\n } else {\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);\n }\n } else {\n // This is an update.\n // If the current fiber has a SuspenseState, that means it's already showing\n // a fallback.\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n if (showFallback) {\n var _nextFallbackChildren2 = nextProps.fallback;\n var _nextPrimaryChildren2 = nextProps.children;\n\n var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);\n\n var _primaryChildFragment3 = workInProgress.child;\n var prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return _fallbackChildFragment;\n } else {\n var _nextPrimaryChildren3 = nextProps.children;\n\n var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment4;\n }\n } else {\n // The current tree is not already showing a fallback.\n if (showFallback) {\n // Timed out.\n var _nextFallbackChildren3 = nextProps.fallback;\n var _nextPrimaryChildren4 = nextProps.children;\n\n var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);\n\n var _primaryChildFragment5 = workInProgress.child;\n var _prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);\n _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return _fallbackChildFragment2;\n } else {\n // Still haven't timed out. Continue rendering the children, like we\n // normally do.\n var _nextPrimaryChildren5 = nextProps.children;\n\n var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment6;\n }\n }\n }\n }\n\n function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n var mode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);\n primaryChildFragment.return = workInProgress;\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n }\n\n function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n var fallbackChildFragment;\n\n if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if (workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = 0;\n primaryChildFragment.treeBaseDuration = 0;\n }\n\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n } else {\n primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n }\n\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n }\n\n function createWorkInProgressOffscreenFiber(current, offscreenProps) {\n // The props argument to `createWorkInProgress` is `any` typed, so we use this\n // wrapper function to constrain it.\n return createWorkInProgress(current, offscreenProps);\n }\n\n function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n mode: 'visible',\n children: primaryChildren\n });\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n primaryChildFragment.lanes = renderLanes;\n }\n\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = null;\n\n if (currentFallbackChildFragment !== null) {\n // Delete the fallback child fragment\n currentFallbackChildFragment.nextEffect = null;\n currentFallbackChildFragment.flags = Deletion;\n workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;\n }\n\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n }\n\n function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n\n if ( // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n // already cloned. In legacy mode, the only case where this isn't true is\n // when DevTools forces us to display a fallback; we skip the first render\n // pass entirely and go straight to rendering the fallback. (In Concurrent\n // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n // only codepath.)\n workInProgress.child !== currentPrimaryChildFragment) {\n var progressedPrimaryFragment = workInProgress.child;\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if (workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n } // The fallback fiber was added as a deletion effect during the first pass.\n // However, since we're going to remain on the fallback, we no longer want\n // to delete it. So we need to remove it from the list. Deletions are stored\n // on the same list as effects. We want to keep the effects from the primary\n // tree. So we copy the primary child fragment's effect list, which does not\n // include the fallback deletion effect.\n\n\n var progressedLastEffect = primaryChildFragment.lastEffect;\n\n if (progressedLastEffect !== null) {\n workInProgress.firstEffect = primaryChildFragment.firstEffect;\n workInProgress.lastEffect = progressedLastEffect;\n progressedLastEffect.nextEffect = null;\n } else {\n // TODO: Reset this somewhere else? Lol legacy mode is so weird.\n workInProgress.firstEffect = workInProgress.lastEffect = null;\n }\n } else {\n primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);\n }\n\n var fallbackChildFragment;\n\n if (currentFallbackChildFragment !== null) {\n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n } else {\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n }\n\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n }\n\n function scheduleWorkOnFiber(fiber, renderLanes) {\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleWorkOnParentPath(fiber.return, renderLanes);\n }\n\n function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\n // Mark any Suspense boundaries with fallbacks as having work to do.\n // If they were previously forced into fallbacks, they may now be able\n // to unblock.\n var node = firstChild;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n scheduleWorkOnFiber(node, renderLanes);\n }\n } else if (node.tag === SuspenseListComponent) {\n // If the tail is hidden there might not be an Suspense boundaries\n // to schedule work on. In this case we have to schedule it on the\n // list itself.\n // We don't have to traverse to the children of the list since\n // the list will propagate the change when it rerenders.\n scheduleWorkOnFiber(node, renderLanes);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n function findLastContentRow(firstChild) {\n // This is going to find the last row among these children that is already\n // showing content on the screen, as opposed to being in fallback state or\n // new. If a row has multiple Suspense boundaries, any of them being in the\n // fallback state, counts as the whole row being in a fallback state.\n // Note that the \"rows\" will be workInProgress, but any nested children\n // will still be current since we haven't rendered them yet. The mounted\n // order may not be the same as the new order. We use the new order.\n var row = firstChild;\n var lastContentRow = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n lastContentRow = row;\n }\n\n row = row.sibling;\n }\n\n return lastContentRow;\n }\n\n function validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\n\n if (typeof revealOrder === 'string') {\n switch (revealOrder.toLowerCase()) {\n case 'together':\n case 'forwards':\n case 'backwards':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n break;\n }\n\n case 'forward':\n case 'backward':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n break;\n }\n\n default:\n error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n break;\n }\n } else {\n error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n }\n }\n }\n }\n\n function validateTailOptions(tailMode, revealOrder) {\n {\n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n didWarnAboutTailOptions[tailMode] = true;\n error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n didWarnAboutTailOptions[tailMode] = true;\n error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n }\n }\n }\n }\n\n function validateSuspenseListNestedChild(childSlot, index) {\n {\n var isArray = Array.isArray(childSlot);\n var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isArray || isIterable) {\n var type = isArray ? 'array' : 'iterable';\n error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n return false;\n }\n }\n return true;\n }\n\n function validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n if (!validateSuspenseListNestedChild(children[i], i)) {\n return;\n }\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\n }\n\n _i++;\n }\n }\n } else {\n error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n }\n }\n }\n }\n }\n\n function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode,\n lastEffect: lastEffectBeforeRendering\n };\n } else {\n // We can reuse the existing object from previous renders.\n renderState.isBackwards = isBackwards;\n renderState.rendering = null;\n renderState.renderingStartTime = 0;\n renderState.last = lastContentRow;\n renderState.tail = tail;\n renderState.tailMode = tailMode;\n renderState.lastEffect = lastEffectBeforeRendering;\n }\n } // This can end up rendering this component multiple passes.\n // The first pass splits the children fibers into two sets. A head and tail.\n // We first render the head. If anything is in fallback state, we do another\n // pass through beginWork to rerender all children (including the tail) with\n // the force suspend context. If the first render didn't have anything in\n // in fallback state. Then we render each row in the tail one-by-one.\n // That happens in the completeWork phase without going back to beginWork.\n\n\n function updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n }\n\n function updatePortalComponent(current, workInProgress, renderLanes) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n }\n\n var hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\n function updateContextProvider(current, workInProgress, renderLanes) {\n var providerType = workInProgress.type;\n var context = providerType._context;\n var newProps = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps;\n var newValue = newProps.value;\n {\n if (!('value' in newProps)) {\n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n }\n }\n\n var providerPropTypes = workInProgress.type.propTypes;\n\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n }\n }\n pushProvider(workInProgress, newValue);\n\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n var changedBits = calculateChangedBits(context, newValue, oldValue);\n\n if (changedBits === 0) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, changedBits, renderLanes);\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n }\n\n var hasWarnedAboutUsingContextAsConsumer = false;\n\n function updateContextConsumer(current, workInProgress, renderLanes) {\n var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n var newProps = workInProgress.pendingProps;\n var render = newProps.children;\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n prepareToReadContext(workInProgress, renderLanes);\n var newValue = readContext(context, newProps.unstable_observedBits);\n var newChildren;\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n }\n\n function markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n }\n\n function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\n // The children don't have any work either. We can skip them.\n // TODO: Once we add back resuming, we should check if the children are\n // a work-in-progress set. If so, we need to transfer their effects.\n return null;\n } else {\n // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n }\n }\n\n function remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\n\n\n current.alternate = null;\n oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n newWorkInProgress.index = oldWorkInProgress.index;\n newWorkInProgress.sibling = oldWorkInProgress.sibling;\n newWorkInProgress.return = oldWorkInProgress.return;\n newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n if (oldWorkInProgress === returnFiber.child) {\n returnFiber.child = newWorkInProgress;\n } else {\n var prevSibling = returnFiber.child;\n\n if (prevSibling === null) {\n throw new Error('Expected parent to have a child.');\n }\n\n while (prevSibling.sibling !== oldWorkInProgress) {\n prevSibling = prevSibling.sibling;\n\n if (prevSibling === null) {\n throw new Error('Expected to find the previous sibling.');\n }\n }\n\n prevSibling.sibling = newWorkInProgress;\n } // Delete the old fiber and place the new one.\n // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = current;\n returnFiber.lastEffect = current;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = current;\n }\n\n current.nextEffect = null;\n current.flags = Deletion;\n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n }\n\n function beginWork(current, workInProgress, renderLanes) {\n var updateLanes = workInProgress.lanes;\n {\n if (workInProgress._debugNeedsRemount && current !== null) {\n // This will restart the begin phase with a new fiber.\n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));\n }\n }\n\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n\n if (oldProps !== newProps || hasContextChanged() || // Force a re-render if the implementation changed due to hot reload:\n workInProgress.type !== current.type) {\n // If props or context changed, mark the fiber as having performed work.\n // This may be unset if the props are determined to be equal later (memo).\n didReceiveUpdate = true;\n } else if (!includesSomeLane(renderLanes, updateLanes)) {\n didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering\n // the begin phase. There's still some bookkeeping we that needs to be done\n // in this optimized path, mostly pushing stuff onto the stack.\n\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n resetHydrationState();\n break;\n\n case HostComponent:\n pushHostContext(workInProgress);\n break;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n\n break;\n }\n\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n pushProvider(workInProgress, newValue);\n break;\n }\n\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (hasChildWork) {\n workInProgress.flags |= Update;\n } // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n\n\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n // whether to retry the primary children, or to skip over it and\n // go straight to the fallback. Check the priority of the primary\n // child fragment.\n var primaryChildFragment = workInProgress.child;\n var primaryChildLanes = primaryChildFragment.childLanes;\n\n if (includesSomeLane(renderLanes, primaryChildLanes)) {\n // The primary children have pending work. Use the normal path\n // to attempt to render the primary children again.\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n } else {\n // The primary child fragment does not have pending work marked\n // on it\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient\n // priority. Bailout.\n\n var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n\n if (child !== null) {\n // The fallback children have pending work. Skip over the\n // primary children and work on the fallback.\n return child.sibling;\n } else {\n return null;\n }\n }\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n }\n\n break;\n }\n\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;\n\n var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (didSuspendBefore) {\n if (_hasChildWork) {\n // If something was in fallback state last time, and we have all the\n // same children then we're still in progressive loading state.\n // Something might get unblocked by state updates or retries in the\n // tree which will affect the tail. So we need to use the normal\n // path to compute the correct tail.\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n } // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n\n\n workInProgress.flags |= DidCapture;\n } // If nothing suspended before and we're rendering the same children,\n // then the tail doesn't matter. Anything new that suspends will work\n // in the \"together\" mode, so we can continue from the state we had.\n\n\n var renderState = workInProgress.memoizedState;\n\n if (renderState !== null) {\n // Reset to the \"together\" mode in case we've started a different\n // update in the past but didn't complete it.\n renderState.rendering = null;\n renderState.tail = null;\n renderState.lastEffect = null;\n }\n\n pushSuspenseContext(workInProgress, suspenseStackCursor.current);\n\n if (_hasChildWork) {\n break;\n } else {\n // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n return null;\n }\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n // Need to check if the tree still needs to be deferred. This is\n // almost identical to the logic used in the normal update path,\n // so we'll just enter that. The only difference is we'll bail out\n // at the next level instead of this one, because the child props\n // have not changed. Which is fine.\n // TODO: Probably should refactor `beginWork` to split the bailout\n // path from the normal path. I'm tempted to do a labeled break here\n // but I won't :)\n workInProgress.lanes = NoLanes;\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else {\n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n } else {\n // An update was scheduled on this fiber, but there are no new props\n // nor legacy context. Set this to false. If an update queue or context\n // consumer produces a changed value, it will set this to true. Otherwise,\n // the component will assume the children have not changed and bail out.\n didReceiveUpdate = false;\n }\n }\n } else {\n didReceiveUpdate = false;\n } // Before entering the begin phase, clear pending update priority.\n // TODO: This assumes that we're about to evaluate the component and process\n // the update queue. However, there's an exception: SimpleMemoComponent\n // sometimes bails out later in the begin phase. This indicates that we should\n // move this assignment out of the common path and into each branch.\n\n\n workInProgress.lanes = NoLanes;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);\n }\n\n case FunctionComponent:\n {\n var _Component = workInProgress.type;\n var unresolvedProps = workInProgress.pendingProps;\n var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);\n return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);\n }\n\n case ClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderLanes);\n\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderLanes);\n\n case HostText:\n return updateHostText(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderLanes);\n\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderLanes);\n\n case Mode:\n return updateMode(current, workInProgress, renderLanes);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderLanes);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderLanes);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderLanes);\n\n case MemoComponent:\n {\n var _type2 = workInProgress.type;\n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = _type2.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n 'prop', getComponentName(_type2));\n }\n }\n }\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);\n }\n\n case IncompleteClassComponent:\n {\n var _Component3 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n }\n\n case FundamentalComponent:\n {\n break;\n }\n\n case ScopeComponent:\n {\n break;\n }\n\n case Block:\n {\n break;\n }\n\n case OffscreenComponent:\n {\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n\n case LegacyHiddenComponent:\n {\n return updateLegacyHiddenComponent(current, workInProgress, renderLanes);\n }\n }\n\n {\n {\n throw Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.flags |= Update;\n }\n\n function markRef$1(workInProgress) {\n workInProgress.flags |= Ref;\n }\n\n var appendAllChildren;\n var updateHostContainer;\n var updateHostComponent$1;\n var updateHostText$1;\n {\n // Mutation mode\n appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal) ;else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n };\n\n updateHostContainer = function (workInProgress) {// Noop\n };\n\n updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n\n if (oldProps === newProps) {\n // In mutation mode, this is sufficient for a bailout because\n // we won't touch this node even if children changed.\n return;\n } // If we get updated because one of our children updated, we don't\n // have newProps so we'll have to reuse them.\n // TODO: Split the update API as separate for the props vs. children.\n // Even better would be if children weren't special cased at all tho.\n\n\n var instance = workInProgress.stateNode;\n var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host\n // component is hitting the resume path. Figure out why. Possibly\n // related to `hidden`.\n\n var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.\n\n workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update. All the work is done in commitWork.\n\n if (updatePayload) {\n markUpdate(workInProgress);\n }\n };\n\n updateHostText$1 = function (current, workInProgress, oldText, newText) {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n };\n }\n\n function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (getIsHydrating()) {\n // If we're hydrating, we should consume as many items as we can\n // so we don't leave any behind.\n return;\n }\n\n switch (renderState.tailMode) {\n case 'hidden':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var tailNode = renderState.tail;\n var lastTailNode = null;\n\n while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (lastTailNode === null) {\n // All remaining items in the tail are insertions.\n renderState.tail = null;\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n lastTailNode.sibling = null;\n }\n\n break;\n }\n\n case 'collapsed':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var _tailNode = renderState.tail;\n var _lastTailNode = null;\n\n while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (_lastTailNode === null) {\n // All remaining items in the tail are insertions.\n if (!hasRenderedATailFallback && renderState.tail !== null) {\n // We suspended during the head. We want to show at least one\n // row at the tail. So we'll keep on and cut off the rest.\n renderState.tail.sibling = null;\n } else {\n renderState.tail = null;\n }\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n _lastTailNode.sibling = null;\n }\n\n break;\n }\n }\n }\n\n function completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case LazyComponent:\n case SimpleMemoComponent:\n case FunctionComponent:\n case ForwardRef:\n case Fragment:\n case Mode:\n case Profiler:\n case ContextConsumer:\n case MemoComponent:\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var fiberRoot = workInProgress.stateNode;\n\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n var wasHydrated = popHydrationState(workInProgress);\n\n if (wasHydrated) {\n // If we hydrated, then we'll need to schedule an update for\n // the commit side-effects on the root.\n markUpdate(workInProgress);\n } else if (!fiberRoot.hydrate) {\n // Schedule an effect to clear this container at the start of the next commit.\n // This handles the case of React rendering into a container with previous children.\n // It's also safe to do for updates too, because current.child would only be null\n // if the previous render was null (so the the container would already be empty).\n workInProgress.flags |= Snapshot;\n }\n }\n\n updateHostContainer(workInProgress);\n return null;\n }\n\n case HostComponent:\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var type = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);\n\n if (current.ref !== workInProgress.ref) {\n markRef$1(workInProgress);\n }\n } else {\n if (!newProps) {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error(\"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\");\n }\n } // This can happen when we abort work.\n\n\n return null;\n }\n\n var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on whether we want to add them top->down or\n // bottom->up. Top->down is faster in IE11.\n\n var _wasHydrated = popHydrationState(workInProgress);\n\n if (_wasHydrated) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {\n // If changes to the hydrated node need to be applied at the\n // commit-phase we mark this as such.\n markUpdate(workInProgress);\n }\n } else {\n var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);\n appendAllChildren(instance, workInProgress, false, false);\n workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.\n // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n\n if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {\n markUpdate(workInProgress);\n }\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef$1(workInProgress);\n }\n }\n\n return null;\n }\n\n case HostText:\n {\n var newText = newProps;\n\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n\n updateHostText$1(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error(\"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\");\n }\n } // This can happen when we abort work.\n\n }\n\n var _rootContainerInstance = getRootHostContainer();\n\n var _currentHostContext = getHostContext();\n\n var _wasHydrated2 = popHydrationState(workInProgress);\n\n if (_wasHydrated2) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n }\n }\n\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var nextState = workInProgress.memoizedState;\n\n if ((workInProgress.flags & DidCapture) !== NoFlags) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = false;\n\n if (current === null) {\n if (workInProgress.memoizedProps.fallback !== undefined) {\n popHydrationState(workInProgress);\n }\n } else {\n var prevState = current.memoizedState;\n prevDidTimeout = prevState !== null;\n }\n\n if (nextDidTimeout && !prevDidTimeout) {\n // If this subtreee is running in blocking mode we can suspend,\n // otherwise we won't suspend.\n // TODO: This will still suspend a synchronous tree if anything\n // in the concurrent tree already suspended during this render.\n // This is a known bug.\n if ((workInProgress.mode & BlockingMode) !== NoMode) {\n // TODO: Move this back to throwException because this is too late\n // if this is a large tree which is common for initial loads. We\n // don't know if we should restart a render or not until we get\n // this marker, and this is too late.\n // If this render already had a ping or lower pri updates,\n // and this is the first time we know we're going to suspend we\n // should be able to immediately restart from within throwException.\n var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;\n\n if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {\n // If this was in an invisible tree or a new render, then showing\n // this boundary is ok.\n renderDidSuspend();\n } else {\n // Otherwise, we're going to have to hide content so we should\n // suspend for longer if possible.\n renderDidSuspendDelayIfPossible();\n }\n }\n }\n\n {\n // TODO: Only schedule updates if these values are non equal, i.e. it changed.\n if (nextDidTimeout || prevDidTimeout) {\n // If this boundary just timed out, schedule an effect to attach a\n // retry listener to the promise. This flag is also used to hide the\n // primary children. In mutation mode, we also need the flag to\n // *unhide* children that were previously hidden, so check if this\n // is currently timed out, too.\n workInProgress.flags |= Update;\n }\n }\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(workInProgress);\n\n if (current === null) {\n preparePortalMount(workInProgress.stateNode.containerInfo);\n }\n\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n popProvider(workInProgress);\n return null;\n\n case IncompleteClassComponent:\n {\n // Same as class component case. I put it down here so that the tags are\n // sequential to ensure this switch is compiled to a jump table.\n var _Component = workInProgress.type;\n\n if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n return null;\n }\n\n var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;\n var renderedTail = renderState.rendering;\n\n if (renderedTail === null) {\n // We just rendered the head.\n if (!didSuspendAlready) {\n // This is the first pass. We need to figure out if anything is still\n // suspended in the rendered set.\n // If new content unsuspended, but there's still some content that\n // didn't. Then we need to do a second pass that forces everything\n // to keep showing their fallbacks.\n // We might be suspended if something in this render pass suspended, or\n // something in the previous committed pass suspended. Otherwise,\n // there's no chance so we can skip the expensive call to\n // findFirstSuspended.\n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);\n\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.flags |= DidCapture;\n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n // part of the second pass. In that case nothing will subscribe to\n // its thennables. Instead, we'll transfer its thennables to the\n // SuspenseList so that it can retry if they resolve.\n // There might be multiple of these in the list but since we're\n // going to wait for all of them anyway, it doesn't really matter\n // which ones gets to ping. In theory we could get clever and keep\n // track of how many dependencies remain but it gets tricky because\n // in the meantime, we can add/remove/change items and dependencies.\n // We might bail out of the loop before finding any but that\n // doesn't matter since that means that the other boundaries that\n // we did find already has their listeners attached.\n\n var newThennables = suspended.updateQueue;\n\n if (newThennables !== null) {\n workInProgress.updateQueue = newThennables;\n workInProgress.flags |= Update;\n } // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect list before doing the second pass since that's now invalid.\n\n\n if (renderState.lastEffect === null) {\n workInProgress.firstEffect = null;\n }\n\n workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.\n\n resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately\n // rerender the children.\n\n pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n\n if (renderState.tail !== null && now() > getRenderTargetTime()) {\n // We have already passed our CPU deadline but we still have rows\n // left in the tail. We'll just give up further attempts to render\n // the main content and only render fallbacks.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n {\n markSpawnedWork(SomeRetryLane);\n }\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n\n if (_suspended !== null) {\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n // get lost if this row ends up dropped during a second pass.\n\n var _newThennables = _suspended.updateQueue;\n\n if (_newThennables !== null) {\n workInProgress.updateQueue = _newThennables;\n workInProgress.flags |= Update;\n }\n\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n ) {\n // We need to delete the row we just rendered.\n // Reset the effect list to what it was before we rendered this\n // child. The nested children have already appended themselves.\n var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.\n\n if (lastEffect !== null) {\n lastEffect.nextEffect = null;\n } // We're done.\n\n\n return null;\n }\n } else if ( // The time it took to render last row is greater than the remaining\n // time we have to render. So rendering one more row would likely\n // exceed it.\n now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\n // We have now passed our CPU deadline and we'll just give up further\n // attempts to render the main content and only render fallbacks.\n // The assumption is that this is usually faster.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n {\n markSpawnedWork(SomeRetryLane);\n }\n }\n }\n\n if (renderState.isBackwards) {\n // The effect list of the backwards tail will have been added\n // to the end. This breaks the guarantee that life-cycles fire in\n // sibling order but that isn't a strong guarantee promised by React.\n // Especially since these might also just pop in during future commits.\n // Append to the beginning of the list.\n renderedTail.sibling = workInProgress.child;\n workInProgress.child = renderedTail;\n } else {\n var previousSibling = renderState.last;\n\n if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n\n renderState.last = renderedTail;\n }\n }\n\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n // Pop a row.\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\n renderState.lastEffect = workInProgress.lastEffect;\n renderState.renderingStartTime = now();\n next.sibling = null; // Restore the context.\n // TODO: We can probably just avoid popping it instead and only\n // setting it the first time we go from not suspended to suspended.\n\n var suspenseContext = suspenseStackCursor.current;\n\n if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n\n return next;\n }\n\n return null;\n }\n\n case FundamentalComponent:\n {\n break;\n }\n\n case ScopeComponent:\n {\n break;\n }\n\n case Block:\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popRenderLanes(workInProgress);\n\n if (current !== null) {\n var _nextState = workInProgress.memoizedState;\n var _prevState = current.memoizedState;\n var prevIsHidden = _prevState !== null;\n var nextIsHidden = _nextState !== null;\n\n if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {\n workInProgress.flags |= Update;\n }\n }\n\n return null;\n }\n }\n\n {\n {\n throw Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function unwindWork(workInProgress, renderLanes) {\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n var flags = workInProgress.flags;\n\n if (flags & ShouldCapture) {\n workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var _flags = workInProgress.flags;\n\n if (!((_flags & DidCapture) === NoFlags)) {\n {\n throw Error(\"The root failed to unmount after an error. This is likely a bug in React. Please file an issue.\");\n }\n }\n\n workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n return workInProgress;\n }\n\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var _flags2 = workInProgress.flags;\n\n if (_flags2 & ShouldCapture) {\n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ((workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n // caught by a nested boundary. If not, it should bubble through.\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n popProvider(workInProgress);\n return null;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(workInProgress);\n return null;\n\n default:\n return null;\n }\n }\n\n function unwindInterruptedWork(interruptedWork) {\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n\n break;\n }\n\n case HostRoot:\n {\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n resetWorkInProgressVersions();\n break;\n }\n\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n\n case SuspenseComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case SuspenseListComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case ContextProvider:\n popProvider(interruptedWork);\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(interruptedWork);\n break;\n }\n }\n\n function createCapturedValue(value, source) {\n // If the value is an error, call this function immediately after it is thrown\n // so the stack is accurate.\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n } // This module is forked in different environments.\n // By default, return `true` to log errors to the console.\n // Forks can return `false` if this isn't desirable.\n\n\n function showErrorDialog(boundary, errorInfo) {\n return true;\n }\n\n function logCapturedError(boundary, errorInfo) {\n try {\n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n\n if (logError === false) {\n return;\n }\n\n var error = errorInfo.value;\n\n if (true) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling\n // `preventDefault()` in window `error` handler.\n // We record this information as an expando on the error.\n\n if (error != null && error._suppressLogging) {\n if (boundary.tag === ClassComponent) {\n // The error is recoverable and was silenced.\n // Ignore it and don't print the stack addendum.\n // This is handy for testing error boundaries without noise.\n return;\n } // The error is fatal. Since the silencing might have\n // been accidental, we'll surface it anyway.\n // However, the browser would have silenced the original error\n // so we'll print it first, and then print the stack addendum.\n\n\n console['error'](error); // Don't transform to our wrapper\n // For a more detailed description of this block, see:\n // https://github.com/facebook/react/pull/13384\n }\n\n var componentName = source ? getComponentName(source.type) : null;\n var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n var errorBoundaryMessage;\n var errorBoundaryName = getComponentName(boundary.type);\n\n if (errorBoundaryName) {\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n } else {\n 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.';\n }\n\n var combinedMessage = componentNameMessage + \"\\n\" + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n // We don't include the original error message and JS stack because the browser\n // has already printed it. Even if the application swallows the error, it is still\n // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n console['error'](combinedMessage); // Don't transform to our wrapper\n } else {\n // In production, we print the error directly.\n // This will include the message, the JS stack, and anything the browser wants to show.\n // We pass the error object instead of custom message so that the browser displays the error natively.\n console['error'](error); // Don't transform to our wrapper\n }\n } catch (e) {\n // This method must not throw, or React internal state will get messed up.\n // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n // we want to report this error outside of the normal stack as a last resort.\n // https://github.com/facebook/react/issues/13188\n setTimeout(function () {\n throw e;\n });\n }\n }\n\n var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\n function createRootErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.\n\n update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: null\n };\n var error = errorInfo.value;\n\n update.callback = function () {\n onUncaughtError(error);\n logCapturedError(fiber, errorInfo);\n };\n\n return update;\n }\n\n function createClassErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n\n update.payload = function () {\n logCapturedError(fiber, errorInfo);\n return getDerivedStateFromError(error$1);\n };\n }\n\n var inst = fiber.stateNode;\n\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n if (typeof getDerivedStateFromError !== 'function') {\n // To preserve the preexisting retry behavior of error boundaries,\n // we keep track of which ones already failed during this batch.\n // This gets reset before we yield back to the browser.\n // TODO: Warn in strict mode if getDerivedStateFromError is\n // not defined.\n markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined\n\n logCapturedError(fiber, errorInfo);\n }\n\n var error$1 = errorInfo.value;\n var stack = errorInfo.stack;\n this.componentDidCatch(error$1, {\n componentStack: stack !== null ? stack : ''\n });\n {\n if (typeof getDerivedStateFromError !== 'function') {\n // If componentDidCatch is the only error boundary method defined,\n // then it needs to call setState to recover from errors.\n // If no state update is scheduled then the boundary will swallow the error.\n if (!includesSomeLane(fiber.lanes, SyncLane)) {\n 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');\n }\n }\n }\n };\n } else {\n update.callback = function () {\n markFailedErrorBoundaryForHotReloading(fiber);\n };\n }\n\n return update;\n }\n\n function attachPingListener(root, wakeable, lanes) {\n // Attach a listener to the promise to \"ping\" the root and retry. But only if\n // one does not already exist for the lanes we're currently rendering (which\n // acts like a \"thread ID\" here).\n var pingCache = root.pingCache;\n var threadIDs;\n\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap$1();\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else {\n threadIDs = pingCache.get(wakeable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n }\n }\n\n if (!threadIDs.has(lanes)) {\n // Memoize using the thread ID to prevent redundant listeners.\n threadIDs.add(lanes);\n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n wakeable.then(ping, ping);\n }\n }\n\n function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n // The source fiber did not complete.\n sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.\n\n sourceFiber.firstEffect = sourceFiber.lastEffect = null;\n\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a wakeable.\n var wakeable = value;\n\n if ((sourceFiber.mode & BlockingMode) === NoMode) {\n // Reset the memoizedState to what it was before we attempted\n // to render it.\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.lanes = currentSource.lanes;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n\n var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.\n\n var _workInProgress = returnFiber;\n\n do {\n if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {\n // Found the nearest boundary.\n // Stash the promise on the boundary fiber. If the boundary times out, we'll\n // attach another listener to flip the boundary back to its normal state.\n var wakeables = _workInProgress.updateQueue;\n\n if (wakeables === null) {\n var updateQueue = new Set();\n updateQueue.add(wakeable);\n _workInProgress.updateQueue = updateQueue;\n } else {\n wakeables.add(wakeable);\n } // If the boundary is outside of blocking mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. In the commit phase, we'll schedule a\n // subsequent synchronous update to re-render the Suspense.\n //\n // Note: It doesn't matter whether the component that suspended was\n // inside a blocking mode tree. If the Suspense is outside of it, we\n // should *not* suspend the commit.\n\n\n if ((_workInProgress.mode & BlockingMode) === NoMode) {\n _workInProgress.flags |= DidCapture;\n sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.\n // But we shouldn't call any lifecycle methods or callbacks. Remove\n // all lifecycle effect tags.\n\n sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);\n\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\n\n if (currentSourceFiber === null) {\n // This is a new mount. Change the tag so it's not mistaken for a\n // completed class component. For example, we should not call\n // componentWillUnmount if it is deleted.\n sourceFiber.tag = IncompleteClassComponent;\n } else {\n // When we try rendering again, we should not reuse the current fiber,\n // since it's known to be in an inconsistent state. Use a force update to\n // prevent a bail out.\n var update = createUpdate(NoTimestamp, SyncLane);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.\n\n return;\n } // Confirmed that the boundary is in a concurrent mode tree. Continue\n // with the normal suspend path.\n //\n // After this we'll use a set of heuristics to determine whether this\n // render pass will run to completion or restart or \"suspend\" the commit.\n // The actual logic for this is spread out in different places.\n //\n // This first principle is that if we're going to suspend when we complete\n // a root, then we should also restart if we get an update or ping that\n // might unsuspend it, and vice versa. The only reason to suspend is\n // because you think you might want to restart before committing. However,\n // it doesn't make sense to restart only while in the period we're suspended.\n //\n // Restarting too aggressively is also not good because it starves out any\n // intermediate loading state. So we use heuristics to determine when.\n // Suspense Heuristics\n //\n // If nothing threw a Promise or all the same fallbacks are already showing,\n // then don't suspend/restart.\n //\n // If this is an initial render of a new tree of Suspense boundaries and\n // those trigger a fallback, then don't suspend/restart. We want to ensure\n // that we can show the initial loading state as quickly as possible.\n //\n // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n // a fallback, then we should always suspend/restart. Transitions apply\n // to this case. If none is defined, JND is used instead.\n //\n // If we're already showing a fallback and it gets \"retried\", allowing us to show\n // another level, but there's still an inner boundary that would show a fallback,\n // then we suspend/restart for 500ms since the last time we showed a fallback\n // anywhere in the tree. This effectively throttles progressive loading into a\n // consistent train of commits. This also gives us an opportunity to restart to\n // get to the completed state slightly earlier.\n //\n // If there's ambiguity due to batching it's resolved in preference of:\n // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n //\n // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n // ensure that new initial loading states can commit as soon as possible.\n\n\n attachPingListener(root, wakeable, rootRenderLanes);\n _workInProgress.flags |= ShouldCapture;\n _workInProgress.lanes = rootRenderLanes;\n return;\n } // This boundary already captured during this render. Continue to the next\n // boundary.\n\n\n _workInProgress = _workInProgress.return;\n } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.\n // TODO: Use invariant so the message is stripped in prod?\n\n\n 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.');\n } // We didn't find a boundary that could handle this type of exception. Start\n // over and traverse parent path again, this time treating the exception\n // as an error.\n\n\n renderDidError();\n value = createCapturedValue(value, sourceFiber);\n var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.flags |= ShouldCapture;\n var lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n\n var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n\n if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.flags |= ShouldCapture;\n\n var _lane = pickArbitraryLane(rootRenderLanes);\n\n workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n enqueueCapturedUpdate(workInProgress, _update2);\n return;\n }\n\n break;\n }\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n }\n\n var didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n {\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n }\n var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\n\n var callComponentWillUnmountWithTimer = function (current, instance) {\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n {\n instance.componentWillUnmount();\n }\n }; // Capture errors so they don't interrupt unmounting.\n\n\n function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current, unmountError);\n }\n }\n }\n\n function safelyDetachRef(current) {\n var ref = current.ref;\n\n if (ref !== null) {\n if (typeof ref === 'function') {\n {\n invokeGuardedCallback(null, ref, null, null);\n\n if (hasCaughtError()) {\n var refError = clearCaughtError();\n captureCommitPhaseError(current, refError);\n }\n }\n } else {\n ref.current = null;\n }\n }\n }\n\n function safelyCallDestroy(current, destroy) {\n {\n invokeGuardedCallback(null, destroy, null);\n\n if (hasCaughtError()) {\n var error = clearCaughtError();\n captureCommitPhaseError(current, error);\n }\n }\n }\n\n function commitBeforeMutationLifeCycles(current, finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n return;\n }\n\n case ClassComponent:\n {\n if (finishedWork.flags & Snapshot) {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n var instance = finishedWork.stateNode; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props 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');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n 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');\n }\n }\n }\n var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n {\n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n didWarnSet.add(finishedWork.type);\n error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));\n }\n }\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n }\n\n return;\n }\n\n case HostRoot:\n {\n {\n if (finishedWork.flags & Snapshot) {\n var root = finishedWork.stateNode;\n clearContainer(root.containerInfo);\n }\n }\n return;\n }\n\n case HostComponent:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n return;\n }\n\n {\n {\n throw Error(\"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function commitHookEffectListUnmount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Unmount\n var destroy = effect.destroy;\n effect.destroy = undefined;\n\n if (destroy !== undefined) {\n destroy();\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n\n function commitHookEffectListMount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Mount\n var create = effect.create;\n effect.destroy = create();\n {\n var destroy = effect.destroy;\n\n if (destroy !== undefined && typeof destroy !== 'function') {\n var addendum = void 0;\n\n if (destroy === null) {\n addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n } else if (typeof destroy.then === 'function') {\n 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';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n\n function schedulePassiveEffects(finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var _effect = effect,\n next = _effect.next,\n tag = _effect.tag;\n\n if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {\n enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);\n enqueuePendingPassiveHookEffectMount(finishedWork, effect);\n }\n\n effect = next;\n } while (effect !== firstEffect);\n }\n }\n\n function commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n // At this point layout effects have already been destroyed (during mutation phase).\n // This is done to prevent sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n {\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n }\n schedulePassiveEffects(finishedWork);\n return;\n }\n\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (finishedWork.flags & Update) {\n if (current === null) {\n // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props 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');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n 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');\n }\n }\n }\n {\n instance.componentDidMount();\n }\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props 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');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n 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');\n }\n }\n }\n {\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n }\n }\n } // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n\n\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props 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');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n 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');\n }\n }\n } // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n commitUpdateQueue(finishedWork, updateQueue, instance);\n }\n\n return;\n }\n\n case HostRoot:\n {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var _updateQueue = finishedWork.updateQueue;\n\n if (_updateQueue !== null) {\n var _instance = null;\n\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostComponent:\n _instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n\n case ClassComponent:\n _instance = finishedWork.child.stateNode;\n break;\n }\n }\n\n commitUpdateQueue(finishedWork, _updateQueue, _instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (current === null && finishedWork.flags & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props);\n }\n\n return;\n }\n\n case HostText:\n {\n // We have no life-cycles associated with text.\n return;\n }\n\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n return;\n }\n\n case Profiler:\n {\n {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n onCommit = _finishedWork$memoize2.onCommit,\n onRender = _finishedWork$memoize2.onRender;\n var effectDuration = finishedWork.stateNode.effectDuration;\n var commitTime = getCommitTime();\n\n if (typeof onRender === 'function') {\n {\n onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);\n }\n }\n }\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n case IncompleteClassComponent:\n case FundamentalComponent:\n case ScopeComponent:\n case OffscreenComponent:\n case LegacyHiddenComponent:\n return;\n }\n\n {\n {\n throw Error(\"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function hideOrUnhideAllChildren(finishedWork, isHidden) {\n {\n // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n\n while (true) {\n if (node.tag === HostComponent) {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } else if (node.tag === HostText) {\n var _instance3 = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance3);\n } else {\n unhideTextInstance(_instance3, node.memoizedProps);\n }\n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ;else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === finishedWork) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n }\n\n function commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n\n switch (finishedWork.tag) {\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n\n if (typeof ref === 'function') {\n ref(instanceToUse);\n } else {\n {\n if (!ref.hasOwnProperty('current')) {\n error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));\n }\n }\n ref.current = instanceToUse;\n }\n }\n }\n\n function commitDetachRef(current) {\n var currentRef = current.ref;\n\n if (currentRef !== null) {\n if (typeof currentRef === 'function') {\n currentRef(null);\n } else {\n currentRef.current = null;\n }\n }\n } // User-originating errors (lifecycles and refs) should not interrupt\n // deletion, so don't let them throw. Host-originating errors should\n // interrupt deletion, so it's okay\n\n\n function commitUnmount(finishedRoot, current, renderPriorityLevel) {\n onCommitUnmount(current);\n\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n var updateQueue = current.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var _effect2 = effect,\n destroy = _effect2.destroy,\n tag = _effect2.tag;\n\n if (destroy !== undefined) {\n if ((tag & Passive$1) !== NoFlags$1) {\n enqueuePendingPassiveHookEffectUnmount(current, effect);\n } else {\n {\n safelyCallDestroy(current, destroy);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n safelyDetachRef(current);\n var instance = current.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(current, instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n safelyDetachRef(current);\n return;\n }\n\n case HostPortal:\n {\n // TODO: this is recursive.\n // We are also not using this parent because\n // the portal will get pushed immediately.\n {\n unmountHostComponents(finishedRoot, current);\n }\n return;\n }\n\n case FundamentalComponent:\n {\n return;\n }\n\n case DehydratedFragment:\n {\n return;\n }\n\n case ScopeComponent:\n {\n return;\n }\n }\n }\n\n function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {\n // While we're inside a removed host node we don't want to call\n // removeChild on the inner nodes because they're removed by the top\n // call anyway. We also want to call componentWillUnmount on all\n // composites before this host node is removed from the tree. Therefore\n // we do an inner loop while we're still inside the host node.\n var node = root;\n\n while (true) {\n commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.\n // Skip portals because commitUnmount() currently visits them recursively.\n\n if (node.child !== null && // If we use mutation we drill down into portals using commitUnmount above.\n // If we don't use mutation we drill down into portals here instead.\n node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === root) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === root) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n function detachFiberMutation(fiber) {\n // Cut off the return pointers to disconnect it from the tree. Ideally, we\n // should clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child. This child\n // itself will be GC:ed when the parent updates the next time.\n // Note: we cannot null out sibling here, otherwise it can cause issues\n // with findDOMNode and how it requires the sibling field to carry out\n // traversal in a later effect. See PR #16820. We now clear the sibling\n // field after effects, see: detachFiberAfterEffects.\n //\n // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.\n // It may be required if the current component is an error boundary,\n // and one of its descendants throws while unmounting a passive effect.\n fiber.alternate = null;\n fiber.child = null;\n fiber.dependencies = null;\n fiber.firstEffect = null;\n fiber.lastEffect = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.return = null;\n fiber.updateQueue = null;\n {\n fiber._debugOwner = null;\n }\n }\n\n function getHostParentFiber(fiber) {\n var parent = fiber.return;\n\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n\n parent = parent.return;\n }\n\n {\n {\n throw Error(\"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n }\n\n function getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n // TODO: Find a more efficient way to do this.\n var node = fiber;\n\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node.return === null || isHostParent(node.return)) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n\n while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.flags & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n } // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n\n\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child.return = node;\n node = node.child;\n }\n } // Check if this host node is stable or about to be placed.\n\n\n if (!(node.flags & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n }\n\n function commitPlacement(finishedWork) {\n var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n var parent;\n var isContainer;\n var parentStateNode = parentFiber.stateNode;\n\n switch (parentFiber.tag) {\n case HostComponent:\n parent = parentStateNode;\n isContainer = false;\n break;\n\n case HostRoot:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case HostPortal:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case FundamentalComponent: // eslint-disable-next-line-no-fallthrough\n\n default:\n {\n {\n throw Error(\"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n if (parentFiber.flags & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(parent); // Clear ContentReset from the effect tag\n\n parentFiber.flags &= ~ContentReset;\n }\n\n var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n if (isContainer) {\n insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);\n } else {\n insertOrAppendPlacementNode(finishedWork, before, parent);\n }\n }\n\n function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertInContainerBefore(parent, stateNode, before);\n } else {\n appendChildToContainer(parent, stateNode);\n }\n } else if (tag === HostPortal) ;else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n }\n\n function insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertBefore(parent, stateNode, before);\n } else {\n appendChild(parent, stateNode);\n }\n } else if (tag === HostPortal) ;else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n }\n\n function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {\n // We only have the top Fiber that was deleted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = current; // Each iteration, currentParent is populated with node's host parent if not\n // currentParentIsValid.\n\n var currentParentIsValid = false; // Note: these two variables *must* always be updated together.\n\n var currentParent;\n var currentParentIsContainer;\n\n while (true) {\n if (!currentParentIsValid) {\n var parent = node.return;\n\n findParent: while (true) {\n if (!(parent !== null)) {\n {\n throw Error(\"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var parentStateNode = parent.stateNode;\n\n switch (parent.tag) {\n case HostComponent:\n currentParent = parentStateNode;\n currentParentIsContainer = false;\n break findParent;\n\n case HostRoot:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n\n case HostPortal:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n }\n\n parent = parent.return;\n }\n\n currentParentIsValid = true;\n }\n\n if (node.tag === HostComponent || node.tag === HostText) {\n commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the\n // node from the tree.\n\n if (currentParentIsContainer) {\n removeChildFromContainer(currentParent, node.stateNode);\n } else {\n removeChild(currentParent, node.stateNode);\n } // Don't visit children because we already visited them.\n\n } else if (node.tag === HostPortal) {\n if (node.child !== null) {\n // When we go into a portal, it becomes the parent to remove from.\n // We will reassign it back when we pop the portal on the way up.\n currentParent = node.stateNode.containerInfo;\n currentParentIsContainer = true; // Visit children because portals might contain host components.\n\n node.child.return = node;\n node = node.child;\n continue;\n }\n } else {\n commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.\n\n if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n }\n\n if (node === current) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === current) {\n return;\n }\n\n node = node.return;\n\n if (node.tag === HostPortal) {\n // When we go out of the portal, we need to restore the parent.\n // Since we don't keep a stack of them, we will search for it.\n currentParentIsValid = false;\n }\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n function commitDeletion(finishedRoot, current, renderPriorityLevel) {\n {\n // Recursively delete all host nodes from the parent.\n // Detach refs and call componentWillUnmount() on the whole subtree.\n unmountHostComponents(finishedRoot, current);\n }\n var alternate = current.alternate;\n detachFiberMutation(current);\n\n if (alternate !== null) {\n detachFiberMutation(alternate);\n }\n }\n\n function commitWork(current, finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n // Layout effects are destroyed during the mutation phase so that all\n // destroy functions for all fibers are called before any create functions.\n // This prevents sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n {\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork);\n }\n return;\n }\n\n case ClassComponent:\n {\n return;\n }\n\n case HostComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (instance != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n if (updatePayload !== null) {\n commitUpdate(instance, updatePayload, type, oldProps, newProps);\n }\n }\n\n return;\n }\n\n case HostText:\n {\n if (!(finishedWork.stateNode !== null)) {\n {\n throw Error(\"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldText = current !== null ? current.memoizedProps : newText;\n commitTextUpdate(textInstance, oldText, newText);\n return;\n }\n\n case HostRoot:\n {\n {\n var _root = finishedWork.stateNode;\n\n if (_root.hydrate) {\n // We've just hydrated. No need to hydrate again.\n _root.hydrate = false;\n commitHydratedContainer(_root.containerInfo);\n }\n }\n return;\n }\n\n case Profiler:\n {\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseComponent(finishedWork);\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n {\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case IncompleteClassComponent:\n {\n return;\n }\n\n case FundamentalComponent:\n {\n break;\n }\n\n case ScopeComponent:\n {\n break;\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n var newState = finishedWork.memoizedState;\n var isHidden = newState !== null;\n hideOrUnhideAllChildren(finishedWork, isHidden);\n return;\n }\n }\n\n {\n {\n throw Error(\"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n function commitSuspenseComponent(finishedWork) {\n var newState = finishedWork.memoizedState;\n\n if (newState !== null) {\n markCommitTimeOfFallback();\n {\n // Hide the Offscreen component that contains the primary children. TODO:\n // Ideally, this effect would have been scheduled on the Offscreen fiber\n // itself. That's how unhiding works: the Offscreen component schedules an\n // effect on itself. However, in this case, the component didn't complete,\n // so the fiber was never added to the effect list in the normal path. We\n // could have appended it to the effect list in the Suspense component's\n // second pass, but doing it this way is less complicated. This would be\n // simpler if we got rid of the effect list and traversed the tree, like\n // we're planning to do.\n var primaryChildParent = finishedWork.child;\n hideOrUnhideAllChildren(primaryChildParent, true);\n }\n }\n }\n\n function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n var newState = finishedWork.memoizedState;\n\n if (newState === null) {\n var current = finishedWork.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n\n if (suspenseInstance !== null) {\n commitHydratedSuspenseInstance(suspenseInstance);\n }\n }\n }\n }\n }\n\n function attachSuspenseRetryListeners(finishedWork) {\n // If this boundary just timed out, then it will have a set of wakeables.\n // For each wakeable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var wakeables = finishedWork.updateQueue;\n\n if (wakeables !== null) {\n finishedWork.updateQueue = null;\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n wakeables.forEach(function (wakeable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n if (!retryCache.has(wakeable)) {\n {\n if (wakeable.__reactDoNotTraceInteractions !== true) {\n retry = tracing.unstable_wrap(retry);\n }\n }\n retryCache.add(wakeable);\n wakeable.then(retry, retry);\n }\n });\n }\n } // This function detects when a Suspense boundary goes from visible to hidden.\n // It returns false if the boundary is already hidden.\n // TODO: Use an effect tag.\n\n\n function isSuspenseBoundaryBeingHidden(current, finishedWork) {\n if (current !== null) {\n var oldState = current.memoizedState;\n\n if (oldState === null || oldState.dehydrated !== null) {\n var newState = finishedWork.memoizedState;\n return newState !== null && newState.dehydrated === null;\n }\n }\n\n return false;\n }\n\n function commitResetTextContent(current) {\n resetTextContent(current.stateNode);\n }\n\n var COMPONENT_TYPE = 0;\n var HAS_PSEUDO_CLASS_TYPE = 1;\n var ROLE_TYPE = 2;\n var TEST_NAME_TYPE = 3;\n var TEXT_TYPE = 4;\n\n if (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor$1 = Symbol.for;\n COMPONENT_TYPE = symbolFor$1('selector.component');\n HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');\n ROLE_TYPE = symbolFor$1('selector.role');\n TEST_NAME_TYPE = symbolFor$1('selector.test_id');\n TEXT_TYPE = symbolFor$1('selector.text');\n }\n\n var commitHooks = [];\n\n function onCommitRoot$1() {\n {\n commitHooks.forEach(function (commitHook) {\n return commitHook();\n });\n }\n }\n\n var ceil = Math.ceil;\n var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;\n var NoContext =\n /* */\n 0;\n var BatchedContext =\n /* */\n 1;\n var EventContext =\n /* */\n 2;\n var DiscreteEventContext =\n /* */\n 4;\n var LegacyUnbatchedContext =\n /* */\n 8;\n var RenderContext =\n /* */\n 16;\n var CommitContext =\n /* */\n 32;\n var RetryAfterError =\n /* */\n 64;\n var RootIncomplete = 0;\n var RootFatalErrored = 1;\n var RootErrored = 2;\n var RootSuspended = 3;\n var RootSuspendedWithDelay = 4;\n var RootCompleted = 5; // Describes where we are in the React execution stack\n\n var executionContext = NoContext; // The root we're working on\n\n var workInProgressRoot = null; // The fiber we're working on\n\n var workInProgress = null; // The lanes we're rendering\n\n var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree\n // This is a superset of the lanes we started working on at the root. The only\n // case where it's different from `workInProgressRootRenderLanes` is when we\n // enter a subtree that is hidden and needs to be unhidden: Suspense and\n // Offscreen component.\n //\n // Most things in the work loop should deal with workInProgressRootRenderLanes.\n // Most things in begin/complete phases should deal with subtreeRenderLanes.\n\n var subtreeRenderLanes = NoLanes;\n var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.\n\n var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown\n\n var workInProgressRootFatalError = null; // \"Included\" lanes refer to lanes that were worked on during this render. It's\n // slightly different than `renderLanes` because `renderLanes` can change as you\n // enter and exit an Offscreen tree. This value is the combination of all render\n // lanes for the entire render phase.\n\n var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only\n // includes unprocessed updates, not work in bailed out children.\n\n var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\n var workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.\n\n var workInProgressRootPingedLanes = NoLanes;\n var mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train\n // model where we don't commit new loading states in too quick succession.\n\n var globalMostRecentFallbackTime = 0;\n var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering\n // more and prefer CPU suspense heuristics instead.\n\n var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n // suspense heuristics and opt out of rendering more content.\n\n var RENDER_TIMEOUT_MS = 500;\n\n function resetRenderTimer() {\n workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;\n }\n\n function getRenderTargetTime() {\n return workInProgressRootRenderTargetTime;\n }\n\n var nextEffect = null;\n var hasUncaughtError = false;\n var firstUncaughtError = null;\n var legacyErrorBoundariesThatAlreadyFailed = null;\n var rootDoesHavePassiveEffects = false;\n var rootWithPendingPassiveEffects = null;\n var pendingPassiveEffectsRenderPriority = NoPriority$1;\n var pendingPassiveEffectsLanes = NoLanes;\n var pendingPassiveHookEffectsMount = [];\n var pendingPassiveHookEffectsUnmount = [];\n var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates\n\n var NESTED_UPDATE_LIMIT = 50;\n var nestedUpdateCount = 0;\n var rootWithNestedUpdates = null;\n var NESTED_PASSIVE_UPDATE_LIMIT = 50;\n var nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes\n // during the commit phase. This enables them to be traced across components\n // that spawn new work during render. E.g. hidden boundaries, suspended SSR\n // hydration or SuspenseList.\n // TODO: Can use a bitmask instead of an array\n\n var spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their\n // event times as simultaneous, even if the actual clock time has advanced\n // between the first and second call.\n\n var currentEventTime = NoTimestamp;\n var currentEventWipLanes = NoLanes;\n var currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.\n // We warn about state updates for unmounted components differently in this case.\n\n var isFlushingPassiveEffects = false;\n var focusedInstanceHandle = null;\n var shouldFireAfterActiveInstanceBlur = false;\n\n function getWorkInProgressRoot() {\n return workInProgressRoot;\n }\n\n function requestEventTime() {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // We're inside React, so it's fine to read the actual time.\n return now();\n } // We're not inside React, so we may be in the middle of a browser event.\n\n\n if (currentEventTime !== NoTimestamp) {\n // Use the same start time for all updates until we enter React again.\n return currentEventTime;\n } // This is the first update since React yielded. Compute a new start time.\n\n\n currentEventTime = now();\n return currentEventTime;\n }\n\n function requestUpdateLane(fiber) {\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & BlockingMode) === NoMode) {\n return SyncLane;\n } else if ((mode & ConcurrentMode) === NoMode) {\n return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;\n } // The algorithm for assigning an update to a lane should be stable for all\n // updates at the same priority within the same event. To do this, the inputs\n // to the algorithm must be the same. For example, we use the `renderLanes`\n // to avoid choosing a lane that is already in the middle of rendering.\n //\n // However, the \"included\" lanes could be mutated in between updates in the\n // same event, like if you perform an update inside `flushSync`. Or any other\n // code path that might call `prepareFreshStack`.\n //\n // The trick we use is to cache the first of each of these inputs within an\n // event. Then reset the cached values once we can be sure the event is over.\n // Our heuristic for that is whenever we enter a concurrent work loop.\n //\n // We'll do the same for `currentEventPendingLanes` below.\n\n\n if (currentEventWipLanes === NoLanes) {\n currentEventWipLanes = workInProgressRootIncludedLanes;\n }\n\n var isTransition = requestCurrentTransition() !== NoTransition;\n\n if (isTransition) {\n if (currentEventPendingLanes !== NoLanes) {\n currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;\n }\n\n return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);\n } // TODO: Remove this dependency on the Scheduler priority.\n // To do that, we're replacing it with an update lane priority.\n\n\n var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.\n // This couples React to the Scheduler internals, so we're replacing it\n // with the currentUpdateLanePriority above. As an example of how this\n // could be problematic, if we're not inside `Scheduler.runWithPriority`,\n // then we'll get the priority of the current running Scheduler task,\n // which is probably not what we want.\n\n var lane;\n\n if ( // TODO: Temporary. We're removing the concept of discrete updates.\n (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {\n lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);\n } else {\n var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);\n lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);\n }\n\n return lane;\n }\n\n function requestRetryLane(fiber) {\n // This is a fork of `requestUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & BlockingMode) === NoMode) {\n return SyncLane;\n } else if ((mode & ConcurrentMode) === NoMode) {\n return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;\n } // See `requestUpdateLane` for explanation of `currentEventWipLanes`\n\n\n if (currentEventWipLanes === NoLanes) {\n currentEventWipLanes = workInProgressRootIncludedLanes;\n }\n\n return findRetryLane(currentEventWipLanes);\n }\n\n function scheduleUpdateOnFiber(fiber, lane, eventTime) {\n checkForNestedUpdates();\n warnAboutRenderPhaseUpdatesInDEV(fiber);\n var root = markUpdateLaneFromFiberToRoot(fiber, lane);\n\n if (root === null) {\n warnAboutUpdateOnUnmountedFiberInDEV(fiber);\n return null;\n } // Mark that the root has a pending update.\n\n\n markRootUpdated(root, lane, eventTime);\n\n if (root === workInProgressRoot) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that there was an interleaved update work on this root. Unless the\n // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render\n // phase update. In that case, we don't treat render phase updates as if\n // they were interleaved, for backwards compat reasons.\n {\n workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);\n }\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: Make sure this doesn't override pings that happen while we've\n // already started rendering.\n markRootSuspended$1(root, workInProgressRootRenderLanes);\n }\n } // TODO: requestUpdateLanePriority also reads the priority. Pass the\n // priority as an argument to that function and this one.\n\n\n var priorityLevel = getCurrentPriorityLevel();\n\n if (lane === SyncLane) {\n if ( // Check if we're inside unbatchedUpdates\n (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering\n (executionContext & (RenderContext | CommitContext)) === NoContext) {\n // Register pending interactions on the root to avoid losing traced interaction data.\n schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed\n // root inside of batchedUpdates should be synchronous, but layout updates\n // should be deferred until the end of the batch.\n\n performSyncWorkOnRoot(root);\n } else {\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, lane);\n\n if (executionContext === NoContext) {\n // Flush the synchronous work now, unless we're already working or inside\n // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n // scheduleCallbackForFiber to preserve the ability to schedule a callback\n // without immediately flushing it. We only do this for user-initiated\n // updates, to preserve historical behavior of legacy mode.\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n } else {\n // Schedule a discrete update but only if it's not Sync.\n if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered\n // discrete, even inside a discrete event.\n priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {\n // This is the result of a discrete event. Track the lowest priority\n // discrete update per root so we can flush them early, if needed.\n if (rootsWithPendingDiscreteUpdates === null) {\n rootsWithPendingDiscreteUpdates = new Set([root]);\n } else {\n rootsWithPendingDiscreteUpdates.add(root);\n }\n } // Schedule other updates after in case the callback is sync.\n\n\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, lane);\n } // We use this when assigning a lane for a transition inside\n // `requestUpdateLane`. We assume it's the same as the root being updated,\n // since in the common case of a single root app it probably is. If it's not\n // the same root, then it's not a huge deal, we just might batch more stuff\n // together more than necessary.\n\n\n mostRecentlyUpdatedRoot = root;\n } // This is split into a separate function so we can mark a fiber with pending\n // work without treating it as a typical update that originates from an event;\n // e.g. retrying a Suspense boundary isn't an update, but it does schedule work\n // on a fiber.\n\n\n function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n // Update the source fiber's lanes\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n var alternate = sourceFiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n }\n\n {\n if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n } // Walk the parent path to the root and update the child expiration time.\n\n var node = sourceFiber;\n var parent = sourceFiber.return;\n\n while (parent !== null) {\n parent.childLanes = mergeLanes(parent.childLanes, lane);\n alternate = parent.alternate;\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n } else {\n {\n if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n }\n }\n\n node = parent;\n parent = parent.return;\n }\n\n if (node.tag === HostRoot) {\n var root = node.stateNode;\n return root;\n } else {\n return null;\n }\n } // Use this function to schedule a task for a root. There's only one task per\n // root; if a task was already scheduled, we'll check to make sure the priority\n // of the existing task is the same as the priority of the next level that the\n // root has work on. This function is called on every update, and right before\n // exiting a task.\n\n\n function ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n } // This is the entry point for every concurrent task, i.e. anything that\n // goes through Scheduler.\n\n\n function performConcurrentWorkOnRoot(root) {\n // Since we know we're in a React event, we can clear the current\n // event time. The next update will compute a new event time.\n currentEventTime = NoTimestamp;\n currentEventWipLanes = NoLanes;\n currentEventPendingLanes = NoLanes;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Should not already be working.\");\n }\n } // Flush any pending passive effects before deciding which lanes to work on,\n // in case they schedule additional work.\n\n\n var originalCallbackNode = root.callbackNode;\n var didFlushPassiveEffects = flushPassiveEffects();\n\n if (didFlushPassiveEffects) {\n // Something in the passive effect phase may have canceled the current task.\n // Check if the task node for this root was changed.\n if (root.callbackNode !== originalCallbackNode) {\n // The current task was canceled. Exit. We don't need to call\n // `ensureRootIsScheduled` because the check above implies either that\n // there's a new task, or that there's no remaining work on this root.\n return null;\n }\n } // Determine the next expiration time to work on, using the fields stored\n // on the root.\n\n\n var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (lanes === NoLanes) {\n // Defensive coding. This is never expected to happen.\n return null;\n }\n\n var exitStatus = renderRootConcurrent(root, lanes);\n\n if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {\n // The render included lanes that were updated during the render phase.\n // For example, when unhiding a hidden tree, we include all the lanes\n // that were previously skipped when the tree was hidden. That set of\n // lanes is a superset of the lanes we started rendering with.\n //\n // So we'll throw out the current work and restart.\n prepareFreshStack(root, NoLanes);\n } else if (exitStatus !== RootIncomplete) {\n if (exitStatus === RootErrored) {\n executionContext |= RetryAfterError; // If an error occurred during hydration,\n // discard server response and fall back to client side render.\n\n if (root.hydrate) {\n root.hydrate = false;\n clearContainer(root.containerInfo);\n } // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n\n\n lanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (lanes !== NoLanes) {\n exitStatus = renderRootSync(root, lanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n } // We now have a consistent tree. The next step is either to commit it,\n // or, if something suspended, wait to commit it after a timeout.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n finishConcurrentRender(root, exitStatus, lanes);\n }\n\n ensureRootIsScheduled(root, now());\n\n if (root.callbackNode === originalCallbackNode) {\n // The task node scheduled for this root is the same one that's\n // currently executed. Need to return a continuation.\n return performConcurrentWorkOnRoot.bind(null, root);\n }\n\n return null;\n }\n\n function finishConcurrentRender(root, exitStatus, lanes) {\n switch (exitStatus) {\n case RootIncomplete:\n case RootFatalErrored:\n {\n {\n {\n throw Error(\"Root did not complete. This is a bug in React.\");\n }\n }\n }\n // Flow knows about invariant, so it complains if I add a break\n // statement, but eslint doesn't know about invariant, so it complains\n // if I do. eslint-disable-next-line no-fallthrough\n\n case RootErrored:\n {\n // We should have already attempted to retry this tree. If we reached\n // this point, it errored again. Commit it.\n commitRoot(root);\n break;\n }\n\n case RootSuspended:\n {\n markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we\n // should immediately commit it or wait a bit.\n\n if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope\n !shouldForceFlushFallbacksInDEV()) {\n // This render only included retries, no updates. Throttle committing\n // retries so that we don't show too many loading states too quickly.\n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.\n\n if (msUntilTimeout > 10) {\n var nextLanes = getNextLanes(root, NoLanes);\n\n if (nextLanes !== NoLanes) {\n // There's additional work on this root.\n break;\n }\n\n var suspendedLanes = root.suspendedLanes;\n\n if (!isSubsetOfLanes(suspendedLanes, lanes)) {\n // We should prefer to render the fallback of at the last\n // suspended level. Ping the last suspended level to try\n // rendering it again.\n // FIXME: What if the suspended lanes are Idle? Should not restart.\n var eventTime = requestEventTime();\n markRootPinged(root, suspendedLanes);\n break;\n } // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n\n\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root);\n break;\n }\n\n case RootSuspendedWithDelay:\n {\n markRootSuspended$1(root, lanes);\n\n if (includesOnlyTransitions(lanes)) {\n // This is a transition, so we should exit without committing a\n // placeholder and without scheduling a timeout. Delay indefinitely\n // until we receive more data.\n break;\n }\n\n if (!shouldForceFlushFallbacksInDEV()) {\n // This is not a transition, but we did trigger an avoided state.\n // Schedule a placeholder to display after a short delay, using the Just\n // Noticeable Difference.\n // TODO: Is the JND optimization worth the added complexity? If this is\n // the only reason we track the event time, then probably not.\n // Consider removing.\n var mostRecentEventTime = getMostRecentEventTime(root, lanes);\n var eventTimeMs = mostRecentEventTime;\n var timeElapsedMs = now() - eventTimeMs;\n\n var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.\n\n\n if (_msUntilTimeout > 10) {\n // Instead of committing the fallback immediately, wait for more data\n // to arrive.\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);\n break;\n }\n } // Commit the placeholder.\n\n\n commitRoot(root);\n break;\n }\n\n case RootCompleted:\n {\n // The work completed. Ready to commit.\n commitRoot(root);\n break;\n }\n\n default:\n {\n {\n {\n throw Error(\"Unknown root exit status.\");\n }\n }\n }\n }\n }\n\n function markRootSuspended$1(root, suspendedLanes) {\n // When suspending, we should always exclude lanes that were pinged or (more\n // rarely, since we try to avoid it) updated during the render phase.\n // TODO: Lol maybe there's a better way to factor this besides this\n // obnoxiously named function :)\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);\n markRootSuspended(root, suspendedLanes);\n } // This is the entry point for synchronous tasks that don't go\n // through Scheduler\n\n\n function performSyncWorkOnRoot(root) {\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Should not already be working.\");\n }\n }\n\n flushPassiveEffects();\n var lanes;\n var exitStatus;\n\n if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {\n // There's a partial tree, and at least one of its lanes has expired. Finish\n // rendering it before rendering the rest of the expired work.\n lanes = workInProgressRootRenderLanes;\n exitStatus = renderRootSync(root, lanes);\n\n if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {\n // The render included lanes that were updated during the render phase.\n // For example, when unhiding a hidden tree, we include all the lanes\n // that were previously skipped when the tree was hidden. That set of\n // lanes is a superset of the lanes we started rendering with.\n //\n // Note that this only happens when part of the tree is rendered\n // concurrently. If the whole tree is rendered synchronously, then there\n // are no interleaved events.\n lanes = getNextLanes(root, lanes);\n exitStatus = renderRootSync(root, lanes);\n }\n } else {\n lanes = getNextLanes(root, NoLanes);\n exitStatus = renderRootSync(root, lanes);\n }\n\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n executionContext |= RetryAfterError; // If an error occurred during hydration,\n // discard server response and fall back to client side render.\n\n if (root.hydrate) {\n root.hydrate = false;\n clearContainer(root.containerInfo);\n } // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n\n\n lanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (lanes !== NoLanes) {\n exitStatus = renderRootSync(root, lanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n } // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n ensureRootIsScheduled(root, now());\n return null;\n }\n\n function flushDiscreteUpdates() {\n // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.\n // However, `act` uses `batchedUpdates`, so there's no way to distinguish\n // those two cases. Need to fix this before exposing flushDiscreteUpdates\n // as a public API.\n if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');\n }\n } // We're already rendering, so we can't synchronously flush pending work.\n // This is probably a nested event dispatch triggered by a lifecycle/effect,\n // like `el.focus()`. Exit.\n\n return;\n }\n\n flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that\n // they fire before the next serial event.\n\n flushPassiveEffects();\n }\n\n function flushPendingDiscreteUpdates() {\n if (rootsWithPendingDiscreteUpdates !== null) {\n // For each root with pending discrete updates, schedule a callback to\n // immediately flush them.\n var roots = rootsWithPendingDiscreteUpdates;\n rootsWithPendingDiscreteUpdates = null;\n roots.forEach(function (root) {\n markDiscreteUpdatesExpired(root);\n ensureRootIsScheduled(root, now());\n });\n } // Now flush the immediate queue.\n\n\n flushSyncCallbackQueue();\n }\n\n function batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n }\n\n function batchedEventUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= EventContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n }\n\n function discreteUpdates$1(fn, a, b, c, d) {\n var prevExecutionContext = executionContext;\n executionContext |= DiscreteEventContext;\n {\n try {\n return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n }\n }\n\n function unbatchedUpdates(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext &= ~BatchedContext;\n executionContext |= LegacyUnbatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n }\n\n function flushSync(fn, a) {\n var prevExecutionContext = executionContext;\n\n if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {\n {\n 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.');\n }\n return fn(a);\n }\n\n executionContext |= BatchedContext;\n {\n try {\n if (fn) {\n return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));\n } else {\n return undefined;\n }\n } finally {\n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n // Note that this will happen even if batchedUpdates is higher up\n // the stack.\n\n flushSyncCallbackQueue();\n }\n }\n }\n\n function pushRenderLanes(fiber, lanes) {\n push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);\n subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);\n workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);\n }\n\n function popRenderLanes(fiber) {\n subtreeRenderLanes = subtreeRenderLanesCursor.current;\n pop(subtreeRenderLanesCursor, fiber);\n }\n\n function prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n var timeoutHandle = root.timeoutHandle;\n\n if (timeoutHandle !== noTimeout) {\n // The root previous suspended and scheduled a timeout to commit a fallback\n // state. Now that we have additional work, cancel the timeout.\n root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above\n\n cancelTimeout(timeoutHandle);\n }\n\n if (workInProgress !== null) {\n var interruptedWork = workInProgress.return;\n\n while (interruptedWork !== null) {\n unwindInterruptedWork(interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n }\n\n workInProgressRoot = root;\n workInProgress = createWorkInProgress(root.current, null);\n workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;\n workInProgressRootExitStatus = RootIncomplete;\n workInProgressRootFatalError = null;\n workInProgressRootSkippedLanes = NoLanes;\n workInProgressRootUpdatedLanes = NoLanes;\n workInProgressRootPingedLanes = NoLanes;\n {\n spawnedWorkDuringRender = null;\n }\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n }\n\n function handleError(root, thrownValue) {\n do {\n var erroredWork = workInProgress;\n\n try {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksAfterThrow();\n resetCurrentFiber(); // TODO: I found and added this missing line while investigating a\n // separate issue. Write a regression test using string refs.\n\n ReactCurrentOwner$2.current = null;\n\n if (erroredWork === null || erroredWork.return === null) {\n // Expected to be working on a non-root fiber. This is a fatal error\n // because there's no ancestor that can handle it; the root is\n // supposed to capture all errors that weren't caught by an error\n // boundary.\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n // sibling, or the parent if there are no siblings. But since the root\n // has no siblings nor a parent, we set it to null. Usually this is\n // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n // intentionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return;\n }\n\n if (enableProfilerTimer && erroredWork.mode & ProfileMode) {\n // Record the time spent rendering before an error was thrown. This\n // avoids inaccurate Profiler durations in the case of a\n // suspended render.\n stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);\n }\n\n throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);\n completeUnitOfWork(erroredWork);\n } catch (yetAnotherThrownValue) {\n // Something in the return path also threw.\n thrownValue = yetAnotherThrownValue;\n\n if (workInProgress === erroredWork && erroredWork !== null) {\n // If this boundary has already errored, then we had trouble processing\n // the error. Bubble it to the next boundary.\n erroredWork = erroredWork.return;\n workInProgress = erroredWork;\n } else {\n erroredWork = workInProgress;\n }\n\n continue;\n } // Return to the normal work loop.\n\n\n return;\n } while (true);\n }\n\n function pushDispatcher() {\n var prevDispatcher = ReactCurrentDispatcher$2.current;\n ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;\n\n if (prevDispatcher === null) {\n // The React isomorphic package does not include a default dispatcher.\n // Instead the first renderer will lazily attach one, in order to give\n // nicer error messages.\n return ContextOnlyDispatcher;\n } else {\n return prevDispatcher;\n }\n }\n\n function popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher$2.current = prevDispatcher;\n }\n\n function pushInteractions(root) {\n {\n var prevInteractions = tracing.__interactionsRef.current;\n tracing.__interactionsRef.current = root.memoizedInteractions;\n return prevInteractions;\n }\n }\n\n function popInteractions(prevInteractions) {\n {\n tracing.__interactionsRef.current = prevInteractions;\n }\n }\n\n function markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now();\n }\n\n function markSkippedUpdateLanes(lane) {\n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n }\n\n function renderDidSuspend() {\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootSuspended;\n }\n }\n\n function renderDidSuspendDelayIfPossible() {\n if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {\n workInProgressRootExitStatus = RootSuspendedWithDelay;\n } // Check if there are updates that we skipped tree that might have unblocked\n // this render.\n\n\n if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {\n // Mark the current render as suspended so that we switch to working on\n // the updates that were skipped. Usually we only suspend at the end of\n // the render phase.\n // TODO: We should probably always mark the root as suspended immediately\n // (inside this function), since by suspending at the end of the render\n // phase introduces a potential mistake where we suspend lanes that were\n // pinged or updated while we were rendering.\n markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);\n }\n }\n\n function renderDidError() {\n if (workInProgressRootExitStatus !== RootCompleted) {\n workInProgressRootExitStatus = RootErrored;\n }\n } // Called during render to determine if anything has suspended.\n // Returns false if we're not sure.\n\n\n function renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n }\n\n function renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n prepareFreshStack(root, lanes);\n startWorkOnPendingInteractions(root, lanes);\n }\n\n var prevInteractions = pushInteractions(root);\n\n do {\n try {\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n {\n popInteractions(prevInteractions);\n }\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n {\n {\n throw Error(\"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.\");\n }\n }\n }\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes;\n return workInProgressRootExitStatus;\n } // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n /** @noinline */\n\n\n function workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n }\n\n function renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n resetRenderTimer();\n prepareFreshStack(root, lanes);\n startWorkOnPendingInteractions(root, lanes);\n }\n\n var prevInteractions = pushInteractions(root);\n\n do {\n try {\n workLoopConcurrent();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n {\n popInteractions(prevInteractions);\n }\n popDispatcher(prevDispatcher);\n executionContext = prevExecutionContext;\n\n if (workInProgress !== null) {\n return RootIncomplete;\n } else {\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // Return the final exit status.\n\n return workInProgressRootExitStatus;\n }\n }\n /** @noinline */\n\n\n function workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n performUnitOfWork(workInProgress);\n }\n }\n\n function performUnitOfWork(unitOfWork) {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = unitOfWork.alternate;\n setCurrentFiber(unitOfWork);\n var next;\n\n if ((unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n }\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$2.current = null;\n }\n\n function completeUnitOfWork(unitOfWork) {\n // Attempt to complete the current unit of work, then move to the next\n // sibling. If there are no more siblings, return to the parent fiber.\n var completedWork = unitOfWork;\n\n do {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = completedWork.alternate;\n var returnFiber = completedWork.return; // Check if the work completed or if something threw.\n\n if ((completedWork.flags & Incomplete) === NoFlags) {\n setCurrentFiber(completedWork);\n var next = void 0;\n\n if ((completedWork.mode & ProfileMode) === NoMode) {\n next = completeWork(current, completedWork, subtreeRenderLanes);\n } else {\n startProfilerTimer(completedWork);\n next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n }\n\n resetCurrentFiber();\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n workInProgress = next;\n return;\n }\n\n resetChildLanes(completedWork);\n\n if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete\n (returnFiber.flags & Incomplete) === NoFlags) {\n // Append all the effects of the subtree and this fiber onto the effect\n // list of the parent. The completion order of the children affects the\n // side-effect order.\n if (returnFiber.firstEffect === null) {\n returnFiber.firstEffect = completedWork.firstEffect;\n }\n\n if (completedWork.lastEffect !== null) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = completedWork.firstEffect;\n }\n\n returnFiber.lastEffect = completedWork.lastEffect;\n } // If this fiber had side-effects, we append it AFTER the children's\n // side-effects. We can perform certain side-effects earlier if needed,\n // by doing multiple passes over the effect list. We don't want to\n // schedule our own side-effect on our own list because if end up\n // reusing children we'll schedule this effect onto itself since we're\n // at the end.\n\n\n var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect\n // list. PerformedWork effect is read by React DevTools but shouldn't be\n // committed.\n\n if (flags > PerformedWork) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = completedWork;\n } else {\n returnFiber.firstEffect = completedWork;\n }\n\n returnFiber.lastEffect = completedWork;\n }\n }\n } else {\n // This fiber did not complete because something threw. Pop values off\n // the stack without entering the complete phase. If this is a boundary,\n // capture values if possible.\n var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time.\n\n\n if (_next !== null) {\n // If completing this work spawned new work, do that next. We'll come\n // back here again.\n // Since we're restarting, remove anything that is not a host effect\n // from the effect tag.\n _next.flags &= HostEffectMask;\n workInProgress = _next;\n return;\n }\n\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = completedWork.actualDuration;\n var child = completedWork.child;\n\n while (child !== null) {\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n }\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its effect list.\n returnFiber.firstEffect = returnFiber.lastEffect = null;\n returnFiber.flags |= Incomplete;\n }\n }\n\n var siblingFiber = completedWork.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n workInProgress = siblingFiber;\n return;\n } // Otherwise, return to the parent\n\n\n completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = completedWork;\n } while (completedWork !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootCompleted;\n }\n }\n\n function resetChildLanes(completedWork) {\n if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`\n // to switch statement in `completeWork`.\n (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {\n // The children of this component are hidden. Don't bubble their\n // expiration times.\n return;\n }\n\n var newChildLanes = NoLanes; // Bubble up the earliest expiration time.\n\n if ((completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var actualDuration = completedWork.actualDuration;\n var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n // When work is done, it should bubble to the parent's actualDuration. If\n // the fiber has not been cloned though, (meaning no work was done), then\n // this value will reflect the amount of time spent working on a previous\n // render. In that case it should not bubble. We determine whether it was\n // cloned by comparing the child pointer.\n\n var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;\n var child = completedWork.child;\n\n while (child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n\n if (shouldBubbleActualDurations) {\n actualDuration += child.actualDuration;\n }\n\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n\n var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;\n\n if (isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = completedWork.child;\n\n if (primaryChildFragment !== null) {\n treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n\n while (_child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n _child = _child.sibling;\n }\n }\n\n completedWork.childLanes = newChildLanes;\n }\n\n function commitRoot(root) {\n var renderPriorityLevel = getCurrentPriorityLevel();\n runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));\n return null;\n }\n\n function commitRootImpl(root, renderPriorityLevel) {\n do {\n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n // means `flushPassiveEffects` will sometimes result in additional\n // passive effects. So we need to keep flushing in a loop until there are\n // no more pending effects.\n // TODO: Might be better if `flushPassiveEffects` did not automatically\n // flush synchronous work at the end, to avoid factoring hazards like this.\n flushPassiveEffects();\n } while (rootWithPendingPassiveEffects !== null);\n\n flushRenderPhaseStrictModeWarningsInDEV();\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Should not already be working.\");\n }\n }\n\n var finishedWork = root.finishedWork;\n var lanes = root.finishedLanes;\n\n if (finishedWork === null) {\n return null;\n }\n\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n\n if (!(finishedWork !== root.current)) {\n {\n throw Error(\"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\");\n }\n } // commitRoot never returns a continuation; it always finishes synchronously.\n // So we can clear these now to allow a new callback to be scheduled.\n\n\n root.callbackNode = null; // Update the first and last pending times on this root. The new first\n // pending time is whatever is left on the root fiber.\n\n var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);\n markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of\n // `flushDiscreteUpdates` starts a useless render pass which may cancels\n // a scheduled timeout.\n\n if (rootsWithPendingDiscreteUpdates !== null) {\n if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {\n rootsWithPendingDiscreteUpdates.delete(root);\n }\n }\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n workInProgressRootRenderLanes = NoLanes;\n } // Get the list of effects.\n\n\n var firstEffect;\n\n if (finishedWork.flags > PerformedWork) {\n // A fiber's effect list consists only of its children, not itself. So if\n // the root has an effect, we need to add it to the end of the list. The\n // resulting list is the set that would belong to the root's parent, if it\n // had one; that is, all the effects in the tree including the root.\n if (finishedWork.lastEffect !== null) {\n finishedWork.lastEffect.nextEffect = finishedWork;\n firstEffect = finishedWork.firstEffect;\n } else {\n firstEffect = finishedWork;\n }\n } else {\n // There is no effect on the root.\n firstEffect = finishedWork.firstEffect;\n }\n\n if (firstEffect !== null) {\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles\n\n ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n // of the effect list for each phase: all mutation effects come before all\n // layout effects, and so on.\n // The first phase a \"before mutation\" phase. We use this phase to read the\n // state of the host tree right before we mutate it. This is where\n // getSnapshotBeforeUpdate is called.\n\n focusedInstanceHandle = prepareForCommit(root.containerInfo);\n shouldFireAfterActiveInstanceBlur = false;\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitBeforeMutationEffects, null);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var error = clearCaughtError();\n captureCommitPhaseError(nextEffect, error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null); // We no longer need to track the active instance fiber\n\n\n focusedInstanceHandle = null;\n {\n // Mark the current commit time to be shared by all Profilers in this\n // batch. This enables them to be grouped later.\n recordCommitTime();\n } // The next phase is the mutation phase, where we mutate the host tree.\n\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var _error = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after\n // the mutation phase, so that the previous tree is still current during\n // componentWillUnmount, but before the layout phase, so that the finished\n // work is current during componentDidMount/Update.\n\n root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n // the host tree after it's been mutated. The idiomatic use case for this is\n // layout, but class component lifecycles also fire here for legacy reasons.\n\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var _error2 = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error2);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an\n // opportunity to paint.\n\n requestPaint();\n {\n popInteractions(prevInteractions);\n }\n executionContext = prevExecutionContext;\n } else {\n // No effects.\n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n // no effects.\n // TODO: Maybe there's a better way to report this.\n\n {\n recordCommitTime();\n }\n }\n\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n if (rootDoesHavePassiveEffects) {\n // This commit has passive effects. Stash a reference to them. But don't\n // schedule a callback until after flushing layout work.\n rootDoesHavePassiveEffects = false;\n rootWithPendingPassiveEffects = root;\n pendingPassiveEffectsLanes = lanes;\n pendingPassiveEffectsRenderPriority = renderPriorityLevel;\n } else {\n // We are done with the effect chain at this point so let's clear the\n // nextEffect pointers to assist with GC. If we have passive effects, we'll\n // clear this in flushPassiveEffects.\n nextEffect = firstEffect;\n\n while (nextEffect !== null) {\n var nextNextEffect = nextEffect.nextEffect;\n nextEffect.nextEffect = null;\n\n if (nextEffect.flags & Deletion) {\n detachFiberAfterEffects(nextEffect);\n }\n\n nextEffect = nextNextEffect;\n }\n } // Read this again, since an effect might have updated it\n\n\n remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n\n if (remainingLanes !== NoLanes) {\n {\n if (spawnedWorkDuringRender !== null) {\n var expirationTimes = spawnedWorkDuringRender;\n spawnedWorkDuringRender = null;\n\n for (var i = 0; i < expirationTimes.length; i++) {\n scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);\n }\n }\n\n schedulePendingInteractions(root, remainingLanes);\n }\n } else {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n\n {\n if (!rootDidHavePassiveEffects) {\n // If there are no passive effects, then we can complete the pending interactions.\n // Otherwise, we'll wait until after the passive effects are flushed.\n // Wait to do this until after remaining work has been scheduled,\n // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.\n finishPendingInteractions(root, lanes);\n }\n }\n\n if (remainingLanes === SyncLane) {\n // Count the number of times the root synchronously re-renders without\n // finishing. If there are too many, it indicates an infinite update loop.\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n }\n\n onCommitRoot(finishedWork.stateNode, renderPriorityLevel);\n {\n onCommitRoot$1();\n } // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n ensureRootIsScheduled(root, now());\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var _error3 = firstUncaughtError;\n firstUncaughtError = null;\n throw _error3;\n }\n\n if ((executionContext & LegacyUnbatchedContext) !== NoContext) {\n // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired\n // synchronously, but layout updates should be deferred until the end\n // of the batch.\n return null;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncCallbackQueue();\n return null;\n }\n\n function commitBeforeMutationEffects() {\n while (nextEffect !== null) {\n var current = nextEffect.alternate;\n\n if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {\n if ((nextEffect.flags & Deletion) !== NoFlags) {\n if (doesFiberContain(nextEffect, focusedInstanceHandle)) {\n shouldFireAfterActiveInstanceBlur = true;\n }\n } else {\n // TODO: Move this out of the hot path using a dedicated effect tag.\n if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {\n shouldFireAfterActiveInstanceBlur = true;\n }\n }\n }\n\n var flags = nextEffect.flags;\n\n if ((flags & Snapshot) !== NoFlags) {\n setCurrentFiber(nextEffect);\n commitBeforeMutationLifeCycles(current, nextEffect);\n resetCurrentFiber();\n }\n\n if ((flags & Passive) !== NoFlags) {\n // If there are passive effects, schedule a callback to flush at\n // the earliest opportunity.\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n\n nextEffect = nextEffect.nextEffect;\n }\n }\n\n function commitMutationEffects(root, renderPriorityLevel) {\n // TODO: Should probably move the bulk of this function to commitWork.\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var flags = nextEffect.flags;\n\n if (flags & ContentReset) {\n commitResetTextContent(nextEffect);\n }\n\n if (flags & Ref) {\n var current = nextEffect.alternate;\n\n if (current !== null) {\n commitDetachRef(current);\n }\n } // The following switch statement is only concerned about placement,\n // updates, and deletions. To avoid needing to add a case for every possible\n // bitmap value, we remove the secondary effects from the effect tag and\n // switch on that value.\n\n\n var primaryFlags = flags & (Placement | Update | Deletion | Hydrating);\n\n switch (primaryFlags) {\n case Placement:\n {\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted does\n // and isMounted is deprecated anyway so we should be able to kill this.\n\n nextEffect.flags &= ~Placement;\n break;\n }\n\n case PlacementAndUpdate:\n {\n // Placement\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n\n nextEffect.flags &= ~Placement; // Update\n\n var _current = nextEffect.alternate;\n commitWork(_current, nextEffect);\n break;\n }\n\n case Hydrating:\n {\n nextEffect.flags &= ~Hydrating;\n break;\n }\n\n case HydratingAndUpdate:\n {\n nextEffect.flags &= ~Hydrating; // Update\n\n var _current2 = nextEffect.alternate;\n commitWork(_current2, nextEffect);\n break;\n }\n\n case Update:\n {\n var _current3 = nextEffect.alternate;\n commitWork(_current3, nextEffect);\n break;\n }\n\n case Deletion:\n {\n commitDeletion(root, nextEffect);\n break;\n }\n }\n\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n }\n\n function commitLayoutEffects(root, committedLanes) {\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var flags = nextEffect.flags;\n\n if (flags & (Update | Callback)) {\n var current = nextEffect.alternate;\n commitLifeCycles(root, current, nextEffect);\n }\n\n {\n if (flags & Ref) {\n commitAttachRef(nextEffect);\n }\n }\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n }\n\n function flushPassiveEffects() {\n // Returns whether passive effects were flushed.\n if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {\n var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;\n pendingPassiveEffectsRenderPriority = NoPriority$1;\n {\n return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);\n }\n }\n\n return false;\n }\n\n function enqueuePendingPassiveHookEffectMount(fiber, effect) {\n pendingPassiveHookEffectsMount.push(effect, fiber);\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n\n function enqueuePendingPassiveHookEffectUnmount(fiber, effect) {\n pendingPassiveHookEffectsUnmount.push(effect, fiber);\n {\n fiber.flags |= PassiveUnmountPendingDev;\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.flags |= PassiveUnmountPendingDev;\n }\n }\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n\n function invokePassiveEffectCreate(effect) {\n var create = effect.create;\n effect.destroy = create();\n }\n\n function flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n }\n\n var root = rootWithPendingPassiveEffects;\n var lanes = pendingPassiveEffectsLanes;\n rootWithPendingPassiveEffects = null;\n pendingPassiveEffectsLanes = NoLanes;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error(\"Cannot flush passive effects while already rendering.\");\n }\n }\n\n {\n isFlushingPassiveEffects = true;\n }\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called\n // before ANY passive effect create functions are called.\n // Otherwise effects in sibling components might interfere with each other.\n // e.g. a destroy function in one component may unintentionally override a ref\n // value set by a create function in another component.\n // Layout effects have the same constraint.\n // First pass: Destroy stale passive effects.\n\n var unmountEffects = pendingPassiveHookEffectsUnmount;\n pendingPassiveHookEffectsUnmount = [];\n\n for (var i = 0; i < unmountEffects.length; i += 2) {\n var _effect = unmountEffects[i];\n var fiber = unmountEffects[i + 1];\n var destroy = _effect.destroy;\n _effect.destroy = undefined;\n {\n fiber.flags &= ~PassiveUnmountPendingDev;\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.flags &= ~PassiveUnmountPendingDev;\n }\n }\n\n if (typeof destroy === 'function') {\n {\n setCurrentFiber(fiber);\n {\n invokeGuardedCallback(null, destroy, null);\n }\n\n if (hasCaughtError()) {\n if (!(fiber !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var error = clearCaughtError();\n captureCommitPhaseError(fiber, error);\n }\n\n resetCurrentFiber();\n }\n }\n } // Second pass: Create new passive effects.\n\n\n var mountEffects = pendingPassiveHookEffectsMount;\n pendingPassiveHookEffectsMount = [];\n\n for (var _i = 0; _i < mountEffects.length; _i += 2) {\n var _effect2 = mountEffects[_i];\n var _fiber = mountEffects[_i + 1];\n {\n setCurrentFiber(_fiber);\n {\n invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);\n }\n\n if (hasCaughtError()) {\n if (!(_fiber !== null)) {\n {\n throw Error(\"Should be working on an effect.\");\n }\n }\n\n var _error4 = clearCaughtError();\n\n captureCommitPhaseError(_fiber, _error4);\n }\n\n resetCurrentFiber();\n }\n } // Note: This currently assumes there are no passive effects on the root fiber\n // because the root is not part of its own effect list.\n // This could change in the future.\n\n\n var effect = root.current.firstEffect;\n\n while (effect !== null) {\n var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC\n\n effect.nextEffect = null;\n\n if (effect.flags & Deletion) {\n detachFiberAfterEffects(effect);\n }\n\n effect = nextNextEffect;\n }\n\n {\n popInteractions(prevInteractions);\n finishPendingInteractions(root, lanes);\n }\n {\n isFlushingPassiveEffects = false;\n }\n executionContext = prevExecutionContext;\n flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n\n nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;\n return true;\n }\n\n function isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n }\n\n function markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n }\n\n function prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n }\n\n var onUncaughtError = prepareToThrowUncaughtError;\n\n function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n enqueueUpdate(rootFiber, update);\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, SyncLane);\n }\n }\n\n function captureCommitPhaseError(sourceFiber, error) {\n if (sourceFiber.tag === HostRoot) {\n // Error was thrown at the root. There is no parent, so the root\n // itself should capture it.\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n return;\n }\n\n var fiber = sourceFiber.return;\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n enqueueUpdate(fiber, update);\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, SyncLane);\n } else {\n // This component has already been unmounted.\n // We can't schedule any follow up work for the root because the fiber is already unmounted,\n // but we can still call the log-only boundary so the error isn't swallowed.\n //\n // TODO This is only a temporary bandaid for the old reconciler fork.\n // We can delete this special case once the new fork is merged.\n if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n try {\n instance.componentDidCatch(error, errorInfo);\n } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?\n // This is kind of an edge case.\n }\n }\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n }\n\n function pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(wakeable);\n }\n\n var eventTime = requestEventTime();\n markRootPinged(root, pingedLanes);\n\n if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\n // Received a ping at the same priority level at which we're currently\n // rendering. We might want to restart this render. This should mirror\n // the logic of whether or not a root suspends once it completes.\n // TODO: If we're rendering sync either due to Sync, Batched or expired,\n // we should probably never restart.\n // If we're suspended with delay, or if it's a retry, we'll always suspend\n // so we can always restart.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Restart from the root.\n prepareFreshStack(root, NoLanes);\n } else {\n // Even though we can't restart right now, we might get an\n // opportunity later. So we mark this render as having a ping.\n workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n }\n }\n\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, pingedLanes);\n }\n\n function retryTimedOutBoundary(boundaryFiber, retryLane) {\n // The boundary fiber (a Suspense component or SuspenseList component)\n // previously was rendered in its fallback state. One of the promises that\n // suspended it has resolved, which means at least part of the tree was\n // likely unblocked. Try rendering again, at a new expiration time.\n if (retryLane === NoLane) {\n retryLane = requestRetryLane(boundaryFiber);\n } // TODO: Special case idle priority?\n\n\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);\n\n if (root !== null) {\n markRootUpdated(root, retryLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, retryLane);\n }\n }\n\n function resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = NoLane; // Default\n\n var retryCache;\n {\n retryCache = boundaryFiber.stateNode;\n }\n\n if (retryCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(wakeable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n } // Computes the next Just Noticeable Difference (JND) boundary.\n // The theory is that a person can't tell the difference between small differences in time.\n // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable\n // difference in the experience. However, waiting for longer might mean that we can avoid\n // showing an intermediate loading state. The longer we have already waited, the harder it\n // is to tell small differences in time. Therefore, the longer we've already waited,\n // the longer we can wait additionally. At some point we have to give up though.\n // We pick a train model where the next boundary commits at a consistent schedule.\n // These particular numbers are vague estimates. We expect to adjust them based on research.\n\n\n function jnd(timeElapsed) {\n return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;\n }\n\n function checkForNestedUpdates() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = null;\n {\n {\n throw Error(\"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\");\n }\n }\n }\n\n {\n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n }\n }\n }\n\n function flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n {\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n }\n }\n\n var didWarnStateUpdateForNotYetMountedComponent = null;\n\n function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n // We let the other warning about render phase updates deal with this one.\n return;\n }\n\n if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {\n return;\n }\n\n var tag = fiber.tag;\n\n if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentName(fiber.type) || 'ReactComponent';\n\n if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n }\n\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n 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.');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n\n var didWarnStateUpdateForUnmountedComponent = null;\n\n function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {\n {\n var tag = fiber.tag;\n\n if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // If there are pending passive effects unmounts for this Fiber,\n // we can assume that they would have prevented this update.\n\n\n if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentName(fiber.type) || 'ReactComponent';\n\n if (didWarnStateUpdateForUnmountedComponent !== null) {\n if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForUnmountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForUnmountedComponent = new Set([componentName]);\n }\n\n if (isFlushingPassiveEffects) ;else {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n 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');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n }\n\n var beginWork$1;\n {\n var dummyFiber = null;\n\n beginWork$1 = function (current, unitOfWork, lanes) {\n // If a component throws an error, we replay it again in a synchronously\n // dispatched event, so that the debugger will treat it as an uncaught\n // error See ReactErrorUtils for more information.\n // Before entering the begin phase, copy the work-in-progress onto a dummy\n // fiber. If beginWork throws, we'll use this to reset the state.\n var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n try {\n return beginWork(current, unitOfWork, lanes);\n } catch (originalError) {\n if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises. Treat everything else like an error.\n throw originalError;\n } // Keep this code in sync with handleError; any changes here must have\n // corresponding changes there.\n\n\n resetContextDependencies();\n resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the\n // same fiber again.\n // Unwind the failed stack frame\n\n unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.\n\n assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if (unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n } // Run beginWork again.\n\n\n invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);\n\n if (hasCaughtError()) {\n var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.\n // Rethrow this error instead of the original one.\n\n throw replayError;\n } else {\n // This branch is reachable if the render phase is impure.\n throw originalError;\n }\n }\n };\n }\n var didWarnAboutUpdateInRender = false;\n var didWarnAboutUpdateInRenderForAnotherComponent;\n {\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n }\n\n function warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentName(fiber.type) || 'Unknown';\n 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);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n if (!didWarnAboutUpdateInRender) {\n error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n didWarnAboutUpdateInRender = true;\n }\n\n break;\n }\n }\n }\n }\n } // a 'shared' variable that changes when act() opens/closes in tests.\n\n\n var IsThisRendererActing = {\n current: false\n };\n\n function warnIfNotScopedWithMatchingAct(fiber) {\n {\n if (IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n 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.\n '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.\n 'import TestRenderer fr' + \"om react-test-renderer';\\n\" + 'const {act} = TestRenderer;\\n' + '// ...\\n' + 'act(() => ...);');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n }\n\n function warnIfNotCurrentlyActingEffectsInDEV(fiber) {\n {\n if ((fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n 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));\n }\n }\n }\n\n function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {\n {\n if (executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n 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));\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n }\n\n var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.\n\n var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked\n // scheduler is the actual recommendation. The alternative could be a testing build,\n // a new lib, or whatever; we dunno just yet. This message is for early adopters\n // to get their tests right.\n\n function warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n 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.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n }\n\n function computeThreadID(root, lane) {\n // Interaction threads are unique per root and expiration time.\n // NOTE: Intentionally unsound cast. All that matters is that it's a number\n // and it represents a batch of work. Could make a helper function instead,\n // but meh this is fine for now.\n return lane * 1000 + root.interactionThreadID;\n }\n\n function markSpawnedWork(lane) {\n if (spawnedWorkDuringRender === null) {\n spawnedWorkDuringRender = [lane];\n } else {\n spawnedWorkDuringRender.push(lane);\n }\n }\n\n function scheduleInteractions(root, lane, interactions) {\n if (interactions.size > 0) {\n var pendingInteractionMap = root.pendingInteractionMap;\n var pendingInteractions = pendingInteractionMap.get(lane);\n\n if (pendingInteractions != null) {\n interactions.forEach(function (interaction) {\n if (!pendingInteractions.has(interaction)) {\n // Update the pending async work count for previously unscheduled interaction.\n interaction.__count++;\n }\n\n pendingInteractions.add(interaction);\n });\n } else {\n pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.\n\n interactions.forEach(function (interaction) {\n interaction.__count++;\n });\n }\n\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, lane);\n subscriber.onWorkScheduled(interactions, threadID);\n }\n }\n }\n\n function schedulePendingInteractions(root, lane) {\n scheduleInteractions(root, lane, tracing.__interactionsRef.current);\n }\n\n function startWorkOnPendingInteractions(root, lanes) {\n // we can accurately attribute time spent working on it, And so that cascading\n // work triggered during the render phase will be associated with it.\n var interactions = new Set();\n root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {\n if (includesSomeLane(lanes, scheduledLane)) {\n scheduledInteractions.forEach(function (interaction) {\n return interactions.add(interaction);\n });\n }\n }); // Store the current set of interactions on the FiberRoot for a few reasons:\n // We can re-use it in hot functions like performConcurrentWorkOnRoot()\n // without having to recalculate it. We will also use it in commitWork() to\n // pass to any Profiler onRender() hooks. This also provides DevTools with a\n // way to access it when the onCommitRoot() hook is called.\n\n root.memoizedInteractions = interactions;\n\n if (interactions.size > 0) {\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, lanes);\n\n try {\n subscriber.onWorkStarted(interactions, threadID);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n }\n }\n }\n }\n\n function finishPendingInteractions(root, committedLanes) {\n var remainingLanesAfterCommit = root.pendingLanes;\n var subscriber;\n\n try {\n subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null && root.memoizedInteractions.size > 0) {\n // FIXME: More than one lane can finish in a single commit.\n var threadID = computeThreadID(root, committedLanes);\n subscriber.onWorkStopped(root.memoizedInteractions, threadID);\n }\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n } finally {\n // Clear completed interactions from the pending Map.\n // Unless the render was suspended or cascading work was scheduled,\n // In which case leave pending interactions until the subsequent render.\n var pendingInteractionMap = root.pendingInteractionMap;\n pendingInteractionMap.forEach(function (scheduledInteractions, lane) {\n // Only decrement the pending interaction count if we're done.\n // If there's still work at the current priority,\n // That indicates that we are waiting for suspense data.\n if (!includesSomeLane(remainingLanesAfterCommit, lane)) {\n pendingInteractionMap.delete(lane);\n scheduledInteractions.forEach(function (interaction) {\n interaction.__count--;\n\n if (subscriber !== null && interaction.__count === 0) {\n try {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n }\n }\n });\n }\n });\n }\n } // `act` testing API\n\n\n function shouldForceFlushFallbacksInDEV() {\n // Never force flush in production. This function should get stripped out.\n return actingUpdatesScopeDepth > 0;\n } // so we can tell if any async act() calls try to run in parallel.\n\n\n var actingUpdatesScopeDepth = 0;\n\n function detachFiberAfterEffects(fiber) {\n fiber.sibling = null;\n fiber.stateNode = null;\n }\n\n var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\n var failedBoundaries = null;\n\n var setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n };\n\n function resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n }\n\n function resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n }\n\n function resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n // Check if we're dealing with a real forwardRef. Don't want to crash early.\n if (type !== null && type !== undefined && typeof type.render === 'function') {\n // ForwardRef is special because its resolved .type is an object,\n // but it's possible that we only have its inner render function in the map.\n // If that inner render function is different, we'll build a new forwardRef type.\n var currentRender = resolveFunctionForHotReloading(type.render);\n\n if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n\n return syntheticType;\n }\n }\n\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n }\n\n function isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\n }\n\n var prevType = fiber.elementType;\n var nextType = element.type; // If we got here, we know types aren't === equal.\n\n var needsCompareFamilies = false;\n var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case FunctionComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n // We don't know the inner type yet.\n // We're going to assume that the lazy inner type is stable,\n // and so it is sufficient to avoid reconciling it away.\n // We're not going to unwrap or actually use the new lazy type.\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case ForwardRef:\n {\n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ($$typeofNextType === REACT_MEMO_TYPE) {\n // TODO: if it was but can no longer be simple,\n // we shouldn't set this.\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n default:\n return false;\n } // Check if both types have a family and it's the same one.\n\n\n if (needsCompareFamilies) {\n // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n // This means both of them need to be registered to preserve state.\n // If we unwrapped and compared the inner types for wrappers instead,\n // then we would risk falsely saying two separate memo(Foo)\n // calls are equivalent because they wrap the same Foo function.\n var prevFamily = resolveFamily(prevType);\n\n if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n\n return false;\n }\n }\n\n function markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n if (typeof WeakSet !== 'function') {\n return;\n }\n\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n\n failedBoundaries.add(fiber);\n }\n }\n\n var scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n var staleFamilies = update.staleFamilies,\n updatedFamilies = update.updatedFamilies;\n flushPassiveEffects();\n flushSync(function () {\n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n });\n }\n };\n\n var scheduleRoot = function (root, element) {\n {\n if (root.context !== emptyContextObject) {\n // Super edge case: root has a legacy _renderSubtree context\n // but we don't know the parentComponent so we can't pass it.\n // Just ignore. We'll delete this with _renderSubtree code path later.\n return;\n }\n\n flushPassiveEffects();\n flushSync(function () {\n updateContainer(element, root, null, null);\n });\n }\n };\n\n function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n {\n var alternate = fiber.alternate,\n child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n\n var needsRender = false;\n var needsRemount = false;\n\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\n\n if (family !== undefined) {\n if (staleFamilies.has(family)) {\n needsRemount = true;\n } else if (updatedFamilies.has(family)) {\n if (tag === ClassComponent) {\n needsRemount = true;\n } else {\n needsRender = true;\n }\n }\n }\n }\n\n if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n\n if (needsRemount || needsRender) {\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n }\n }\n }\n\n var findHostInstancesForRefresh = function (root, families) {\n {\n var hostInstances = new Set();\n var types = new Set(families.map(function (family) {\n return family.current;\n }));\n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n return hostInstances;\n }\n };\n\n function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n {\n var child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n var didMatch = false;\n\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\n }\n }\n\n if (didMatch) {\n // We have a match. This only drills down to the closest host components.\n // There's no need to search deeper because for the purpose of giving\n // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n findHostInstancesForFiberShallowly(fiber, hostInstances);\n } else {\n // If there's no match, maybe there will be one further down in the child tree.\n if (child !== null) {\n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n }\n }\n\n if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n }\n\n function findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n\n var node = fiber;\n\n while (true) {\n switch (node.tag) {\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n\n node = node.return;\n }\n }\n }\n\n function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\n\n while (true) {\n if (node.tag === HostComponent) {\n // We got a match.\n foundHostInstances = true;\n hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === fiber) {\n return foundHostInstances;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n return false;\n }\n\n var hasBadMapPolyfill;\n {\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n\n new Map([[nonExtensibleObject, null]]);\n new Set([nonExtensibleObject]);\n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n }\n var debugCounter = 1;\n\n function FiberNode(tag, pendingProps, key, mode) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.elementType = null;\n this.type = null;\n this.stateNode = null; // Fiber\n\n this.return = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n this.ref = null;\n this.pendingProps = pendingProps;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n this.dependencies = null;\n this.mode = mode; // Effects\n\n this.flags = NoFlags;\n this.nextEffect = null;\n this.firstEffect = null;\n this.lastEffect = null;\n this.lanes = NoLanes;\n this.childLanes = NoLanes;\n this.alternate = null;\n {\n // Note: The following is done to avoid a v8 performance cliff.\n //\n // Initializing the fields below to smis and later updating them with\n // double values will cause Fibers to end up having separate shapes.\n // This behavior/bug has something to do with Object.preventExtension().\n // Fortunately this only impacts DEV builds.\n // Unfortunately it makes React unusably slow for some applications.\n // To work around this, initialize the fields below with doubles.\n //\n // Learn more about this here:\n // https://github.com/facebook/react/issues/14365\n // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n this.actualDuration = Number.NaN;\n this.actualStartTime = Number.NaN;\n this.selfBaseDuration = Number.NaN;\n this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n // This won't trigger the performance cliff mentioned above,\n // and it simplifies other profiler code (including DevTools).\n\n this.actualDuration = 0;\n this.actualStartTime = -1;\n this.selfBaseDuration = 0;\n this.treeBaseDuration = 0;\n }\n {\n // This isn't directly used but is handy for debugging internals:\n this._debugID = debugCounter++;\n this._debugSource = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\n\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n } // This is a constructor function, rather than a POJO constructor, still\n // please ensure we do the following:\n // 1) Nobody should add any instance methods on this. Instance methods can be\n // more difficult to predict when they get optimized and they are almost\n // never inlined properly in static compilers.\n // 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n // always know when it is a fiber.\n // 3) We might want to experiment with using numeric keys since they are easier\n // to optimize in a non-JIT environment.\n // 4) We can easily go from a constructor to a createFiber object literal if that\n // is faster.\n // 5) It should be easy to port this to a C struct and keep a C implementation\n // compatible.\n\n\n var createFiber = function (tag, pendingProps, key, mode) {\n // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, pendingProps, key, mode);\n };\n\n function shouldConstruct$1(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n }\n\n function isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;\n }\n\n function resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n\n return IndeterminateComponent;\n } // This is used to create an alternate fiber to do work on.\n\n\n function createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.flags = NoFlags; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n }; // These will be overridden during the parent's reconciliation\n\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n return workInProgress;\n } // Used to reuse a Fiber for a second pass.\n\n\n function resetWorkInProgress(workInProgress, renderLanes) {\n // This resets the Fiber to what createFiber or createWorkInProgress would\n // have set the values to before during the first pass. Ideally this wouldn't\n // be necessary but unfortunately many code paths reads from the workInProgress\n // when they should be reading from current and writing to workInProgress.\n // We assume pendingProps, index, key, ref, return are still untouched to\n // avoid doing another reconciliation.\n // Reset the effect tag but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.flags &= Placement; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childLanes = NoLanes;\n workInProgress.lanes = renderLanes;\n workInProgress.child = null;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n workInProgress.stateNode = null;\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = 0;\n workInProgress.treeBaseDuration = 0;\n }\n } else {\n // Reset to the cloned values that createWorkInProgress would've.\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n };\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n }\n\n return workInProgress;\n }\n\n function createHostRootFiber(tag) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode | BlockingMode | StrictMode;\n } else if (tag === BlockingRoot) {\n mode = BlockingMode | StrictMode;\n } else {\n mode = NoMode;\n }\n\n if (isDevToolsPresent) {\n // Always collect profile timings when DevTools are present.\n // This enables DevTools to start capturing timing at any point\n // Without some nodes in the tree having empty base times.\n mode |= ProfileMode;\n }\n\n return createFiber(HostRoot, null, null, mode);\n }\n\n function createFiberFromTypeAndProps(type, // React$ElementType\n key, pendingProps, owner, mode, lanes) {\n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n var resolvedType = type;\n\n if (typeof type === 'function') {\n if (shouldConstruct$1(type)) {\n fiberTag = ClassComponent;\n {\n resolvedType = resolveClassForHotReloading(resolvedType);\n }\n } else {\n {\n resolvedType = resolveFunctionForHotReloading(resolvedType);\n }\n }\n } else if (typeof type === 'string') {\n fiberTag = HostComponent;\n } else {\n getTag: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n\n case REACT_DEBUG_TRACING_MODE_TYPE:\n fiberTag = Mode;\n mode |= DebugTracingMode;\n break;\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictMode;\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n case REACT_LEGACY_HIDDEN_TYPE:\n return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);\n\n case REACT_SCOPE_TYPE: // eslint-disable-next-line no-fallthrough\n\n default:\n {\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = ContextProvider;\n break getTag;\n\n case REACT_CONTEXT_TYPE:\n // This is a consumer\n fiberTag = ContextConsumer;\n break getTag;\n\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n break getTag;\n\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\n\n case REACT_BLOCK_TYPE:\n fiberTag = Block;\n break getTag;\n }\n }\n\n var info = '';\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n\n var ownerName = owner ? getComponentName(owner.type) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n {\n {\n throw Error(\"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" + (type == null ? type : typeof type) + \".\" + info);\n }\n }\n }\n }\n }\n\n var fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.lanes = lanes;\n {\n fiber._debugOwner = owner;\n }\n return fiber;\n }\n\n function createFiberFromElement(element, mode, lanes) {\n var owner = null;\n {\n owner = element._owner;\n }\n var type = element.type;\n var key = element.key;\n var pendingProps = element.props;\n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n return fiber;\n }\n\n function createFiberFromFragment(elements, mode, lanes, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.lanes = lanes;\n return fiber;\n }\n\n function createFiberFromProfiler(pendingProps, mode, lanes, key) {\n {\n if (typeof pendingProps.id !== 'string') {\n error('Profiler must specify an \"id\" as a prop');\n }\n }\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.\n\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.type = REACT_PROFILER_TYPE;\n fiber.lanes = lanes;\n {\n fiber.stateNode = {\n effectDuration: 0,\n passiveEffectDuration: 0\n };\n }\n return fiber;\n }\n\n function createFiberFromSuspense(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n fiber.type = REACT_SUSPENSE_TYPE;\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n }\n\n function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n {\n // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n fiber.type = REACT_SUSPENSE_LIST_TYPE;\n }\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.lanes = lanes;\n return fiber;\n }\n\n function createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n {\n fiber.type = REACT_OFFSCREEN_TYPE;\n }\n fiber.elementType = REACT_OFFSCREEN_TYPE;\n fiber.lanes = lanes;\n return fiber;\n }\n\n function createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {\n var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n {\n fiber.type = REACT_LEGACY_HIDDEN_TYPE;\n }\n fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;\n fiber.lanes = lanes;\n return fiber;\n }\n\n function createFiberFromText(content, mode, lanes) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.lanes = lanes;\n return fiber;\n }\n\n function createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.\n\n fiber.elementType = 'DELETED';\n fiber.type = 'DELETED';\n return fiber;\n }\n\n function createFiberFromPortal(portal, mode, lanes) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.lanes = lanes;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n } // Used for stashing WIP properties to replay failed work in DEV.\n\n\n function assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n } // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.flags = source.flags;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.lanes = source.lanes;\n target.childLanes = source.childLanes;\n target.alternate = source.alternate;\n {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n }\n\n function FiberRootNode(containerInfo, tag, hydrate) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.current = null;\n this.pingCache = null;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.context = null;\n this.pendingContext = null;\n this.hydrate = hydrate;\n this.callbackNode = null;\n this.callbackPriority = NoLanePriority;\n this.eventTimes = createLaneMap(NoLanes);\n this.expirationTimes = createLaneMap(NoTimestamp);\n this.pendingLanes = NoLanes;\n this.suspendedLanes = NoLanes;\n this.pingedLanes = NoLanes;\n this.expiredLanes = NoLanes;\n this.mutableReadLanes = NoLanes;\n this.finishedLanes = NoLanes;\n this.entangledLanes = NoLanes;\n this.entanglements = createLaneMap(NoLanes);\n {\n this.mutableSourceEagerHydrationData = null;\n }\n {\n this.interactionThreadID = tracing.unstable_getThreadID();\n this.memoizedInteractions = new Set();\n this.pendingInteractionMap = new Map();\n }\n {\n switch (tag) {\n case BlockingRoot:\n this._debugRootType = 'createBlockingRoot()';\n break;\n\n case ConcurrentRoot:\n this._debugRootType = 'createRoot()';\n break;\n\n case LegacyRoot:\n this._debugRootType = 'createLegacyRoot()';\n break;\n }\n }\n }\n\n function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {\n var root = new FiberRootNode(containerInfo, tag, hydrate); // stateNode is any.\n\n var uninitializedFiber = createHostRootFiber(tag);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n initializeUpdateQueue(uninitializedFiber);\n return root;\n } // This ensures that the version used for server rendering matches the one\n // that is eventually read during hydration.\n // If they don't match there's a potential tear and a full deopt render is required.\n\n\n function registerMutableSourceForHydration(root, mutableSource) {\n var getVersion = mutableSource._getVersion;\n var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n // Retaining it forever may interfere with GC.\n\n if (root.mutableSourceEagerHydrationData == null) {\n root.mutableSourceEagerHydrationData = [mutableSource, version];\n } else {\n root.mutableSourceEagerHydrationData.push(mutableSource, version);\n }\n }\n\n function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\n implementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n }\n\n var didWarnAboutNestedUpdates;\n var didWarnAboutFindNodeInStrictMode;\n {\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n }\n\n function getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n\n return parentContext;\n }\n\n function findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n {\n {\n throw Error(\"Unable to find node on an unmounted component.\");\n }\n }\n } else {\n {\n {\n throw Error(\"Argument appears to not be a ReactComponent. Keys: \" + Object.keys(component));\n }\n }\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictMode) {\n var componentName = getComponentName(fiber.type) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n var previousFiber = current;\n\n try {\n setCurrentFiber(hostFiber);\n\n if (fiber.mode & StrictMode) {\n 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);\n } else {\n 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);\n }\n } finally {\n // Ideally this should reset to previous but this shouldn't be called in\n // render and there's another warning for that anyway.\n if (previousFiber) {\n setCurrentFiber(previousFiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n\n return hostFiber.stateNode;\n }\n }\n\n function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {\n return createFiberRoot(containerInfo, tag, hydrate);\n }\n\n function updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n var current$1 = container.current;\n var eventTime = requestEventTime();\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfUnmockedScheduler(current$1);\n warnIfNotScopedWithMatchingAct(current$1);\n }\n }\n var lane = requestUpdateLane(current$1);\n var context = getContextForSubtree(parentComponent);\n\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n {\n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');\n }\n }\n var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: element\n };\n callback = callback === undefined ? null : callback;\n\n if (callback !== null) {\n {\n if (typeof callback !== 'function') {\n error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n update.callback = callback;\n }\n\n enqueueUpdate(current$1, update);\n scheduleUpdateOnFiber(current$1, lane, eventTime);\n return lane;\n }\n\n function getPublicRootInstance(container) {\n var containerFiber = container.current;\n\n if (!containerFiber.child) {\n return null;\n }\n\n switch (containerFiber.child.tag) {\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n\n default:\n return containerFiber.child.stateNode;\n }\n }\n\n function markRetryLaneImpl(fiber, retryLane) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n }\n } // Increases the priority of thennables when they resolve within this boundary.\n\n\n function markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryLaneImpl(alternate, retryLane);\n }\n }\n\n function attemptUserBlockingHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = InputDiscreteHydrationLane;\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n }\n\n function attemptContinuousHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = SelectiveHydrationLane;\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n }\n\n function attemptHydrationAtCurrentPriority$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority other than synchronously flush it.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n }\n\n function runWithPriority$2(priority, fn) {\n try {\n setCurrentUpdateLanePriority(priority);\n return fn();\n } finally {}\n }\n\n function findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.tag === FundamentalComponent) {\n return hostFiber.stateNode.instance;\n }\n\n return hostFiber.stateNode;\n }\n\n var shouldSuspendImpl = function (fiber) {\n return false;\n };\n\n function shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n }\n\n var overrideHookState = null;\n var overrideHookStateDeletePath = null;\n var overrideHookStateRenamePath = null;\n var overrideProps = null;\n var overridePropsDeletePath = null;\n var overridePropsRenamePath = null;\n var scheduleUpdate = null;\n var setSuspenseHandler = null;\n {\n var copyWithDeleteImpl = function (obj, path, index) {\n var key = path[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);\n\n if (index + 1 === path.length) {\n if (Array.isArray(updated)) {\n updated.splice(key, 1);\n } else {\n delete updated[key];\n }\n\n return updated;\n } // $FlowFixMe number or string is fine here\n\n\n updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n return updated;\n };\n\n var copyWithDelete = function (obj, path) {\n return copyWithDeleteImpl(obj, path, 0);\n };\n\n var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n var oldKey = oldPath[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);\n\n if (index + 1 === oldPath.length) {\n var newKey = newPath[index]; // $FlowFixMe number or string is fine here\n\n updated[newKey] = updated[oldKey];\n\n if (Array.isArray(updated)) {\n updated.splice(oldKey, 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe number or string is fine here\n updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here\n obj[oldKey], oldPath, newPath, index + 1);\n }\n\n return updated;\n };\n\n var copyWithRename = function (obj, oldPath, newPath) {\n if (oldPath.length !== newPath.length) {\n warn('copyWithRename() expects paths of the same length');\n return;\n } else {\n for (var i = 0; i < newPath.length - 1; i++) {\n if (oldPath[i] !== newPath[i]) {\n warn('copyWithRename() expects paths to be the same except for the deepest key');\n return;\n }\n }\n }\n\n return copyWithRenameImpl(obj, oldPath, newPath, 0);\n };\n\n var copyWithSetImpl = function (obj, path, index, value) {\n if (index >= path.length) {\n return value;\n }\n\n var key = path[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n };\n\n var findHook = function (fiber, id) {\n // For now, the \"id\" of stateful hooks is just the stateful hook index.\n // This may change in the future with e.g. nested hooks.\n var currentHook = fiber.memoizedState;\n\n while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n\n return currentHook;\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithSet(hook.memoizedState, path, value);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n };\n\n overrideHookStateDeletePath = function (fiber, id, path) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithDelete(hook.memoizedState, path);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n };\n\n overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n overridePropsDeletePath = function (fiber, path) {\n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n overridePropsRenamePath = function (fiber, oldPath, newPath) {\n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n scheduleUpdate = function (fiber) {\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n }\n\n function findHostInstanceByFiber(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n }\n\n function emptyFindFiberByHostInstance(instance) {\n return null;\n }\n\n function getCurrentFiberForDevTools() {\n return current;\n }\n\n function injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals({\n bundleType: devToolsConfig.bundleType,\n version: devToolsConfig.version,\n rendererPackageName: devToolsConfig.rendererPackageName,\n rendererConfig: devToolsConfig.rendererConfig,\n overrideHookState: overrideHookState,\n overrideHookStateDeletePath: overrideHookStateDeletePath,\n overrideHookStateRenamePath: overrideHookStateRenamePath,\n overrideProps: overrideProps,\n overridePropsDeletePath: overridePropsDeletePath,\n overridePropsRenamePath: overridePropsRenamePath,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: findHostInstanceByFiber,\n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\n // React Refresh\n findHostInstancesForRefresh: findHostInstancesForRefresh,\n scheduleRefresh: scheduleRefresh,\n scheduleRoot: scheduleRoot,\n setRefreshHandler: setRefreshHandler,\n // Enables DevTools to append owner stacks to error messages in DEV mode.\n getCurrentFiber: getCurrentFiberForDevTools\n });\n }\n\n function ReactDOMRoot(container, options) {\n this._internalRoot = createRootImpl(container, ConcurrentRoot, options);\n }\n\n function ReactDOMBlockingRoot(container, tag, options) {\n this._internalRoot = createRootImpl(container, tag, options);\n }\n\n ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {\n var root = this._internalRoot;\n {\n if (typeof arguments[1] === 'function') {\n error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n\n var container = root.containerInfo;\n\n if (container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(root.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + \"root.unmount() to empty a root's container.\");\n }\n }\n }\n }\n updateContainer(children, root, null, null);\n };\n\n ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {\n {\n if (typeof arguments[0] === 'function') {\n error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n }\n var root = this._internalRoot;\n var container = root.containerInfo;\n updateContainer(null, root, null, function () {\n unmarkContainerAsRoot(container);\n });\n };\n\n function createRootImpl(container, tag, options) {\n // Tag is either LegacyRoot or Concurrent Root\n var hydrate = options != null && options.hydrate === true;\n var hydrationCallbacks = options != null && options.hydrationOptions || null;\n var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;\n var root = createContainer(container, tag, hydrate);\n markContainerAsRoot(root.current, container);\n var containerNodeType = container.nodeType;\n {\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n }\n\n if (mutableSources) {\n for (var i = 0; i < mutableSources.length; i++) {\n var mutableSource = mutableSources[i];\n registerMutableSourceForHydration(root, mutableSource);\n }\n }\n\n return root;\n }\n\n function createLegacyRoot(container, options) {\n return new ReactDOMBlockingRoot(container, LegacyRoot, options);\n }\n\n function isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n }\n\n var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\n var topLevelUpdateWarnings;\n var warnedAboutHydrateAPI = false;\n {\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n }\n }\n }\n\n var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\n\n if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n 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.');\n }\n\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');\n }\n };\n }\n\n function getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n }\n\n function shouldHydrateDueToLegacyHeuristic(container) {\n var rootElement = getReactRootElementInContainer(container);\n return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));\n }\n\n function legacyCreateRootFromDOMContainer(container, forceHydrate) {\n var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.\n\n if (!shouldHydrate) {\n var warned = false;\n var rootSibling;\n\n while (rootSibling = container.lastChild) {\n {\n if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {\n warned = true;\n error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');\n }\n }\n container.removeChild(rootSibling);\n }\n }\n\n {\n if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {\n warnedAboutHydrateAPI = true;\n 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.');\n }\n }\n return createLegacyRoot(container, shouldHydrate ? {\n hydrate: true\n } : undefined);\n }\n\n function warnOnInvalidCallback$1(callback, callerName) {\n {\n if (callback !== null && typeof callback !== 'function') {\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n }\n }\n\n function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n } // TODO: Without `any` type, Flow says \"Property cannot be accessed on any\n // member of intersection type.\" Whyyyyyy.\n\n var root = container._reactRootContainer;\n var fiberRoot;\n\n if (!root) {\n // Initial mount\n root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n originalCallback.call(instance);\n };\n } // Initial mount should not be batched.\n\n\n unbatchedUpdates(function () {\n updateContainer(children, fiberRoot, parentComponent, callback);\n });\n } else {\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n\n _originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, fiberRoot, parentComponent, callback);\n }\n\n return getPublicRootInstance(fiberRoot);\n }\n\n function findDOMNode(componentOrElement) {\n {\n var owner = ReactCurrentOwner$3.current;\n\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n if (!warnedAboutRefsInRender) {\n error('%s is accessing findDOMNode inside its render(). ' + '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(owner.type) || 'A component');\n }\n\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n\n if (componentOrElement == null) {\n return null;\n }\n\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n }\n\n function hydrate(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error(\"Target container is not a DOM element.\");\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n }\n\n function render(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error(\"Target container is not a DOM element.\");\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n }\n }\n return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n }\n\n function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n if (!isValidContainer(containerNode)) {\n {\n throw Error(\"Target container is not a DOM element.\");\n }\n }\n\n if (!(parentComponent != null && has(parentComponent))) {\n {\n throw Error(\"parentComponent must be a valid React Component\");\n }\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n }\n\n function unmountComponentAtNode(container) {\n if (!isValidContainer(container)) {\n {\n throw Error(\"unmountComponentAtNode(...): Target container is not a DOM element.\");\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\n\n if (renderedByDifferentReact) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n }\n } // Unmount should not be batched.\n\n unbatchedUpdates(function () {\n legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n // $FlowFixMe This should probably use `delete container._reactRootContainer`\n container._reactRootContainer = null;\n unmarkContainerAsRoot(container);\n });\n }); // If you call unmountComponentAtNode twice in quick succession, you'll\n // get `true` twice. That's probably fine?\n\n return true;\n } else {\n {\n var _rootEl = getReactRootElementInContainer(container);\n\n var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;\n\n if (hasNonRootReactChild) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n }\n }\n return false;\n }\n }\n\n setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);\n setAttemptContinuousHydration(attemptContinuousHydration$1);\n setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\n setAttemptHydrationAtPriority(runWithPriority$2);\n var didWarnAboutUnstableCreatePortal = false;\n {\n if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype\n Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n 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');\n }\n }\n setRestoreImplementation(restoreControlledState$3);\n setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);\n\n function createPortal$1(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n {\n throw Error(\"Target container is not a DOM element.\");\n }\n } // TODO: pass ReactDOM portal implementation as third argument\n // $FlowFixMe The Flow type is opaque but there's no way to actually create it.\n\n\n return createPortal(children, container, null, key);\n }\n\n function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n }\n\n function unstable_createPortal(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n {\n if (!didWarnAboutUnstableCreatePortal) {\n didWarnAboutUnstableCreatePortal = true;\n 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.');\n }\n }\n return createPortal$1(children, container, key);\n }\n\n var Internals = {\n // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.\n // This is an array for better minification.\n Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?\n IsThisRendererActing]\n };\n var foundDevTools = injectIntoDevTools({\n findFiberByHostInstance: getClosestInstanceFromNode,\n bundleType: 1,\n version: ReactVersion,\n rendererPackageName: 'react-dom'\n });\n {\n if (!foundDevTools && canUseDOM && window.top === window.self) {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n if (/^(https?|file):$/.test(protocol)) {\n // eslint-disable-next-line react-internal/no-production-logging\n 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');\n }\n }\n }\n }\n exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\n exports.createPortal = createPortal$1;\n exports.findDOMNode = findDOMNode;\n exports.flushSync = flushSync;\n exports.hydrate = hydrate;\n exports.render = render;\n exports.unmountComponentAtNode = unmountComponentAtNode;\n exports.unstable_batchedUpdates = batchedUpdates$1;\n exports.unstable_createPortal = unstable_createPortal;\n exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\n exports.version = ReactVersion;\n })();\n}","map":{"version":3,"sources":["/app/node_modules/react-dom/cjs/react-dom.development.js"],"names":["process","env","NODE_ENV","React","require","_assign","Scheduler","tracing","ReactSharedInternals","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","warn","format","_len","arguments","length","args","Array","_key","printWarning","error","_len2","_key2","level","ReactDebugCurrentFrame","stack","getStackAddendum","concat","argsWithFormat","map","item","unshift","Function","prototype","apply","call","console","Error","FunctionComponent","ClassComponent","IndeterminateComponent","HostRoot","HostPortal","HostComponent","HostText","Fragment","Mode","ContextConsumer","ContextProvider","ForwardRef","Profiler","SuspenseComponent","MemoComponent","SimpleMemoComponent","LazyComponent","IncompleteClassComponent","DehydratedFragment","SuspenseListComponent","FundamentalComponent","ScopeComponent","Block","OffscreenComponent","LegacyHiddenComponent","enableProfilerTimer","enableFundamentalAPI","enableNewReconciler","warnAboutStringRefs","allNativeEvents","Set","registrationNameDependencies","possibleRegistrationNames","registerTwoPhaseEvent","registrationName","dependencies","registerDirectEvent","lowerCasedName","toLowerCase","ondblclick","i","add","canUseDOM","window","document","createElement","RESERVED","STRING","BOOLEANISH_STRING","BOOLEAN","OVERLOADED_BOOLEAN","NUMERIC","POSITIVE_NUMERIC","ATTRIBUTE_NAME_START_CHAR","ATTRIBUTE_NAME_CHAR","ROOT_ATTRIBUTE_NAME","VALID_ATTRIBUTE_NAME_REGEX","RegExp","hasOwnProperty","Object","illegalAttributeNameCache","validatedAttributeNameCache","isAttributeNameSafe","attributeName","test","shouldIgnoreAttribute","name","propertyInfo","isCustomComponentTag","type","shouldRemoveAttributeWithWarning","value","acceptsBooleans","prefix","slice","shouldRemoveAttribute","isNaN","getPropertyInfo","properties","PropertyInfoRecord","mustUseProperty","attributeNamespace","sanitizeURL","removeEmptyString","propertyName","reservedProps","forEach","_ref","CAMELIZE","capitalize","token","toUpperCase","replace","xlinkHref","isJavaScriptProtocol","didWarn","url","JSON","stringify","getValueForProperty","node","expected","stringValue","hasAttribute","getAttribute","getValueForAttribute","isOpaqueHydratingObject","undefined","setValueForProperty","_attributeName","removeAttribute","setAttribute","_type","attributeValue","toString","setAttributeNS","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_SERVER_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_SCOPE_TYPE","REACT_OPAQUE_ID_TYPE","REACT_DEBUG_TRACING_MODE_TYPE","REACT_OFFSCREEN_TYPE","REACT_LEGACY_HIDDEN_TYPE","Symbol","for","symbolFor","MAYBE_ITERATOR_SYMBOL","iterator","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","__reactDisabledLog","disableLogs","log","info","group","groupCollapsed","groupEnd","props","configurable","enumerable","writable","defineProperties","reenableLogs","ReactCurrentDispatcher","describeBuiltInComponentFrame","source","ownerFn","x","match","trim","reentry","componentFrameCache","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","construct","frame","get","control","previousPrepareStackTrace","prepareStackTrace","previousDispatcher","current","Fake","defineProperty","set","Reflect","sample","sampleLines","split","controlLines","s","c","_frame","displayName","syntheticFrame","describeClassComponentFrame","ctor","describeFunctionComponentFrame","shouldConstruct","Component","isReactComponent","describeUnknownElementTypeFrameInDEV","$$typeof","render","_render","lazyComponent","payload","_payload","init","_init","describeFiber","fiber","owner","_debugOwner","_debugSource","tag","getStackByFiberInDevAndProd","workInProgress","return","message","getWrappedName","outerType","innerType","wrapperName","functionName","getContextName","getComponentName","context","provider","_context","isRendering","getCurrentFiberOwnerNameInDevOrNull","getCurrentFiberStackInDev","resetCurrentFiber","getCurrentStack","setCurrentFiber","setIsRendering","rendering","getIsRendering","getToStringValue","hasReadOnlyValue","button","checkbox","image","hidden","radio","reset","submit","checkControlledValueProps","tagName","onChange","onInput","readOnly","disabled","checked","isCheckable","elem","nodeName","getTracker","_valueTracker","detachTracker","getValueFromNode","trackValueOnNode","valueField","descriptor","getOwnPropertyDescriptor","constructor","currentValue","tracker","getValue","setValue","stopTracking","track","updateValueIfChanged","lastValue","nextValue","getActiveElement","doc","activeElement","body","e","didWarnValueDefaultValue","didWarnCheckedDefaultChecked","didWarnControlledToUncontrolled","didWarnUncontrolledToControlled","isControlled","usesChecked","getHostProps","element","hostProps","defaultChecked","defaultValue","_wrapperState","initialChecked","initWrapperState","initialValue","controlled","updateChecked","updateWrapper","setDefaultValue","postMountWrapper","isHydrating","isButton","restoreControlledState","updateNamedCousins","rootNode","queryRoot","parentNode","querySelectorAll","otherNode","form","otherProps","getFiberCurrentPropsFromNode","ownerDocument","didWarnSelectedSetOnOption","didWarnInvalidChild","flattenChildren","children","content","Children","child","validateProps","selected","postMountWrapper$1","getHostProps$1","didWarnValueDefaultValue$1","getDeclarationErrorAddendum","ownerName","valuePropNames","checkSelectPropTypes","propName","isArray","multiple","updateOptions","propValue","setDefaultSelected","options","selectedValues","selectedValue","_i","defaultSelected","_selectedValue","_i2","getHostProps$2","initWrapperState$1","wasMultiple","postMountWrapper$2","postUpdateWrapper","restoreControlledState$1","didWarnValDefaultVal","getHostProps$3","dangerouslySetInnerHTML","initWrapperState$2","updateWrapper$1","newValue","postMountWrapper$3","textContent","restoreControlledState$2","HTML_NAMESPACE","MATH_NAMESPACE","SVG_NAMESPACE","Namespaces","html","mathml","svg","getIntrinsicNamespace","getChildNamespace","parentNamespace","createMicrosoftUnsafeLocalFunction","func","MSApp","execUnsafeLocalFunction","arg0","arg1","arg2","arg3","reusableSVGContainer","setInnerHTML","namespaceURI","innerHTML","valueOf","svgNode","firstChild","removeChild","appendChild","ELEMENT_NODE","TEXT_NODE","COMMENT_NODE","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","setTextContent","text","lastChild","nodeType","nodeValue","shorthandToLonghand","animation","background","backgroundPosition","border","borderBlockEnd","borderBlockStart","borderBottom","borderColor","borderImage","borderInlineEnd","borderInlineStart","borderLeft","borderRadius","borderRight","borderStyle","borderTop","borderWidth","columnRule","columns","flex","flexFlow","font","fontVariant","gap","grid","gridArea","gridColumn","gridColumnGap","gridGap","gridRow","gridRowGap","gridTemplate","listStyle","margin","marker","mask","maskPosition","outline","overflow","padding","placeContent","placeItems","placeSelf","textDecoration","textEmphasis","transition","wordWrap","isUnitlessNumber","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRowEnd","gridRowSpan","gridRowStart","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixKey","key","charAt","substring","prefixes","keys","prop","dangerousStyleValue","isCustomProperty","isEmpty","uppercasePattern","msPattern","hyphenateStyleName","warnValidStyle","badVendoredStyleNamePattern","msPattern$1","hyphenPattern","badStyleValueWithSemicolonPattern","warnedStyleNames","warnedStyleValues","warnedForNaNValue","warnedForInfinityValue","camelize","string","_","character","warnHyphenatedStyleName","warnBadVendoredStyleName","warnStyleValueWithSemicolon","warnStyleValueIsNaN","warnStyleValueIsInfinity","indexOf","isFinite","warnValidStyle$1","createDangerousStringForStyles","styles","serialized","delimiter","styleName","styleValue","setValueForStyles","style","setProperty","isValueEmpty","expandShorthandMap","expanded","longhands","validateShorthandPropertyCollisionInDev","styleUpdates","nextStyles","expandedUpdates","expandedStyles","warnedAbout","originalKey","correctOriginalKey","warningKey","omittedCloseTags","area","base","br","col","embed","hr","img","input","keygen","link","meta","param","wbr","voidElementTags","menuitem","HTML","assertValidProps","suppressContentEditableWarning","contentEditable","isCustomComponent","is","possibleStandardNames","accept","acceptcharset","accesskey","action","allowfullscreen","alt","as","async","autocapitalize","autocomplete","autocorrect","autofocus","autoplay","autosave","capture","cellpadding","cellspacing","challenge","charset","cite","class","classid","classname","cols","colspan","contenteditable","contextmenu","controls","controlslist","coords","crossorigin","dangerouslysetinnerhtml","data","datetime","default","defaultchecked","defaultvalue","defer","dir","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","formmethod","formaction","formenctype","formnovalidate","formtarget","frameborder","headers","height","high","href","hreflang","htmlfor","httpequiv","icon","id","innerhtml","inputmode","integrity","itemid","itemprop","itemref","itemscope","itemtype","keyparams","keytype","kind","label","lang","list","loop","low","manifest","marginwidth","marginheight","max","maxlength","media","mediagroup","method","min","minlength","muted","nomodule","nonce","novalidate","open","optimum","pattern","placeholder","playsinline","poster","preload","profile","radiogroup","readonly","referrerpolicy","rel","required","reversed","role","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","shape","size","sizes","span","spellcheck","src","srcdoc","srclang","srcset","start","step","summary","tabindex","target","title","usemap","width","wmode","wrap","about","accentheight","accumulate","additive","alignmentbaseline","allowreorder","alphabetic","amplitude","arabicform","ascent","attributename","attributetype","autoreverse","azimuth","basefrequency","baselineshift","baseprofile","bbox","begin","bias","by","calcmode","capheight","clip","clippath","clippathunits","cliprule","color","colorinterpolation","colorinterpolationfilters","colorprofile","colorrendering","contentscripttype","contentstyletype","cursor","cx","cy","d","datatype","decelerate","descent","diffuseconstant","direction","display","divisor","dominantbaseline","dur","dx","dy","edgemode","elevation","enablebackground","end","exponent","externalresourcesrequired","fill","fillopacity","fillrule","filter","filterres","filterunits","floodopacity","floodcolor","focusable","fontfamily","fontsize","fontsizeadjust","fontstretch","fontstyle","fontvariant","fontweight","from","fx","fy","g1","g2","glyphname","glyphorientationhorizontal","glyphorientationvertical","glyphref","gradienttransform","gradientunits","hanging","horizadvx","horizoriginx","ideographic","imagerendering","in2","in","inlist","intercept","k1","k2","k3","k4","k","kernelmatrix","kernelunitlength","kerning","keypoints","keysplines","keytimes","lengthadjust","letterspacing","lightingcolor","limitingconeangle","local","markerend","markerheight","markermid","markerstart","markerunits","markerwidth","maskcontentunits","maskunits","mathematical","mode","numoctaves","offset","operator","orient","orientation","origin","overlineposition","overlinethickness","paintorder","panose1","pathlength","patterncontentunits","patterntransform","patternunits","pointerevents","points","pointsatx","pointsaty","pointsatz","preservealpha","preserveaspectratio","primitiveunits","property","r","radius","refx","refy","renderingintent","repeatcount","repeatdur","requiredextensions","requiredfeatures","resource","restart","result","results","rotate","rx","ry","scale","security","seed","shaperendering","slope","spacing","specularconstant","specularexponent","speed","spreadmethod","startoffset","stddeviation","stemh","stemv","stitchtiles","stopcolor","stopopacity","strikethroughposition","strikethroughthickness","stroke","strokedasharray","strokedashoffset","strokelinecap","strokelinejoin","strokemiterlimit","strokewidth","strokeopacity","suppresscontenteditablewarning","suppresshydrationwarning","surfacescale","systemlanguage","tablevalues","targetx","targety","textanchor","textdecoration","textlength","textrendering","to","transform","typeof","u1","u2","underlineposition","underlinethickness","unicode","unicodebidi","unicoderange","unitsperem","unselectable","valphabetic","values","vectoreffect","version","vertadvy","vertoriginx","vertoriginy","vhanging","videographic","viewbox","viewtarget","visibility","vmathematical","vocab","widths","wordspacing","writingmode","x1","x2","xchannelselector","xheight","xlinkactuate","xlinkarcrole","xlinkhref","xlinkrole","xlinkshow","xlinktitle","xlinktype","xmlbase","xmllang","xmlns","xmlnsxlink","xmlspace","y1","y2","y","ychannelselector","z","zoomandpan","ariaProperties","warnedProperties","rARIA","rARIACamel","hasOwnProperty$1","validateProperty","ariaName","correctName","standardName","warnInvalidARIAProps","invalidProps","isValid","push","unknownPropString","join","validateProperties","didWarnValueNull","validateProperties$1","validateProperty$1","warnedProperties$1","_hasOwnProperty","EVENT_NAME_REGEX","INVALID_EVENT_NAME_REGEX","rARIA$1","rARIACamel$1","eventRegistry","isReserved","warnUnknownProperties","unknownProps","validateProperties$2","IS_EVENT_HANDLE_NON_MANAGED_NODE","IS_NON_DELEGATED","IS_CAPTURE_PHASE","IS_REPLAYED","SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS","getEventTarget","nativeEvent","srcElement","correspondingUseElement","restoreImpl","restoreTarget","restoreQueue","restoreStateOfTarget","internalInstance","getInstanceFromNode","stateNode","_props","setRestoreImplementation","impl","enqueueStateRestore","needsStateRestore","restoreStateIfNeeded","queuedTargets","batchedUpdatesImpl","bookkeeping","discreteUpdatesImpl","a","b","flushDiscreteUpdatesImpl","batchedEventUpdatesImpl","isInsideEventHandler","isBatchingEventUpdates","finishEventHandler","controlledComponentsHavePendingUpdates","batchedUpdates","batchedEventUpdates","discreteUpdates","prevIsInsideEventHandler","flushDiscreteUpdatesIfNeeded","timeStamp","setBatchingImplementation","_batchedUpdatesImpl","_discreteUpdatesImpl","_flushDiscreteUpdatesImpl","_batchedEventUpdatesImpl","isInteractive","shouldPreventMouseEvent","getListener","inst","listener","passiveBrowserEventsSupported","addEventListener","removeEventListener","invokeGuardedCallbackProd","f","funcArgs","onError","invokeGuardedCallbackImpl","dispatchEvent","createEvent","fakeNode","invokeGuardedCallbackDev","evt","didCall","didError","windowEvent","event","windowEventDescriptor","restoreAfterDispatch","evtType","callCallback","didSetError","isCrossOriginError","handleWindowError","colno","lineno","defaultPrevented","_suppressLogging","inner","initEvent","invokeGuardedCallbackImpl$1","hasError","caughtError","hasRethrowError","rethrowError","reporter","invokeGuardedCallback","invokeGuardedCallbackAndCatchFirstError","clearCaughtError","rethrowCaughtError","hasCaughtError","_reactInternals","has","NoFlags","PerformedWork","Placement","Update","PlacementAndUpdate","Deletion","ContentReset","Callback","DidCapture","Ref","Snapshot","Passive","PassiveUnmountPendingDev","Hydrating","HydratingAndUpdate","LifecycleEffectMask","HostEffectMask","Incomplete","ShouldCapture","ForceUpdateForLegacySuspense","ReactCurrentOwner","getNearestMountedFiber","nearestMounted","alternate","nextNode","flags","getSuspenseInstanceFromFiber","suspenseState","memoizedState","dehydrated","getContainerFromFiber","containerInfo","isFiberMounted","isMounted","component","ownerFiber","instance","_warnedAboutRefsInRender","assertIsMounted","findCurrentFiberUsingSlowPath","parentA","parentB","nextParent","sibling","didFindChild","_child","findCurrentHostFiber","parent","currentParent","findCurrentHostFiberWithNoPortals","doesFiberContain","parentFiber","childFiber","parentFiberAlternate","attemptUserBlockingHydration","setAttemptUserBlockingHydration","attemptContinuousHydration","setAttemptContinuousHydration","attemptHydrationAtCurrentPriority","setAttemptHydrationAtCurrentPriority","attemptHydrationAtPriority","setAttemptHydrationAtPriority","hasScheduledReplayAttempt","queuedDiscreteEvents","queuedFocus","queuedDrag","queuedMouse","queuedPointers","queuedPointerCaptures","queuedExplicitHydrationTargets","hasQueuedDiscreteEvents","discreteReplayableEvents","isReplayableDiscreteEvent","eventType","createQueuedReplayableEvent","blockedOn","domEventName","eventSystemFlags","targetContainer","targetContainers","queueDiscreteEvent","queuedEvent","clearIfContinuousEvent","pointerId","delete","_pointerId","accumulateOrCreateContinuousQueuedReplayableEvent","existingQueuedEvent","_fiber2","queueIfContinuousEvent","focusEvent","dragEvent","mouseEvent","pointerEvent","_pointerEvent","_pointerId2","attemptExplicitHydrationTarget","queuedTarget","targetInst","getClosestInstanceFromNode","lanePriority","unstable_runWithPriority","priority","root","hydrate","attemptReplayContinuousQueuedEvent","nextBlockedOn","attemptToDispatchEvent","_fiber3","shift","attemptReplayContinuousQueuedEventInMap","replayUnblockedEvents","nextDiscreteEvent","_fiber4","scheduleCallbackIfUnblocked","unblocked","unstable_scheduleCallback","unstable_NormalPriority","retryIfBlockedOn","unblock","nextExplicitTarget","DiscreteEvent","UserBlockingEvent","ContinuousEvent","makePrefixMap","styleProp","eventName","vendorPrefixes","animationend","animationiteration","animationstart","transitionend","prefixedEventNames","getVendorPrefixedEventName","prefixMap","ANIMATION_END","ANIMATION_ITERATION","ANIMATION_START","TRANSITION_END","topLevelEventsToReactNames","eventPriorities","discreteEventPairsForSimpleEventPlugin","otherDiscreteEvents","userBlockingPairsForSimpleEventPlugin","continuousPairsForSimpleEventPlugin","registerSimplePluginEventsAndSetTheirPriorities","eventTypes","topEvent","capitalizedEvent","reactName","setEventPriorities","getEventPriorityForPluginSystem","registerSimpleEvents","Scheduler_now","unstable_now","__interactionsRef","ImmediatePriority","UserBlockingPriority","NormalPriority","LowPriority","IdlePriority","NoPriority","initialTimeMs","SyncLanePriority","SyncBatchedLanePriority","InputDiscreteHydrationLanePriority","InputDiscreteLanePriority","InputContinuousHydrationLanePriority","InputContinuousLanePriority","DefaultHydrationLanePriority","DefaultLanePriority","TransitionHydrationPriority","TransitionPriority","RetryLanePriority","SelectiveHydrationLanePriority","IdleHydrationLanePriority","IdleLanePriority","OffscreenLanePriority","NoLanePriority","TotalLanes","NoLanes","NoLane","SyncLane","SyncBatchedLane","InputDiscreteHydrationLane","InputDiscreteLanes","InputContinuousHydrationLane","InputContinuousLanes","DefaultHydrationLane","DefaultLanes","TransitionHydrationLane","TransitionLanes","RetryLanes","SomeRetryLane","SelectiveHydrationLane","NonIdleLanes","IdleHydrationLane","IdleLanes","OffscreenLane","NoTimestamp","setCurrentUpdateLanePriority","newLanePriority","return_highestLanePriority","getHighestPriorityLanes","lanes","inputDiscreteLanes","inputContinuousLanes","defaultLanes","transitionLanes","retryLanes","idleLanes","schedulerPriorityToLanePriority","schedulerPriorityLevel","lanePriorityToSchedulerPriority","getNextLanes","wipLanes","pendingLanes","nextLanes","nextLanePriority","expiredLanes","suspendedLanes","pingedLanes","nonIdlePendingLanes","nonIdleUnblockedLanes","nonIdlePingedLanes","unblockedLanes","getEqualOrHigherPriorityLanes","wipLanePriority","entangledLanes","entanglements","index","pickArbitraryLaneIndex","lane","getMostRecentEventTime","eventTimes","mostRecentEventTime","eventTime","computeExpirationTime","currentTime","markStarvedLanesAsExpired","expirationTimes","expirationTime","getLanesToRetrySynchronouslyOnError","everythingButOffscreen","returnNextLanesPriority","includesNonIdleWork","includesOnlyRetries","includesOnlyTransitions","findUpdateLane","_lane","pickArbitraryLane","_lane2","_lane3","findTransitionLane","findRetryLane","getHighestPriorityLane","getLowestPriorityLane","clz32","laneToIndex","includesSomeLane","isSubsetOfLanes","subset","mergeLanes","removeLanes","laneToLanes","higherPriorityLane","createLaneMap","initial","laneMap","markRootUpdated","updateLane","higherPriorityLanes","markRootSuspended","markRootPinged","markDiscreteUpdatesExpired","hasDiscreteLanes","markRootMutableRead","mutableReadLanes","markRootFinished","remainingLanes","noLongerPendingLanes","markRootEntangled","Math","clz32Fallback","LN2","UserBlockingPriority$1","unstable_UserBlockingPriority","runWithPriority","_enabled","setEnabled","enabled","isEnabled","createEventListenerWrapperWithPriority","eventPriority","listenerWrapper","dispatchDiscreteEvent","dispatchUserBlockingUpdate","bind","container","allowReplay","dispatchEventForPluginEventSystem","nativeEventTarget","addEventBubbleListener","addEventCaptureListener","addEventCaptureListenerWithPassiveFlag","passive","addEventBubbleListenerWithPassiveFlag","startText","fallbackText","initialize","getText","getData","startValue","startLength","endValue","endLength","minEnd","sliceTail","getEventCharCode","charCode","keyCode","functionThatReturnsTrue","functionThatReturnsFalse","createSyntheticEvent","Interface","SyntheticBaseEvent","reactEventType","_reactName","_targetInst","currentTarget","_propName","normalize","returnValue","isDefaultPrevented","isPropagationStopped","preventDefault","stopPropagation","cancelBubble","persist","isPersistent","EventInterface","eventPhase","bubbles","cancelable","Date","now","isTrusted","SyntheticEvent","UIEventInterface","view","detail","SyntheticUIEvent","lastMovementX","lastMovementY","lastMouseEvent","updateMouseMovementPolyfillState","screenX","screenY","MouseEventInterface","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","getEventModifierState","buttons","relatedTarget","fromElement","toElement","movementX","movementY","SyntheticMouseEvent","DragEventInterface","dataTransfer","SyntheticDragEvent","FocusEventInterface","SyntheticFocusEvent","AnimationEventInterface","animationName","elapsedTime","pseudoElement","SyntheticAnimationEvent","ClipboardEventInterface","clipboardData","SyntheticClipboardEvent","CompositionEventInterface","SyntheticCompositionEvent","SyntheticInputEvent","normalizeKey","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","translateToKey","getEventKey","String","fromCharCode","modifierKeyToProp","Alt","Control","Meta","Shift","modifierStateGetter","keyArg","syntheticEvent","keyProp","KeyboardEventInterface","code","location","repeat","locale","which","SyntheticKeyboardEvent","PointerEventInterface","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","SyntheticPointerEvent","TouchEventInterface","touches","targetTouches","changedTouches","SyntheticTouchEvent","TransitionEventInterface","SyntheticTransitionEvent","WheelEventInterface","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","SyntheticWheelEvent","END_KEYCODES","START_KEYCODE","canUseCompositionEvent","documentMode","canUseTextInputEvent","useFallbackCompositionData","SPACEBAR_CODE","SPACEBAR_CHAR","registerEvents","hasSpaceKeypress","isKeypressCommand","getCompositionEventType","isFallbackCompositionStart","isFallbackCompositionEnd","getDataFromCustomEvent","isUsingKoreanIME","isComposing","extractCompositionEvent","dispatchQueue","fallbackData","listeners","accumulateTwoPhaseListeners","customData","getNativeBeforeInputChars","chars","getFallbackBeforeInputChars","char","extractBeforeInputEvent","extractEvents","supportedInputTypes","date","email","month","number","password","range","search","tel","time","week","isTextInputElement","isEventSupported","eventNameSuffix","isSupported","registerEvents$1","createAndAccumulateChangeEvent","activeElementInst","shouldUseChangeEvent","manualDispatchChangeEvent","runEventInBatch","processDispatchQueue","getInstIfValueChanged","targetNode","getNodeFromInstance","getTargetInstForChangeEvent","isInputEventSupported","startWatchingForValueChange","attachEvent","handlePropertyChange","stopWatchingForValueChange","detachEvent","handleEventsForInputEventPolyfill","getTargetInstForInputEventPolyfill","shouldUseClickEvent","getTargetInstForClickEvent","getTargetInstForInputOrChangeEvent","handleControlledInputBlur","state","extractEvents$1","getTargetInstFunc","handleEventFunc","registerEvents$2","extractEvents$2","isOverEvent","isOutEvent","related","isContainerMarkedAsRoot","win","defaultView","parentWindow","_related","SyntheticEventCtor","leaveEventType","enterEventType","eventTypePrefix","fromNode","toNode","leave","enter","nativeTargetInst","enterEvent","accumulateEnterLeaveTwoPhaseListeners","objectIs","hasOwnProperty$2","shallowEqual","objA","objB","keysA","keysB","getLeafNode","getSiblingNode","nextSibling","getNodeForCharacterOffset","nodeStart","nodeEnd","getOffsets","outerNode","selection","getSelection","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","getModernOffsetsFromPoints","indexWithinAnchor","indexWithinFocus","outer","next","setOffsets","offsets","extend","temp","startMarker","endMarker","createRange","setStart","removeAllRanges","addRange","setEnd","isTextNode","containsNode","innerNode","contains","compareDocumentPosition","isInDocument","documentElement","isSameOriginFrame","iframe","contentWindow","err","getActiveElementDeep","HTMLIFrameElement","hasSelectionCapabilities","getSelectionInformation","focusedElem","selectionRange","restoreSelection","priorSelectionInformation","curFocusedElem","priorFocusedElem","priorSelectionRange","setSelection","ancestors","ancestor","left","scrollLeft","top","scrollTop","focus","selectionStart","selectionEnd","skipSelectionChangeEvent","registerEvents$3","activeElement$1","activeElementInst$1","lastSelection","mouseDown","getSelection$1","getEventTargetDocument","eventTarget","constructSelectEvent","currentSelection","extractEvents$3","extractEvents$4","inCapturePhase","accumulateTargetOnly","_listeners","accumulateSinglePhaseListeners","_event","extractEvents$5","shouldProcessPolyfillPlugins","mediaEventTypes","nonDelegatedEvents","executeDispatch","processDispatchQueueItemsInOrder","dispatchListeners","previousInstance","_dispatchListeners$i","_dispatchListeners$_i","_instance","_currentTarget","_listener","_dispatchQueue$i","dispatchEventsForPlugins","listenToNonDelegatedEvent","targetElement","isCapturePhaseListener","listenerSet","getEventListenerSet","listenerSetKey","getListenerSetKey","addTrappedEventListener","listeningMarker","random","listenToAllSupportedEvents","rootContainerElement","listenToNativeEvent","isDeferredListenerForLegacyFBSupport","isPassiveListener","unsubscribeListener","isMatchingRootContainer","grandContainer","ancestorInst","targetContainerNode","mainLoop","nodeTag","grandNode","grandTag","parentTag","createDispatchListener","targetFiber","nativeEventType","captureName","reactEventName","lastHostComponent","_instance2","_instance3","captureListener","bubbleListener","getParent","getLowestCommonAncestor","instA","instB","nodeA","nodeB","depthA","tempA","depthB","tempB","depth","accumulateEnterLeaveListenersForEvent","common","_instance4","leaveEvent","didWarnInvalidHydration","DANGEROUSLY_SET_INNER_HTML","SUPPRESS_CONTENT_EDITABLE_WARNING","SUPPRESS_HYDRATION_WARNING","AUTOFOCUS","CHILDREN","STYLE","HTML$1","HTML_NAMESPACE$1","warnedUnknownTags","suppressHydrationWarning","validatePropertiesInDevelopment","warnForTextDifference","warnForPropDifference","warnForExtraAttributes","warnForInvalidEventListener","canDiffStyleForHydrationWarning","normalizeMarkupForTextOrAttribute","normalizeHTML","dialog","webview","NORMALIZE_NEWLINES_REGEX","NORMALIZE_NULL_AND_REPLACEMENT_REGEX","markup","markupString","serverText","clientText","normalizedClientText","normalizedServerText","serverValue","clientValue","normalizedClientValue","normalizedServerValue","attributeNames","names","testElement","createElementNS","getOwnerDocumentFromRootContainer","noop","trapClickOnNonInteractiveElement","onclick","setInitialDOMProperties","domElement","nextProps","propKey","nextProp","freeze","nextHtml","canSetTextContent","updateDOMProperties","updatePayload","wasCustomComponentTag","div","createTextNode","setInitialProperties","rawProps","onClick","diffProperties","lastRawProps","nextRawProps","lastProps","lastStyle","lastProp","lastHtml","updateProperties","getPossibleStandardName","diffHydratedProperties","extraAttributeNames","attributes","serverHTML","expectedHTML","expectedStyle","isMismatchDueToBadCasing","ownNamespace","diffHydratedText","textNode","isDifferent","warnForUnmatchedText","warnForDeletedHydratableElement","warnForDeletedHydratableText","warnForInsertedHydratedElement","warnForInsertedHydratedText","restoreControlledState$3","validateDOMNesting","updatedAncestorInfo","specialTags","inScopeTags","buttonScopeTags","impliedEndTags","emptyAncestorInfo","formTag","aTagInScope","buttonTagInScope","nobrTagInScope","pTagInButtonScope","listItemTagAutoclosing","dlItemTagAutoclosing","oldInfo","ancestorInfo","isTagValidWithParent","findInvalidAncestorForTag","didWarn$1","childTag","childText","parentInfo","invalidParent","invalidAncestor","invalidParentOrAncestor","ancestorTag","warnKey","tagDisplayName","whitespaceInfo","SUPPRESS_HYDRATION_WARNING$1","SUSPENSE_START_DATA","SUSPENSE_END_DATA","SUSPENSE_PENDING_START_DATA","SUSPENSE_FALLBACK_START_DATA","STYLE$1","eventsEnabled","selectionInformation","shouldAutoFocusHostComponent","autoFocus","getRootHostContext","rootContainerInstance","namespace","validatedTag","getChildHostContext","parentHostContext","parentHostContextDev","getPublicInstance","prepareForCommit","activeInstance","resetAfterCommit","createInstance","hostContext","internalInstanceHandle","hostContextDev","ownAncestorInfo","precacheFiberNode","updateFiberProps","appendInitialChild","parentInstance","finalizeInitialChildren","prepareUpdate","oldProps","newProps","shouldSetTextContent","__html","createTextInstance","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","commitMount","commitUpdate","resetTextContent","commitTextUpdate","textInstance","oldText","newText","appendChildToContainer","insertBefore","reactRootContainer","_reactRootContainer","beforeChild","insertInContainerBefore","removeChildFromContainer","hideInstance","hideTextInstance","unhideInstance","unhideTextInstance","clearContainer","canHydrateInstance","canHydrateTextInstance","isSuspenseInstancePending","isSuspenseInstanceFallback","getNextHydratable","getNextHydratableSibling","getFirstHydratableChild","hydrateInstance","hydrateTextInstance","getNextHydratableInstanceAfterSuspenseInstance","suspenseInstance","getParentSuspenseInstance","targetInstance","previousSibling","commitHydratedContainer","commitHydratedSuspenseInstance","didNotMatchHydratedContainerTextInstance","parentContainer","didNotMatchHydratedTextInstance","parentType","parentProps","didNotHydrateContainerInstance","didNotHydrateInstance","didNotFindHydratableContainerInstance","didNotFindHydratableContainerTextInstance","didNotFindHydratableInstance","didNotFindHydratableTextInstance","didNotFindHydratableSuspenseInstance","clientId","makeClientIdInDEV","warnOnAccessInDEV","makeOpaqueHydratingObject","attemptToReadValue","preparePortalMount","portalInstance","randomKey","internalInstanceKey","internalPropsKey","internalContainerInstanceKey","internalEventHandlersKey","hostInst","markContainerAsRoot","hostRoot","unmarkContainerAsRoot","targetSuspenseInst","elementListenerSet","loggedTypeFailures","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement","_owner","_source","setExtraStackFrame","checkPropTypes","typeSpecs","componentName","typeSpecName","error$1","ex","valueStack","fiberStack","createCursor","pop","warnedAboutMissingGetChildContext","emptyContextObject","contextStackCursor","didPerformWorkStackCursor","previousContext","getUnmaskedContext","didPushOwnContextIfProvider","isContextProvider","cacheContext","unmaskedContext","maskedContext","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","getMaskedContext","contextTypes","hasContextChanged","childContextTypes","popContext","popTopLevelContextObject","pushTopLevelContextObject","didChange","processChildContext","parentContext","getChildContext","childContext","contextKey","pushContextProvider","memoizedMergedChildContext","__reactInternalMemoizedMergedChildContext","invalidateContextProvider","mergedContext","findCurrentUnmaskedContext","LegacyRoot","BlockingRoot","ConcurrentRoot","rendererID","injectedHook","hasLoggedError","isDevToolsPresent","__REACT_DEVTOOLS_GLOBAL_HOOK__","injectInternals","internals","hook","isDisabled","supportsFiber","inject","onScheduleRoot","onScheduleFiberRoot","onCommitRoot","priorityLevel","onCommitFiberRoot","onCommitUnmount","onCommitFiberUnmount","Scheduler_runWithPriority","Scheduler_scheduleCallback","Scheduler_cancelCallback","unstable_cancelCallback","Scheduler_shouldYield","unstable_shouldYield","Scheduler_requestPaint","unstable_requestPaint","Scheduler_now$1","Scheduler_getCurrentPriorityLevel","unstable_getCurrentPriorityLevel","Scheduler_ImmediatePriority","unstable_ImmediatePriority","Scheduler_UserBlockingPriority","Scheduler_NormalPriority","Scheduler_LowPriority","unstable_LowPriority","Scheduler_IdlePriority","unstable_IdlePriority","fakeCallbackNode","ImmediatePriority$1","UserBlockingPriority$2","NormalPriority$1","LowPriority$1","IdlePriority$1","NoPriority$1","shouldYield","requestPaint","syncQueue","immediateQueueCallbackNode","isFlushingSyncQueue","initialTimeMs$1","getCurrentPriorityLevel","reactPriorityToSchedulerPriority","reactPriorityLevel","runWithPriority$1","scheduleCallback","callback","scheduleSyncCallback","flushSyncCallbackQueueImpl","cancelCallback","callbackNode","flushSyncCallbackQueue","_isSync2","_queue","ReactVersion","NoMode","StrictMode","BlockingMode","ConcurrentMode","ProfileMode","DebugTracingMode","ReactCurrentBatchConfig","NoTransition","requestCurrentTransition","ReactStrictModeWarnings","recordUnsafeLifecycleWarnings","flushPendingUnsafeLifecycleWarnings","recordLegacyContextWarning","flushLegacyContextWarning","discardPendingWarnings","findStrictRoot","maybeStrictRoot","setToSortedString","array","sort","pendingComponentWillMountWarnings","pendingUNSAFE_ComponentWillMountWarnings","pendingComponentWillReceivePropsWarnings","pendingUNSAFE_ComponentWillReceivePropsWarnings","pendingComponentWillUpdateWarnings","pendingUNSAFE_ComponentWillUpdateWarnings","didWarnAboutUnsafeLifecycles","componentWillMount","__suppressDeprecationWarning","UNSAFE_componentWillMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","componentWillUpdate","UNSAFE_componentWillUpdate","componentWillMountUniqueNames","UNSAFE_componentWillMountUniqueNames","componentWillReceivePropsUniqueNames","UNSAFE_componentWillReceivePropsUniqueNames","componentWillUpdateUniqueNames","UNSAFE_componentWillUpdateUniqueNames","sortedNames","_sortedNames","_sortedNames2","_sortedNames3","_sortedNames4","_sortedNames5","pendingLegacyContextWarning","didWarnAboutLegacyContext","strictRoot","warningsForRoot","fiberArray","firstFiber","uniqueNames","resolveDefaultProps","baseProps","defaultProps","MAX_SIGNED_31_BIT_INT","valueCursor","rendererSigil","currentlyRenderingFiber","lastContextDependency","lastContextWithAllBitsObserved","isDisallowedContextReadInDEV","resetContextDependencies","enterDisallowedContextReadInDEV","exitDisallowedContextReadInDEV","pushProvider","providerFiber","_currentValue","_currentRenderer","popProvider","calculateChangedBits","oldValue","changedBits","_calculateChangedBits","scheduleWorkOnParentPath","renderLanes","childLanes","propagateContextChange","nextFiber","dependency","firstContext","observedBits","update","createUpdate","ForceUpdate","enqueueUpdate","prepareToReadContext","markWorkInProgressReceivedUpdate","readContext","resolvedObservedBits","contextItem","responders","UpdateState","ReplaceState","CaptureUpdate","hasForceUpdate","didWarnUpdateInsideUpdate","currentlyProcessingQueue","initializeUpdateQueue","queue","baseState","firstBaseUpdate","lastBaseUpdate","shared","pending","effects","updateQueue","cloneUpdateQueue","currentQueue","clone","sharedQueue","enqueueCapturedUpdate","capturedUpdate","newFirst","newLast","getStateFromUpdate","prevState","nextState","partialState","processUpdateQueue","pendingQueue","lastPendingUpdate","firstPendingUpdate","currentLastBaseUpdate","newState","newLanes","newBaseState","newFirstBaseUpdate","newLastBaseUpdate","updateEventTime","_clone","_lastPendingUpdate","_firstPendingUpdate","markSkippedUpdateLanes","resetHasForceUpdateBeforeProcessing","checkHasForceUpdateAfterProcessing","commitUpdateQueue","finishedWork","finishedQueue","effect","fakeInternalInstance","emptyRefsObject","refs","didWarnAboutStateAssignmentForComponent","didWarnAboutUninitializedState","didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate","didWarnAboutLegacyLifecyclesAndDerivedState","didWarnAboutUndefinedDerivedState","warnOnUndefinedDerivedState","warnOnInvalidCallback","didWarnAboutDirectlyAssigningPropsToState","didWarnAboutContextTypeAndContextTypes","didWarnAboutInvalidateContextType","didWarnOnInvalidCallback","callerName","applyDerivedStateFromProps","getDerivedStateFromProps","classComponentUpdater","enqueueSetState","requestEventTime","requestUpdateLane","scheduleUpdateOnFiber","enqueueReplaceState","enqueueForceUpdate","checkShouldComponentUpdate","oldState","nextContext","shouldComponentUpdate","shouldUpdate","isPureReactComponent","checkClassInstance","renderPresent","getInitialState","isReactClassApproved","getDefaultProps","propTypes","contextType","componentShouldUpdate","componentDidUnmount","componentDidReceiveProps","componentWillRecieveProps","UNSAFE_componentWillRecieveProps","hasMutatedProps","getSnapshotBeforeUpdate","componentDidUpdate","getDerivedStateFromError","_state","adoptClassInstance","updater","_reactInternalInstance","constructClassInstance","isLegacyContextConsumer","addendum","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","_componentName","newApiName","callComponentWillMount","callComponentWillReceiveProps","mountClassInstance","componentDidMount","resumeMountClassInstance","memoizedProps","oldContext","nextLegacyUnmaskedContext","hasNewLifecycles","updateClassInstance","unresolvedOldProps","elementType","unresolvedNewProps","pendingProps","nextUnmaskedContext","didWarnAboutMaps","didWarnAboutGenerators","didWarnAboutStringRefs","ownerHasKeyUseWarning","ownerHasFunctionTypeWarning","warnForMissingKey","returnFiber","_store","validated","isArray$1","coerceRef","mixedRef","ref","_self","stringRef","_stringRef","throwOnInvalidObjectType","newChild","warnOnFunctionType","ChildReconciler","shouldTrackSideEffects","deleteChild","childToDelete","last","lastEffect","nextEffect","firstEffect","deleteRemainingChildren","currentFirstChild","mapRemainingChildren","existingChildren","existingChild","useFiber","createWorkInProgress","placeChild","newFiber","lastPlacedIndex","newIndex","oldIndex","placeSingleChild","updateTextNode","created","createFiberFromText","existing","updateElement","isCompatibleFamilyForHotReloading","createFiberFromElement","updatePortal","portal","implementation","createFiberFromPortal","updateFragment","fragment","createFiberFromFragment","createChild","_created","_created2","_created3","updateSlot","oldFiber","updateFromMap","newIdx","matchedFiber","_matchedFiber","_matchedFiber2","_matchedFiber3","warnOnInvalidKey","knownKeys","reconcileChildrenArray","newChildren","resultingFirstChild","previousNewFiber","nextOldFiber","_newFiber","_newFiber2","reconcileChildrenIterator","newChildrenIterable","iteratorFn","toStringTag","entries","_newChildren","_step","done","_newFiber3","_newFiber4","reconcileSingleTextNode","reconcileSingleElement","_existing3","_created4","reconcileSinglePortal","reconcileChildFibers","isUnkeyedTopLevelFragment","isObject","_isMockFunction","mountChildFibers","cloneChildFibers","currentChild","resetChildFibers","resetWorkInProgress","NO_CONTEXT","contextStackCursor$1","contextFiberStackCursor","rootInstanceStackCursor","requiredContext","getRootHostContainer","rootInstance","pushHostContainer","nextRootInstance","nextRootContext","popHostContainer","getHostContext","pushHostContext","popHostContext","DefaultSuspenseContext","SubtreeSuspenseContextMask","InvisibleParentSuspenseContext","ForceSuspenseFallback","suspenseStackCursor","hasSuspenseContext","flag","setDefaultShallowSuspenseContext","setShallowSuspenseContext","shallowContext","addSubtreeSuspenseContext","subtreeContext","pushSuspenseContext","newContext","popSuspenseContext","shouldCaptureSuspense","hasInvisibleParent","fallback","unstable_avoidThisFallback","findFirstSuspended","row","revealOrder","didSuspend","NoFlags$1","HasEffect","Layout","Passive$1","hydrationParentFiber","nextHydratableInstance","enterHydrationState","deleteHydratableInstance","createFiberFromHostInstanceForDeletion","insertNonHydratedInstance","_text","tryHydrate","nextInstance","tryToClaimNextHydratableInstance","firstAttemptedInstance","prepareToHydrateHostInstance","prepareToHydrateHostTextInstance","skipPastDehydratedSuspenseInstance","popToNextHostParent","popHydrationState","resetHydrationState","getIsHydrating","workInProgressSources","rendererSigil$1","markSourceAsDirty","mutableSource","resetWorkInProgressVersions","_workInProgressVersionPrimary","getWorkInProgressVersion","setWorkInProgressVersion","warnAboutMultipleRenderersDEV","_currentPrimaryRenderer","ReactCurrentDispatcher$1","ReactCurrentBatchConfig$1","didWarnAboutMismatchedHooksForComponent","didWarnAboutUseOpaqueIdentifier","currentlyRenderingFiber$1","currentHook","workInProgressHook","didScheduleRenderPhaseUpdate","didScheduleRenderPhaseUpdateDuringThisPass","RE_RENDER_LIMIT","currentHookNameInDev","hookTypesDev","hookTypesUpdateIndexDev","ignorePreviousDependencies","mountHookTypesDev","hookName","updateHookTypesDev","warnOnHookMismatchInDev","checkDepsAreArrayDev","deps","currentHookName","table","secondColumnStart","oldHookName","newHookName","throwInvalidHookError","areHookInputsEqual","nextDeps","prevDeps","renderWithHooks","secondArg","nextRenderLanes","_debugHookTypes","HooksDispatcherOnUpdateInDEV","HooksDispatcherOnMountWithHookTypesInDEV","HooksDispatcherOnMountInDEV","numberOfReRenders","HooksDispatcherOnRerenderInDEV","ContextOnlyDispatcher","didRenderTooFewHooks","bailoutHooks","resetHooksAfterThrow","isUpdatingOpaqueValueInRenderPhase","mountWorkInProgressHook","baseQueue","updateWorkInProgressHook","nextCurrentHook","nextWorkInProgressHook","newHook","createFunctionComponentUpdateQueue","basicStateReducer","mountReducer","reducer","initialArg","initialState","dispatch","lastRenderedReducer","lastRenderedState","dispatchAction","updateReducer","baseFirst","pendingFirst","first","newBaseQueueFirst","newBaseQueueLast","eagerReducer","eagerState","rerenderReducer","lastRenderPhaseUpdate","firstRenderPhaseUpdate","readFromUnsubcribedMutableSource","getSnapshot","getVersion","_getVersion","isSafeToReadFromSource","currentRenderVersion","snapshot","useMutableSource","subscribe","getWorkInProgressRoot","dispatcher","_dispatcher$useState","useState","currentSnapshot","setSnapshot","stateHook","prevGetSnapshot","prevSource","prevSubscribe","useEffect","maybeNewVersion","maybeNewSnapshot","handleChange","latestGetSnapshot","latestSetSnapshot","unsubscribe","newQueue","mountMutableSource","updateMutableSource","mountState","updateState","rerenderState","pushEffect","create","destroy","componentUpdateQueue","mountRef","seal","updateRef","mountEffectImpl","fiberFlags","hookFlags","updateEffectImpl","prevEffect","mountEffect","jest","warnIfNotCurrentlyActingEffectsInDEV","updateEffect","mountLayoutEffect","updateLayoutEffect","imperativeHandleEffect","refCallback","_inst","refObject","_inst2","mountImperativeHandle","effectDeps","updateImperativeHandle","mountDebugValue","formatterFn","updateDebugValue","mountCallback","updateCallback","mountMemo","nextCreate","updateMemo","mountDeferredValue","_mountState","prevValue","prevTransition","updateDeferredValue","_updateState","rerenderDeferredValue","_rerenderState","startTransition","setPending","mountTransition","_mountState2","isPending","updateTransition","_updateState2","startRef","rerenderTransition","_rerenderState2","getIsUpdatingOpaqueValueInRenderPhaseInDEV","warnOnOpaqueIdentifierAccessInDEV","mountOpaqueIdentifier","makeId","didUpgrade","readValue","setId","_id","updateOpaqueIdentifier","rerenderOpaqueIdentifier","prevDispatcher","InvalidNestedHooksDispatcherOnUpdateInDEV","currentState","warnIfNotScopedWithMatchingAct","warnIfNotCurrentlyActingUpdatesInDev","useCallback","useContext","useImperativeHandle","useLayoutEffect","useMemo","useReducer","useRef","useDebugValue","useDeferredValue","useTransition","useOpaqueIdentifier","unstable_isNewReconciler","InvalidNestedHooksDispatcherOnMountInDEV","InvalidNestedHooksDispatcherOnRerenderInDEV","warnInvalidContextAccess","warnInvalidHookAccess","now$1","commitTime","profilerStartTime","getCommitTime","recordCommitTime","startProfilerTimer","actualStartTime","stopProfilerTimerIfRunning","stopProfilerTimerIfRunningAndRecordDelta","overrideBaseTime","actualDuration","selfBaseDuration","transferActualDuration","ReactCurrentOwner$1","didReceiveUpdate","didWarnAboutBadClass","didWarnAboutModulePatternComponent","didWarnAboutContextTypeOnFunctionComponent","didWarnAboutGetDerivedStateOnFunctionComponent","didWarnAboutFunctionRefs","didWarnAboutReassigningProps","didWarnAboutRevealOrder","didWarnAboutTailOptions","reconcileChildren","nextChildren","forceUnmountCurrentAndReconcile","updateForwardRef","innerPropTypes","bailoutOnAlreadyFinishedWork","updateMemoComponent","updateLanes","isSimpleFunctionComponent","compare","resolvedType","resolveFunctionForHotReloading","validateFunctionComponentInDev","updateSimpleMemoComponent","createFiberFromTypeAndProps","_innerPropTypes","prevProps","outerMemoType","outerPropTypes","updateFunctionComponent","updateOffscreenComponent","baseLanes","pushRenderLanes","nextBaseLanes","prevBaseLanes","markSpawnedWork","_nextState","_nextState2","subtreeRenderLanes","_subtreeRenderLanes","updateLegacyHiddenComponent","updateMode","updateProfiler","effectDuration","passiveEffectDuration","markRef","updateClassComponent","hasContext","nextUnitOfWork","finishClassComponent","didCaptureError","pushHostRootContext","pendingContext","updateHostRoot","prevChildren","mutableSourceEagerHydrationData","updateHostComponent","isDirectTextChild","updateHostText","mountLazyComponent","_current","resolvedTag","resolveLazyComponentTag","resolvedProps","resolveClassForHotReloading","resolveForwardRefForHotReloading","hint","mountIncompleteClassComponent","mountIndeterminateComponent","_componentName2","_debugID","debugSource","fileName","lineNumber","_componentName3","_componentName4","SUSPENDED_MARKER","retryLane","mountSuspenseOffscreenState","updateSuspenseOffscreenState","prevOffscreenState","shouldRemainOnFallback","suspenseContext","getRemainingWorkInPrimaryTree","updateSuspenseComponent","shouldSuspend","showFallback","nextPrimaryChildren","nextFallbackChildren","fallbackFragment","mountSuspenseFallbackChildren","primaryChildFragment","unstable_expectedLoadTime","_fallbackFragment","_primaryChildFragment","mountSuspensePrimaryChildren","_nextFallbackChildren2","_nextPrimaryChildren2","_fallbackChildFragment","updateSuspenseFallbackChildren","_primaryChildFragment3","_nextPrimaryChildren3","_primaryChildFragment4","updateSuspensePrimaryChildren","_nextFallbackChildren3","_nextPrimaryChildren4","_fallbackChildFragment2","_primaryChildFragment5","_prevOffscreenState","_nextPrimaryChildren5","_primaryChildFragment6","primaryChildren","primaryChildProps","createFiberFromOffscreen","fallbackChildren","progressedPrimaryFragment","fallbackChildFragment","treeBaseDuration","createWorkInProgressOffscreenFiber","offscreenProps","currentPrimaryChildFragment","currentFallbackChildFragment","progressedLastEffect","scheduleWorkOnFiber","propagateSuspenseContextChange","findLastContentRow","lastContentRow","currentRow","validateRevealOrder","validateTailOptions","tailMode","validateSuspenseListNestedChild","childSlot","isIterable","validateSuspenseListChildren","childrenIterator","initSuspenseListRenderState","isBackwards","tail","lastEffectBeforeRendering","renderState","renderingStartTime","updateSuspenseListComponent","shouldForceFallback","didSuspendBefore","_tail","nextRow","updatePortalComponent","hasWarnedAboutUsingNoValuePropOnContextProvider","updateContextProvider","providerType","providerPropTypes","hasWarnedAboutUsingContextAsConsumer","updateContextConsumer","Consumer","unstable_observedBits","remountFiber","oldWorkInProgress","newWorkInProgress","prevSibling","beginWork","_debugNeedsRemount","hasChildWork","primaryChildLanes","_hasChildWork","_Component","unresolvedProps","_Component2","_unresolvedProps","_resolvedProps","_unresolvedProps2","_resolvedProps2","_type2","_unresolvedProps3","_resolvedProps3","_Component3","_unresolvedProps4","_resolvedProps4","markUpdate","markRef$1","appendAllChildren","updateHostContainer","updateHostComponent$1","updateHostText$1","needsVisibilityToggle","isHidden","currentHostContext","cutOffTailIfNeeded","hasRenderedATailFallback","tailNode","lastTailNode","_tailNode","_lastTailNode","completeWork","fiberRoot","wasHydrated","_wasHydrated","_rootContainerInstance","_currentHostContext","_wasHydrated2","nextDidTimeout","prevDidTimeout","hasInvisibleChildContext","renderDidSuspend","renderDidSuspendDelayIfPossible","didSuspendAlready","renderedTail","cannotBeSuspended","renderHasNotSuspendedYet","suspended","newThennables","getRenderTargetTime","_suspended","_newThennables","popRenderLanes","_prevState","prevIsHidden","nextIsHidden","unwindWork","_flags","_flags2","unwindInterruptedWork","interruptedWork","createCapturedValue","showErrorDialog","boundary","errorInfo","logCapturedError","logError","componentStack","componentNameMessage","errorBoundaryMessage","errorBoundaryName","combinedMessage","PossiblyWeakMap$1","createRootErrorUpdate","onUncaughtError","createClassErrorUpdate","componentDidCatch","markFailedErrorBoundaryForHotReloading","markLegacyErrorBoundaryAsFailed","attachPingListener","wakeable","pingCache","threadIDs","ping","pingSuspendedRoot","then","throwException","sourceFiber","rootRenderLanes","currentSource","hasInvisibleParentBoundary","_workInProgress","wakeables","currentSourceFiber","renderDidError","_errorInfo","_update","isAlreadyFailedLegacyErrorBoundary","_update2","didWarnAboutUndefinedSnapshotBeforeUpdate","PossiblyWeakSet","WeakSet","callComponentWillUnmountWithTimer","componentWillUnmount","safelyCallComponentWillUnmount","unmountError","captureCommitPhaseError","safelyDetachRef","refError","safelyCallDestroy","commitBeforeMutationLifeCycles","didWarnSet","__reactInternalSnapshotBeforeUpdate","commitHookEffectListUnmount","commitHookEffectListMount","schedulePassiveEffects","_effect","enqueuePendingPassiveHookEffectUnmount","enqueuePendingPassiveHookEffectMount","commitLifeCycles","finishedRoot","committedLanes","_updateQueue","_finishedWork$memoize2","onCommit","onRender","memoizedInteractions","commitSuspenseHydrationCallbacks","hideOrUnhideAllChildren","commitAttachRef","instanceToUse","commitDetachRef","currentRef","commitUnmount","renderPriorityLevel","_effect2","unmountHostComponents","commitNestedUnmounts","detachFiberMutation","getHostParentFiber","isHostParent","getHostSibling","siblings","commitPlacement","isContainer","parentStateNode","before","insertOrAppendPlacementNodeIntoContainer","insertOrAppendPlacementNode","isHost","currentParentIsValid","currentParentIsContainer","findParent","commitDeletion","commitWork","_root","commitSuspenseComponent","attachSuspenseRetryListeners","markCommitTimeOfFallback","primaryChildParent","retryCache","retry","resolveRetryWakeable","__reactDoNotTraceInteractions","unstable_wrap","isSuspenseBoundaryBeingHidden","commitResetTextContent","COMPONENT_TYPE","HAS_PSEUDO_CLASS_TYPE","ROLE_TYPE","TEST_NAME_TYPE","TEXT_TYPE","symbolFor$1","commitHooks","onCommitRoot$1","commitHook","ceil","ReactCurrentDispatcher$2","ReactCurrentOwner$2","IsSomeRendererActing","NoContext","BatchedContext","EventContext","DiscreteEventContext","LegacyUnbatchedContext","RenderContext","CommitContext","RetryAfterError","RootIncomplete","RootFatalErrored","RootErrored","RootSuspended","RootSuspendedWithDelay","RootCompleted","executionContext","workInProgressRoot","workInProgressRootRenderLanes","subtreeRenderLanesCursor","workInProgressRootExitStatus","workInProgressRootFatalError","workInProgressRootIncludedLanes","workInProgressRootSkippedLanes","workInProgressRootUpdatedLanes","workInProgressRootPingedLanes","mostRecentlyUpdatedRoot","globalMostRecentFallbackTime","FALLBACK_THROTTLE_MS","workInProgressRootRenderTargetTime","Infinity","RENDER_TIMEOUT_MS","resetRenderTimer","hasUncaughtError","firstUncaughtError","legacyErrorBoundariesThatAlreadyFailed","rootDoesHavePassiveEffects","rootWithPendingPassiveEffects","pendingPassiveEffectsRenderPriority","pendingPassiveEffectsLanes","pendingPassiveHookEffectsMount","pendingPassiveHookEffectsUnmount","rootsWithPendingDiscreteUpdates","NESTED_UPDATE_LIMIT","nestedUpdateCount","rootWithNestedUpdates","NESTED_PASSIVE_UPDATE_LIMIT","nestedPassiveUpdateCount","spawnedWorkDuringRender","currentEventTime","currentEventWipLanes","currentEventPendingLanes","isFlushingPassiveEffects","focusedInstanceHandle","shouldFireAfterActiveInstanceBlur","isTransition","schedulerPriority","schedulerLanePriority","requestRetryLane","checkForNestedUpdates","warnAboutRenderPhaseUpdatesInDEV","markUpdateLaneFromFiberToRoot","warnAboutUpdateOnUnmountedFiberInDEV","markRootSuspended$1","schedulePendingInteractions","performSyncWorkOnRoot","ensureRootIsScheduled","warnAboutUpdateOnNotYetMountedFiberInDEV","existingCallbackNode","newCallbackPriority","callbackPriority","existingCallbackPriority","newCallbackNode","performConcurrentWorkOnRoot","originalCallbackNode","didFlushPassiveEffects","flushPassiveEffects","exitStatus","renderRootConcurrent","prepareFreshStack","renderRootSync","fatalError","finishedLanes","finishConcurrentRender","commitRoot","shouldForceFlushFallbacksInDEV","msUntilTimeout","timeoutHandle","eventTimeMs","timeElapsedMs","_msUntilTimeout","jnd","flushDiscreteUpdates","flushPendingDiscreteUpdates","roots","batchedUpdates$1","prevExecutionContext","batchedEventUpdates$1","discreteUpdates$1","unbatchedUpdates","flushSync","handleError","thrownValue","erroredWork","completeUnitOfWork","yetAnotherThrownValue","pushDispatcher","popDispatcher","pushInteractions","prevInteractions","popInteractions","startWorkOnPendingInteractions","workLoopSync","performUnitOfWork","workLoopConcurrent","unitOfWork","beginWork$1","completedWork","resetChildLanes","_next","siblingFiber","newChildLanes","shouldBubbleActualDurations","isTimedOutSuspense","commitRootImpl","flushRenderPhaseStrictModeWarningsInDEV","commitBeforeMutationEffects","commitMutationEffects","_error","commitLayoutEffects","_error2","rootDidHavePassiveEffects","nextNextEffect","detachFiberAfterEffects","scheduleInteractions","finishPendingInteractions","_error3","primaryFlags","_current2","_current3","flushPassiveEffectsImpl","invokePassiveEffectCreate","unmountEffects","mountEffects","_fiber","_error4","prepareToThrowUncaughtError","captureCommitPhaseErrorOnRoot","rootFiber","errorToIgnore","retryTimedOutBoundary","boundaryFiber","timeElapsed","didWarnStateUpdateForNotYetMountedComponent","previousFiber","didWarnStateUpdateForUnmountedComponent","dummyFiber","originalWorkInProgressCopy","assignFiberPropertiesInDEV","originalError","replayError","didWarnAboutUpdateInRender","didWarnAboutUpdateInRenderForAnotherComponent","renderingComponentName","dedupeKey","setStateComponentName","IsThisRendererActing","warnIfNotCurrentlyActingUpdatesInDEV","didWarnAboutUnmockedScheduler","warnIfUnmockedScheduler","unstable_flushAllWithoutAsserting","computeThreadID","interactionThreadID","interactions","pendingInteractionMap","pendingInteractions","interaction","__count","subscriber","__subscriberRef","threadID","onWorkScheduled","scheduledInteractions","scheduledLane","onWorkStarted","remainingLanesAfterCommit","onWorkStopped","onInteractionScheduledWorkCompleted","actingUpdatesScopeDepth","resolveFamily","failedBoundaries","setRefreshHandler","handler","family","currentRender","syntheticType","prevType","nextType","needsCompareFamilies","$$typeofNextType","prevFamily","scheduleRefresh","staleFamilies","updatedFamilies","scheduleFibersWithFamiliesRecursively","scheduleRoot","updateContainer","candidateType","needsRender","needsRemount","findHostInstancesForRefresh","families","hostInstances","types","findHostInstancesForMatchingFibersRecursively","didMatch","findHostInstancesForFiberShallowly","foundHostInstances","findChildHostInstancesForFiberShallowly","hasBadMapPolyfill","nonExtensibleObject","preventExtensions","debugCounter","FiberNode","Number","NaN","createFiber","shouldConstruct$1","currentDependencies","createHostRootFiber","fiberTag","getTag","createFiberFromProfiler","createFiberFromSuspense","createFiberFromSuspenseList","createFiberFromLegacyHidden","elements","pendingChildren","FiberRootNode","unstable_getThreadID","_debugRootType","createFiberRoot","hydrationCallbacks","uninitializedFiber","registerMutableSourceForHydration","createPortal","didWarnAboutNestedUpdates","didWarnAboutFindNodeInStrictMode","getContextForSubtree","parentComponent","findHostInstanceWithWarning","methodName","hostFiber","createContainer","current$1","getPublicRootInstance","containerFiber","markRetryLaneImpl","markRetryLaneIfNotHydrated","attemptUserBlockingHydration$1","attemptContinuousHydration$1","attemptHydrationAtCurrentPriority$1","runWithPriority$2","findHostInstanceWithNoPortals","shouldSuspendImpl","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","scheduleUpdate","setSuspenseHandler","copyWithDeleteImpl","obj","path","updated","splice","copyWithDelete","copyWithRenameImpl","oldPath","newPath","oldKey","newKey","copyWithRename","copyWithSetImpl","copyWithSet","findHook","newShouldSuspendImpl","findHostInstanceByFiber","emptyFindFiberByHostInstance","getCurrentFiberForDevTools","injectIntoDevTools","devToolsConfig","findFiberByHostInstance","bundleType","rendererPackageName","rendererConfig","currentDispatcherRef","getCurrentFiber","ReactDOMRoot","_internalRoot","createRootImpl","ReactDOMBlockingRoot","hostInstance","unmount","hydrationOptions","mutableSources","containerNodeType","createLegacyRoot","isValidContainer","ReactCurrentOwner$3","topLevelUpdateWarnings","warnedAboutHydrateAPI","isRootRenderedBySomeReact","rootEl","getReactRootElementInContainer","hasNonRootReactChild","shouldHydrateDueToLegacyHeuristic","rootElement","legacyCreateRootFromDOMContainer","forceHydrate","shouldHydrate","warned","rootSibling","warnOnInvalidCallback$1","legacyRenderSubtreeIntoContainer","originalCallback","_originalCallback","findDOMNode","componentOrElement","warnedAboutRefsInRender","isModernRoot","unstable_renderSubtreeIntoContainer","containerNode","unmountComponentAtNode","renderedByDifferentReact","_rootEl","isContainerReactRoot","didWarnAboutUnstableCreatePortal","clear","createPortal$1","renderSubtreeIntoContainer","unstable_createPortal","Internals","Events","foundDevTools","self","navigator","userAgent","protocol","exports","unstable_batchedUpdates"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEA,IAAIA,OAAO,CAACC,GAAR,CA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C;AACAvyG,YAAAA,OAAO,CAAC+J,IAAR,CAAa,mCAAmC,uCAAnC,GAA6E,yCAA7E,IAA0HwoG,QAAQ,KAAK,OAAb,GAAuB,uEAAuE,6CAA9F,GAA8I,EAAxQ,CAAb,EAA0R,kBAA1R;AACD;AACF;AACF;AACF;AAEDC,IAAAA,OAAO,CAACl0G,kDAAR,GAA6D2zG,SAA7D;AACAO,IAAAA,OAAO,CAAC1G,YAAR,GAAuBgG,cAAvB;AACAU,IAAAA,OAAO,CAACtB,WAAR,GAAsBA,WAAtB;AACAsB,IAAAA,OAAO,CAAC3P,SAAR,GAAoBA,SAApB;AACA2P,IAAAA,OAAO,CAACppE,OAAR,GAAkBA,OAAlB;AACAopE,IAAAA,OAAO,CAACplG,MAAR,GAAiBA,MAAjB;AACAolG,IAAAA,OAAO,CAAChB,sBAAR,GAAiCA,sBAAjC;AACAgB,IAAAA,OAAO,CAACC,uBAAR,GAAkCjQ,gBAAlC;AACAgQ,IAAAA,OAAO,CAACR,qBAAR,GAAgCA,qBAAhC;AACAQ,IAAAA,OAAO,CAAClB,mCAAR,GAA8CS,0BAA9C;AACAS,IAAAA,OAAO,CAAC35E,OAAR,GAAkBmqC,YAAlB;AACG,GAxozBD;AAyozBD","sourcesContent":["/** @license React v17.0.2\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\nvar _assign = require('object-assign');\nvar Scheduler = require('scheduler');\nvar tracing = require('scheduler/tracing');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n}\nfunction error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nif (!React) {\n {\n throw Error( \"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.\" );\n }\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar FundamentalComponent = 20;\nvar ScopeComponent = 21;\nvar Block = 22;\nvar OffscreenComponent = 23;\nvar LegacyHiddenComponent = 24;\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n\nvar enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\nvar enableFundamentalAPI = false; // Experimental Scope support.\nvar enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)\nvar warnAboutStringRefs = false;\n\nvar allNativeEvents = new Set();\n/**\n * Mapping from registration name to event name\n */\n\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\nvar possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true\n\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + 'Capture', dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n {\n if (registrationNameDependencies[registrationName]) {\n error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n }\n }\n\n registrationNameDependencies[registrationName] = dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n\n for (var i = 0; i < dependencies.length; i++) {\n allNativeEvents.add(dependencies[i]);\n }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":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\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar ROOT_ATTRIBUTE_NAME = 'data-reactroot';\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\nfunction shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n\n return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n}\nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n\n case OVERLOADED_BOOLEAN:\n return value === false;\n\n case NUMERIC:\n return isNaN(value);\n\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n\n return false;\n}\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\nreservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['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' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL\n false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL\n false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL\nfalse);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true);\n});\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar 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;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n }\n }\n}\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\nfunction setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n } // If the prop isn't in the special list, treat it as a simple attribute.\n\n\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n node.setAttribute(_attributeName, '' + value);\n }\n }\n\n return;\n }\n\n var mustUseProperty = propertyInfo.mustUseProperty;\n\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n if (value === null) {\n var type = propertyInfo.type;\n node[propertyName] = type === BOOLEAN ? false : '';\n } else {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyName] = value;\n }\n\n return;\n } // The rest are treated as attributes with special cases.\n\n\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n var attributeValue;\n\n if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n // If attribute type is boolean, we know for sure it won't be an execution sink\n // and we won't require Trusted Type here.\n attributeValue = '';\n } else {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n {\n attributeValue = '' + value;\n }\n\n if (propertyInfo.sanitizeURL) {\n sanitizeURL(attributeValue.toString());\n }\n }\n\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = 0xeac7;\nvar REACT_PORTAL_TYPE = 0xeaca;\nvar REACT_FRAGMENT_TYPE = 0xeacb;\nvar REACT_STRICT_MODE_TYPE = 0xeacc;\nvar REACT_PROFILER_TYPE = 0xead2;\nvar REACT_PROVIDER_TYPE = 0xeacd;\nvar REACT_CONTEXT_TYPE = 0xeace;\nvar REACT_FORWARD_REF_TYPE = 0xead0;\nvar REACT_SUSPENSE_TYPE = 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\nvar REACT_MEMO_TYPE = 0xead3;\nvar REACT_LAZY_TYPE = 0xead4;\nvar REACT_BLOCK_TYPE = 0xead9;\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\nvar REACT_SCOPE_TYPE = 0xead7;\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n REACT_FRAGMENT_TYPE = symbolFor('react.fragment');\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_BLOCK_TYPE = symbolFor('react.block');\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n}\n\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: _assign({}, props, {\n value: prevLog\n }),\n info: _assign({}, props, {\n value: prevInfo\n }),\n warn: _assign({}, props, {\n value: prevWarn\n }),\n error: _assign({}, props, {\n value: prevError\n }),\n group: _assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: _assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: _assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at ');\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_BLOCK_TYPE:\n return describeFunctionComponentFrame(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nfunction describeFiber(fiber) {\n var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;\n var source = fiber._debugSource ;\n\n switch (fiber.tag) {\n case HostComponent:\n return describeBuiltInComponentFrame(fiber.type);\n\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy');\n\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(fiber.type);\n\n case ForwardRef:\n return describeFunctionComponentFrame(fiber.type.render);\n\n case Block:\n return describeFunctionComponentFrame(fiber.type._render);\n\n case ClassComponent:\n return describeClassComponentFrame(fiber.type);\n\n default:\n return '';\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n}\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentName(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentName(owner.type);\n }\n }\n\n return null;\n}\n\nfunction getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n}\n\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n}\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n}\nfunction setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n}\nfunction getIsRendering() {\n {\n return isRendering;\n }\n}\n\n// Flow does not allow string concatenation of most non-string types. To work\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\nfunction toString(value) {\n return '' + value;\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'object':\n case 'string':\n case 'undefined':\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n 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`.');\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n 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`.');\n }\n }\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n}\n\nfunction getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\nfunction getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}\nfunction initWrapperState(element, props) {\n {\n checkControlledValueProps('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n 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);\n\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n 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);\n\n didWarnValueDefaultValue = true;\n }\n }\n\n var node = element;\n var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n controlled: isControlled(props)\n };\n}\nfunction updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n}\nfunction updateWrapper(element, props) {\n var node = element;\n\n {\n var controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n 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');\n\n didWarnUncontrolledToControlled = true;\n }\n\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n 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');\n\n didWarnControlledToUncontrolled = true;\n }\n }\n\n updateChecked(element, props);\n var value = getToStringValue(props.value);\n var type = props.type;\n\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(value);\n }\n } else if (node.value !== toString(value)) {\n node.value = toString(value);\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n return;\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (props.hasOwnProperty('value')) {\n setDefaultValue(node, props.type, value);\n } else if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n }\n\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n}\nfunction postMountWrapper(element, props, isHydrating) {\n var node = element; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n var type = props.type;\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (props.value === undefined || props.value === null)) {\n return;\n }\n\n var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var name = node.name;\n\n if (name !== '') {\n node.name = '';\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!node._wrapperState.initialChecked;\n }\n\n if (name !== '') {\n node.name = name;\n }\n}\nfunction restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode(otherNode);\n\n if (!otherProps) {\n {\n throw Error( \"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.\" );\n }\n } // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n\n\n updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n updateWrapper(otherNode, otherProps);\n }\n }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value <x> is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\n\nfunction setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\n\nfunction flattenChildren(children) {\n var content = ''; // Flatten children. We'll warn if they are invalid\n // during validateProps() which runs for hydration too.\n // Note that this would throw on non-element objects.\n // Elements are stringified (which is normally irrelevant\n // but matters for <fbt>).\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child; // Note: we don't warn about invalid children here.\n // Instead, this is done separately below so that\n // it happens during the hydration code path too.\n });\n return content;\n}\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\n\nfunction validateProps(element, props) {\n {\n // This mirrors the code path above, but runs for hydration too.\n // Warn about invalid children here so that client and hydration are consistent.\n // TODO: this seems like it could cause a DEV-only throw for hydration\n // if children contains a non-element object. We should try to avoid that.\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n\n if (typeof child.type !== 'string') {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n\n error('Only strings and numbers are supported as <option> children.');\n }\n });\n } // TODO: Remove support for `selected` in <option>.\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n}\nfunction postMountWrapper$1(element, props) {\n // value=\"\" should make a value attribute (#6219)\n if (props.value != null) {\n element.setAttribute('value', toString(getToStringValue(props.value)));\n }\n}\nfunction getHostProps$1(element, props) {\n var hostProps = _assign({\n children: undefined\n }, props);\n\n var content = flattenChildren(props.children);\n\n if (content) {\n hostProps.children = content;\n }\n\n return hostProps;\n}\n\nvar didWarnValueDefaultValue$1;\n\n{\n didWarnValueDefaultValue$1 = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n}\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction getHostProps$2(element, props) {\n return _assign({}, props, {\n value: undefined\n });\n}\nfunction initWrapperState$1(element, props) {\n var node = element;\n\n {\n checkSelectPropTypes(props);\n }\n\n node._wrapperState = {\n wasMultiple: !!props.multiple\n };\n\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n 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');\n\n didWarnValueDefaultValue$1 = true;\n }\n }\n}\nfunction postMountWrapper$2(element, props) {\n var node = element;\n node.multiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n }\n}\nfunction postUpdateWrapper(element, props) {\n var node = element;\n var wasMultiple = node._wrapperState.wasMultiple;\n node._wrapperState.wasMultiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (wasMultiple !== !!props.multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n }\n }\n}\nfunction restoreControlledState$1(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n}\n\nvar didWarnValDefaultVal = false;\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nfunction getHostProps$3(element, props) {\n var node = element;\n\n if (!(props.dangerouslySetInnerHTML == null)) {\n {\n throw Error( \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\" );\n }\n } // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n\n\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n\n return hostProps;\n}\nfunction initWrapperState$2(element, props) {\n var node = element;\n\n {\n checkControlledValueProps('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n 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');\n\n didWarnValDefaultVal = true;\n }\n }\n\n var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n var children = props.children,\n defaultValue = props.defaultValue;\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n\n {\n if (!(defaultValue == null)) {\n {\n throw Error( \"If you supply `defaultValue` on a <textarea>, do not pass children.\" );\n }\n }\n\n if (Array.isArray(children)) {\n if (!(children.length <= 1)) {\n {\n throw Error( \"<textarea> can only have at most one child.\" );\n }\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n node._wrapperState = {\n initialValue: getToStringValue(initialValue)\n };\n}\nfunction updateWrapper$1(element, props) {\n var node = element;\n var value = getToStringValue(props.value);\n var defaultValue = getToStringValue(props.defaultValue);\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n }\n\n if (props.defaultValue == null && node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\n }\n}\nfunction postMountWrapper$3(element, props) {\n var node = element; // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === node._wrapperState.initialValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n}\nfunction restoreControlledState$2(element, props) {\n // DOM component is still mounted; update\n updateWrapper$1(element, props);\n}\n\nvar HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nvar Namespaces = {\n html: HTML_NAMESPACE,\n mathml: MATH_NAMESPACE,\n svg: SVG_NAMESPACE\n}; // Assumes there is no parent namespace.\n\nfunction getIntrinsicNamespace(type) {\n switch (type) {\n case 'svg':\n return SVG_NAMESPACE;\n\n case 'math':\n return MATH_NAMESPACE;\n\n default:\n return HTML_NAMESPACE;\n }\n}\nfunction getChildNamespace(parentNamespace, type) {\n if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n // No (or default) parent namespace: potential entry point.\n return getIntrinsicNamespace(type);\n }\n\n if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n // We're leaving SVG.\n return HTML_NAMESPACE;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n}\n\n/* globals MSApp */\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n};\n\nvar reusableSVGContainer;\n/**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n if (node.namespaceURI === Namespaces.svg) {\n\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n});\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n};\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n};\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return ('' + value).trim();\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\nvar warnValidStyle = function () {};\n\n{\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern$1 = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n {\n if (!isCustomProperty) {\n warnValidStyle$1(styleName, styles[styleName]);\n }\n }\n\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n}\n\nfunction isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n {\n if (!nextStyles) {\n return;\n }\n\n var expandedUpdates = expandShorthandMap(styleUpdates);\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var key in expandedUpdates) {\n var originalKey = expandedUpdates[key];\n var correctOriginalKey = expandedStyles[key];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n}\n\n// For HTML, certain tags should omit their close tag. We keep a list for\n// those special-case tags.\nvar omittedCloseTags = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n};\n\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = _assign({\n menuitem: true\n}, omittedCloseTags);\n\nvar HTML = '__html';\n\nfunction assertValidProps(tag, props) {\n if (!props) {\n return;\n } // Note the use of `==` which checks for null or undefined.\n\n\n if (voidElementTags[tag]) {\n if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {\n {\n throw Error( tag + \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\" );\n }\n }\n }\n\n if (props.dangerouslySetInnerHTML != null) {\n if (!(props.children == null)) {\n {\n throw Error( \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\" );\n }\n }\n\n if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {\n {\n throw Error( \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.\" );\n }\n }\n }\n\n {\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n\n if (!(props.style == null || typeof props.style === 'object')) {\n {\n 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.\" );\n }\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\n// When adding attributes to the HTML or SVG allowed attribute list, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\nfunction validateProperty(tagName, name) {\n {\n if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nvar validateProperty$1 = function () {};\n\n{\n var warnedProperties$1 = {};\n var _hasOwnProperty = Object.prototype.hasOwnProperty;\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, eventRegistry) {\n if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n}\n\nvar warnUnknownProperties = function (type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n 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);\n } else if (unknownProps.length > 1) {\n 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);\n }\n }\n};\n\nfunction validateProperties$2(type, props, eventRegistry) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\nvar IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\nvar IS_NON_DELEGATED = 1 << 1;\nvar IS_CAPTURE_PHASE = 1 << 2;\nvar IS_REPLAYED = 1 << 4;\n// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n// we call willDeferLaterForLegacyFBSupport, thus not bailing out\n// will result in endless cycles like an infinite loop.\n// We also don't want to defer during event replaying.\n\nvar SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\nvar restoreImpl = null;\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n if (!(typeof restoreImpl === 'function')) {\n {\n 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.\" );\n }\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var _props = getFiberCurrentPropsFromNode(stateNode);\n\n restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n }\n}\n\nfunction setRestoreImplementation(impl) {\n restoreImpl = impl;\n}\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\nfunction needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n// Defaults\n\nvar batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n};\n\nvar discreteUpdatesImpl = function (fn, a, b, c, d) {\n return fn(a, b, c, d);\n};\n\nvar flushDiscreteUpdatesImpl = function () {};\n\nvar batchedEventUpdatesImpl = batchedUpdatesImpl;\nvar isInsideEventHandler = false;\nvar isBatchingEventUpdates = false;\n\nfunction finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n flushDiscreteUpdatesImpl();\n restoreStateIfNeeded();\n }\n}\n\nfunction batchedUpdates(fn, bookkeeping) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(bookkeeping);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n}\nfunction batchedEventUpdates(fn, a, b) {\n if (isBatchingEventUpdates) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isBatchingEventUpdates = true;\n\n try {\n return batchedEventUpdatesImpl(fn, a, b);\n } finally {\n isBatchingEventUpdates = false;\n finishEventHandler();\n }\n}\nfunction discreteUpdates(fn, a, b, c, d) {\n var prevIsInsideEventHandler = isInsideEventHandler;\n isInsideEventHandler = true;\n\n try {\n return discreteUpdatesImpl(fn, a, b, c, d);\n } finally {\n isInsideEventHandler = prevIsInsideEventHandler;\n\n if (!isInsideEventHandler) {\n finishEventHandler();\n }\n }\n}\nfunction flushDiscreteUpdatesIfNeeded(timeStamp) {\n {\n if (!isInsideEventHandler) {\n flushDiscreteUpdatesImpl();\n }\n }\n}\nfunction setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n discreteUpdatesImpl = _discreteUpdatesImpl;\n flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;\n batchedEventUpdatesImpl = _batchedEventUpdatesImpl;\n}\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n case 'onMouseEnter':\n return !!(props.disabled && isInteractive(type));\n\n default:\n return false;\n }\n}\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\nfunction getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n\n if (stateNode === null) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (props === null) {\n // Work in progress.\n return null;\n }\n\n var listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (!(!listener || typeof listener === 'function')) {\n {\n throw Error( \"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\" );\n }\n }\n\n return listener;\n}\n\nvar passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\nif (canUseDOM) {\n try {\n var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value\n\n Object.defineProperty(options, 'passive', {\n get: function () {\n passiveBrowserEventsSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (e) {\n passiveBrowserEventsSupported = false;\n }\n}\n\nfunction invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n}\n\nvar invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\n\n{\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n\n invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {\n // If document doesn't exist we know for sure we will crash in this method\n // when we call document.createEvent(). However this can cause confusing\n // errors: https://github.com/facebookincubator/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (!(typeof document !== 'undefined')) {\n {\n 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.\" );\n }\n }\n\n var evt = document.createEvent('Event');\n var didCall = false; // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');\n\n function restoreAfterDispatch() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n } // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n function callCallback() {\n didCall = true;\n restoreAfterDispatch();\n func.apply(context, funcArgs);\n didError = false;\n } // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n } // Create a fake event type.\n\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n\n if (didCall && didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n 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.');\n } else if (isCrossOriginError) {\n 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.');\n }\n\n this.onError(error);\n } // Remove our event listeners\n\n\n window.removeEventListener('error', handleWindowError);\n\n if (!didCall) {\n // Something went really wrong, and our event was not dispatched.\n // https://github.com/facebook/react/issues/16734\n // https://github.com/facebook/react/issues/16585\n // Fall back to the production implementation.\n restoreAfterDispatch();\n return invokeGuardedCallbackProd.apply(this, arguments);\n }\n };\n }\n}\n\nvar invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n\nvar hasError = false;\nvar caughtError = null; // Used by event system to capture/rethrow the first error.\n\nvar hasRethrowError = false;\nvar rethrowError = null;\nvar reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n};\n/**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n}\n/**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n\n if (hasError) {\n var error = clearCaughtError();\n\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n}\n/**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\nfunction rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}\nfunction hasCaughtError() {\n return hasError;\n}\nfunction clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n {\n {\n throw Error( \"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction has(key) {\n return key._reactInternals !== undefined;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoFlags =\n/* */\n0;\nvar PerformedWork =\n/* */\n1; // You can change the rest (and add more).\n\nvar Placement =\n/* */\n2;\nvar Update =\n/* */\n4;\nvar PlacementAndUpdate =\n/* */\n6;\nvar Deletion =\n/* */\n8;\nvar ContentReset =\n/* */\n16;\nvar Callback =\n/* */\n32;\nvar DidCapture =\n/* */\n64;\nvar Ref =\n/* */\n128;\nvar Snapshot =\n/* */\n256;\nvar Passive =\n/* */\n512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.\n\nvar PassiveUnmountPendingDev =\n/* */\n8192;\nvar Hydrating =\n/* */\n1024;\nvar HydratingAndUpdate =\n/* */\n1028; // Passive & Update & Callback & Ref & Snapshot\n\nvar LifecycleEffectMask =\n/* */\n932; // Union of all host effects\n\nvar HostEffectMask =\n/* */\n2047; // These are not really side effects, but we still reuse this field.\n\nvar Incomplete =\n/* */\n2048;\nvar ShouldCapture =\n/* */\n4096;\nvar ForceUpdateForLegacySuspense =\n/* */\n16384; // Static tags describe aspects of a fiber that are not specific to a render,\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.flags & (Placement | Hydrating)) !== NoFlags) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n }\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n}\nfunction getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n 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');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n if (!(getNearestMountedFiber(fiber) === fiber)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (!(nearestMounted !== null)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n {\n 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.\" );\n }\n }\n }\n }\n\n if (!(a.alternate === b)) {\n {\n throw Error( \"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (!(a.tag === HostRoot)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n}\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {\n return node;\n } else if (node.child && node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n}\nfunction doesFiberContain(parentFiber, childFiber) {\n var node = childFiber;\n var parentFiberAlternate = parentFiber.alternate;\n\n while (node !== null) {\n if (node === parentFiber || node === parentFiberAlternate) {\n return true;\n }\n\n node = node.return;\n }\n\n return false;\n}\n\nvar attemptUserBlockingHydration;\nfunction setAttemptUserBlockingHydration(fn) {\n attemptUserBlockingHydration = fn;\n}\nvar attemptContinuousHydration;\nfunction setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n}\nvar attemptHydrationAtCurrentPriority;\nfunction setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n}\nvar attemptHydrationAtPriority;\nfunction setAttemptHydrationAtPriority(fn) {\n attemptHydrationAtPriority = fn;\n} // TODO: Upgrade this definition once we're on a newer version of Flow that\nvar hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\nvar queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nfunction hasQueuedDiscreteEvents() {\n return queuedDiscreteEvents.length > 0;\n}\nvar discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];\nfunction isReplayableDiscreteEvent(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n return {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags | IS_REPLAYED,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n };\n}\n\nfunction queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n queuedDiscreteEvents.push(queuedEvent);\n} // Resets the replaying for this type of continuous event to no event.\n\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'focusin':\n case 'focusout':\n queuedFocus = null;\n break;\n\n case 'dragenter':\n case 'dragleave':\n queuedDrag = null;\n break;\n\n case 'mouseover':\n case 'mouseout':\n queuedMouse = null;\n break;\n\n case 'pointerover':\n case 'pointerout':\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode(blockedOn);\n\n if (_fiber2 !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(_fiber2);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags, and the targetContainers, and\n // store a single event to be replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n var targetContainers = existingQueuedEvent.targetContainers;\n\n if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n targetContainers.push(targetContainer);\n }\n\n return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (domEventName) {\n case 'focusin':\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n return true;\n }\n\n case 'dragenter':\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n return true;\n }\n\n case 'mouseover':\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n return true;\n }\n\n case 'pointerover':\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n return true;\n }\n\n case 'gotpointercapture':\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n return true;\n }\n }\n\n return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with attemptToDispatchEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n attemptHydrationAtPriority(queuedTarget.lanePriority, function () {\n Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var targetContainers = queuedEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode(nextBlockedOn);\n\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n}\n\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = false; // First replay discrete events.\n\n while (queuedDiscreteEvents.length > 0) {\n var nextDiscreteEvent = queuedDiscreteEvents[0];\n\n if (nextDiscreteEvent.blockedOn !== null) {\n // We're still blocked.\n // Increase the priority of this boundary to unblock\n // the next discrete event.\n var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);\n\n if (_fiber4 !== null) {\n attemptUserBlockingHydration(_fiber4);\n }\n\n break;\n }\n\n var targetContainers = nextDiscreteEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n nextDiscreteEvent.blockedOn = nextBlockedOn;\n break;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n if (nextDiscreteEvent.blockedOn === null) {\n // We've successfully replayed the first event. Let's try the next one.\n queuedDiscreteEvents.shift();\n }\n } // Next replay any continuous events.\n\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n}\n\nfunction retryIfBlockedOn(unblocked) {\n // Mark anything that was blocked on this as no longer blocked\n // and eligible for a replay.\n if (queuedDiscreteEvents.length > 0) {\n scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n // worth it because we expect very few discrete events to queue up and once\n // we are actually fully unblocked it will be fast to replay them.\n\n for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n var queuedEvent = queuedDiscreteEvents[i];\n\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n }\n }\n }\n\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n}\n\nvar DiscreteEvent = 0;\nvar UserBlockingEvent = 1;\nvar ContinuousEvent = 2;\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n}\n\nvar ANIMATION_END = getVendorPrefixedEventName('animationend');\nvar ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\nvar ANIMATION_START = getVendorPrefixedEventName('animationstart');\nvar TRANSITION_END = getVendorPrefixedEventName('transitionend');\n\nvar topLevelEventsToReactNames = new Map();\nvar eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use\n// the code required to apply the same logic for event prioritization and that of the\n// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code\n// duplication (for which there would be quite a bit). For the events that are not needed\n// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an\n// array of top level events.\n// Lastly, we ignore prettier so we can keep the formatting sane.\n// prettier-ignore\n\nvar discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!\n'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!\n'focusout', 'blur', // Careful!\n'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'];\nvar otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];\n\n\nvar 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\n\nvar 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'];\n/**\n * Turns\n * ['abort', ...]\n *\n * into\n *\n * topLevelEventsToReactNames = new Map([\n * ['abort', 'onAbort'],\n * ]);\n *\n * and registers them.\n */\n\nfunction registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {\n // As the event types are in pairs of two, we need to iterate\n // through in twos. The events are in pairs of two to save code\n // and improve init perf of processing this array, as it will\n // result in far fewer object allocations and property accesses\n // if we only use three arrays to process all the categories of\n // instead of tuples.\n for (var i = 0; i < eventTypes.length; i += 2) {\n var topEvent = eventTypes[i];\n var event = eventTypes[i + 1];\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var reactName = 'on' + capitalizedEvent;\n eventPriorities.set(topEvent, priority);\n topLevelEventsToReactNames.set(topEvent, reactName);\n registerTwoPhaseEvent(reactName, [topEvent]);\n }\n}\n\nfunction setEventPriorities(eventTypes, priority) {\n for (var i = 0; i < eventTypes.length; i++) {\n eventPriorities.set(eventTypes[i], priority);\n }\n}\n\nfunction getEventPriorityForPluginSystem(domEventName) {\n var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might\n // want to warn if we can't detect the priority\n // for the event.\n\n return priority === undefined ? ContinuousEvent : priority;\n}\nfunction registerSimpleEvents() {\n registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);\n registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);\n registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);\n setEventPriorities(otherDiscreteEvents, DiscreteEvent);\n}\n\nvar Scheduler_now = Scheduler.unstable_now;\n\n{\n // Provide explicit error message when production+profiling bundle of e.g.\n // react-dom is used with production (non-profiling) bundle of\n // scheduler/tracing\n if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {\n {\n 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\" );\n }\n }\n}\n// ascending numbers so we can compare them like numbers. They start at 90 to\n// avoid clashing with Scheduler's priorities.\n\nvar ImmediatePriority = 99;\nvar UserBlockingPriority = 98;\nvar NormalPriority = 97;\nvar LowPriority = 96;\nvar IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.\n\nvar NoPriority = 90;\nvar initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.\n\nvar SyncLanePriority = 15;\nvar SyncBatchedLanePriority = 14;\nvar InputDiscreteHydrationLanePriority = 13;\nvar InputDiscreteLanePriority = 12;\nvar InputContinuousHydrationLanePriority = 11;\nvar InputContinuousLanePriority = 10;\nvar DefaultHydrationLanePriority = 9;\nvar DefaultLanePriority = 8;\nvar TransitionHydrationPriority = 7;\nvar TransitionPriority = 6;\nvar RetryLanePriority = 5;\nvar SelectiveHydrationLanePriority = 4;\nvar IdleHydrationLanePriority = 3;\nvar IdleLanePriority = 2;\nvar OffscreenLanePriority = 1;\nvar NoLanePriority = 0;\nvar TotalLanes = 31;\nvar NoLanes =\n/* */\n0;\nvar NoLane =\n/* */\n0;\nvar SyncLane =\n/* */\n1;\nvar SyncBatchedLane =\n/* */\n2;\nvar InputDiscreteHydrationLane =\n/* */\n4;\nvar InputDiscreteLanes =\n/* */\n24;\nvar InputContinuousHydrationLane =\n/* */\n32;\nvar InputContinuousLanes =\n/* */\n192;\nvar DefaultHydrationLane =\n/* */\n256;\nvar DefaultLanes =\n/* */\n3584;\nvar TransitionHydrationLane =\n/* */\n4096;\nvar TransitionLanes =\n/* */\n4186112;\nvar RetryLanes =\n/* */\n62914560;\nvar SomeRetryLane =\n/* */\n33554432;\nvar SelectiveHydrationLane =\n/* */\n67108864;\nvar NonIdleLanes =\n/* */\n134217727;\nvar IdleHydrationLane =\n/* */\n134217728;\nvar IdleLanes =\n/* */\n805306368;\nvar OffscreenLane =\n/* */\n1073741824;\nvar NoTimestamp = -1;\nfunction setCurrentUpdateLanePriority(newLanePriority) {\n} // \"Registers\" used to \"return\" multiple values\n// Used by getHighestPriorityLanes and getNextLanes:\n\nvar return_highestLanePriority = DefaultLanePriority;\n\nfunction getHighestPriorityLanes(lanes) {\n if ((SyncLane & lanes) !== NoLanes) {\n return_highestLanePriority = SyncLanePriority;\n return SyncLane;\n }\n\n if ((SyncBatchedLane & lanes) !== NoLanes) {\n return_highestLanePriority = SyncBatchedLanePriority;\n return SyncBatchedLane;\n }\n\n if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {\n return_highestLanePriority = InputDiscreteHydrationLanePriority;\n return InputDiscreteHydrationLane;\n }\n\n var inputDiscreteLanes = InputDiscreteLanes & lanes;\n\n if (inputDiscreteLanes !== NoLanes) {\n return_highestLanePriority = InputDiscreteLanePriority;\n return inputDiscreteLanes;\n }\n\n if ((lanes & InputContinuousHydrationLane) !== NoLanes) {\n return_highestLanePriority = InputContinuousHydrationLanePriority;\n return InputContinuousHydrationLane;\n }\n\n var inputContinuousLanes = InputContinuousLanes & lanes;\n\n if (inputContinuousLanes !== NoLanes) {\n return_highestLanePriority = InputContinuousLanePriority;\n return inputContinuousLanes;\n }\n\n if ((lanes & DefaultHydrationLane) !== NoLanes) {\n return_highestLanePriority = DefaultHydrationLanePriority;\n return DefaultHydrationLane;\n }\n\n var defaultLanes = DefaultLanes & lanes;\n\n if (defaultLanes !== NoLanes) {\n return_highestLanePriority = DefaultLanePriority;\n return defaultLanes;\n }\n\n if ((lanes & TransitionHydrationLane) !== NoLanes) {\n return_highestLanePriority = TransitionHydrationPriority;\n return TransitionHydrationLane;\n }\n\n var transitionLanes = TransitionLanes & lanes;\n\n if (transitionLanes !== NoLanes) {\n return_highestLanePriority = TransitionPriority;\n return transitionLanes;\n }\n\n var retryLanes = RetryLanes & lanes;\n\n if (retryLanes !== NoLanes) {\n return_highestLanePriority = RetryLanePriority;\n return retryLanes;\n }\n\n if (lanes & SelectiveHydrationLane) {\n return_highestLanePriority = SelectiveHydrationLanePriority;\n return SelectiveHydrationLane;\n }\n\n if ((lanes & IdleHydrationLane) !== NoLanes) {\n return_highestLanePriority = IdleHydrationLanePriority;\n return IdleHydrationLane;\n }\n\n var idleLanes = IdleLanes & lanes;\n\n if (idleLanes !== NoLanes) {\n return_highestLanePriority = IdleLanePriority;\n return idleLanes;\n }\n\n if ((OffscreenLane & lanes) !== NoLanes) {\n return_highestLanePriority = OffscreenLanePriority;\n return OffscreenLane;\n }\n\n {\n error('Should have found matching lanes. This is a bug in React.');\n } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n\n return_highestLanePriority = DefaultLanePriority;\n return lanes;\n}\n\nfunction schedulerPriorityToLanePriority(schedulerPriorityLevel) {\n switch (schedulerPriorityLevel) {\n case ImmediatePriority:\n return SyncLanePriority;\n\n case UserBlockingPriority:\n return InputContinuousLanePriority;\n\n case NormalPriority:\n case LowPriority:\n // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n return DefaultLanePriority;\n\n case IdlePriority:\n return IdleLanePriority;\n\n default:\n return NoLanePriority;\n }\n}\nfunction lanePriorityToSchedulerPriority(lanePriority) {\n switch (lanePriority) {\n case SyncLanePriority:\n case SyncBatchedLanePriority:\n return ImmediatePriority;\n\n case InputDiscreteHydrationLanePriority:\n case InputDiscreteLanePriority:\n case InputContinuousHydrationLanePriority:\n case InputContinuousLanePriority:\n return UserBlockingPriority;\n\n case DefaultHydrationLanePriority:\n case DefaultLanePriority:\n case TransitionHydrationPriority:\n case TransitionPriority:\n case SelectiveHydrationLanePriority:\n case RetryLanePriority:\n return NormalPriority;\n\n case IdleHydrationLanePriority:\n case IdleLanePriority:\n case OffscreenLanePriority:\n return IdlePriority;\n\n case NoLanePriority:\n return NoPriority;\n\n default:\n {\n {\n throw Error( \"Invalid update priority: \" + lanePriority + \". This is a bug in React.\" );\n }\n }\n\n }\n}\nfunction getNextLanes(root, wipLanes) {\n // Early bailout if there's no pending work left.\n var pendingLanes = root.pendingLanes;\n\n if (pendingLanes === NoLanes) {\n return_highestLanePriority = NoLanePriority;\n return NoLanes;\n }\n\n var nextLanes = NoLanes;\n var nextLanePriority = NoLanePriority;\n var expiredLanes = root.expiredLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes; // Check if any work has expired.\n\n if (expiredLanes !== NoLanes) {\n nextLanes = expiredLanes;\n nextLanePriority = return_highestLanePriority = SyncLanePriority;\n } else {\n // Do not work on any idle work until all the non-idle work has finished,\n // even if the work is suspended.\n var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n if (nonIdlePendingLanes !== NoLanes) {\n var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n if (nonIdleUnblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n nextLanePriority = return_highestLanePriority;\n } else {\n var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n if (nonIdlePingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n nextLanePriority = return_highestLanePriority;\n }\n }\n } else {\n // The only remaining work is Idle.\n var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n if (unblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(unblockedLanes);\n nextLanePriority = return_highestLanePriority;\n } else {\n if (pingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(pingedLanes);\n nextLanePriority = return_highestLanePriority;\n }\n }\n }\n }\n\n if (nextLanes === NoLanes) {\n // This should only be reachable if we're suspended\n // TODO: Consider warning in this path if a fallback timer is not scheduled.\n return NoLanes;\n } // If there are higher priority lanes, we'll include them even if they\n // are suspended.\n\n\n nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt\n // it and we'll lose our progress. We should only do this if the new lanes are\n // higher priority.\n\n if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n // bother waiting until the root is complete.\n (wipLanes & suspendedLanes) === NoLanes) {\n getHighestPriorityLanes(wipLanes);\n var wipLanePriority = return_highestLanePriority;\n\n if (nextLanePriority <= wipLanePriority) {\n return wipLanes;\n } else {\n return_highestLanePriority = nextLanePriority;\n }\n } // Check for entangled lanes and add them to the batch.\n //\n // A lane is said to be entangled with another when it's not allowed to render\n // in a batch that does not also include the other lane. Typically we do this\n // when multiple updates have the same source, and we only want to respond to\n // the most recent event from that source.\n //\n // Note that we apply entanglements *after* checking for partial work above.\n // This means that if a lane is entangled during an interleaved event while\n // it's already rendering, we won't interrupt it. This is intentional, since\n // entanglement is usually \"best effort\": we'll try our best to render the\n // lanes in the same batch, but it's not worth throwing out partially\n // completed work in order to do it.\n //\n // For those exceptions where entanglement is semantically important, like\n // useMutableSource, we should ensure that there is no partial work at the\n // time we apply the entanglement.\n\n\n var entangledLanes = root.entangledLanes;\n\n if (entangledLanes !== NoLanes) {\n var entanglements = root.entanglements;\n var lanes = nextLanes & entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n nextLanes |= entanglements[index];\n lanes &= ~lane;\n }\n }\n\n return nextLanes;\n}\nfunction getMostRecentEventTime(root, lanes) {\n var eventTimes = root.eventTimes;\n var mostRecentEventTime = NoTimestamp;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var eventTime = eventTimes[index];\n\n if (eventTime > mostRecentEventTime) {\n mostRecentEventTime = eventTime;\n }\n\n lanes &= ~lane;\n }\n\n return mostRecentEventTime;\n}\n\nfunction computeExpirationTime(lane, currentTime) {\n // TODO: Expiration heuristic is constant per lane, so could use a map.\n getHighestPriorityLanes(lane);\n var priority = return_highestLanePriority;\n\n if (priority >= InputContinuousLanePriority) {\n // User interactions should expire slightly more quickly.\n //\n // NOTE: This is set to the corresponding constant as in Scheduler.js. When\n // we made it larger, a product metric in www regressed, suggesting there's\n // a user interaction that's being starved by a series of synchronous\n // updates. If that theory is correct, the proper solution is to fix the\n // starvation. However, this scenario supports the idea that expiration\n // times are an important safeguard when starvation does happen.\n //\n // Also note that, in the case of user input specifically, this will soon no\n // longer be an issue because we plan to make user input synchronous by\n // default (until you enter `startTransition`, of course.)\n //\n // If weren't planning to make these updates synchronous soon anyway, I\n // would probably make this number a configurable parameter.\n return currentTime + 250;\n } else if (priority >= TransitionPriority) {\n return currentTime + 5000;\n } else {\n // Anything idle priority or lower should never expire.\n return NoTimestamp;\n }\n}\n\nfunction markStarvedLanesAsExpired(root, currentTime) {\n // TODO: This gets called every time we yield. We can optimize by storing\n // the earliest expiration time on the root. Then use that to quickly bail out\n // of this function.\n var pendingLanes = root.pendingLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes;\n var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n // expiration time. If so, we'll assume the update is being starved and mark\n // it as expired to force it to finish.\n\n var lanes = pendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var expirationTime = expirationTimes[index];\n\n if (expirationTime === NoTimestamp) {\n // Found a pending lane with no expiration time. If it's not suspended, or\n // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n // using the current time.\n if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n // Assumes timestamps are monotonically increasing.\n expirationTimes[index] = computeExpirationTime(lane, currentTime);\n }\n } else if (expirationTime <= currentTime) {\n // This lane expired\n root.expiredLanes |= lane;\n }\n\n lanes &= ~lane;\n }\n} // This returns the highest priority pending lanes regardless of whether they\nfunction getLanesToRetrySynchronouslyOnError(root) {\n var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n if (everythingButOffscreen !== NoLanes) {\n return everythingButOffscreen;\n }\n\n if (everythingButOffscreen & OffscreenLane) {\n return OffscreenLane;\n }\n\n return NoLanes;\n}\nfunction returnNextLanesPriority() {\n return return_highestLanePriority;\n}\nfunction includesNonIdleWork(lanes) {\n return (lanes & NonIdleLanes) !== NoLanes;\n}\nfunction includesOnlyRetries(lanes) {\n return (lanes & RetryLanes) === lanes;\n}\nfunction includesOnlyTransitions(lanes) {\n return (lanes & TransitionLanes) === lanes;\n} // To ensure consistency across multiple updates in the same event, this should\n// be a pure function, so that it always returns the same lane for given inputs.\n\nfunction findUpdateLane(lanePriority, wipLanes) {\n switch (lanePriority) {\n case NoLanePriority:\n break;\n\n case SyncLanePriority:\n return SyncLane;\n\n case SyncBatchedLanePriority:\n return SyncBatchedLane;\n\n case InputDiscreteLanePriority:\n {\n var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);\n\n if (_lane === NoLane) {\n // Shift to the next priority level\n return findUpdateLane(InputContinuousLanePriority, wipLanes);\n }\n\n return _lane;\n }\n\n case InputContinuousLanePriority:\n {\n var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);\n\n if (_lane2 === NoLane) {\n // Shift to the next priority level\n return findUpdateLane(DefaultLanePriority, wipLanes);\n }\n\n return _lane2;\n }\n\n case DefaultLanePriority:\n {\n var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);\n\n if (_lane3 === NoLane) {\n // If all the default lanes are already being worked on, look for a\n // lane in the transition range.\n _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);\n\n if (_lane3 === NoLane) {\n // All the transition lanes are taken, too. This should be very\n // rare, but as a last resort, pick a default lane. This will have\n // the effect of interrupting the current work-in-progress render.\n _lane3 = pickArbitraryLane(DefaultLanes);\n }\n }\n\n return _lane3;\n }\n\n case TransitionPriority: // Should be handled by findTransitionLane instead\n\n case RetryLanePriority:\n // Should be handled by findRetryLane instead\n break;\n\n case IdleLanePriority:\n var lane = pickArbitraryLane(IdleLanes & ~wipLanes);\n\n if (lane === NoLane) {\n lane = pickArbitraryLane(IdleLanes);\n }\n\n return lane;\n }\n\n {\n {\n throw Error( \"Invalid update priority: \" + lanePriority + \". This is a bug in React.\" );\n }\n }\n} // To ensure consistency across multiple updates in the same event, this should\n// be pure function, so that it always returns the same lane for given inputs.\n\nfunction findTransitionLane(wipLanes, pendingLanes) {\n // First look for lanes that are completely unclaimed, i.e. have no\n // pending work.\n var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);\n\n if (lane === NoLane) {\n // If all lanes have pending work, look for a lane that isn't currently\n // being worked on.\n lane = pickArbitraryLane(TransitionLanes & ~wipLanes);\n\n if (lane === NoLane) {\n // If everything is being worked on, pick any lane. This has the\n // effect of interrupting the current work-in-progress.\n lane = pickArbitraryLane(TransitionLanes);\n }\n }\n\n return lane;\n} // To ensure consistency across multiple updates in the same event, this should\n// be pure function, so that it always returns the same lane for given inputs.\n\nfunction findRetryLane(wipLanes) {\n // This is a fork of `findUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n var lane = pickArbitraryLane(RetryLanes & ~wipLanes);\n\n if (lane === NoLane) {\n lane = pickArbitraryLane(RetryLanes);\n }\n\n return lane;\n}\n\nfunction getHighestPriorityLane(lanes) {\n return lanes & -lanes;\n}\n\nfunction getLowestPriorityLane(lanes) {\n // This finds the most significant non-zero bit.\n var index = 31 - clz32(lanes);\n return index < 0 ? NoLanes : 1 << index;\n}\n\nfunction getEqualOrHigherPriorityLanes(lanes) {\n return (getLowestPriorityLane(lanes) << 1) - 1;\n}\n\nfunction pickArbitraryLane(lanes) {\n // This wrapper function gets inlined. Only exists so to communicate that it\n // doesn't matter which bit is selected; you can pick any bit without\n // affecting the algorithms where its used. Here I'm using\n // getHighestPriorityLane because it requires the fewest operations.\n return getHighestPriorityLane(lanes);\n}\n\nfunction pickArbitraryLaneIndex(lanes) {\n return 31 - clz32(lanes);\n}\n\nfunction laneToIndex(lane) {\n return pickArbitraryLaneIndex(lane);\n}\n\nfunction includesSomeLane(a, b) {\n return (a & b) !== NoLanes;\n}\nfunction isSubsetOfLanes(set, subset) {\n return (set & subset) === subset;\n}\nfunction mergeLanes(a, b) {\n return a | b;\n}\nfunction removeLanes(set, subset) {\n return set & ~subset;\n} // Seems redundant, but it changes the type from a single lane (used for\n// updates) to a group of lanes (used for flushing work).\n\nfunction laneToLanes(lane) {\n return lane;\n}\nfunction higherPriorityLane(a, b) {\n // This works because the bit ranges decrease in priority as you go left.\n return a !== NoLane && a < b ? a : b;\n}\nfunction createLaneMap(initial) {\n // Intentionally pushing one by one.\n // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n var laneMap = [];\n\n for (var i = 0; i < TotalLanes; i++) {\n laneMap.push(initial);\n }\n\n return laneMap;\n}\nfunction markRootUpdated(root, updateLane, eventTime) {\n root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But\n // it's not practical to try every single possible combination. We need a\n // heuristic to decide which lanes to attempt to render, and in which batches.\n // For now, we use the same heuristic as in the old ExpirationTimes model:\n // retry any lane at equal or lower priority, but don't try updates at higher\n // priority without also including the lower priority updates. This works well\n // when considering updates across different priority levels, but isn't\n // sufficient for updates within the same priority, since we want to treat\n // those updates as parallel.\n // Unsuspend any update at equal or lower priority.\n\n var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111\n\n root.suspendedLanes &= higherPriorityLanes;\n root.pingedLanes &= higherPriorityLanes;\n var eventTimes = root.eventTimes;\n var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most\n // recent event, and we assume time is monotonically increasing.\n\n eventTimes[index] = eventTime;\n}\nfunction markRootSuspended(root, suspendedLanes) {\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n var expirationTimes = root.expirationTimes;\n var lanes = suspendedLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootPinged(root, pingedLanes, eventTime) {\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n}\nfunction markDiscreteUpdatesExpired(root) {\n root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;\n}\nfunction hasDiscreteLanes(lanes) {\n return (lanes & InputDiscreteLanes) !== NoLanes;\n}\nfunction markRootMutableRead(root, updateLane) {\n root.mutableReadLanes |= updateLane & root.pendingLanes;\n}\nfunction markRootFinished(root, remainingLanes) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes; // Let's try everything again\n\n root.suspendedLanes = 0;\n root.pingedLanes = 0;\n root.expiredLanes &= remainingLanes;\n root.mutableReadLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n var entanglements = root.entanglements;\n var eventTimes = root.eventTimes;\n var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work\n\n var lanes = noLongerPendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] = NoLanes;\n eventTimes[index] = NoTimestamp;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootEntangled(root, entangledLanes) {\n root.entangledLanes |= entangledLanes;\n var entanglements = root.entanglements;\n var lanes = entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] |= entangledLanes;\n lanes &= ~lane;\n }\n}\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(lanes) {\n if (lanes === 0) {\n return 32;\n }\n\n return 31 - (log(lanes) / LN2 | 0) | 0;\n}\n\n// Intentionally not named imports because Rollup would use dynamic dispatch for\nvar UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority,\n runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?\n\nvar _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n// We'd like to remove this but it's not clear if this is safe.\n\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\nfunction isEnabled() {\n return _enabled;\n}\nfunction createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n var eventPriority = getEventPriorityForPluginSystem(domEventName);\n var listenerWrapper;\n\n switch (eventPriority) {\n case DiscreteEvent:\n listenerWrapper = dispatchDiscreteEvent;\n break;\n\n case UserBlockingEvent:\n listenerWrapper = dispatchUserBlockingUpdate;\n break;\n\n case ContinuousEvent:\n default:\n listenerWrapper = dispatchEvent;\n break;\n }\n\n return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n}\n\nfunction dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n {\n flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);\n }\n\n discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);\n}\n\nfunction dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {\n {\n runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));\n }\n}\n\nfunction dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n var allowReplay = true;\n\n {\n // TODO: replaying capture phase events is currently broken\n // because we used to do it during top-level native bubble handlers\n // but now we use different bubble and capture handlers.\n // In eager mode, we attach capture listeners early, so we need\n // to filter them out until we fix the logic to handle them correctly.\n // This could've been outside the flag but I put it inside to reduce risk.\n allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;\n }\n\n if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {\n // If we already have a queue of discrete events, and this is another discrete\n // event, then we can't dispatch it regardless of its target, since they\n // need to dispatch in order.\n queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.\n domEventName, eventSystemFlags, targetContainer, nativeEvent);\n return;\n }\n\n var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn === null) {\n // We successfully dispatched this event.\n if (allowReplay) {\n clearIfContinuousEvent(domEventName, nativeEvent);\n }\n\n return;\n }\n\n if (allowReplay) {\n if (isReplayableDiscreteEvent(domEventName)) {\n // This this to be replayed later once the target is available.\n queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accummulative.\n\n\n clearIfContinuousEvent(domEventName, nativeEvent);\n } // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.\n\nfunction attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // TODO: Warn if _enabled is false.\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.\n\n return null;\n}\n\nfunction addEventBubbleListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, false);\n return listener;\n}\nfunction addEventCaptureListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, true);\n return listener;\n}\nfunction addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n capture: true,\n passive: passive\n });\n return listener;\n}\nfunction addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n passive: passive\n });\n return listener;\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\nfunction initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\nfunction reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\nfunction getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start;\n var startValue = startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\nfunction getText() {\n if ('value' in root) {\n return root.value;\n }\n\n return root.textContent;\n}\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\nfunction functionThatReturnsTrue() {\n return true;\n}\n\nfunction functionThatReturnsFalse() {\n return false;\n} // This is intentionally a factory so that we have different returned constructors.\n// If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\nfunction createSyntheticEvent(Interface) {\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */\n function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n\n for (var _propName in Interface) {\n if (!Interface.hasOwnProperty(_propName)) {\n continue;\n }\n\n var normalize = Interface[_propName];\n\n if (normalize) {\n this[_propName] = normalize(nativeEvent);\n } else {\n this[_propName] = nativeEvent[_propName];\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n\n _assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {// Modern event system doesn't use pooling.\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsTrue\n });\n\n return SyntheticBaseEvent;\n}\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n};\nvar SyntheticEvent = createSyntheticEvent(EventInterface);\n\nvar UIEventInterface = _assign({}, EventInterface, {\n view: 0,\n detail: 0\n});\n\nvar SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\nvar lastMovementX;\nvar lastMovementY;\nvar lastMouseEvent;\n\nfunction updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n lastMovementX = event.screenX - lastMouseEvent.screenX;\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n\n lastMouseEvent = event;\n }\n}\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar MouseEventInterface = _assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n\n return lastMovementY;\n }\n});\n\nvar SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar DragEventInterface = _assign({}, MouseEventInterface, {\n dataTransfer: 0\n});\n\nvar SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar FocusEventInterface = _assign({}, UIEventInterface, {\n relatedTarget: 0\n});\n\nvar SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\nvar AnimationEventInterface = _assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar ClipboardEventInterface = _assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n});\n\nvar SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar CompositionEventInterface = _assign({}, EventInterface, {\n data: 0\n});\n\nvar SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n// Happens to share the same list for now.\n\nvar SyntheticInputEvent = SyntheticCompositionEvent;\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n};\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n\n return '';\n}\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar KeyboardEventInterface = _assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n }\n});\n\nvar SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar PointerEventInterface = _assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n});\n\nvar SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar TouchEventInterface = _assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n});\n\nvar SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\nvar TransitionEventInterface = _assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar WheelEventInterface = _assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: 0,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: 0\n});\n\nvar SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\n\nif (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n} // Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\n\n\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\n\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\nfunction registerEvents() {\n registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n} // Track whether we've ever handled a keypress on the space key.\n\n\nvar hasSpaceKeypress = false;\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n/**\n * Translate native top level events into event types.\n */\n\n\nfunction getCompositionEventType(domEventName) {\n switch (domEventName) {\n case 'compositionstart':\n return 'onCompositionStart';\n\n case 'compositionend':\n return 'onCompositionEnd';\n\n case 'compositionupdate':\n return 'onCompositionUpdate';\n }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\nfunction isFallbackCompositionStart(domEventName, nativeEvent) {\n return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'keyup':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case 'keydown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n\n case 'keypress':\n case 'mousedown':\n case 'focusout':\n // Events are not possible without cancelling IME.\n return true;\n\n default:\n return false;\n }\n}\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n\n return null;\n}\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n} // Track the current IME composition status, if any.\n\n\nvar isComposing = false;\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\nfunction extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(domEventName);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n eventType = 'onCompositionStart';\n }\n } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n eventType = 'onCompositionEnd';\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === 'onCompositionStart') {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === 'onCompositionEnd') {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n if (listeners.length > 0) {\n var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n\n if (customData !== null) {\n event.data = customData;\n }\n }\n }\n}\n\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'compositionend':\n return getDataFromCustomEvent(nativeEvent);\n\n case 'keypress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'textInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n */\n\n\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\nfunction extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n\n if (!chars) {\n return null;\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n if (listeners.length > 0) {\n var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.data = chars;\n }\n}\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\nfunction extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n}\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = (eventName in document);\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n}\n\nfunction registerEvents$1() {\n registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n}\n\nfunction createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n}\n/**\n * For IE shims\n */\n\n\nvar activeElement = null;\nvar activeElementInst = null;\n/**\n * SECTION: handle `change` event\n */\n\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n\n batchedUpdates(runEventInBatch, dispatchQueue);\n}\n\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (domEventName === 'change') {\n return targetInst;\n }\n}\n/**\n * SECTION: handle `input` event\n */\n\n\nvar isInputEventSupported = false;\n\nif (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n}\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n\n\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\n\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n if (domEventName === 'focusin') {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (domEventName === 'focusout') {\n stopWatchingForValueChange();\n }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst);\n }\n}\n/**\n * SECTION: handle `click` event\n */\n\n\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n if (domEventName === 'click') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (domEventName === 'input' || domEventName === 'change') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction handleControlledInputBlur(node) {\n var state = node._wrapperState;\n\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n}\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\nfunction extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(domEventName, targetInst);\n\n if (inst) {\n createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n return;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(domEventName, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (domEventName === 'focusout') {\n handleControlledInputBlur(targetNode);\n }\n}\n\nfunction registerEvents$2() {\n registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\n}\n/**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n\n\nfunction extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {\n // If this is an over event with a target, we might have already dispatched\n // the event in the out event of the other target. If this is replayed,\n // then it's because we couldn't dispatch against this target previously\n // so we have to do it now instead.\n var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n if (related) {\n // If the related node is managed by React, we can assume that we have\n // already dispatched the corresponding events during its mouseout.\n if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n return;\n }\n }\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return;\n }\n\n var win; // TODO: why is this nullable in the types but we read from it?\n\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n\n if (isOutEvent) {\n var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n from = targetInst;\n to = _related ? getClosestInstanceFromNode(_related) : null;\n\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\n\n if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {\n to = null;\n }\n }\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return;\n }\n\n var SyntheticEventCtor = SyntheticMouseEvent;\n var leaveEventType = 'onMouseLeave';\n var enterEventType = 'onMouseEnter';\n var eventTypePrefix = 'mouse';\n\n if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n SyntheticEventCtor = SyntheticPointerEvent;\n leaveEventType = 'onPointerLeave';\n enterEventType = 'onPointerEnter';\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance(from);\n var toNode = to == null ? win : getNodeFromInstance(to);\n var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = null; // We should only process this nativeEvent if we are processing\n // the first ancestor. Next time, we will ignore the event.\n\n var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (nativeTargetInst === targetInst) {\n var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n enterEvent.target = toNode;\n enterEvent.relatedTarget = fromNode;\n enter = enterEvent;\n }\n\n accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n\n node = node.parentNode;\n }\n}\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\nfunction getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n\n if ((next = node.nextSibling) !== null) {\n break;\n }\n\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\nfunction setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nfunction isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nfunction isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n}\n\nfunction getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n\n element = getActiveElement(win.document);\n }\n\n return element;\n}\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\nfunction getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null\n };\n}\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\nfunction restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n } // Focusing a node can change the scroll position, which is undesirable\n\n\n var ancestors = [];\n var ancestor = priorFocusedElem;\n\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n}\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\nfunction getSelection(input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || {\n start: 0,\n end: 0\n };\n}\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n\nfunction setSelection(input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nfunction registerEvents$3() {\n registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\n}\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\nvar lastSelection = null;\nvar mouseDown = false;\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n */\n\nfunction getSelection$1(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n}\n/**\n * Get document associated with the event target.\n */\n\n\nfunction getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n return;\n } // Only fire when selection has actually changed.\n\n\n var currentSelection = getSelection$1(activeElement$1);\n\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.target = activeElement$1;\n }\n }\n}\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\nfunction extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n switch (domEventName) {\n // Track the input node that has focus.\n case 'focusin':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n\n break;\n\n case 'focusout':\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n\n case 'mousedown':\n mouseDown = true;\n break;\n\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n\n case 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n}\n\nfunction extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n\n if (reactName === undefined) {\n return;\n }\n\n var SyntheticEventCtor = SyntheticEvent;\n var reactEventType = domEventName;\n\n switch (domEventName) {\n case 'keypress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return;\n }\n\n /* falls through */\n\n case 'keydown':\n case 'keyup':\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n\n case 'focusin':\n reactEventType = 'focus';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'focusout':\n reactEventType = 'blur';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'beforeblur':\n case 'afterblur':\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'click':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return;\n }\n\n /* falls through */\n\n case 'auxclick':\n case 'dblclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case 'mouseout':\n case 'mouseover':\n case 'contextmenu':\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n\n case 'drag':\n case 'dragend':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'dragstart':\n case 'drop':\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n\n case 'touchcancel':\n case 'touchend':\n case 'touchmove':\n case 'touchstart':\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n\n case 'scroll':\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n\n case 'wheel':\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n\n case 'copy':\n case 'cut':\n case 'paste':\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'pointerup':\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n }\n\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n {\n // Some events don't bubble in the browser.\n // In the past, React has always bubbled them, but this can be surprising.\n // We're going to try aligning closer to the browser behavior by not bubbling\n // them in React either. We'll start by not bubbling onScroll, and then expand.\n var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from\n // nonDelegatedEvents list in DOMPluginEventSystem.\n // Then we can remove this special list.\n // This is a breaking change that can wait until React 18.\n domEventName === 'scroll';\n\n var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n if (_listeners.length > 0) {\n // Intentionally create event lazily.\n var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n dispatchQueue.push({\n event: _event,\n listeners: _listeners\n });\n }\n }\n}\n\n// TODO: remove top-level side effect.\nregisterSimpleEvents();\nregisterEvents$2();\nregisterEvents$1();\nregisterEvents$3();\nregisterEvents();\n\nfunction extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n // This is the basic functionality of the event system. All\n // the other plugins are essentially polyfills. So the plugin\n // should probably be inlined somewhere and have its logic\n // be core the to event system. This would potentially allow\n // us to ship builds of React without the polyfilled plugins below.\n extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n // event's native \"bubble\" phase, which means that we're\n // not in the capture phase. That's because we emulate\n // the capture phase here still. This is a trade-off,\n // because in an ideal world we would not emulate and use\n // the phases properly, like we do with the SimpleEvent\n // plugin. However, the plugins below either expect\n // emulation (EnterLeave) or use state localized to that\n // plugin (BeforeInput, Change, Select). The state in\n // these modules complicates things, as you'll essentially\n // get the case where the capture phase event might change\n // state, only for the following bubble event to come in\n // later and not trigger anything as the state now\n // invalidates the heuristics of the event plugin. We\n // could alter all these plugins to work in such ways, but\n // that might cause other unknown side-effects that we\n // can't forsee right now.\n\n if (shouldProcessPolyfillPlugins) {\n extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n} // List of events that need to be individually attached to media elements.\n\n\nvar 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\n// set them on the actual target element itself. This is primarily\n// because these events do not consistently bubble in the DOM.\n\nvar nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n\nfunction executeDispatch(event, listener, currentTarget) {\n var type = event.type || 'unknown-event';\n event.currentTarget = currentTarget;\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n\nfunction processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n var previousInstance;\n\n if (inCapturePhase) {\n for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n var _dispatchListeners$i = dispatchListeners[i],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget,\n listener = _dispatchListeners$i.listener;\n\n if (instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, listener, currentTarget);\n previousInstance = instance;\n }\n } else {\n for (var _i = 0; _i < dispatchListeners.length; _i++) {\n var _dispatchListeners$_i = dispatchListeners[_i],\n _instance = _dispatchListeners$_i.instance,\n _currentTarget = _dispatchListeners$_i.currentTarget,\n _listener = _dispatchListeners$_i.listener;\n\n if (_instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, _listener, _currentTarget);\n previousInstance = _instance;\n }\n }\n}\n\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event,\n listeners = _dispatchQueue$i.listeners;\n processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n}\n\nfunction dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n var dispatchQueue = [];\n extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n}\n\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n var isCapturePhaseListener = false;\n var listenerSet = getEventListenerSet(targetElement);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n if (!listenerSet.has(listenerSetKey)) {\n addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n}\nvar listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n {\n if (rootContainerElement[listeningMarker]) {\n // Performance optimization: don't iterate through events\n // for the same portal container or root node more than once.\n // TODO: once we remove the flag, we may be able to also\n // remove some of the bookkeeping maps used for laziness.\n return;\n }\n\n rootContainerElement[listeningMarker] = true;\n allNativeEvents.forEach(function (domEventName) {\n if (!nonDelegatedEvents.has(domEventName)) {\n listenToNativeEvent(domEventName, false, rootContainerElement, null);\n }\n\n listenToNativeEvent(domEventName, true, rootContainerElement, null);\n });\n }\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {\n var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var target = rootContainerElement; // selectionchange needs to be attached to the document\n // otherwise it won't capture incoming events that are only\n // triggered on the document directly.\n\n if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {\n target = rootContainerElement.ownerDocument;\n } // If the event can be delegated (or is capture phase), we can\n // register it to the root container. Otherwise, we should\n // register the event to the target element and mark it as\n // a non-delegated event.\n\n\n if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {\n // For all non-delegated events, apart from scroll, we attach\n // their event listeners to the respective elements that their\n // events fire on. That means we can skip this step, as event\n // listener has already been added previously. However, we\n // special case the scroll event because the reality is that any\n // element can scroll.\n // TODO: ideally, we'd eventually apply the same logic to all\n // events from the nonDelegatedEvents list. Then we can remove\n // this special case and use the same logic for all events.\n if (domEventName !== 'scroll') {\n return;\n }\n\n eventSystemFlags |= IS_NON_DELEGATED;\n target = targetElement;\n }\n\n var listenerSet = getEventListenerSet(target);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then\n // we need to trap an event listener onto the target.\n\n if (!listenerSet.has(listenerSetKey)) {\n if (isCapturePhaseListener) {\n eventSystemFlags |= IS_CAPTURE_PHASE;\n }\n\n addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n}\n\nfunction addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n // active and not passive.\n\n var isPassiveListener = undefined;\n\n if (passiveBrowserEventsSupported) {\n // Browsers introduced an intervention, making these events\n // passive by default on document. React doesn't bind them\n // to document anymore, but changing this now would undo\n // the performance wins from the change. So we emulate\n // the existing behavior manually on the roots now.\n // https://github.com/facebook/react/issues/19651\n if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n isPassiveListener = true;\n }\n }\n\n targetContainer = targetContainer;\n var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we\n\n\n if (isCapturePhaseListener) {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);\n }\n } else {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);\n }\n }\n}\n\nfunction isMatchingRootContainer(grandContainer, targetContainer) {\n return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n}\n\nfunction dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var ancestorInst = targetInst;\n\n if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n if (targetInst !== null) {\n // The below logic attempts to work out if we need to change\n // the target fiber to a different ancestor. We had similar logic\n // in the legacy event system, except the big difference between\n // systems is that the modern event system now has an event listener\n // attached to each React Root and React Portal Root. Together,\n // the DOM nodes representing these roots are the \"rootContainer\".\n // To figure out which ancestor instance we should use, we traverse\n // up the fiber tree from the target instance and attempt to find\n // root boundaries that match that of our current \"rootContainer\".\n // If we find that \"rootContainer\", we find the parent fiber\n // sub-tree for that root and make that our ancestor instance.\n var node = targetInst;\n\n mainLoop: while (true) {\n if (node === null) {\n return;\n }\n\n var nodeTag = node.tag;\n\n if (nodeTag === HostRoot || nodeTag === HostPortal) {\n var container = node.stateNode.containerInfo;\n\n if (isMatchingRootContainer(container, targetContainerNode)) {\n break;\n }\n\n if (nodeTag === HostPortal) {\n // The target is a portal, but it's not the rootContainer we're looking for.\n // Normally portals handle their own events all the way down to the root.\n // So we should be able to stop now. However, we don't know if this portal\n // was part of *our* root.\n var grandNode = node.return;\n\n while (grandNode !== null) {\n var grandTag = grandNode.tag;\n\n if (grandTag === HostRoot || grandTag === HostPortal) {\n var grandContainer = grandNode.stateNode.containerInfo;\n\n if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n // This is the rootContainer we're looking for and we found it as\n // a parent of the Portal. That means we can ignore it because the\n // Portal will bubble through to us.\n return;\n }\n }\n\n grandNode = grandNode.return;\n }\n } // Now we need to find it's corresponding host fiber in the other\n // tree. To do this we can use getClosestInstanceFromNode, but we\n // need to validate that the fiber is a host instance, otherwise\n // we need to traverse up through the DOM till we find the correct\n // node that is from the other tree.\n\n\n while (container !== null) {\n var parentNode = getClosestInstanceFromNode(container);\n\n if (parentNode === null) {\n return;\n }\n\n var parentTag = parentNode.tag;\n\n if (parentTag === HostComponent || parentTag === HostText) {\n node = ancestorInst = parentNode;\n continue mainLoop;\n }\n\n container = container.parentNode;\n }\n }\n\n node = node.return;\n }\n }\n }\n\n batchedEventUpdates(function () {\n return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n });\n}\n\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\n\nfunction accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {\n var captureName = reactName !== null ? reactName + 'Capture' : null;\n var reactEventName = inCapturePhase ? captureName : reactName;\n var listeners = [];\n var instance = targetFiber;\n var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance2 = instance,\n stateNode = _instance2.stateNode,\n tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n lastHostComponent = stateNode; // createEventHandle listeners\n\n\n if (reactEventName !== null) {\n var listener = getListener(instance, reactEventName);\n\n if (listener != null) {\n listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n }\n }\n } // If we are only accumulating events for the target, then we don't\n // continue to propagate through the React fiber tree to find other\n // listeners.\n\n\n if (accumulateTargetOnly) {\n break;\n }\n\n instance = instance.return;\n }\n\n return listeners;\n} // We should only use this function for:\n// - BeforeInputEventPlugin\n// - ChangeEventPlugin\n// - SelectEventPlugin\n// This is because we only process these plugins\n// in the bubble phase, so we need to accumulate two\n// phase event listeners (via emulation).\n\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n var captureName = reactName + 'Capture';\n var listeners = [];\n var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance3 = instance,\n stateNode = _instance3.stateNode,\n tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n var captureListener = getListener(instance, captureName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n\n var bubbleListener = getListener(instance, reactName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n\n instance = instance.return;\n }\n\n return listeners;\n}\n\nfunction getParent(inst) {\n if (inst === null) {\n return null;\n }\n\n do {\n inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent);\n\n if (inst) {\n return inst;\n }\n\n return null;\n}\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\nfunction getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}\n\nfunction accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n var registrationName = event._reactName;\n var listeners = [];\n var instance = target;\n\n while (instance !== null) {\n if (instance === common) {\n break;\n }\n\n var _instance4 = instance,\n alternate = _instance4.alternate,\n stateNode = _instance4.stateNode,\n tag = _instance4.tag;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n\n if (inCapturePhase) {\n var captureListener = getListener(instance, registrationName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n } else if (!inCapturePhase) {\n var bubbleListener = getListener(instance, registrationName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n }\n\n instance = instance.return;\n }\n\n if (listeners.length !== 0) {\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n} // We should only use this function for:\n// - EnterLeaveEventPlugin\n// This is because we only process this plugin\n// in the bubble phase, so we need to accumulate two\n// phase event listeners.\n\n\nfunction accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n if (from !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n }\n\n if (to !== null && enterEvent !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n }\n}\nfunction getListenerSetKey(domEventName, capture) {\n return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\n}\n\nvar didWarnInvalidHydration = false;\nvar DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\nvar SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar AUTOFOCUS = 'autoFocus';\nvar CHILDREN = 'children';\nvar STYLE = 'style';\nvar HTML$1 = '__html';\nvar HTML_NAMESPACE$1 = Namespaces.html;\nvar warnedUnknownTags;\nvar suppressHydrationWarning;\nvar validatePropertiesInDevelopment;\nvar warnForTextDifference;\nvar warnForPropDifference;\nvar warnForExtraAttributes;\nvar warnForInvalidEventListener;\nvar canDiffStyleForHydrationWarning;\nvar normalizeMarkupForTextOrAttribute;\nvar normalizeHTML;\n\n{\n warnedUnknownTags = {\n // There are working polyfills for <dialog>. Let people use it.\n dialog: true,\n // Electron ships a custom <webview> tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n };\n\n validatePropertiesInDevelopment = function (type, props) {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props, {\n registrationNameDependencies: registrationNameDependencies,\n possibleRegistrationNames: possibleRegistrationNames\n });\n }; // IE 11 parses & normalizes the style attribute as opposed to other\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n\n\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.\n // It also can turn \\u0000 into \\uFFFD inside attributes.\n // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n // If we have a mismatch, it might be caused by that.\n // We will still patch up in this case but not fire the warning.\n\n var NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\n var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\n normalizeMarkupForTextOrAttribute = function (markup) {\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n };\n\n warnForTextDifference = function (serverText, clientText) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n };\n\n warnForPropDifference = function (propName, serverValue, clientValue) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n };\n\n warnForExtraAttributes = function (attributeNames) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n\n error('Extra attributes from the server: %s', names);\n };\n\n warnForInvalidEventListener = function (registrationName, listener) {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }; // Parse the HTML and read it back to normalize the HTML string so that it\n // can be used for comparison.\n\n\n normalizeHTML = function (parent, html) {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how <noscript> is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n}\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction noop() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop;\n}\n\nfunction setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n for (var propKey in nextProps) {\n if (!nextProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = nextProps[propKey];\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n\n setValueForStyles(domElement, nextProp);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n setInnerHTML(domElement, nextHtml);\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string') {\n // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a <textarea> will cause the placeholder to not\n // show within the <textarea> until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n if (canSetTextContent) {\n setTextContent(domElement, nextProp);\n }\n } else if (typeof nextProp === 'number') {\n setTextContent(domElement, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if (nextProp != null) {\n setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n }\n }\n}\n\nfunction updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n // TODO: Handle wasCustomComponentTag\n for (var i = 0; i < updatePayload.length; i += 2) {\n var propKey = updatePayload[i];\n var propValue = updatePayload[i + 1];\n\n if (propKey === STYLE) {\n setValueForStyles(domElement, propValue);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n setInnerHTML(domElement, propValue);\n } else if (propKey === CHILDREN) {\n setTextContent(domElement, propValue);\n } else {\n setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n }\n }\n}\n\nfunction createElement(type, props, rootContainerElement, parentNamespace) {\n var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n var domElement;\n var namespaceURI = parentNamespace;\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n {\n isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n // allow <SVG> or <mATH>.\n\n if (!isCustomComponentTag && type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n\n if (type === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n\n div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n // This is guaranteed to yield a script element.\n\n var firstChild = div.firstChild;\n domElement = div.removeChild(firstChild);\n } else if (typeof props.is === 'string') {\n // $FlowIssue `createElement` should be updated for Web Components\n domElement = ownerDocument.createElement(type, {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`\n // attributes on `select`s needs to be added before `option`s are inserted.\n // This prevents:\n // - a bug where the `select` does not scroll to the correct option because singular\n // `select` elements automatically pick the first item #13222\n // - a bug where the `select` set the first item as selected despite the `size` attribute #14239\n // See https://github.com/facebook/react/issues/13222\n // and https://github.com/facebook/react/issues/14239\n\n if (type === 'select') {\n var node = domElement;\n\n if (props.multiple) {\n node.multiple = true;\n } else if (props.size) {\n // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n // it is possible that no option is selected.\n //\n // This is only necessary when a select in \"single selection mode\".\n node.size = props.size;\n }\n }\n }\n } else {\n domElement = ownerDocument.createElementNS(namespaceURI, type);\n }\n\n {\n if (namespaceURI === HTML_NAMESPACE$1) {\n if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {\n warnedUnknownTags[type] = true;\n\n error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n }\n }\n }\n\n return domElement;\n}\nfunction createTextNode(text, rootContainerElement) {\n return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\n}\nfunction setInitialProperties(domElement, tag, rawProps, rootContainerElement) {\n var isCustomComponentTag = isCustomComponent(tag, rawProps);\n\n {\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n var props;\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n props = rawProps;\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n props = rawProps;\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n props = rawProps;\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n props = rawProps;\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n props = getHostProps$1(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n default:\n props = rawProps;\n }\n\n assertValidProps(tag, props);\n setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, false);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'option':\n postMountWrapper$1(domElement, rawProps);\n break;\n\n case 'select':\n postMountWrapper$2(domElement, rawProps);\n break;\n\n default:\n if (typeof props.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n} // Calculate the diff between the two objects.\n\nfunction diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n var lastProps;\n var nextProps;\n\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n assertValidProps(tag, nextProps);\n var propKey;\n var styleName;\n var styleUpdates = null;\n\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n }\n } 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)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the allowed property list in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n } // Update styles that changed since `lastProp`.\n\n\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n\n updatePayload.push(propKey, styleUpdates);\n }\n\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n var lastHtml = lastProp ? lastProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, nextHtml);\n }\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string' || typeof nextProp === 'number') {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {\n // If we encounter useOpaqueReference's opaque object, this means we are hydrating.\n // In this case, call the opaque object's toString function which generates a new client\n // ID so client and server IDs match and throws to rerender.\n nextProp.toString();\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the allowed property list during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n }\n\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n\n return updatePayload;\n} // Apply the diff.\n\nfunction updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {\n // Update checked *before* name.\n // In the middle of an update, it is possible to have multiple checked.\n // When a checked radio tries to change name, browser makes another radio's checked false.\n if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {\n updateChecked(domElement, nextRawProps);\n }\n\n var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);\n var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.\n\n updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props\n // changed.\n\n switch (tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n updateWrapper(domElement, nextRawProps);\n break;\n\n case 'textarea':\n updateWrapper$1(domElement, nextRawProps);\n break;\n\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n postUpdateWrapper(domElement, nextRawProps);\n break;\n }\n}\n\nfunction getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n\n return possibleStandardNames[lowerCasedName] || null;\n }\n}\n\nfunction diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {\n var isCustomComponentTag;\n var extraAttributeNames;\n\n {\n suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;\n isCustomComponentTag = isCustomComponent(tag, rawProps);\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n }\n\n assertValidProps(tag, rawProps);\n\n {\n extraAttributeNames = new Set();\n var attributes = domElement.attributes;\n\n for (var _i = 0; _i < attributes.length; _i++) {\n var name = attributes[_i].name.toLowerCase();\n\n switch (name) {\n // Built-in SSR attribute is allowed\n case 'data-reactroot':\n break;\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n\n case 'value':\n break;\n\n case 'checked':\n break;\n\n case 'selected':\n break;\n\n default:\n // Intentionally use the original name.\n // See discussion in https://github.com/facebook/react/pull/10676.\n extraAttributeNames.add(attributes[_i].name);\n }\n }\n }\n\n var updatePayload = null;\n\n for (var propKey in rawProps) {\n if (!rawProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = rawProps[propKey];\n\n if (propKey === CHILDREN) {\n // For text content children we compare against textContent. This\n // might match additional HTML that is hidden when we read it using\n // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n // satisfies our requirement. Our requirement is not to produce perfect\n // HTML and attributes. Ideally we should preserve structure but it's\n // ok not to if the visible content is still enough to indicate what\n // even listeners these nodes might be wired up to.\n // TODO: Warn if there is more than a single textNode as a child.\n // TODO: Should we use domElement.firstChild.nodeValue to compare?\n if (typeof nextProp === 'string') {\n if (domElement.textContent !== nextProp) {\n if ( !suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, nextProp];\n }\n } else if (typeof nextProp === 'number') {\n if (domElement.textContent !== '' + nextProp) {\n if ( !suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, '' + nextProp];\n }\n }\n } else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)\n typeof isCustomComponentTag === 'boolean') {\n // Validate that the properties correspond to their expected values.\n var serverValue = void 0;\n var propertyInfo = getPropertyInfo(propKey);\n\n if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var serverHTML = domElement.innerHTML;\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n\n if (expectedHTML !== serverHTML) {\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n }\n } else if (propKey === STYLE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey);\n\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(nextProp);\n serverValue = domElement.getAttribute('style');\n\n if (expectedStyle !== serverValue) {\n warnForPropDifference(propKey, serverValue, expectedStyle);\n }\n }\n } else if (isCustomComponentTag) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n\n if (nextProp !== serverValue) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {\n var isMismatchDueToBadCasing = false;\n\n if (propertyInfo !== null) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propertyInfo.attributeName);\n serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);\n } else {\n var ownNamespace = parentNamespace;\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n ownNamespace = getIntrinsicNamespace(tag);\n }\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\n\n if (standardName !== null && standardName !== propKey) {\n // If an SVG prop is supplied with bad casing, it will\n // be successfully parsed from HTML, but will produce a mismatch\n // (and would be incorrectly rendered on the client).\n // However, we already warn about bad casing elsewhere.\n // So we'll skip the misleading extra mismatch warning in this case.\n isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.\n\n extraAttributeNames.delete(standardName);\n } // $FlowFixMe - Should be inferred as not undefined.\n\n\n extraAttributeNames.delete(propKey);\n }\n\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n }\n\n if (nextProp !== serverValue && !isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n }\n }\n }\n\n {\n // $FlowFixMe - Should be inferred as not undefined.\n if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {\n // $FlowFixMe - Should be inferred as not undefined.\n warnForExtraAttributes(extraAttributeNames);\n }\n }\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, true);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'select':\n case 'option':\n // For input and textarea we current always set the value property at\n // post mount to force it to diverge from attributes. However, for\n // option and select we don't quite do the same thing and select\n // is not resilient to the DOM state changing so we don't do that here.\n // TODO: Consider not doing this for input and textarea.\n break;\n\n default:\n if (typeof rawProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n return updatePayload;\n}\nfunction diffHydratedText(textNode, text) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n}\nfunction warnForUnmatchedText(textNode, text) {\n {\n warnForTextDifference(textNode.nodeValue, text);\n }\n}\nfunction warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedText(parentNode, text) {\n {\n if (text === '') {\n // We expect to insert empty text nodes since they're not represented in\n // the HTML.\n // TODO: Remove this special case if we can just avoid inserting empty\n // text nodes.\n return;\n }\n\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n }\n}\nfunction restoreControlledState$3(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledState(domElement, props);\n return;\n\n case 'textarea':\n restoreControlledState$2(domElement, props);\n return;\n\n case 'select':\n restoreControlledState$1(domElement, props);\n return;\n }\n}\n\nvar validateDOMNesting = function () {};\n\nvar updatedAncestorInfo = function () {};\n\n{\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example, <b><div></div></b> is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n // <p> tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for <title>, including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\n var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n var emptyAncestorInfo = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n\n updatedAncestorInfo = function (oldInfo, tag) {\n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);\n\n var info = {\n tag: tag\n };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n } // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n return ancestorInfo;\n };\n /**\n * Returns whether\n */\n\n\n var isTagValidWithParent = function (tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n case 'html':\n return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n case 'frameset':\n return tag === 'frame';\n\n case '#document':\n return tag === 'html';\n } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frameset':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n };\n /**\n * Returns whether\n */\n\n\n var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n };\n\n var didWarn$1 = {};\n\n validateDOMNesting = function (childTag, childText, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n\n if (childText != null) {\n if (childTag != null) {\n error('validateDOMNesting: when childText is passed, childTag should be null');\n }\n\n childTag = '#text';\n }\n\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n if (!invalidParentOrAncestor) {\n return;\n }\n\n var ancestorTag = invalidParentOrAncestor.tag;\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;\n\n if (didWarn$1[warnKey]) {\n return;\n }\n\n didWarn$1[warnKey] = true;\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n\n if (invalidParent) {\n var info = '';\n\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n\n error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);\n } else {\n error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n }\n };\n}\n\nvar SUPPRESS_HYDRATION_WARNING$1;\n\n{\n SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';\n}\n\nvar SUSPENSE_START_DATA = '$';\nvar SUSPENSE_END_DATA = '/$';\nvar SUSPENSE_PENDING_START_DATA = '$?';\nvar SUSPENSE_FALLBACK_START_DATA = '$!';\nvar STYLE$1 = 'style';\nvar eventsEnabled = null;\nvar selectionInformation = null;\n\nfunction shouldAutoFocusHostComponent(type, props) {\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n }\n\n return false;\n}\nfunction getRootHostContext(rootContainerInstance) {\n var type;\n var namespace;\n var nodeType = rootContainerInstance.nodeType;\n\n switch (nodeType) {\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n {\n type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n var root = rootContainerInstance.documentElement;\n namespace = root ? root.namespaceURI : getChildNamespace(null, '');\n break;\n }\n\n default:\n {\n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n var ownNamespace = container.namespaceURI || null;\n type = container.tagName;\n namespace = getChildNamespace(ownNamespace, type);\n break;\n }\n }\n\n {\n var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getChildHostContext(parentHostContext, type, rootContainerInstance) {\n {\n var parentHostContextDev = parentHostContext;\n var namespace = getChildNamespace(parentHostContextDev.namespace, type);\n var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getPublicInstance(instance) {\n return instance;\n}\nfunction prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n var activeInstance = null;\n\n setEnabled(false);\n return activeInstance;\n}\nfunction resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n selectionInformation = null;\n}\nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n var parentNamespace;\n\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n validateDOMNesting(type, null, hostContextDev.ancestorInfo);\n\n if (typeof props.children === 'string' || typeof props.children === 'number') {\n var string = '' + props.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n\n parentNamespace = hostContextDev.namespace;\n }\n\n var domElement = createElement(type, props, rootContainerInstance, parentNamespace);\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n return domElement;\n}\nfunction appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n setInitialProperties(domElement, type, props, rootContainerInstance);\n return shouldAutoFocusHostComponent(type, props);\n}\nfunction prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n {\n var hostContextDev = hostContext;\n\n if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {\n var string = '' + newProps.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n }\n\n return diffProperties(domElement, type, oldProps, newProps);\n}\nfunction shouldSetTextContent(type, props) {\n 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;\n}\nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n {\n var hostContextDev = hostContext;\n validateDOMNesting(null, text, hostContextDev.ancestorInfo);\n }\n\n var textNode = createTextNode(text, rootContainerInstance);\n precacheFiberNode(internalInstanceHandle, textNode);\n return textNode;\n}\n// if a component just imports ReactDOM (e.g. for findDOMNode).\n// Some environments might not have setTimeout or clearTimeout.\n\nvar scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\nvar cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\nvar noTimeout = -1; // -------------------\nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {\n // Despite the naming that might imply otherwise, this method only\n // fires if there is an `Update` effect scheduled during mounting.\n // This happens if `finalizeInitialChildren` returns `true` (which it\n // does to implement the `autoFocus` attribute on the client). But\n // there are also other cases when this might happen (such as patching\n // up text content during hydration mismatch). So we'll check this again.\n if (shouldAutoFocusHostComponent(type, newProps)) {\n domElement.focus();\n }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.\n\n updateProperties(domElement, updatePayload, type, oldProps, newProps);\n}\nfunction resetTextContent(domElement) {\n setTextContent(domElement, '');\n}\nfunction commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n}\nfunction appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction appendChildToContainer(container, child) {\n var parentNode;\n\n if (container.nodeType === COMMENT_NODE) {\n parentNode = container.parentNode;\n parentNode.insertBefore(child, container);\n } else {\n parentNode = container;\n parentNode.appendChild(child);\n } // This container might be used for a portal.\n // If something inside a portal is clicked, that click should bubble\n // through the React tree. However, on Mobile Safari the click would\n // never bubble through the *DOM* tree unless an ancestor with onclick\n // event exists. So we wouldn't see it and dispatch it.\n // This is why we ensure that non React root containers have inline onclick\n // defined.\n // https://github.com/facebook/react/issues/11918\n\n\n var reactRootContainer = container._reactRootContainer;\n\n if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(parentNode);\n }\n}\nfunction insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\n}\nfunction insertInContainerBefore(container, child, beforeChild) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.insertBefore(child, beforeChild);\n } else {\n container.insertBefore(child, beforeChild);\n }\n}\n\nfunction removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n}\nfunction removeChildFromContainer(container, child) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.removeChild(child);\n } else {\n container.removeChild(child);\n }\n}\nfunction hideInstance(instance) {\n // TODO: Does this work for all element types? What about MathML? Should we\n // pass host context to this method?\n instance = instance;\n var style = instance.style;\n\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n}\nfunction hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\n}\nfunction unhideInstance(instance, props) {\n instance = instance;\n var styleProp = props[STYLE$1];\n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n instance.style.display = dangerousStyleValue('display', display);\n}\nfunction unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n}\nfunction clearContainer(container) {\n if (container.nodeType === ELEMENT_NODE) {\n container.textContent = '';\n } else if (container.nodeType === DOCUMENT_NODE) {\n var body = container.body;\n\n if (body != null) {\n body.textContent = '';\n }\n }\n} // -------------------\nfunction canHydrateInstance(instance, type, props) {\n if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {\n return null;\n } // This has now been refined to an element node.\n\n\n return instance;\n}\nfunction canHydrateTextInstance(instance, text) {\n if (text === '' || instance.nodeType !== TEXT_NODE) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n return null;\n } // This has now been refined to a text node.\n\n\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n}\n\nfunction getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n }\n\n return node;\n}\n\nfunction getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n}\nfunction getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n}\nfunction hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n // get attached.\n\n updateFiberProps(instance, props);\n var parentNamespace;\n\n {\n var hostContextDev = hostContext;\n parentNamespace = hostContextDev.namespace;\n }\n\n return diffHydratedProperties(instance, type, props, parentNamespace);\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, textInstance);\n return diffHydratedText(textInstance, text);\n}\nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n return getNextHydratableSibling(node);\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n depth++;\n }\n }\n\n node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\n\n\n return null;\n} // Returns the SuspenseInstance if this node is a direct child of a\n// SuspenseInstance. I.e. if its previous sibling is a Comment with\n// SUSPENSE_x_START_DATA. Otherwise, null.\n\nfunction getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n}\nfunction commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n}\nfunction commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {\n {\n warnForUnmatchedText(textInstance, text);\n }\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForUnmatchedText(textInstance, text);\n }\n}\nfunction didNotHydrateContainerInstance(parentContainer, instance) {\n {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentContainer, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentContainer, instance);\n }\n }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentInstance, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentInstance, instance);\n }\n }\n}\nfunction didNotFindHydratableContainerInstance(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n}\nfunction didNotFindHydratableContainerTextInstance(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n}\nfunction didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;\n}\nvar clientId = 0;\nfunction makeClientIdInDEV(warnOnAccessInDEV) {\n var id = 'r:' + (clientId++).toString(36);\n return {\n toString: function () {\n warnOnAccessInDEV();\n return id;\n },\n valueOf: function () {\n warnOnAccessInDEV();\n return id;\n }\n };\n}\nfunction isOpaqueHydratingObject(value) {\n return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;\n}\nfunction makeOpaqueHydratingObject(attemptToReadValue) {\n return {\n $$typeof: REACT_OPAQUE_ID_TYPE,\n toString: attemptToReadValue,\n valueOf: attemptToReadValue\n };\n}\nfunction preparePortalMount(portalInstance) {\n {\n listenToAllSupportedEvents(portalInstance);\n }\n}\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactFiber$' + randomKey;\nvar internalPropsKey = '__reactProps$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainer$' + randomKey;\nvar internalEventHandlersKey = '__reactEvents$' + randomKey;\nfunction precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n}\nfunction markContainerAsRoot(hostRoot, node) {\n node[internalContainerInstanceKey] = hostRoot;\n}\nfunction unmarkContainerAsRoot(node) {\n node[internalContainerInstanceKey] = null;\n}\nfunction isContainerMarkedAsRoot(node) {\n return !!node[internalContainerInstanceKey];\n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n// If the target node is part of a hydrated or not yet rendered subtree, then\n// this may also return a SuspenseComponent or HostRoot to indicate that.\n// Conceptually the HostRoot fiber is a child of the Container node. So if you\n// pass the Container node as the targetNode, you will not actually get the\n// HostRoot back. To get to the HostRoot, you need to pass a child of it.\n// The same thing applies to Suspense boundaries.\n\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n}\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\nfunction getInstanceFromNode(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n}\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\nfunction getNodeFromInstance(inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n } // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n\n\n {\n {\n throw Error( \"getNodeFromInstance: Invalid argument.\" );\n }\n }\n}\nfunction getFiberCurrentPropsFromNode(node) {\n return node[internalPropsKey] || null;\n}\nfunction updateFiberProps(node, props) {\n node[internalPropsKey] = props;\n}\nfunction getEventListenerSet(node) {\n var elementListenerSet = node[internalEventHandlersKey];\n\n if (elementListenerSet === undefined) {\n elementListenerSet = node[internalEventHandlersKey] = new Set();\n }\n\n return elementListenerSet;\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n 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`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n 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);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar valueStack = [];\nvar fiberStack;\n\n{\n fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n}\n\nfunction pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n error('Unexpected Fiber popped.');\n }\n }\n\n cursor.current = valueStack[index];\n valueStack[index] = null;\n\n {\n fiberStack[index] = null;\n }\n\n index--;\n}\n\nfunction push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n\n {\n fiberStack[index] = fiber;\n }\n\n cursor.current = value;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n} // A cursor to the current merged context object on the stack.\n\n\nvar contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\nvar didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\n\nvar previousContext = emptyContextObject;\n\nfunction getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n {\n if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n // If the fiber is a context provider itself, when we read its context\n // we may have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n\n return contextStackCursor.current;\n }\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n }\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n } // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n var instance = workInProgress.stateNode;\n\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n\n\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n }\n}\n\nfunction hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n}\n\nfunction isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n}\n\nfunction popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (!(contextStackCursor.current === emptyContextObject)) {\n {\n throw Error( \"Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n }\n}\n\nfunction processChildContext(fiber, type, parentContext) {\n {\n var instance = fiber.stateNode;\n var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentName(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n {\n throw Error( (getComponentName(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\" );\n }\n }\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\n }\n\n return _assign({}, parentContext, childContext);\n }\n}\n\nfunction pushContextProvider(workInProgress) {\n {\n var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n return true;\n }\n}\n\nfunction invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n\n if (!instance) {\n {\n throw Error( \"Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, type, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n }\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {\n {\n throw Error( \"Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var node = fiber;\n\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n\n case ClassComponent:\n {\n var Component = node.type;\n\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n\n break;\n }\n }\n\n node = node.return;\n } while (node !== null);\n\n {\n {\n throw Error( \"Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\nvar LegacyRoot = 0;\nvar BlockingRoot = 1;\nvar ConcurrentRoot = 2;\n\nvar rendererID = null;\nvar injectedHook = null;\nvar hasLoggedError = false;\nvar isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\nfunction injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n\n if (!hook.supportsFiber) {\n {\n 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');\n } // DevTools exists, even though it doesn't support Fiber.\n\n\n return true;\n }\n\n try {\n rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n injectedHook = hook;\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n error('React instrumentation encountered an error: %s.', err);\n }\n } // DevTools exists\n\n\n return true;\n}\nfunction onScheduleRoot(root, children) {\n {\n if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n try {\n injectedHook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if ( !hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitRoot(root, priorityLevel) {\n if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n try {\n var didError = (root.current.flags & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);\n } else {\n injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);\n }\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitUnmount(fiber) {\n if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n try {\n injectedHook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\n\nvar Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,\n Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,\n Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,\n Scheduler_shouldYield = Scheduler.unstable_shouldYield,\n Scheduler_requestPaint = Scheduler.unstable_requestPaint,\n Scheduler_now$1 = Scheduler.unstable_now,\n Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,\n Scheduler_LowPriority = Scheduler.unstable_LowPriority,\n Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;\n\n{\n // Provide explicit error message when production+profiling bundle of e.g.\n // react-dom is used with production (non-profiling) bundle of\n // scheduler/tracing\n if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {\n {\n 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\" );\n }\n }\n}\n\nvar fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use\n// ascending numbers so we can compare them like numbers. They start at 90 to\n// avoid clashing with Scheduler's priorities.\n\nvar ImmediatePriority$1 = 99;\nvar UserBlockingPriority$2 = 98;\nvar NormalPriority$1 = 97;\nvar LowPriority$1 = 96;\nvar IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.\n\nvar NoPriority$1 = 90;\nvar shouldYield = Scheduler_shouldYield;\nvar requestPaint = // Fall back gracefully if we're running an older version of Scheduler.\nScheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};\nvar syncQueue = null;\nvar immediateQueueCallbackNode = null;\nvar isFlushingSyncQueue = false;\nvar initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.\n// This will be the case for modern browsers that support `performance.now`. In\n// older browsers, Scheduler falls back to `Date.now`, which returns a Unix\n// timestamp. In that case, subtract the module initialization time to simulate\n// the behavior of performance.now and keep our times small enough to fit\n// within 32 bits.\n// TODO: Consider lifting this into Scheduler.\n\nvar now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {\n return Scheduler_now$1() - initialTimeMs$1;\n};\nfunction getCurrentPriorityLevel() {\n switch (Scheduler_getCurrentPriorityLevel()) {\n case Scheduler_ImmediatePriority:\n return ImmediatePriority$1;\n\n case Scheduler_UserBlockingPriority:\n return UserBlockingPriority$2;\n\n case Scheduler_NormalPriority:\n return NormalPriority$1;\n\n case Scheduler_LowPriority:\n return LowPriority$1;\n\n case Scheduler_IdlePriority:\n return IdlePriority$1;\n\n default:\n {\n {\n throw Error( \"Unknown priority level.\" );\n }\n }\n\n }\n}\n\nfunction reactPriorityToSchedulerPriority(reactPriorityLevel) {\n switch (reactPriorityLevel) {\n case ImmediatePriority$1:\n return Scheduler_ImmediatePriority;\n\n case UserBlockingPriority$2:\n return Scheduler_UserBlockingPriority;\n\n case NormalPriority$1:\n return Scheduler_NormalPriority;\n\n case LowPriority$1:\n return Scheduler_LowPriority;\n\n case IdlePriority$1:\n return Scheduler_IdlePriority;\n\n default:\n {\n {\n throw Error( \"Unknown priority level.\" );\n }\n }\n\n }\n}\n\nfunction runWithPriority$1(reactPriorityLevel, fn) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_runWithPriority(priorityLevel, fn);\n}\nfunction scheduleCallback(reactPriorityLevel, callback, options) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_scheduleCallback(priorityLevel, callback, options);\n}\nfunction scheduleSyncCallback(callback) {\n // Push this callback into an internal queue. We'll flush these either in\n // the next tick, or earlier if something calls `flushSyncCallbackQueue`.\n if (syncQueue === null) {\n syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.\n\n immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);\n } else {\n // Push onto existing queue. Don't need to schedule a callback because\n // we already scheduled one when we created the queue.\n syncQueue.push(callback);\n }\n\n return fakeCallbackNode;\n}\nfunction cancelCallback(callbackNode) {\n if (callbackNode !== fakeCallbackNode) {\n Scheduler_cancelCallback(callbackNode);\n }\n}\nfunction flushSyncCallbackQueue() {\n if (immediateQueueCallbackNode !== null) {\n var node = immediateQueueCallbackNode;\n immediateQueueCallbackNode = null;\n Scheduler_cancelCallback(node);\n }\n\n flushSyncCallbackQueueImpl();\n}\n\nfunction flushSyncCallbackQueueImpl() {\n if (!isFlushingSyncQueue && syncQueue !== null) {\n // Prevent re-entrancy.\n isFlushingSyncQueue = true;\n var i = 0;\n\n {\n try {\n var _isSync2 = true;\n var _queue = syncQueue;\n runWithPriority$1(ImmediatePriority$1, function () {\n for (; i < _queue.length; i++) {\n var callback = _queue[i];\n\n do {\n callback = callback(_isSync2);\n } while (callback !== null);\n }\n });\n syncQueue = null;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n if (syncQueue !== null) {\n syncQueue = syncQueue.slice(i + 1);\n } // Resume flushing in the next tick\n\n\n Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);\n throw error;\n } finally {\n isFlushingSyncQueue = false;\n }\n }\n }\n}\n\n// TODO: this is special because it gets imported during build.\nvar ReactVersion = '17.0.2';\n\nvar NoMode = 0;\nvar StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root\n// tag instead\n\nvar BlockingMode = 2;\nvar ConcurrentMode = 4;\nvar ProfileMode = 8;\nvar DebugTracingMode = 16;\n\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;\nvar NoTransition = 0;\nfunction requestCurrentTransition() {\n return ReactCurrentBatchConfig.transition;\n}\n\nvar ReactStrictModeWarnings = {\n recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n flushPendingUnsafeLifecycleWarnings: function () {},\n recordLegacyContextWarning: function (fiber, instance) {},\n flushLegacyContextWarning: function () {},\n discardPendingWarnings: function () {}\n};\n\n{\n var findStrictRoot = function (fiber) {\n var maybeStrictRoot = null;\n var node = fiber;\n\n while (node !== null) {\n if (node.mode & StrictMode) {\n maybeStrictRoot = node;\n }\n\n node = node.return;\n }\n\n return maybeStrictRoot;\n };\n\n var setToSortedString = function (set) {\n var array = [];\n set.forEach(function (value) {\n array.push(value);\n });\n return array.sort().join(', ');\n };\n\n var pendingComponentWillMountWarnings = [];\n var pendingUNSAFE_ComponentWillMountWarnings = [];\n var pendingComponentWillReceivePropsWarnings = [];\n var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n var pendingComponentWillUpdateWarnings = [];\n var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n var didWarnAboutUnsafeLifecycles = new Set();\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedup strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n\n if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n\n var UNSAFE_componentWillMountUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n\n var componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n\n var componentWillUpdateUniqueNames = new Set();\n\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n } // Finally, we flush all the warnings\n // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n\n 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);\n }\n\n if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n 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);\n }\n\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n 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);\n }\n\n if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n 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);\n }\n\n if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n 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);\n }\n\n if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n 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);\n }\n };\n\n var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\n\n if (strictRoot === null) {\n error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n\n return;\n } // Dedup strategy: Warn once per component.\n\n\n if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n if (warningsForRoot === undefined) {\n warningsForRoot = [];\n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n }\n\n warningsForRoot.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n\n try {\n setCurrentFiber(firstFiber);\n\n 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);\n } finally {\n resetCurrentFiber();\n }\n });\n };\n\n ReactStrictModeWarnings.discardPendingWarnings = function () {\n pendingComponentWillMountWarnings = [];\n pendingUNSAFE_ComponentWillMountWarnings = [];\n pendingComponentWillReceivePropsWarnings = [];\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n pendingComponentWillUpdateWarnings = [];\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n pendingLegacyContextWarning = new Map();\n };\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = _assign({}, baseProps);\n\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\n// Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\nvar MAX_SIGNED_31_BIT_INT = 1073741823;\n\nvar valueCursor = createCursor(null);\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n}\n\nvar currentlyRenderingFiber = null;\nvar lastContextDependency = null;\nvar lastContextWithAllBitsObserved = null;\nvar isDisallowedContextReadInDEV = false;\nfunction resetContextDependencies() {\n // This is called right before React yields execution, to ensure `readContext`\n // cannot be called outside the render phase.\n currentlyRenderingFiber = null;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n}\nfunction exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction pushProvider(providerFiber, nextValue) {\n var context = providerFiber.type._context;\n\n {\n push(valueCursor, context._currentValue, providerFiber);\n context._currentValue = nextValue;\n\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n}\nfunction popProvider(providerFiber) {\n var currentValue = valueCursor.current;\n pop(valueCursor, providerFiber);\n var context = providerFiber.type._context;\n\n {\n context._currentValue = currentValue;\n }\n}\nfunction calculateChangedBits(context, newValue, oldValue) {\n if (objectIs(oldValue, newValue)) {\n // No change\n return 0;\n } else {\n var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n\n {\n if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {\n error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);\n }\n }\n\n return changedBits | 0;\n }\n}\nfunction scheduleWorkOnParentPath(parent, renderLanes) {\n // Update the child lanes of all the ancestors, including the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n } else {\n // Neither alternate was updated, which means the rest of the\n // ancestor path already has sufficient priority.\n break;\n }\n\n node = node.return;\n }\n}\nfunction propagateContextChange(workInProgress, context, changedBits, renderLanes) {\n var fiber = workInProgress.child;\n\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {\n // Match! Schedule an update on this fiber.\n if (fiber.tag === ClassComponent) {\n // Schedule a force update on the work-in-progress.\n var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));\n update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n // update to the current fiber, too, which means it will persist even if\n // this render is thrown away. Since it's a race condition, not sure it's\n // worth fixing.\n\n enqueueUpdate(fiber, update);\n }\n\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.\n\n list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n // dependency list.\n\n break;\n }\n\n dependency = dependency.next;\n }\n } else if (fiber.tag === ContextProvider) {\n // Don't scan deeper if this is a matching provider\n nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\n }\n\n if (nextFiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n nextFiber.return = fiber;\n } else {\n // No child. Traverse to next sibling.\n nextFiber = fiber;\n\n while (nextFiber !== null) {\n if (nextFiber === workInProgress) {\n // We're back to the root of this subtree. Exit.\n nextFiber = null;\n break;\n }\n\n var sibling = nextFiber.sibling;\n\n if (sibling !== null) {\n // Set the return pointer of the sibling to the work-in-progress fiber.\n sibling.return = nextFiber.return;\n nextFiber = sibling;\n break;\n } // No more siblings. Traverse up.\n\n\n nextFiber = nextFiber.return;\n }\n }\n\n fiber = nextFiber;\n }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (includesSomeLane(dependencies.lanes, renderLanes)) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n\n dependencies.firstContext = null;\n }\n }\n}\nfunction readContext(context, observedBits) {\n {\n // This warning would fire if you read context inside a Hook like useMemo.\n // Unlike the class check below, it's not enforced in production for perf.\n if (isDisallowedContextReadInDEV) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {\n var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.\n\n if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {\n // Observe all updates.\n lastContextWithAllBitsObserved = context;\n resolvedObservedBits = MAX_SIGNED_31_BIT_INT;\n } else {\n resolvedObservedBits = observedBits;\n }\n\n var contextItem = {\n context: context,\n observedBits: resolvedObservedBits,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (!(currentlyRenderingFiber !== null)) {\n {\n throw Error( \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\" );\n }\n } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n currentlyRenderingFiber.dependencies = {\n lanes: NoLanes,\n firstContext: contextItem,\n responders: null\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n\n return context._currentValue ;\n}\n\nvar UpdateState = 0;\nvar ReplaceState = 1;\nvar ForceUpdate = 2;\nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n// It should only be read right after calling `processUpdateQueue`, via\n// `checkHasForceUpdateAfterProcessing`.\n\nvar hasForceUpdate = false;\nvar didWarnUpdateInsideUpdate;\nvar currentlyProcessingQueue;\n\n{\n didWarnUpdateInsideUpdate = false;\n currentlyProcessingQueue = null;\n}\n\nfunction initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null\n },\n effects: null\n };\n fiber.updateQueue = queue;\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n // Clone the update queue from current. Unless it's already a clone.\n var queue = workInProgress.updateQueue;\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: currentQueue.firstBaseUpdate,\n lastBaseUpdate: currentQueue.lastBaseUpdate,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = clone;\n }\n}\nfunction createUpdate(eventTime, lane) {\n var update = {\n eventTime: eventTime,\n lane: lane,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n return update;\n}\nfunction enqueueUpdate(fiber, update) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update;\n\n {\n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n\n didWarnUpdateInsideUpdate = true;\n }\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n // Captured updates are updates that are thrown by a child during the render\n // phase. They should be discarded if the render is aborted. Therefore,\n // we should only put them on the work-in-progress queue, not the current one.\n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n // The work-in-progress queue is the same as current. This happens when\n // we bail out on a parent fiber that then captures an error thrown by\n // a child. Since we want to append the update only to the work-in\n // -progress queue, we need to clone the updates. We usually clone during\n // processUpdateQueue, but that didn't happen in this case because we\n // skipped over the parent when we bailed out.\n var newFirst = null;\n var newLast = null;\n var firstBaseUpdate = queue.firstBaseUpdate;\n\n if (firstBaseUpdate !== null) {\n // Loop through the updates and clone them.\n var update = firstBaseUpdate;\n\n do {\n var clone = {\n eventTime: update.eventTime,\n lane: update.lane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLast === null) {\n newFirst = newLast = clone;\n } else {\n newLast.next = clone;\n newLast = clone;\n }\n\n update = update.next;\n } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n if (newLast === null) {\n newFirst = newLast = capturedUpdate;\n } else {\n newLast.next = capturedUpdate;\n newLast = capturedUpdate;\n }\n } else {\n // There are no base updates.\n newFirst = newLast = capturedUpdate;\n }\n\n queue = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = queue;\n return;\n }\n } // Append the update to the end of the list.\n\n\n var lastBaseUpdate = queue.lastBaseUpdate;\n\n if (lastBaseUpdate === null) {\n queue.firstBaseUpdate = capturedUpdate;\n } else {\n lastBaseUpdate.next = capturedUpdate;\n }\n\n queue.lastBaseUpdate = capturedUpdate;\n}\n\nfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n var nextState = payload.call(instance, prevState, nextProps);\n\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n payload.call(instance, prevState, nextProps);\n } finally {\n reenableLogs();\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n\n return nextState;\n } // State object\n\n\n return payload;\n }\n\n case CaptureUpdate:\n {\n workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n partialState = _payload.call(instance, prevState, nextProps);\n\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n _payload.call(instance, prevState, nextProps);\n } finally {\n reenableLogs();\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\n }\n\n if (partialState === null || partialState === undefined) {\n // Null and undefined are treated as no-ops.\n return prevState;\n } // Merge the partial state and the previous state.\n\n\n return _assign({}, prevState, partialState);\n }\n\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n\n return prevState;\n}\n\nfunction processUpdateQueue(workInProgress, props, instance, renderLanes) {\n // This is always non-null on a ClassComponent or HostRoot\n var queue = workInProgress.updateQueue;\n hasForceUpdate = false;\n\n {\n currentlyProcessingQueue = queue.shared;\n }\n\n var firstBaseUpdate = queue.firstBaseUpdate;\n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n // and last so that it's non-circular.\n\n var lastPendingUpdate = pendingQueue;\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null; // Append pending updates to base queue\n\n if (lastBaseUpdate === null) {\n firstBaseUpdate = firstPendingUpdate;\n } else {\n lastBaseUpdate.next = firstPendingUpdate;\n }\n\n lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n // we need to transfer the updates to that queue, too. Because the base\n // queue is a singly-linked list with no cycles, we can append to both\n // lists and take advantage of structural sharing.\n // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // This is always non-null on a ClassComponent or HostRoot\n var currentQueue = current.updateQueue;\n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n if (currentLastBaseUpdate !== lastBaseUpdate) {\n if (currentLastBaseUpdate === null) {\n currentQueue.firstBaseUpdate = firstPendingUpdate;\n } else {\n currentLastBaseUpdate.next = firstPendingUpdate;\n }\n\n currentQueue.lastBaseUpdate = lastPendingUpdate;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (firstBaseUpdate !== null) {\n // Iterate through the list of updates to compute the result.\n var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n // from the original lanes.\n\n var newLanes = NoLanes;\n var newBaseState = null;\n var newFirstBaseUpdate = null;\n var newLastBaseUpdate = null;\n var update = firstBaseUpdate;\n\n do {\n var updateLane = update.lane;\n var updateEventTime = update.eventTime;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n eventTime: updateEventTime,\n lane: updateLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLastBaseUpdate === null) {\n newFirstBaseUpdate = newLastBaseUpdate = clone;\n newBaseState = newState;\n } else {\n newLastBaseUpdate = newLastBaseUpdate.next = clone;\n } // Update the remaining priority in the queue.\n\n\n newLanes = mergeLanes(newLanes, updateLane);\n } else {\n // This update does have sufficient priority.\n if (newLastBaseUpdate !== null) {\n var _clone = {\n eventTime: updateEventTime,\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n } // Process this update.\n\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null) {\n workInProgress.flags |= Callback;\n var effects = queue.effects;\n\n if (effects === null) {\n queue.effects = [update];\n } else {\n effects.push(update);\n }\n }\n }\n\n update = update.next;\n\n if (update === null) {\n pendingQueue = queue.shared.pending;\n\n if (pendingQueue === null) {\n break;\n } else {\n // An update was scheduled from inside a reducer. Add the new\n // pending updates to the end of the list and keep processing.\n var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n // unravel them when transferring them to the base queue.\n\n var _firstPendingUpdate = _lastPendingUpdate.next;\n _lastPendingUpdate.next = null;\n update = _firstPendingUpdate;\n queue.lastBaseUpdate = _lastPendingUpdate;\n queue.shared.pending = null;\n }\n }\n } while (true);\n\n if (newLastBaseUpdate === null) {\n newBaseState = newState;\n }\n\n queue.baseState = newBaseState;\n queue.firstBaseUpdate = newFirstBaseUpdate;\n queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.\n // This should be fine because the only two other things that contribute to\n // expiration time are props and context. We're already in the middle of the\n // begin phase by the time we start processing the queue, so we've already\n // dealt with the props. Context in components that specify\n // shouldComponentUpdate is tricky; but we'll have to account for\n // that regardless.\n\n markSkippedUpdateLanes(newLanes);\n workInProgress.lanes = newLanes;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n}\n\nfunction callCallback(callback, context) {\n if (!(typeof callback === 'function')) {\n {\n throw Error( \"Invalid argument passed as callback. Expected a function. Instead received: \" + callback );\n }\n }\n\n callback.call(context);\n}\n\nfunction resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n}\nfunction checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n}\nfunction commitUpdateQueue(finishedWork, finishedQueue, instance) {\n // Commit the effects\n var effects = finishedQueue.effects;\n finishedQueue.effects = null;\n\n if (effects !== null) {\n for (var i = 0; i < effects.length; i++) {\n var effect = effects[i];\n var callback = effect.callback;\n\n if (callback !== null) {\n effect.callback = null;\n callCallback(callback, instance);\n }\n }\n }\n}\n\nvar fakeInternalInstance = {};\nvar isArray = Array.isArray; // React.Component uses a shared frozen object by default.\n// We'll use it to determine whether we need to initialize legacy refs.\n\nvar emptyRefsObject = new React.Component().refs;\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\n\n{\n didWarnAboutStateAssignmentForComponent = new Set();\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n var didWarnOnInvalidCallback = new Set();\n\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + '_' + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n };\n\n warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentName(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }; // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n\n\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n {\n {\n throw Error( \"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).\" );\n }\n }\n }\n });\n Object.freeze(fakeInternalInstance);\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n getDerivedStateFromProps(nextProps, prevState);\n } finally {\n reenableLogs();\n }\n }\n }\n\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);\n workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n // base state.\n\n if (workInProgress.lanes === NoLanes) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n}\nvar classComponentUpdater = {\n isMounted: isMounted,\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'setState');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ReplaceState;\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'replaceState');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n },\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ForceUpdate;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'forceUpdate');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n }\n};\n\nfunction checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n\n if (typeof instance.shouldComponentUpdate === 'function') {\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n instance.shouldComponentUpdate(newProps, newState, nextContext);\n } finally {\n reenableLogs();\n }\n }\n }\n\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n\n {\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');\n }\n }\n\n return shouldUpdate;\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n}\n\nfunction checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n\n {\n var name = getComponentName(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var _state = instance.state;\n\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction adoptClassInstance(workInProgress, instance) {\n instance.updater = classComponentUpdater;\n workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n set(instance, workInProgress);\n\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n}\n\nfunction constructClassInstance(workInProgress, ctor, props) {\n var isLegacyContextConsumer = false;\n var unmaskedContext = emptyContextObject;\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n var contextTypes = ctor.contextTypes;\n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n } // Instantiate twice to help detect side-effects.\n\n\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n new ctor(props, context); // eslint-disable-line no-new\n } finally {\n reenableLogs();\n }\n }\n }\n\n var instance = new ctor(props, context);\n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n adoptClassInstance(workInProgress, instance);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentName(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n 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 : '');\n }\n }\n }\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n\n if (isLegacyContextConsumer) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n}\n\nfunction callComponentWillMount(workInProgress, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentName(workInProgress.type) || 'Component';\n\n if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n didWarnAboutStateAssignmentForComponent.add(componentName);\n\n error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n }\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = emptyRefsObject;\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n {\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n }\n\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n instance.state = workInProgress.memoizedState;\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n var oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n} // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\nfunction updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var unresolvedOldProps = workInProgress.memoizedProps;\n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n instance.props = oldProps;\n var unresolvedNewProps = workInProgress.pendingProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n }\n\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.flags |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.flags |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n}\n\nvar didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\n\nvar warnForMissingKey = function (child, returnFiber) {};\n\n{\n didWarnAboutMaps = false;\n didWarnAboutGenerators = false;\n didWarnAboutStringRefs = {};\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n ownerHasKeyUseWarning = {};\n ownerHasFunctionTypeWarning = {};\n\n warnForMissingKey = function (child, returnFiber) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n\n if (!(typeof child._store === 'object')) {\n {\n throw Error( \"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n child._store.validated = true;\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (ownerHasKeyUseWarning[componentName]) {\n return;\n }\n\n ownerHasKeyUseWarning[componentName] = true;\n\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n };\n}\n\nvar isArray$1 = Array.isArray;\n\nfunction coerceRef(returnFiber, current, element) {\n var mixedRef = element.ref;\n\n if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n {\n // TODO: Clean this up once we turn on the string ref warning for\n // everyone, because the strict mode case will no longer be relevant\n if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs\n // because these cannot be automatically converted to an arrow function\n // using a codemod. Therefore, we don't have to warn about string refs again.\n !(element._owner && element._self && element._owner.stateNode !== element._self)) {\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n {\n 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);\n }\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n\n if (element._owner) {\n var owner = element._owner;\n var inst;\n\n if (owner) {\n var ownerFiber = owner;\n\n if (!(ownerFiber.tag === ClassComponent)) {\n {\n 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\" );\n }\n }\n\n inst = ownerFiber.stateNode;\n }\n\n if (!inst) {\n {\n throw Error( \"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n return current.ref;\n }\n\n var ref = function (value) {\n var refs = inst.refs;\n\n if (refs === emptyRefsObject) {\n // This is a lazy pooled frozen object, so we need to initialize.\n refs = inst.refs = {};\n }\n\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n\n ref._stringRef = stringRef;\n return ref;\n } else {\n if (!(typeof mixedRef === 'string')) {\n {\n throw Error( \"Expected ref to be a function, a string, an object returned by React.createRef(), or null.\" );\n }\n }\n\n if (!element._owner) {\n {\n 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.\" );\n }\n }\n }\n }\n\n return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n if (returnFiber.type !== 'textarea') {\n {\n {\n 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.\" );\n }\n }\n }\n}\n\nfunction warnOnFunctionType(returnFiber) {\n {\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (ownerHasFunctionTypeWarning[componentName]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[componentName] = true;\n\n 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.');\n }\n} // We avoid inlining this to avoid potential deopts from using try/catch.\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\n\n\nfunction ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n 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.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = ChildReconciler(true);\nvar mountChildFibers = ChildReconciler(false);\nfunction cloneChildFibers(current, workInProgress) {\n if (!(current === null || workInProgress.child === current.child)) {\n {\n throw Error( \"Resuming work not yet implemented.\" );\n }\n }\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n\n newChild.sibling = null;\n} // Reset a workInProgress child set to prepare it for a second pass.\n\nfunction resetChildFibers(workInProgress, lanes) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, lanes);\n child = child.sibling;\n }\n}\n\nvar NO_CONTEXT = {};\nvar contextStackCursor$1 = createCursor(NO_CONTEXT);\nvar contextFiberStackCursor = createCursor(NO_CONTEXT);\nvar rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\nfunction requiredContext(c) {\n if (!(c !== NO_CONTEXT)) {\n {\n throw Error( \"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n return c;\n}\n\nfunction getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n}\n\nfunction pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n // However, we can't just call getRootHostContext() and push it because\n // we'd have a different number of entries on the stack depending on\n // whether getRootHostContext() throws somewhere in renderer code or not.\n // So we push an empty value first. This lets us safely unwind on errors.\n\n push(contextStackCursor$1, NO_CONTEXT, fiber);\n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n pop(contextStackCursor$1, fiber);\n push(contextStackCursor$1, nextRootContext, fiber);\n}\n\nfunction popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n}\n\nfunction getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\n}\n\nfunction pushHostContext(fiber) {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n var context = requiredContext(contextStackCursor$1.current);\n var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n if (context === nextContext) {\n return;\n } // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\n}\n\nfunction popHostContext(fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n if (contextFiberStackCursor.current !== fiber) {\n return;\n }\n\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n}\n\nvar DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is\n// inherited deeply down the subtree. The upper bits only affect\n// this immediate suspense boundary and gets reset each new\n// boundary or suspense list.\n\nvar SubtreeSuspenseContextMask = 1; // Subtree Flags:\n// InvisibleParentSuspenseContext indicates that one of our parent Suspense\n// boundaries is not currently showing visible main content.\n// Either because it is already showing a fallback or is not mounted at all.\n// We can use this to determine if it is desirable to trigger a fallback at\n// the parent. If not, then we might need to trigger undesirable boundaries\n// and/or suspend the commit to avoid hiding the parent content.\n\nvar InvisibleParentSuspenseContext = 1; // Shallow Flags:\n// ForceSuspenseFallback can be used by SuspenseList to force newly added\n// items into their fallback state during one of the render passes.\n\nvar ForceSuspenseFallback = 2;\nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);\nfunction hasSuspenseContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n}\nfunction setDefaultShallowSuspenseContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n}\nfunction setShallowSuspenseContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n}\nfunction addSubtreeSuspenseContext(parentContext, subtreeContext) {\n return parentContext | subtreeContext;\n}\nfunction pushSuspenseContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n}\nfunction popSuspenseContext(fiber) {\n pop(suspenseStackCursor, fiber);\n}\n\nfunction shouldCaptureSuspense(workInProgress, hasInvisibleParent) {\n // If it was the primary children that just suspended, capture and render the\n // fallback. Otherwise, don't capture and bubble to the next boundary.\n var nextState = workInProgress.memoizedState;\n\n if (nextState !== null) {\n if (nextState.dehydrated !== null) {\n // A dehydrated boundary always captures.\n return true;\n }\n\n return false;\n }\n\n var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.\n\n if (props.fallback === undefined) {\n return false;\n } // Regular boundaries always capture.\n\n\n if (props.unstable_avoidThisFallback !== true) {\n return true;\n } // If it's a boundary we should avoid, then we prefer to bubble up to the\n // parent boundary if it is currently invisible.\n\n\n if (hasInvisibleParent) {\n return false;\n } // If the parent is not able to handle it, we must handle it.\n\n\n return true;\n}\nfunction findFirstSuspended(row) {\n var node = row;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n var dehydrated = state.dehydrated;\n\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n // keep track of whether it suspended or not.\n node.memoizedProps.revealOrder !== undefined) {\n var didSuspend = (node.flags & DidCapture) !== NoFlags;\n\n if (didSuspend) {\n return node;\n }\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === row) {\n return null;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n\n return null;\n}\n\nvar NoFlags$1 =\n/* */\n0; // Represents whether effect should fire.\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Layout =\n/* */\n2;\nvar Passive$1 =\n/* */\n4;\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false;\n\nfunction enterHydrationState(fiber) {\n\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChild(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n return true;\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);\n break;\n\n case HostComponent:\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);\n break;\n }\n }\n\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,\n // these children are not part of the reconciliation list of children.\n // Even if we abort and rereconcile the children, that will try to hydrate\n // again and the nodes are still in the host tree so these will be\n // recreated.\n\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n fiber.flags = fiber.flags & ~Hydrating | Placement;\n\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n\n switch (fiber.tag) {\n case HostComponent:\n var type = fiber.type;\n var props = fiber.pendingProps;\n didNotFindHydratableContainerInstance(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableContainerTextInstance(parentContainer, text);\n break;\n }\n\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n switch (fiber.tag) {\n case HostComponent:\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);\n break;\n\n case HostText:\n var _text = fiber.pendingProps;\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);\n break;\n\n case SuspenseComponent:\n didNotFindHydratableSuspenseInstance(parentType, parentProps);\n break;\n }\n\n break;\n }\n\n default:\n return;\n }\n }\n}\n\nfunction tryHydrate(fiber, nextInstance) {\n switch (fiber.tag) {\n case HostComponent:\n {\n var type = fiber.type;\n var props = fiber.pendingProps;\n var instance = canHydrateInstance(nextInstance, type);\n\n if (instance !== null) {\n fiber.stateNode = instance;\n return true;\n }\n\n return false;\n }\n\n case HostText:\n {\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text);\n\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n return true;\n }\n\n return false;\n }\n\n case SuspenseComponent:\n {\n\n return false;\n }\n\n default:\n return false;\n }\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrate(fiber, nextInstance)) {\n // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n\n if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);\n }\n\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(nextInstance);\n}\n\nfunction prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n\n var instance = fiber.stateNode;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.\n\n fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update.\n\n if (updatePayload !== null) {\n return true;\n }\n\n return false;\n}\n\nfunction prepareToHydrateHostTextInstance(fiber) {\n\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n\n {\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);\n break;\n }\n }\n }\n }\n }\n\n return shouldUpdate;\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n {\n throw Error( \"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n}\n\nfunction popToNextHostParent(fiber) {\n var parent = fiber.return;\n\n while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n parent = parent.return;\n }\n\n hydrationParentFiber = parent;\n}\n\nfunction popHydrationState(fiber) {\n\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n }\n\n var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.\n // We only do this deeper than head and body since they tend to have random\n // other nodes in them. We also ignore components with pure text content in\n // side of them.\n // TODO: Better heuristic.\n\n if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n\n popToNextHostParent(fiber);\n\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n\n return true;\n}\n\nfunction resetHydrationState() {\n\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n}\n\nfunction getIsHydrating() {\n return isHydrating;\n}\n\n// and should be reset before starting a new render.\n// This tracks which mutable sources need to be reset after a render.\n\nvar workInProgressSources = [];\nvar rendererSigil$1;\n\n{\n // Used to detect multiple renderers using the same mutable source.\n rendererSigil$1 = {};\n}\n\nfunction markSourceAsDirty(mutableSource) {\n workInProgressSources.push(mutableSource);\n}\nfunction resetWorkInProgressVersions() {\n for (var i = 0; i < workInProgressSources.length; i++) {\n var mutableSource = workInProgressSources[i];\n\n {\n mutableSource._workInProgressVersionPrimary = null;\n }\n }\n\n workInProgressSources.length = 0;\n}\nfunction getWorkInProgressVersion(mutableSource) {\n {\n return mutableSource._workInProgressVersionPrimary;\n }\n}\nfunction setWorkInProgressVersion(mutableSource, version) {\n {\n mutableSource._workInProgressVersionPrimary = version;\n }\n\n workInProgressSources.push(mutableSource);\n}\nfunction warnAboutMultipleRenderersDEV(mutableSource) {\n {\n {\n if (mutableSource._currentPrimaryRenderer == null) {\n mutableSource._currentPrimaryRenderer = rendererSigil$1;\n } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {\n error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');\n }\n }\n }\n} // Eager reads the version of a mutable source and stores it on the root.\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\nvar didWarnAboutUseOpaqueIdentifier;\n\n{\n didWarnAboutUseOpaqueIdentifier = {};\n didWarnAboutMismatchedHooksForComponent = new Set();\n}\n\n// These are set right before calling the component.\nvar renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from\n// the work-in-progress hook.\n\nvar currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n// current hook list is the list that belongs to the current fiber. The\n// work-in-progress hook list is a new list that will be added to the\n// work-in-progress fiber.\n\nvar currentHook = null;\nvar workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n// does not get reset if we do another render pass; only when we're completely\n// finished evaluating this component. This is an optimization so we know\n// whether we need to clear render phase updates after a throw.\n\nvar didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This\n// gets reset after each attempt.\n// TODO: Maybe there's some way to consolidate this with\n// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\nvar didScheduleRenderPhaseUpdateDuringThisPass = false;\nvar RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n// The list stores the order of hooks used during the initial render (mount).\n// Subsequent renders (updates) reference this list.\n\nvar hookTypesDev = null;\nvar hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n// the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n// When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\nvar ignorePreviousDependencies = false;\n\nfunction mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n}\n\nfunction updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n}\n\nfunction checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !Array.isArray(deps)) {\n // Verify deps, but only on mount to avoid extra checks.\n // It's unlikely their type would change as usually you define them inline.\n error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n }\n }\n}\n\nfunction warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentName(currentlyRenderingFiber$1.type);\n\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\n\n for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n var oldHookName = hookTypesDev[i];\n var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n // lol @ IE not supporting String#repeat\n\n while (row.length < secondColumnStart) {\n row += ' ';\n }\n\n row += newHookName + '\\n';\n table += row;\n }\n\n 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);\n }\n }\n }\n}\n\nfunction throwInvalidHookError() {\n {\n {\n 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.\" );\n }\n }\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n {\n if (ignorePreviousDependencies) {\n // Only true when this component is being hot reloaded.\n return false;\n }\n }\n\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n }\n }\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber$1 = workInProgress;\n\n {\n hookTypesDev = current !== null ? current._debugHookTypes : null;\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = NoLanes; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // TODO Warn if no hooks are used at all during mount, then some are used during update.\n // Currently we will identify the update render as a mount because memoizedState === null.\n // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n // so memoizedState would be null during updates and mounts.\n\n {\n if (current !== null && current.memoizedState !== null) {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;\n } else if (hookTypesDev !== null) {\n // This dispatcher handles an edge case where a component is updating,\n // but no stateful hooks have been used.\n // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n // This dispatcher does that.\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n }\n\n var children = Component(props, secondArg); // Check if there was a render phase update\n\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\n // Keep rendering in a loop for as long as render phase updates continue to\n // be scheduled. Use a counter to prevent infinite loops.\n var numberOfReRenders = 0;\n\n do {\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n\n if (!(numberOfReRenders < RE_RENDER_LIMIT)) {\n {\n throw Error( \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\" );\n }\n }\n\n numberOfReRenders += 1;\n\n {\n // Even when hot reloading, allow dependencies to stabilize\n // after first render to prevent infinite render phase updates.\n ignorePreviousDependencies = false;\n } // Start over from the beginning of the list\n\n\n currentHook = null;\n workInProgressHook = null;\n workInProgress.updateQueue = null;\n\n {\n // Also validate hook order for cascading updates.\n hookTypesUpdateIndexDev = -1;\n }\n\n ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n } // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n\n\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n {\n workInProgress._debugHookTypes = hookTypesDev;\n } // This check uses currentHook so that it works the same in DEV and prod bundles.\n // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n\n var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n }\n\n didScheduleRenderPhaseUpdate = false;\n\n if (!!didRenderTooFewHooks) {\n {\n throw Error( \"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\" );\n }\n }\n\n return children;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.flags &= ~(Passive | Update);\n current.lanes = removeLanes(current.lanes, lanes);\n}\nfunction resetHooksAfterThrow() {\n // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n if (didScheduleRenderPhaseUpdate) {\n // There were render phase updates. These are only valid for this render\n // phase, which we are now aborting. Remove the updates from the queues so\n // they do not persist to the next render. Do not remove updates from hooks\n // that weren't processed.\n //\n // Only reset the updates from the queue if it has a clone. If it does\n // not have a clone, that means it wasn't processed, and the updates were\n // scheduled before we entered the render phase.\n var hook = currentlyRenderingFiber$1.memoizedState;\n\n while (hook !== null) {\n var queue = hook.queue;\n\n if (queue !== null) {\n queue.pending = null;\n }\n\n hook = hook.next;\n }\n\n didScheduleRenderPhaseUpdate = false;\n }\n\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n isUpdatingOpaqueValueInRenderPhase = false;\n }\n\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n}\n\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n } else {\n // Append to the end of the list\n workInProgressHook = workInProgressHook.next = hook;\n }\n\n return workInProgressHook;\n}\n\nfunction updateWorkInProgressHook() {\n // This function is used both for updates and for re-renders triggered by a\n // render phase update. It assumes there is either a current hook we can\n // clone, or a work-in-progress hook from a previous render pass that we can\n // use as a base. When we reach the end of the base list, we must switch to\n // the dispatcher used for mounts.\n var nextCurrentHook;\n\n if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n\n var nextWorkInProgressHook;\n\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\n }\n\n if (nextWorkInProgressHook !== null) {\n // There's already a work-in-progress. Reuse it.\n workInProgressHook = nextWorkInProgressHook;\n nextWorkInProgressHook = workInProgressHook.next;\n currentHook = nextCurrentHook;\n } else {\n // Clone from the current hook.\n if (!(nextCurrentHook !== null)) {\n {\n throw Error( \"Rendered more hooks than during the previous render.\" );\n }\n }\n\n currentHook = nextCurrentHook;\n var newHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list.\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n } else {\n // Append to the end of the list.\n workInProgressHook = workInProgressHook.next = newHook;\n }\n }\n\n return workInProgressHook;\n}\n\nfunction createFunctionComponentUpdateQueue() {\n return {\n lastEffect: null\n };\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n\n if (init !== undefined) {\n initialState = init(initialArg);\n } else {\n initialState = initialArg;\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error( \"Should have a queue. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n queue.lastRenderedReducer = reducer;\n var current = currentHook; // The last rebase update that is NOT part of the base state.\n\n var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n {\n if (current.baseQueue !== baseQueue) {\n // Internal invariant that should never happen, but feasibly could in\n // the future if we implement resuming, or some form of that.\n error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n }\n }\n\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n\n if (baseQueue !== null) {\n // We have a queue to process.\n var first = baseQueue.next;\n var newState = current.baseState;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n var update = first;\n\n do {\n var updateLane = update.lane;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n lane: updateLane,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n markSkippedUpdateLanes(updateLane);\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Process this update.\n\n\n if (update.eagerReducer === reducer) {\n // If this update was processed eagerly, and its reducer matches the\n // current reducer, we can use the eagerly computed state.\n newState = update.eagerState;\n } else {\n var action = update.action;\n newState = reducer(newState, action);\n }\n }\n\n update = update.next;\n } while (update !== null && update !== first);\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n } // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n }\n\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n}\n\nfunction rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error( \"Should have a queue. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n // work-in-progress hook.\n\n var dispatch = queue.dispatch;\n var lastRenderPhaseUpdate = queue.pending;\n var newState = hook.memoizedState;\n\n if (lastRenderPhaseUpdate !== null) {\n // The queue doesn't persist past this render pass.\n queue.pending = null;\n var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n newState = reducer(newState, action);\n update = update.next;\n } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n // the base state unless the queue is empty.\n // TODO: Not sure if this is the desired semantics, but it's what we\n // do for gDSFP. I can't remember why.\n\n if (hook.baseQueue === null) {\n hook.baseState = newState;\n }\n\n queue.lastRenderedState = newState;\n }\n\n return [newState, dispatch];\n}\n\nfunction readFromUnsubcribedMutableSource(root, source, getSnapshot) {\n {\n warnAboutMultipleRenderersDEV(source);\n }\n\n var getVersion = source._getVersion;\n var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?\n\n var isSafeToReadFromSource = false; // Check the version first.\n // If this render has already been started with a specific version,\n // we can use it alone to determine if we can safely read from the source.\n\n var currentRenderVersion = getWorkInProgressVersion(source);\n\n if (currentRenderVersion !== null) {\n // It's safe to read if the store hasn't been mutated since the last time\n // we read something.\n isSafeToReadFromSource = currentRenderVersion === version;\n } else {\n // If there's no version, then this is the first time we've read from the\n // source during the current render pass, so we need to do a bit more work.\n // What we need to determine is if there are any hooks that already\n // subscribed to the source, and if so, whether there are any pending\n // mutations that haven't been synchronized yet.\n //\n // If there are no pending mutations, then `root.mutableReadLanes` will be\n // empty, and we know we can safely read.\n //\n // If there *are* pending mutations, we may still be able to safely read\n // if the currently rendering lanes are inclusive of the pending mutation\n // lanes, since that guarantees that the value we're about to read from\n // the source is consistent with the values that we read during the most\n // recent mutation.\n isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);\n\n if (isSafeToReadFromSource) {\n // If it's safe to read from this source during the current render,\n // store the version in case other components read from it.\n // A changed version number will let those components know to throw and restart the render.\n setWorkInProgressVersion(source, version);\n }\n }\n\n if (isSafeToReadFromSource) {\n var snapshot = getSnapshot(source._source);\n\n {\n if (typeof snapshot === 'function') {\n error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');\n }\n }\n\n return snapshot;\n } else {\n // This handles the special case of a mutable source being shared between renderers.\n // In that case, if the source is mutated between the first and second renderer,\n // The second renderer don't know that it needs to reset the WIP version during unwind,\n // (because the hook only marks sources as dirty if it's written to their WIP version).\n // That would cause this tear check to throw again and eventually be visible to the user.\n // We can avoid this infinite loop by explicitly marking the source as dirty.\n //\n // This can lead to tearing in the first renderer when it resumes,\n // but there's nothing we can do about that (short of throwing here and refusing to continue the render).\n markSourceAsDirty(source);\n\n {\n {\n throw Error( \"Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\nfunction useMutableSource(hook, source, getSnapshot, subscribe) {\n var root = getWorkInProgressRoot();\n\n if (!(root !== null)) {\n {\n throw Error( \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\" );\n }\n }\n\n var getVersion = source._getVersion;\n var version = getVersion(source._source);\n var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const\n\n var _dispatcher$useState = dispatcher.useState(function () {\n return readFromUnsubcribedMutableSource(root, source, getSnapshot);\n }),\n currentSnapshot = _dispatcher$useState[0],\n setSnapshot = _dispatcher$useState[1];\n\n var snapshot = currentSnapshot; // Grab a handle to the state hook as well.\n // We use it to clear the pending update queue if we have a new source.\n\n var stateHook = workInProgressHook;\n var memoizedState = hook.memoizedState;\n var refs = memoizedState.refs;\n var prevGetSnapshot = refs.getSnapshot;\n var prevSource = memoizedState.source;\n var prevSubscribe = memoizedState.subscribe;\n var fiber = currentlyRenderingFiber$1;\n hook.memoizedState = {\n refs: refs,\n source: source,\n subscribe: subscribe\n }; // Sync the values needed by our subscription handler after each commit.\n\n dispatcher.useEffect(function () {\n refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,\n // but this hook recreates the queue in certain cases to avoid updates from stale sources.\n // handleChange() below needs to reference the dispatch function without re-subscribing,\n // so we use a ref to ensure that it always has the latest version.\n\n refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.\n\n var maybeNewVersion = getVersion(source._source);\n\n if (!objectIs(version, maybeNewVersion)) {\n var maybeNewSnapshot = getSnapshot(source._source);\n\n {\n if (typeof maybeNewSnapshot === 'function') {\n error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');\n }\n }\n\n if (!objectIs(snapshot, maybeNewSnapshot)) {\n setSnapshot(maybeNewSnapshot);\n var lane = requestUpdateLane(fiber);\n markRootMutableRead(root, lane);\n } // If the source mutated between render and now,\n // there may be state updates already scheduled from the old source.\n // Entangle the updates so that they render in the same batch.\n\n\n markRootEntangled(root, root.mutableReadLanes);\n }\n }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.\n\n dispatcher.useEffect(function () {\n var handleChange = function () {\n var latestGetSnapshot = refs.getSnapshot;\n var latestSetSnapshot = refs.setSnapshot;\n\n try {\n latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.\n\n var lane = requestUpdateLane(fiber);\n markRootMutableRead(root, lane);\n } catch (error) {\n // A selector might throw after a source mutation.\n // e.g. it might try to read from a part of the store that no longer exists.\n // In this case we should still schedule an update with React.\n // Worst case the selector will throw again and then an error boundary will handle it.\n latestSetSnapshot(function () {\n throw error;\n });\n }\n };\n\n var unsubscribe = subscribe(source._source, handleChange);\n\n {\n if (typeof unsubscribe !== 'function') {\n error('Mutable source subscribe function must return an unsubscribe function.');\n }\n }\n\n return unsubscribe;\n }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.\n //\n // If either the source or the subscription have changed we can't can't trust the update queue.\n // Maybe the source changed in a way that the old subscription ignored but the new one depends on.\n //\n // If the getSnapshot function changed, we also shouldn't rely on the update queue.\n // It's possible that the underlying source was mutated between the when the last \"change\" event fired,\n // and when the current render (with the new getSnapshot function) is processed.\n //\n // In both cases, we need to throw away pending updates (since they are no longer relevant)\n // and treat reading from the source as we do in the mount case.\n\n if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {\n // Create a new queue and setState method,\n // So if there are interleaved updates, they get pushed to the older queue.\n // When this becomes current, the previous queue and dispatch method will be discarded,\n // including any interleaving updates that occur.\n var newQueue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: snapshot\n };\n newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);\n stateHook.queue = newQueue;\n stateHook.baseQueue = null;\n snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);\n stateHook.memoizedState = stateHook.baseState = snapshot;\n }\n\n return snapshot;\n}\n\nfunction mountMutableSource(source, getSnapshot, subscribe) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = {\n refs: {\n getSnapshot: getSnapshot,\n setSnapshot: null\n },\n source: source,\n subscribe: subscribe\n };\n return useMutableSource(hook, source, getSnapshot, subscribe);\n}\n\nfunction updateMutableSource(source, getSnapshot, subscribe) {\n var hook = updateWorkInProgressHook();\n return useMutableSource(hook, source, getSnapshot, subscribe);\n}\n\nfunction mountState(initialState) {\n var hook = mountWorkInProgressHook();\n\n if (typeof initialState === 'function') {\n // $FlowFixMe: Flow doesn't like mixed types\n initialState = initialState();\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateState(initialState) {\n return updateReducer(basicStateReducer);\n}\n\nfunction rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\n}\n\nfunction pushEffect(tag, create, destroy, deps) {\n var effect = {\n tag: tag,\n create: create,\n destroy: destroy,\n deps: deps,\n // Circular\n next: null\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var lastEffect = componentUpdateQueue.lastEffect;\n\n if (lastEffect === null) {\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var firstEffect = lastEffect.next;\n lastEffect.next = effect;\n effect.next = firstEffect;\n componentUpdateQueue.lastEffect = effect;\n }\n }\n\n return effect;\n}\n\nfunction mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n var ref = {\n current: initialValue\n };\n\n {\n Object.seal(ref);\n }\n\n hook.memoizedState = ref;\n return ref;\n}\n\nfunction updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);\n}\n\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var destroy = undefined;\n\n if (currentHook !== null) {\n var prevEffect = currentHook.memoizedState;\n destroy = prevEffect.destroy;\n\n if (nextDeps !== null) {\n var prevDeps = prevEffect.deps;\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n pushEffect(hookFlags, create, destroy, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n\n return mountEffectImpl(Update | Passive, Passive$1, create, deps);\n}\n\nfunction updateEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n\n return updateEffectImpl(Update | Passive, Passive$1, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n return mountEffectImpl(Update, Layout, create, deps);\n}\n\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n}\n\nfunction imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n\n var _inst = create();\n\n refCallback(_inst);\n return function () {\n refCallback(null);\n };\n } else if (ref !== null && ref !== undefined) {\n var refObject = ref;\n\n {\n if (!refObject.hasOwnProperty('current')) {\n error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n }\n }\n\n var _inst2 = create();\n\n refObject.current = _inst2;\n return function () {\n refObject.current = null;\n };\n }\n}\n\nfunction mountImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction updateImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n // The react-debug-hooks package injects its own implementation\n // so that e.g. DevTools can display custom hook values.\n}\n\nvar updateDebugValue = mountDebugValue;\n\nfunction mountCallback(callback, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction mountMemo(nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n // Assume these are defined. If they're not, areHookInputsEqual will warn.\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction mountDeferredValue(value) {\n var _mountState = mountState(value),\n prevValue = _mountState[0],\n setValue = _mountState[1];\n\n mountEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n}\n\nfunction updateDeferredValue(value) {\n var _updateState = updateState(),\n prevValue = _updateState[0],\n setValue = _updateState[1];\n\n updateEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n}\n\nfunction rerenderDeferredValue(value) {\n var _rerenderState = rerenderState(),\n prevValue = _rerenderState[0],\n setValue = _rerenderState[1];\n\n updateEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n}\n\nfunction startTransition(setPending, callback) {\n var priorityLevel = getCurrentPriorityLevel();\n\n {\n runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {\n setPending(true);\n });\n runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setPending(false);\n callback();\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n });\n }\n}\n\nfunction mountTransition() {\n var _mountState2 = mountState(false),\n isPending = _mountState2[0],\n setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`\n // never changes.\n\n\n var start = startTransition.bind(null, setPending);\n mountRef(start);\n return [start, isPending];\n}\n\nfunction updateTransition() {\n var _updateState2 = updateState(),\n isPending = _updateState2[0];\n\n var startRef = updateRef();\n var start = startRef.current;\n return [start, isPending];\n}\n\nfunction rerenderTransition() {\n var _rerenderState2 = rerenderState(),\n isPending = _rerenderState2[0];\n\n var startRef = updateRef();\n var start = startRef.current;\n return [start, isPending];\n}\n\nvar isUpdatingOpaqueValueInRenderPhase = false;\nfunction getIsUpdatingOpaqueValueInRenderPhaseInDEV() {\n {\n return isUpdatingOpaqueValueInRenderPhase;\n }\n}\n\nfunction warnOnOpaqueIdentifierAccessInDEV(fiber) {\n {\n // TODO: Should warn in effects and callbacks, too\n var name = getComponentName(fiber.type) || 'Unknown';\n\n if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {\n error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');\n\n didWarnAboutUseOpaqueIdentifier[name] = true;\n }\n }\n}\n\nfunction mountOpaqueIdentifier() {\n var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;\n\n if (getIsHydrating()) {\n var didUpgrade = false;\n var fiber = currentlyRenderingFiber$1;\n\n var readValue = function () {\n if (!didUpgrade) {\n // Only upgrade once. This works even inside the render phase because\n // the update is added to a shared queue, which outlasts the\n // in-progress render.\n didUpgrade = true;\n\n {\n isUpdatingOpaqueValueInRenderPhase = true;\n setId(makeId());\n isUpdatingOpaqueValueInRenderPhase = false;\n warnOnOpaqueIdentifierAccessInDEV(fiber);\n }\n }\n\n {\n {\n throw Error( \"The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.\" );\n }\n }\n };\n\n var id = makeOpaqueHydratingObject(readValue);\n var setId = mountState(id)[1];\n\n if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {\n currentlyRenderingFiber$1.flags |= Update | Passive;\n pushEffect(HasEffect | Passive$1, function () {\n setId(makeId());\n }, undefined, null);\n }\n\n return id;\n } else {\n var _id = makeId();\n\n mountState(_id);\n return _id;\n }\n}\n\nfunction updateOpaqueIdentifier() {\n var id = updateState()[0];\n return id;\n}\n\nfunction rerenderOpaqueIdentifier() {\n var id = rerenderState()[0];\n return id;\n}\n\nfunction dispatchAction(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n eagerReducer: null,\n eagerState: null,\n next: null\n }; // Append the update to the end of the list.\n\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n var alternate = fiber.alternate;\n\n if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n } else {\n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\n // The queue is currently empty, which means we can eagerly compute the\n // next state before entering the render phase. If the new state is the\n // same as the current state, we may be able to bail out entirely.\n var lastRenderedReducer = queue.lastRenderedReducer;\n\n if (lastRenderedReducer !== null) {\n var prevDispatcher;\n\n {\n prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n }\n\n try {\n var currentState = queue.lastRenderedState;\n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n // it, on the update object. If the reducer hasn't changed by the\n // time we enter the render phase, then the eager state can be used\n // without calling the reducer again.\n\n update.eagerReducer = lastRenderedReducer;\n update.eagerState = eagerState;\n\n if (objectIs(eagerState, currentState)) {\n // Fast path. We can bail out without scheduling React to re-render.\n // It's still possible that we'll need to rebase this update later,\n // if the component re-renders for a different reason and by that\n // time the reducer has changed.\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n }\n }\n }\n\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotScopedWithMatchingAct(fiber);\n warnIfNotCurrentlyActingUpdatesInDev(fiber);\n }\n }\n\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n }\n}\n\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useMutableSource: throwInvalidHookError,\n useOpaqueIdentifier: throwInvalidHookError,\n unstable_isNewReconciler: enableNewReconciler\n};\nvar HooksDispatcherOnMountInDEV = null;\nvar HooksDispatcherOnMountWithHookTypesInDEV = null;\nvar HooksDispatcherOnUpdateInDEV = null;\nvar HooksDispatcherOnRerenderInDEV = null;\nvar InvalidNestedHooksDispatcherOnMountInDEV = null;\nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;\nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n\n{\n var warnInvalidContextAccess = function () {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n };\n\n var warnInvalidHookAccess = function () {\n 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');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n mountHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n mountHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return updateOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return rerenderOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n}\n\nvar now$1 = Scheduler.unstable_now;\nvar commitTime = 0;\nvar profilerStartTime = -1;\n\nfunction getCommitTime() {\n return commitTime;\n}\n\nfunction recordCommitTime() {\n\n commitTime = now$1();\n}\n\nfunction startProfilerTimer(fiber) {\n\n profilerStartTime = now$1();\n\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now$1();\n }\n}\n\nfunction stopProfilerTimerIfRunning(fiber) {\n\n profilerStartTime = -1;\n}\n\nfunction stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n\n if (profilerStartTime >= 0) {\n var elapsedTime = now$1() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n\n profilerStartTime = -1;\n }\n}\n\nfunction transferActualDuration(fiber) {\n // Transfer time spent rendering these children so we don't lose it\n // after we rerender. This is used as a helper in special cases\n // where we should count the work of multiple passes.\n var child = fiber.child;\n\n while (child) {\n fiber.actualDuration += child.actualDuration;\n child = child.sibling;\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar didReceiveUpdate = false;\nvar didWarnAboutBadClass;\nvar didWarnAboutModulePatternComponent;\nvar didWarnAboutContextTypeOnFunctionComponent;\nvar didWarnAboutGetDerivedStateOnFunctionComponent;\nvar didWarnAboutFunctionRefs;\nvar didWarnAboutReassigningProps;\nvar didWarnAboutRevealOrder;\nvar didWarnAboutTailOptions;\n\n{\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);\n }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\n // This function is fork of reconcileChildren. It's used in cases where we\n // want to reconcile without matching against the existing set. This has the\n // effect of all current children being unmounted; even if the type and key\n // are the same, the old child is unmounted and a new child is created.\n //\n // To do this, we're going to go through the reconcile algorithm twice. In\n // the first pass, we schedule a deletion for all the current children by\n // passing null.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we\n // pass null in place of where we usually pass the current child set. This has\n // the effect of remounting all children regardless of whether their\n // identities match.\n\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens after the first render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n }\n\n var render = Component.render;\n var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n var nextChildren;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {\n if (current === null) {\n var type = Component.type;\n\n if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n Component.defaultProps === undefined) {\n var resolvedType = type;\n\n {\n resolvedType = resolveFunctionForHotReloading(type);\n } // If this is a plain function component without default props,\n // and with only the default shallow comparison, we upgrade it\n // to a SimpleMemoComponent to allow fast path updates.\n\n\n workInProgress.tag = SimpleMemoComponent;\n workInProgress.type = resolvedType;\n\n {\n validateFunctionComponentInDev(workInProgress, type);\n }\n\n return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);\n }\n\n {\n var innerPropTypes = type.propTypes;\n\n if (innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(type));\n }\n }\n\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n\n {\n var _type = Component.type;\n var _innerPropTypes = _type.propTypes;\n\n if (_innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(_type));\n }\n }\n\n var currentChild = current.child; // This is always exactly one child\n\n if (!includesSomeLane(updateLanes, renderLanes)) {\n // This will be the props with resolved defaultProps,\n // unlike current.memoizedProps which will be the unresolved ones.\n var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n var compare = Component.compare;\n compare = compare !== null ? compare : shallowEqual;\n\n if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n var newChild = createWorkInProgress(currentChild, nextProps);\n newChild.ref = workInProgress.ref;\n newChild.return = workInProgress;\n workInProgress.child = newChild;\n return newChild;\n}\n\nfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens when the inner render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var outerMemoType = workInProgress.elementType;\n\n if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n // We warn when you define propTypes on lazy()\n // so let's just skip over it to find memo() outer wrapper.\n // Inner props for memo are validated later.\n var lazyComponent = outerMemoType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n outerMemoType = init(payload);\n } catch (x) {\n outerMemoType = null;\n } // Inner propTypes will be validated in the function component path.\n\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentName(outerMemoType));\n }\n }\n }\n }\n\n if (current !== null) {\n var prevProps = current.memoizedProps;\n\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type )) {\n didReceiveUpdate = false;\n\n if (!includesSomeLane(renderLanes, updateLanes)) {\n // The pending lanes were cleared at the beginning of beginWork. We're\n // about to bail out, but there might be other lanes that weren't\n // included in the current render. Usually, the priority level of the\n // remaining updates is accumlated during the evaluation of the\n // component (i.e. when processing the update queue). But since since\n // we're bailing out early *without* evaluating the component, we need\n // to account for it here, too. Reset to the value of the current fiber.\n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n // because a MemoComponent fiber does not have hooks or an update queue;\n // rather, it wraps around an inner component, which may or may not\n // contains hooks.\n // TODO: Move the reset at in beginWork out of the common path so that\n // this is no longer necessary.\n workInProgress.lanes = current.lanes;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n}\n\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n var prevState = current !== null ? current.memoizedState : null;\n\n if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy sync mode, don't defer the subtree. Render it now.\n // TODO: Figure out what we should do in Blocking mode.\n var nextState = {\n baseLanes: NoLanes\n };\n workInProgress.memoizedState = nextState;\n pushRenderLanes(workInProgress, renderLanes);\n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n var nextBaseLanes;\n\n if (prevState !== null) {\n var prevBaseLanes = prevState.baseLanes;\n nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);\n } else {\n nextBaseLanes = renderLanes;\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n {\n markSpawnedWork(OffscreenLane);\n }\n\n workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);\n var _nextState = {\n baseLanes: nextBaseLanes\n };\n workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway\n // to avoid a push/pop misalignment.\n\n pushRenderLanes(workInProgress, nextBaseLanes);\n return null;\n } else {\n // Rendering at offscreen, so we can clear the base lanes.\n var _nextState2 = {\n baseLanes: NoLanes\n };\n workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.\n\n var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;\n pushRenderLanes(workInProgress, subtreeRenderLanes);\n }\n } else {\n var _subtreeRenderLanes;\n\n if (prevState !== null) {\n _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state\n\n workInProgress.memoizedState = null;\n } else {\n // We weren't previously hidden, and we still aren't, so there's nothing\n // special to do. Need to push to the stack regardless, though, to avoid\n // a push/pop misalignment.\n _subtreeRenderLanes = renderLanes;\n }\n\n pushRenderLanes(workInProgress, _subtreeRenderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n} // Note: These happen to have identical begin phases, for now. We shouldn't hold\n// ourselves to this constraint, though. If the behavior diverges, we should\n// fork the function.\n\n\nvar updateLegacyHiddenComponent = updateOffscreenComponent;\n\nfunction updateFragment(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderLanes) {\n {\n workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n\n if (current === null && ref !== null || current !== null && current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.flags |= Ref;\n }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n }\n\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n var nextChildren;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n } // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n if (current !== null) {\n // A class component without an instance only mounts if it suspended\n // inside a non-concurrent tree, in an inconsistent state. We want to\n // treat it like a new mount, even though an empty version of it already\n // committed. Disconnect the alternate pointers.\n current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n } // In the initial pass we might need to construct the instance.\n\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n shouldUpdate = true;\n } else if (current === null) {\n // In a resume, we'll already have an instance we can reuse.\n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n\n {\n var inst = workInProgress.stateNode;\n\n if (shouldUpdate && inst.props !== nextProps) {\n if (!didWarnAboutReassigningProps) {\n 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');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$1.current = workInProgress;\n var nextChildren;\n\n if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n // If we captured an error, but getDerivedStateFromError is not defined,\n // unmount all the children. componentDidCatch will schedule an update to\n // re-render a fallback. This is temporary until we migrate everyone to\n // the new API.\n // TODO: Warn in a future release.\n nextChildren = null;\n\n {\n stopProfilerTimerIfRunning();\n }\n } else {\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n instance.render();\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n if (current !== null && didCaptureError) {\n // If we're recovering from an error, reconcile without reusing any of\n // the existing children. Conceptually, the normal children and the children\n // that are shown on error are two different sets, so we shouldn't reuse\n // normal children even if their identities match.\n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n\n\n workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, true);\n }\n\n return workInProgress.child;\n}\n\nfunction pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n\n pushHostContainer(workInProgress, root.containerInfo);\n}\n\nfunction updateHostRoot(current, workInProgress, renderLanes) {\n pushHostRootContext(workInProgress);\n var updateQueue = workInProgress.updateQueue;\n\n if (!(current !== null && updateQueue !== null)) {\n {\n throw Error( \"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState !== null ? prevState.element : null;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n var nextChildren = nextState.element;\n\n if (nextChildren === prevChildren) {\n resetHydrationState();\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var root = workInProgress.stateNode;\n\n if (root.hydrate && enterHydrationState(workInProgress)) {\n // If we don't have any current children this might be the first pass.\n // We always try to hydrate. If this isn't a hydration pass there won't\n // be any children to hydrate which is effectively the same thing as\n // not hydrating.\n {\n var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;\n\n if (mutableSourceEagerHydrationData != null) {\n for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {\n var mutableSource = mutableSourceEagerHydrationData[i];\n var version = mutableSourceEagerHydrationData[i + 1];\n setWorkInProgressVersion(mutableSource, version);\n }\n }\n }\n\n var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n workInProgress.child = child;\n var node = child;\n\n while (node) {\n // Mark each child as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n node.flags = node.flags & ~Placement | Hydrating;\n node = node.sibling;\n }\n } else {\n // Otherwise reset hydration state in case we aborted and resumed another\n // root.\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n resetHydrationState();\n }\n\n return workInProgress.child;\n}\n\nfunction updateHostComponent(current, workInProgress, renderLanes) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n var type = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n var prevProps = current !== null ? current.memoizedProps : null;\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also has access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.flags |= ContentReset;\n }\n\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostText(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n } // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n\n\n return null;\n}\n\nfunction mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) {\n if (_current !== null) {\n // A lazy component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n\n var props = workInProgress.pendingProps;\n var lazyComponent = elementType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\n\n switch (resolvedTag) {\n case FunctionComponent:\n {\n {\n validateFunctionComponentInDev(workInProgress, Component);\n workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n }\n\n child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case MemoComponent:\n {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = Component.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n 'prop', getComponentName(Component));\n }\n }\n }\n\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n updateLanes, renderLanes);\n return child;\n }\n }\n\n var hint = '';\n\n {\n if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n hint = ' Did you wrap a component in React.lazy() more than once?';\n }\n } // This message intentionally doesn't mention ForwardRef or MemoComponent\n // because the fact that it's a separate type of work is an\n // implementation detail.\n\n\n {\n {\n throw Error( \"Element type is invalid. Received a promise that resolves to: \" + Component + \". Lazy element type must resolve to a class or function.\" + hint );\n }\n }\n}\n\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n if (_current !== null) {\n // An incomplete component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n } // Promote the fiber to a class and try rendering again.\n\n\n workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n if (_current !== null) {\n // An indeterminate component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n\n var props = workInProgress.pendingProps;\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var value;\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$1.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n 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.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n 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);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n } // Proceed under the assumption that this is a class instance\n\n\n workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext = false;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);\n }\n\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n\n {\n\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n }\n\n reconcileChildren(null, workInProgress, value, renderLanes);\n\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n\n return workInProgress.child;\n }\n}\n\nfunction validateFunctionComponentInDev(workInProgress, Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = ownerName || workInProgress._debugID || '';\n var debugSource = workInProgress._debugSource;\n\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n }\n\n if (!didWarnAboutFunctionRefs[warningKey]) {\n didWarnAboutFunctionRefs[warningKey] = true;\n\n error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n retryLane: NoLane\n};\n\nfunction mountSuspenseOffscreenState(renderLanes) {\n return {\n baseLanes: renderLanes\n };\n}\n\nfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n return {\n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)\n };\n} // TODO: Probably should inline this back\n\n\nfunction shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {\n // If we're already showing a fallback, there are cases where we need to\n // remain on that fallback regardless of whether the content has resolved.\n // For example, SuspenseList coordinates when nested content appears.\n if (current !== null) {\n var suspenseState = current.memoizedState;\n\n if (suspenseState === null) {\n // Currently showing content. Don't hide it, even if ForceSuspenseFallack\n // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n // Note: This is a factoring smell. Can't remain on a fallback if there's\n // no fallback to remain on.\n return false;\n }\n } // Not currently showing content. Consult the Suspense context.\n\n\n return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n}\n\nfunction getRemainingWorkInPrimaryTree(current, renderLanes) {\n // TODO: Should not remove render lanes that were pinged during this render\n return removeLanes(current.childLanes, renderLanes);\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.flags |= DidCapture;\n }\n }\n\n var suspenseContext = suspenseStackCursor.current;\n var showFallback = false;\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n showFallback = true;\n workInProgress.flags &= ~DidCapture;\n } else {\n // Attempting the main content\n if (current === null || current.memoizedState !== null) {\n // This is a new mount or this boundary is already showing a fallback state.\n // Mark this subtree context as having at least one invisible parent that could\n // handle the fallback state.\n // Boundaries without fallbacks or should be avoided are not considered since\n // they cannot handle preferred fallback states.\n if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {\n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n }\n }\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense\n // boundary's children. This involves some custom reconcilation logic. Two\n // main reasons this is so complicated.\n //\n // First, Legacy Mode has different semantics for backwards compatibility. The\n // primary tree will commit in an inconsistent state, so when we do the\n // second pass to render the fallback, we do some exceedingly, uh, clever\n // hacks to make that not totally break. Like transferring effects and\n // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n // because we bailout on the primary tree completely and leave it in its old\n // state, no effects. Same as what we do for Offscreen (except that\n // Offscreen doesn't have the first render pass).\n //\n // Second is hydration. During hydration, the Suspense fiber has a slightly\n // different layout, where the child points to a dehydrated fragment, which\n // contains the DOM rendered by the server.\n //\n // Third, even if you set all that aside, Suspense is like error boundaries in\n // that we first we try to render one tree, and if that fails, we render again\n // and switch to a different tree. Like a try/catch block. So we have to track\n // which branch we're currently rendering. Ideally we would model this using\n // a stack.\n\n if (current === null) {\n // Initial mount\n // If we're currently hydrating, try to hydrate this boundary.\n // But only if this has a fallback.\n if (nextProps.fallback !== undefined) {\n tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n }\n\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n\n if (showFallback) {\n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var primaryChildFragment = workInProgress.child;\n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackFragment;\n } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {\n // This is a CPU-bound tree. Skip this tree and show a placeholder to\n // unblock the surrounding content. Then immediately retry after the\n // initial commit.\n var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n\n var _primaryChildFragment = workInProgress.child;\n _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to\n // get it started back up to attempt the next item. While in terms of\n // priority this work has the same priority as this current render, it's\n // not part of the same transition once the transition has committed. If\n // it's sync, we still want to yield so that it can be painted.\n // Conceptually, this is really the same as pinging. We can use any\n // RetryLane even if it's the one currently rendering since we're leaving\n // it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n\n {\n markSpawnedWork(SomeRetryLane);\n }\n\n return _fallbackFragment;\n } else {\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);\n }\n } else {\n // This is an update.\n // If the current fiber has a SuspenseState, that means it's already showing\n // a fallback.\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n\n if (showFallback) {\n var _nextFallbackChildren2 = nextProps.fallback;\n var _nextPrimaryChildren2 = nextProps.children;\n\n var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);\n\n var _primaryChildFragment3 = workInProgress.child;\n var prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return _fallbackChildFragment;\n } else {\n var _nextPrimaryChildren3 = nextProps.children;\n\n var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment4;\n }\n } else {\n // The current tree is not already showing a fallback.\n if (showFallback) {\n // Timed out.\n var _nextFallbackChildren3 = nextProps.fallback;\n var _nextPrimaryChildren4 = nextProps.children;\n\n var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);\n\n var _primaryChildFragment5 = workInProgress.child;\n var _prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);\n _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return _fallbackChildFragment2;\n } else {\n // Still haven't timed out. Continue rendering the children, like we\n // normally do.\n var _nextPrimaryChildren5 = nextProps.children;\n\n var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment6;\n }\n }\n }\n}\n\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n var mode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);\n primaryChildFragment.return = workInProgress;\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n var fallbackChildFragment;\n\n if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if ( workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = 0;\n primaryChildFragment.treeBaseDuration = 0;\n }\n\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n } else {\n primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n }\n\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction createWorkInProgressOffscreenFiber(current, offscreenProps) {\n // The props argument to `createWorkInProgress` is `any` typed, so we use this\n // wrapper function to constrain it.\n return createWorkInProgress(current, offscreenProps);\n}\n\nfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n mode: 'visible',\n children: primaryChildren\n });\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n primaryChildFragment.lanes = renderLanes;\n }\n\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = null;\n\n if (currentFallbackChildFragment !== null) {\n // Delete the fallback child fragment\n currentFallbackChildFragment.nextEffect = null;\n currentFallbackChildFragment.flags = Deletion;\n workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;\n }\n\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n\n if ( // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n // already cloned. In legacy mode, the only case where this isn't true is\n // when DevTools forces us to display a fallback; we skip the first render\n // pass entirely and go straight to rendering the fallback. (In Concurrent\n // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n // only codepath.)\n workInProgress.child !== currentPrimaryChildFragment) {\n var progressedPrimaryFragment = workInProgress.child;\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if ( workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n } // The fallback fiber was added as a deletion effect during the first pass.\n // However, since we're going to remain on the fallback, we no longer want\n // to delete it. So we need to remove it from the list. Deletions are stored\n // on the same list as effects. We want to keep the effects from the primary\n // tree. So we copy the primary child fragment's effect list, which does not\n // include the fallback deletion effect.\n\n\n var progressedLastEffect = primaryChildFragment.lastEffect;\n\n if (progressedLastEffect !== null) {\n workInProgress.firstEffect = primaryChildFragment.firstEffect;\n workInProgress.lastEffect = progressedLastEffect;\n progressedLastEffect.nextEffect = null;\n } else {\n // TODO: Reset this somewhere else? Lol legacy mode is so weird.\n workInProgress.firstEffect = workInProgress.lastEffect = null;\n }\n } else {\n primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);\n }\n\n var fallbackChildFragment;\n\n if (currentFallbackChildFragment !== null) {\n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n } else {\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n }\n\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction scheduleWorkOnFiber(fiber, renderLanes) {\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleWorkOnParentPath(fiber.return, renderLanes);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\n // Mark any Suspense boundaries with fallbacks as having work to do.\n // If they were previously forced into fallbacks, they may now be able\n // to unblock.\n var node = firstChild;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n scheduleWorkOnFiber(node, renderLanes);\n }\n } else if (node.tag === SuspenseListComponent) {\n // If the tail is hidden there might not be an Suspense boundaries\n // to schedule work on. In this case we have to schedule it on the\n // list itself.\n // We don't have to traverse to the children of the list since\n // the list will propagate the change when it rerenders.\n scheduleWorkOnFiber(node, renderLanes);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction findLastContentRow(firstChild) {\n // This is going to find the last row among these children that is already\n // showing content on the screen, as opposed to being in fallback state or\n // new. If a row has multiple Suspense boundaries, any of them being in the\n // fallback state, counts as the whole row being in a fallback state.\n // Note that the \"rows\" will be workInProgress, but any nested children\n // will still be current since we haven't rendered them yet. The mounted\n // order may not be the same as the new order. We use the new order.\n var row = firstChild;\n var lastContentRow = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n lastContentRow = row;\n }\n\n row = row.sibling;\n }\n\n return lastContentRow;\n}\n\nfunction validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\n\n if (typeof revealOrder === 'string') {\n switch (revealOrder.toLowerCase()) {\n case 'together':\n case 'forwards':\n case 'backwards':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n case 'forward':\n case 'backward':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n default:\n error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n\n break;\n }\n } else {\n error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n }\n }\n }\n}\n\nfunction validateTailOptions(tailMode, revealOrder) {\n {\n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n }\n }\n }\n}\n\nfunction validateSuspenseListNestedChild(childSlot, index) {\n {\n var isArray = Array.isArray(childSlot);\n var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isArray || isIterable) {\n var type = isArray ? 'array' : 'iterable';\n\n error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n\n return false;\n }\n }\n\n return true;\n}\n\nfunction validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n if (!validateSuspenseListNestedChild(children[i], i)) {\n return;\n }\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\n }\n\n _i++;\n }\n }\n } else {\n error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n }\n }\n }\n }\n}\n\nfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode,\n lastEffect: lastEffectBeforeRendering\n };\n } else {\n // We can reuse the existing object from previous renders.\n renderState.isBackwards = isBackwards;\n renderState.rendering = null;\n renderState.renderingStartTime = 0;\n renderState.last = lastContentRow;\n renderState.tail = tail;\n renderState.tailMode = tailMode;\n renderState.lastEffect = lastEffectBeforeRendering;\n }\n} // This can end up rendering this component multiple passes.\n// The first pass splits the children fibers into two sets. A head and tail.\n// We first render the head. If anything is in fallback state, we do another\n// pass through beginWork to rerender all children (including the tail) with\n// the force suspend context. If the first render didn't have anything in\n// in fallback state. Then we render each row in the tail one-by-one.\n// That happens in the completeWork phase without going back to beginWork.\n\n\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}\n\nfunction updatePortalComponent(current, workInProgress, renderLanes) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\nfunction updateContextProvider(current, workInProgress, renderLanes) {\n var providerType = workInProgress.type;\n var context = providerType._context;\n var newProps = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps;\n var newValue = newProps.value;\n\n {\n if (!('value' in newProps)) {\n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n\n error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n }\n }\n\n var providerPropTypes = workInProgress.type.propTypes;\n\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n }\n }\n\n pushProvider(workInProgress, newValue);\n\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n var changedBits = calculateChangedBits(context, newValue, oldValue);\n\n if (changedBits === 0) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, changedBits, renderLanes);\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingContextAsConsumer = false;\n\nfunction updateContextConsumer(current, workInProgress, renderLanes) {\n var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n\n var newProps = workInProgress.pendingProps;\n var render = newProps.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var newValue = readContext(context, newProps.unstable_observedBits);\n var newChildren;\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n\n markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\n // The children don't have any work either. We can skip them.\n // TODO: Once we add back resuming, we should check if the children are\n // a work-in-progress set. If so, we need to transfer their effects.\n return null;\n } else {\n // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n }\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\n\n\n current.alternate = null;\n oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n newWorkInProgress.index = oldWorkInProgress.index;\n newWorkInProgress.sibling = oldWorkInProgress.sibling;\n newWorkInProgress.return = oldWorkInProgress.return;\n newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n if (oldWorkInProgress === returnFiber.child) {\n returnFiber.child = newWorkInProgress;\n } else {\n var prevSibling = returnFiber.child;\n\n if (prevSibling === null) {\n throw new Error('Expected parent to have a child.');\n }\n\n while (prevSibling.sibling !== oldWorkInProgress) {\n prevSibling = prevSibling.sibling;\n\n if (prevSibling === null) {\n throw new Error('Expected to find the previous sibling.');\n }\n }\n\n prevSibling.sibling = newWorkInProgress;\n } // Delete the old fiber and place the new one.\n // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = current;\n returnFiber.lastEffect = current;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = current;\n }\n\n current.nextEffect = null;\n current.flags = Deletion;\n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n}\n\nfunction beginWork(current, workInProgress, renderLanes) {\n var updateLanes = workInProgress.lanes;\n\n {\n if (workInProgress._debugNeedsRemount && current !== null) {\n // This will restart the begin phase with a new fiber.\n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));\n }\n }\n\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n\n if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:\n workInProgress.type !== current.type )) {\n // If props or context changed, mark the fiber as having performed work.\n // This may be unset if the props are determined to be equal later (memo).\n didReceiveUpdate = true;\n } else if (!includesSomeLane(renderLanes, updateLanes)) {\n didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering\n // the begin phase. There's still some bookkeeping we that needs to be done\n // in this optimized path, mostly pushing stuff onto the stack.\n\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n resetHydrationState();\n break;\n\n case HostComponent:\n pushHostContext(workInProgress);\n break;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n\n break;\n }\n\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n pushProvider(workInProgress, newValue);\n break;\n }\n\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (hasChildWork) {\n workInProgress.flags |= Update;\n } // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n\n\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n // whether to retry the primary children, or to skip over it and\n // go straight to the fallback. Check the priority of the primary\n // child fragment.\n\n\n var primaryChildFragment = workInProgress.child;\n var primaryChildLanes = primaryChildFragment.childLanes;\n\n if (includesSomeLane(renderLanes, primaryChildLanes)) {\n // The primary children have pending work. Use the normal path\n // to attempt to render the primary children again.\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n } else {\n // The primary child fragment does not have pending work marked\n // on it\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient\n // priority. Bailout.\n\n var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n\n if (child !== null) {\n // The fallback children have pending work. Skip over the\n // primary children and work on the fallback.\n return child.sibling;\n } else {\n return null;\n }\n }\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n }\n\n break;\n }\n\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;\n\n var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (didSuspendBefore) {\n if (_hasChildWork) {\n // If something was in fallback state last time, and we have all the\n // same children then we're still in progressive loading state.\n // Something might get unblocked by state updates or retries in the\n // tree which will affect the tail. So we need to use the normal\n // path to compute the correct tail.\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n } // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n\n\n workInProgress.flags |= DidCapture;\n } // If nothing suspended before and we're rendering the same children,\n // then the tail doesn't matter. Anything new that suspends will work\n // in the \"together\" mode, so we can continue from the state we had.\n\n\n var renderState = workInProgress.memoizedState;\n\n if (renderState !== null) {\n // Reset to the \"together\" mode in case we've started a different\n // update in the past but didn't complete it.\n renderState.rendering = null;\n renderState.tail = null;\n renderState.lastEffect = null;\n }\n\n pushSuspenseContext(workInProgress, suspenseStackCursor.current);\n\n if (_hasChildWork) {\n break;\n } else {\n // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n return null;\n }\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n // Need to check if the tree still needs to be deferred. This is\n // almost identical to the logic used in the normal update path,\n // so we'll just enter that. The only difference is we'll bail out\n // at the next level instead of this one, because the child props\n // have not changed. Which is fine.\n // TODO: Probably should refactor `beginWork` to split the bailout\n // path from the normal path. I'm tempted to do a labeled break here\n // but I won't :)\n workInProgress.lanes = NoLanes;\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else {\n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n } else {\n // An update was scheduled on this fiber, but there are no new props\n // nor legacy context. Set this to false. If an update queue or context\n // consumer produces a changed value, it will set this to true. Otherwise,\n // the component will assume the children have not changed and bail out.\n didReceiveUpdate = false;\n }\n }\n } else {\n didReceiveUpdate = false;\n } // Before entering the begin phase, clear pending update priority.\n // TODO: This assumes that we're about to evaluate the component and process\n // the update queue. However, there's an exception: SimpleMemoComponent\n // sometimes bails out later in the begin phase. This indicates that we should\n // move this assignment out of the common path and into each branch.\n\n\n workInProgress.lanes = NoLanes;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);\n }\n\n case FunctionComponent:\n {\n var _Component = workInProgress.type;\n var unresolvedProps = workInProgress.pendingProps;\n var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);\n return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);\n }\n\n case ClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderLanes);\n\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderLanes);\n\n case HostText:\n return updateHostText(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderLanes);\n\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderLanes);\n\n case Mode:\n return updateMode(current, workInProgress, renderLanes);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderLanes);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderLanes);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderLanes);\n\n case MemoComponent:\n {\n var _type2 = workInProgress.type;\n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = _type2.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n 'prop', getComponentName(_type2));\n }\n }\n }\n\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);\n }\n\n case IncompleteClassComponent:\n {\n var _Component3 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n }\n\n case FundamentalComponent:\n {\n\n break;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case Block:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n\n case LegacyHiddenComponent:\n {\n return updateLegacyHiddenComponent(current, workInProgress, renderLanes);\n }\n }\n\n {\n {\n throw Error( \"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.flags |= Update;\n}\n\nfunction markRef$1(workInProgress) {\n workInProgress.flags |= Ref;\n}\n\nvar appendAllChildren;\nvar updateHostContainer;\nvar updateHostComponent$1;\nvar updateHostText$1;\n\n{\n // Mutation mode\n appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n };\n\n updateHostContainer = function (workInProgress) {// Noop\n };\n\n updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n\n if (oldProps === newProps) {\n // In mutation mode, this is sufficient for a bailout because\n // we won't touch this node even if children changed.\n return;\n } // If we get updated because one of our children updated, we don't\n // have newProps so we'll have to reuse them.\n // TODO: Split the update API as separate for the props vs. children.\n // Even better would be if children weren't special cased at all tho.\n\n\n var instance = workInProgress.stateNode;\n var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host\n // component is hitting the resume path. Figure out why. Possibly\n // related to `hidden`.\n\n var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.\n\n workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update. All the work is done in commitWork.\n\n if (updatePayload) {\n markUpdate(workInProgress);\n }\n };\n\n updateHostText$1 = function (current, workInProgress, oldText, newText) {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n };\n}\n\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (getIsHydrating()) {\n // If we're hydrating, we should consume as many items as we can\n // so we don't leave any behind.\n return;\n }\n\n switch (renderState.tailMode) {\n case 'hidden':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var tailNode = renderState.tail;\n var lastTailNode = null;\n\n while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (lastTailNode === null) {\n // All remaining items in the tail are insertions.\n renderState.tail = null;\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n lastTailNode.sibling = null;\n }\n\n break;\n }\n\n case 'collapsed':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var _tailNode = renderState.tail;\n var _lastTailNode = null;\n\n while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (_lastTailNode === null) {\n // All remaining items in the tail are insertions.\n if (!hasRenderedATailFallback && renderState.tail !== null) {\n // We suspended during the head. We want to show at least one\n // row at the tail. So we'll keep on and cut off the rest.\n renderState.tail.sibling = null;\n } else {\n renderState.tail = null;\n }\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n _lastTailNode.sibling = null;\n }\n\n break;\n }\n }\n}\n\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case LazyComponent:\n case SimpleMemoComponent:\n case FunctionComponent:\n case ForwardRef:\n case Fragment:\n case Mode:\n case Profiler:\n case ContextConsumer:\n case MemoComponent:\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var fiberRoot = workInProgress.stateNode;\n\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n var wasHydrated = popHydrationState(workInProgress);\n\n if (wasHydrated) {\n // If we hydrated, then we'll need to schedule an update for\n // the commit side-effects on the root.\n markUpdate(workInProgress);\n } else if (!fiberRoot.hydrate) {\n // Schedule an effect to clear this container at the start of the next commit.\n // This handles the case of React rendering into a container with previous children.\n // It's also safe to do for updates too, because current.child would only be null\n // if the previous render was null (so the the container would already be empty).\n workInProgress.flags |= Snapshot;\n }\n }\n\n updateHostContainer(workInProgress);\n return null;\n }\n\n case HostComponent:\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var type = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);\n\n if (current.ref !== workInProgress.ref) {\n markRef$1(workInProgress);\n }\n } else {\n if (!newProps) {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error( \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // This can happen when we abort work.\n\n\n return null;\n }\n\n var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on whether we want to add them top->down or\n // bottom->up. Top->down is faster in IE11.\n\n var _wasHydrated = popHydrationState(workInProgress);\n\n if (_wasHydrated) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {\n // If changes to the hydrated node need to be applied at the\n // commit-phase we mark this as such.\n markUpdate(workInProgress);\n }\n } else {\n var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);\n appendAllChildren(instance, workInProgress, false, false);\n workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.\n // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n\n if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {\n markUpdate(workInProgress);\n }\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef$1(workInProgress);\n }\n }\n\n return null;\n }\n\n case HostText:\n {\n var newText = newProps;\n\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n\n updateHostText$1(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error( \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // This can happen when we abort work.\n\n }\n\n var _rootContainerInstance = getRootHostContainer();\n\n var _currentHostContext = getHostContext();\n\n var _wasHydrated2 = popHydrationState(workInProgress);\n\n if (_wasHydrated2) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n }\n }\n\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var nextState = workInProgress.memoizedState;\n\n if ((workInProgress.flags & DidCapture) !== NoFlags) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = false;\n\n if (current === null) {\n if (workInProgress.memoizedProps.fallback !== undefined) {\n popHydrationState(workInProgress);\n }\n } else {\n var prevState = current.memoizedState;\n prevDidTimeout = prevState !== null;\n }\n\n if (nextDidTimeout && !prevDidTimeout) {\n // If this subtreee is running in blocking mode we can suspend,\n // otherwise we won't suspend.\n // TODO: This will still suspend a synchronous tree if anything\n // in the concurrent tree already suspended during this render.\n // This is a known bug.\n if ((workInProgress.mode & BlockingMode) !== NoMode) {\n // TODO: Move this back to throwException because this is too late\n // if this is a large tree which is common for initial loads. We\n // don't know if we should restart a render or not until we get\n // this marker, and this is too late.\n // If this render already had a ping or lower pri updates,\n // and this is the first time we know we're going to suspend we\n // should be able to immediately restart from within throwException.\n var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;\n\n if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {\n // If this was in an invisible tree or a new render, then showing\n // this boundary is ok.\n renderDidSuspend();\n } else {\n // Otherwise, we're going to have to hide content so we should\n // suspend for longer if possible.\n renderDidSuspendDelayIfPossible();\n }\n }\n }\n\n {\n // TODO: Only schedule updates if these values are non equal, i.e. it changed.\n if (nextDidTimeout || prevDidTimeout) {\n // If this boundary just timed out, schedule an effect to attach a\n // retry listener to the promise. This flag is also used to hide the\n // primary children. In mutation mode, we also need the flag to\n // *unhide* children that were previously hidden, so check if this\n // is currently timed out, too.\n workInProgress.flags |= Update;\n }\n }\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(workInProgress);\n\n if (current === null) {\n preparePortalMount(workInProgress.stateNode.containerInfo);\n }\n\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n popProvider(workInProgress);\n return null;\n\n case IncompleteClassComponent:\n {\n // Same as class component case. I put it down here so that the tags are\n // sequential to ensure this switch is compiled to a jump table.\n var _Component = workInProgress.type;\n\n if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n return null;\n }\n\n var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;\n var renderedTail = renderState.rendering;\n\n if (renderedTail === null) {\n // We just rendered the head.\n if (!didSuspendAlready) {\n // This is the first pass. We need to figure out if anything is still\n // suspended in the rendered set.\n // If new content unsuspended, but there's still some content that\n // didn't. Then we need to do a second pass that forces everything\n // to keep showing their fallbacks.\n // We might be suspended if something in this render pass suspended, or\n // something in the previous committed pass suspended. Otherwise,\n // there's no chance so we can skip the expensive call to\n // findFirstSuspended.\n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);\n\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.flags |= DidCapture;\n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n // part of the second pass. In that case nothing will subscribe to\n // its thennables. Instead, we'll transfer its thennables to the\n // SuspenseList so that it can retry if they resolve.\n // There might be multiple of these in the list but since we're\n // going to wait for all of them anyway, it doesn't really matter\n // which ones gets to ping. In theory we could get clever and keep\n // track of how many dependencies remain but it gets tricky because\n // in the meantime, we can add/remove/change items and dependencies.\n // We might bail out of the loop before finding any but that\n // doesn't matter since that means that the other boundaries that\n // we did find already has their listeners attached.\n\n var newThennables = suspended.updateQueue;\n\n if (newThennables !== null) {\n workInProgress.updateQueue = newThennables;\n workInProgress.flags |= Update;\n } // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect list before doing the second pass since that's now invalid.\n\n\n if (renderState.lastEffect === null) {\n workInProgress.firstEffect = null;\n }\n\n workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.\n\n resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately\n // rerender the children.\n\n pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n\n if (renderState.tail !== null && now() > getRenderTargetTime()) {\n // We have already passed our CPU deadline but we still have rows\n // left in the tail. We'll just give up further attempts to render\n // the main content and only render fallbacks.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n\n {\n markSpawnedWork(SomeRetryLane);\n }\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n\n if (_suspended !== null) {\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n // get lost if this row ends up dropped during a second pass.\n\n var _newThennables = _suspended.updateQueue;\n\n if (_newThennables !== null) {\n workInProgress.updateQueue = _newThennables;\n workInProgress.flags |= Update;\n }\n\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n ) {\n // We need to delete the row we just rendered.\n // Reset the effect list to what it was before we rendered this\n // child. The nested children have already appended themselves.\n var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.\n\n if (lastEffect !== null) {\n lastEffect.nextEffect = null;\n } // We're done.\n\n\n return null;\n }\n } else if ( // The time it took to render last row is greater than the remaining\n // time we have to render. So rendering one more row would likely\n // exceed it.\n now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\n // We have now passed our CPU deadline and we'll just give up further\n // attempts to render the main content and only render fallbacks.\n // The assumption is that this is usually faster.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n\n {\n markSpawnedWork(SomeRetryLane);\n }\n }\n }\n\n if (renderState.isBackwards) {\n // The effect list of the backwards tail will have been added\n // to the end. This breaks the guarantee that life-cycles fire in\n // sibling order but that isn't a strong guarantee promised by React.\n // Especially since these might also just pop in during future commits.\n // Append to the beginning of the list.\n renderedTail.sibling = workInProgress.child;\n workInProgress.child = renderedTail;\n } else {\n var previousSibling = renderState.last;\n\n if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n\n renderState.last = renderedTail;\n }\n }\n\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n // Pop a row.\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\n renderState.lastEffect = workInProgress.lastEffect;\n renderState.renderingStartTime = now();\n next.sibling = null; // Restore the context.\n // TODO: We can probably just avoid popping it instead and only\n // setting it the first time we go from not suspended to suspended.\n\n var suspenseContext = suspenseStackCursor.current;\n\n if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n\n return next;\n }\n\n return null;\n }\n\n case FundamentalComponent:\n {\n\n break;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case Block:\n\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popRenderLanes(workInProgress);\n\n if (current !== null) {\n var _nextState = workInProgress.memoizedState;\n var _prevState = current.memoizedState;\n var prevIsHidden = _prevState !== null;\n var nextIsHidden = _nextState !== null;\n\n if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {\n workInProgress.flags |= Update;\n }\n }\n\n return null;\n }\n }\n\n {\n {\n throw Error( \"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction unwindWork(workInProgress, renderLanes) {\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n var flags = workInProgress.flags;\n\n if (flags & ShouldCapture) {\n workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var _flags = workInProgress.flags;\n\n if (!((_flags & DidCapture) === NoFlags)) {\n {\n throw Error( \"The root failed to unmount after an error. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n return workInProgress;\n }\n\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n\n var _flags2 = workInProgress.flags;\n\n if (_flags2 & ShouldCapture) {\n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n // caught by a nested boundary. If not, it should bubble through.\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n popProvider(workInProgress);\n return null;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(workInProgress);\n return null;\n\n default:\n return null;\n }\n}\n\nfunction unwindInterruptedWork(interruptedWork) {\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n\n break;\n }\n\n case HostRoot:\n {\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n resetWorkInProgressVersions();\n break;\n }\n\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n\n case SuspenseComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case SuspenseListComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case ContextProvider:\n popProvider(interruptedWork);\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(interruptedWork);\n break;\n }\n}\n\nfunction createCapturedValue(value, source) {\n // If the value is an error, call this function immediately after it is thrown\n // so the stack is accurate.\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n}\n\n// This module is forked in different environments.\n// By default, return `true` to log errors to the console.\n// Forks can return `false` if this isn't desirable.\nfunction showErrorDialog(boundary, errorInfo) {\n return true;\n}\n\nfunction logCapturedError(boundary, errorInfo) {\n try {\n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n\n if (logError === false) {\n return;\n }\n\n var error = errorInfo.value;\n\n if (true) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling\n // `preventDefault()` in window `error` handler.\n // We record this information as an expando on the error.\n\n if (error != null && error._suppressLogging) {\n if (boundary.tag === ClassComponent) {\n // The error is recoverable and was silenced.\n // Ignore it and don't print the stack addendum.\n // This is handy for testing error boundaries without noise.\n return;\n } // The error is fatal. Since the silencing might have\n // been accidental, we'll surface it anyway.\n // However, the browser would have silenced the original error\n // so we'll print it first, and then print the stack addendum.\n\n\n console['error'](error); // Don't transform to our wrapper\n // For a more detailed description of this block, see:\n // https://github.com/facebook/react/pull/13384\n }\n\n var componentName = source ? getComponentName(source.type) : null;\n var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n var errorBoundaryMessage;\n var errorBoundaryName = getComponentName(boundary.type);\n\n if (errorBoundaryName) {\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n } else {\n 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.';\n }\n\n var combinedMessage = componentNameMessage + \"\\n\" + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n // We don't include the original error message and JS stack because the browser\n // has already printed it. Even if the application swallows the error, it is still\n // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n console['error'](combinedMessage); // Don't transform to our wrapper\n } else {\n // In production, we print the error directly.\n // This will include the message, the JS stack, and anything the browser wants to show.\n // We pass the error object instead of custom message so that the browser displays the error natively.\n console['error'](error); // Don't transform to our wrapper\n }\n } catch (e) {\n // This method must not throw, or React internal state will get messed up.\n // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n // we want to report this error outside of the normal stack as a last resort.\n // https://github.com/facebook/react/issues/13188\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nvar PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.\n\n update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: null\n };\n var error = errorInfo.value;\n\n update.callback = function () {\n onUncaughtError(error);\n logCapturedError(fiber, errorInfo);\n };\n\n return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n\n update.payload = function () {\n logCapturedError(fiber, errorInfo);\n return getDerivedStateFromError(error$1);\n };\n }\n\n var inst = fiber.stateNode;\n\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n if (typeof getDerivedStateFromError !== 'function') {\n // To preserve the preexisting retry behavior of error boundaries,\n // we keep track of which ones already failed during this batch.\n // This gets reset before we yield back to the browser.\n // TODO: Warn in strict mode if getDerivedStateFromError is\n // not defined.\n markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined\n\n logCapturedError(fiber, errorInfo);\n }\n\n var error$1 = errorInfo.value;\n var stack = errorInfo.stack;\n this.componentDidCatch(error$1, {\n componentStack: stack !== null ? stack : ''\n });\n\n {\n if (typeof getDerivedStateFromError !== 'function') {\n // If componentDidCatch is the only error boundary method defined,\n // then it needs to call setState to recover from errors.\n // If no state update is scheduled then the boundary will swallow the error.\n if (!includesSomeLane(fiber.lanes, SyncLane)) {\n 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');\n }\n }\n }\n };\n } else {\n update.callback = function () {\n markFailedErrorBoundaryForHotReloading(fiber);\n };\n }\n\n return update;\n}\n\nfunction attachPingListener(root, wakeable, lanes) {\n // Attach a listener to the promise to \"ping\" the root and retry. But only if\n // one does not already exist for the lanes we're currently rendering (which\n // acts like a \"thread ID\" here).\n var pingCache = root.pingCache;\n var threadIDs;\n\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap$1();\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else {\n threadIDs = pingCache.get(wakeable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n }\n }\n\n if (!threadIDs.has(lanes)) {\n // Memoize using the thread ID to prevent redundant listeners.\n threadIDs.add(lanes);\n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n wakeable.then(ping, ping);\n }\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n // The source fiber did not complete.\n sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.\n\n sourceFiber.firstEffect = sourceFiber.lastEffect = null;\n\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a wakeable.\n var wakeable = value;\n\n if ((sourceFiber.mode & BlockingMode) === NoMode) {\n // Reset the memoizedState to what it was before we attempted\n // to render it.\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.lanes = currentSource.lanes;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n\n var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.\n\n var _workInProgress = returnFiber;\n\n do {\n if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {\n // Found the nearest boundary.\n // Stash the promise on the boundary fiber. If the boundary times out, we'll\n // attach another listener to flip the boundary back to its normal state.\n var wakeables = _workInProgress.updateQueue;\n\n if (wakeables === null) {\n var updateQueue = new Set();\n updateQueue.add(wakeable);\n _workInProgress.updateQueue = updateQueue;\n } else {\n wakeables.add(wakeable);\n } // If the boundary is outside of blocking mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. In the commit phase, we'll schedule a\n // subsequent synchronous update to re-render the Suspense.\n //\n // Note: It doesn't matter whether the component that suspended was\n // inside a blocking mode tree. If the Suspense is outside of it, we\n // should *not* suspend the commit.\n\n\n if ((_workInProgress.mode & BlockingMode) === NoMode) {\n _workInProgress.flags |= DidCapture;\n sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.\n // But we shouldn't call any lifecycle methods or callbacks. Remove\n // all lifecycle effect tags.\n\n sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);\n\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\n\n if (currentSourceFiber === null) {\n // This is a new mount. Change the tag so it's not mistaken for a\n // completed class component. For example, we should not call\n // componentWillUnmount if it is deleted.\n sourceFiber.tag = IncompleteClassComponent;\n } else {\n // When we try rendering again, we should not reuse the current fiber,\n // since it's known to be in an inconsistent state. Use a force update to\n // prevent a bail out.\n var update = createUpdate(NoTimestamp, SyncLane);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.\n\n return;\n } // Confirmed that the boundary is in a concurrent mode tree. Continue\n // with the normal suspend path.\n //\n // After this we'll use a set of heuristics to determine whether this\n // render pass will run to completion or restart or \"suspend\" the commit.\n // The actual logic for this is spread out in different places.\n //\n // This first principle is that if we're going to suspend when we complete\n // a root, then we should also restart if we get an update or ping that\n // might unsuspend it, and vice versa. The only reason to suspend is\n // because you think you might want to restart before committing. However,\n // it doesn't make sense to restart only while in the period we're suspended.\n //\n // Restarting too aggressively is also not good because it starves out any\n // intermediate loading state. So we use heuristics to determine when.\n // Suspense Heuristics\n //\n // If nothing threw a Promise or all the same fallbacks are already showing,\n // then don't suspend/restart.\n //\n // If this is an initial render of a new tree of Suspense boundaries and\n // those trigger a fallback, then don't suspend/restart. We want to ensure\n // that we can show the initial loading state as quickly as possible.\n //\n // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n // a fallback, then we should always suspend/restart. Transitions apply\n // to this case. If none is defined, JND is used instead.\n //\n // If we're already showing a fallback and it gets \"retried\", allowing us to show\n // another level, but there's still an inner boundary that would show a fallback,\n // then we suspend/restart for 500ms since the last time we showed a fallback\n // anywhere in the tree. This effectively throttles progressive loading into a\n // consistent train of commits. This also gives us an opportunity to restart to\n // get to the completed state slightly earlier.\n //\n // If there's ambiguity due to batching it's resolved in preference of:\n // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n //\n // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n // ensure that new initial loading states can commit as soon as possible.\n\n\n attachPingListener(root, wakeable, rootRenderLanes);\n _workInProgress.flags |= ShouldCapture;\n _workInProgress.lanes = rootRenderLanes;\n return;\n } // This boundary already captured during this render. Continue to the next\n // boundary.\n\n\n _workInProgress = _workInProgress.return;\n } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.\n // TODO: Use invariant so the message is stripped in prod?\n\n\n 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.');\n } // We didn't find a boundary that could handle this type of exception. Start\n // over and traverse parent path again, this time treating the exception\n // as an error.\n\n\n renderDidError();\n value = createCapturedValue(value, sourceFiber);\n var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.flags |= ShouldCapture;\n var lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n\n var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n\n if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.flags |= ShouldCapture;\n\n var _lane = pickArbitraryLane(rootRenderLanes);\n\n workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n enqueueCapturedUpdate(workInProgress, _update2);\n return;\n }\n\n break;\n }\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n}\n\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\n\nvar callComponentWillUnmountWithTimer = function (current, instance) {\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n\n {\n instance.componentWillUnmount();\n }\n}; // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current, unmountError);\n }\n }\n}\n\nfunction safelyDetachRef(current) {\n var ref = current.ref;\n\n if (ref !== null) {\n if (typeof ref === 'function') {\n {\n invokeGuardedCallback(null, ref, null, null);\n\n if (hasCaughtError()) {\n var refError = clearCaughtError();\n captureCommitPhaseError(current, refError);\n }\n }\n } else {\n ref.current = null;\n }\n }\n}\n\nfunction safelyCallDestroy(current, destroy) {\n {\n invokeGuardedCallback(null, destroy, null);\n\n if (hasCaughtError()) {\n var error = clearCaughtError();\n captureCommitPhaseError(current, error);\n }\n }\n}\n\nfunction commitBeforeMutationLifeCycles(current, finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n return;\n }\n\n case ClassComponent:\n {\n if (finishedWork.flags & Snapshot) {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n var instance = finishedWork.stateNode; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props 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');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n 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');\n }\n }\n }\n\n var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n\n {\n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n didWarnSet.add(finishedWork.type);\n\n error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));\n }\n }\n\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n }\n\n return;\n }\n\n case HostRoot:\n {\n {\n if (finishedWork.flags & Snapshot) {\n var root = finishedWork.stateNode;\n clearContainer(root.containerInfo);\n }\n }\n\n return;\n }\n\n case HostComponent:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n return;\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction commitHookEffectListUnmount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Unmount\n var destroy = effect.destroy;\n effect.destroy = undefined;\n\n if (destroy !== undefined) {\n destroy();\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitHookEffectListMount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Mount\n var create = effect.create;\n effect.destroy = create();\n\n {\n var destroy = effect.destroy;\n\n if (destroy !== undefined && typeof destroy !== 'function') {\n var addendum = void 0;\n\n if (destroy === null) {\n addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n } else if (typeof destroy.then === 'function') {\n 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';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction schedulePassiveEffects(finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var _effect = effect,\n next = _effect.next,\n tag = _effect.tag;\n\n if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {\n enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);\n enqueuePendingPassiveHookEffectMount(finishedWork, effect);\n }\n\n effect = next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n // At this point layout effects have already been destroyed (during mutation phase).\n // This is done to prevent sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n {\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n }\n\n schedulePassiveEffects(finishedWork);\n return;\n }\n\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (finishedWork.flags & Update) {\n if (current === null) {\n // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props 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');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n 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');\n }\n }\n }\n\n {\n instance.componentDidMount();\n }\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props 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');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n 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');\n }\n }\n }\n\n {\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n }\n }\n } // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n\n\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props 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');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n 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');\n }\n }\n } // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n\n commitUpdateQueue(finishedWork, updateQueue, instance);\n }\n\n return;\n }\n\n case HostRoot:\n {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var _updateQueue = finishedWork.updateQueue;\n\n if (_updateQueue !== null) {\n var _instance = null;\n\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostComponent:\n _instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n\n case ClassComponent:\n _instance = finishedWork.child.stateNode;\n break;\n }\n }\n\n commitUpdateQueue(finishedWork, _updateQueue, _instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (current === null && finishedWork.flags & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props);\n }\n\n return;\n }\n\n case HostText:\n {\n // We have no life-cycles associated with text.\n return;\n }\n\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n return;\n }\n\n case Profiler:\n {\n {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n onCommit = _finishedWork$memoize2.onCommit,\n onRender = _finishedWork$memoize2.onRender;\n var effectDuration = finishedWork.stateNode.effectDuration;\n var commitTime = getCommitTime();\n\n if (typeof onRender === 'function') {\n {\n onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);\n }\n }\n }\n\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n case IncompleteClassComponent:\n case FundamentalComponent:\n case ScopeComponent:\n case OffscreenComponent:\n case LegacyHiddenComponent:\n return;\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n {\n // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n\n while (true) {\n if (node.tag === HostComponent) {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } else if (node.tag === HostText) {\n var _instance3 = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance3);\n } else {\n unhideTextInstance(_instance3, node.memoizedProps);\n }\n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === finishedWork) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n}\n\nfunction commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n\n switch (finishedWork.tag) {\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n if (typeof ref === 'function') {\n ref(instanceToUse);\n } else {\n {\n if (!ref.hasOwnProperty('current')) {\n error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));\n }\n }\n\n ref.current = instanceToUse;\n }\n }\n}\n\nfunction commitDetachRef(current) {\n var currentRef = current.ref;\n\n if (currentRef !== null) {\n if (typeof currentRef === 'function') {\n currentRef(null);\n } else {\n currentRef.current = null;\n }\n }\n} // User-originating errors (lifecycles and refs) should not interrupt\n// deletion, so don't let them throw. Host-originating errors should\n// interrupt deletion, so it's okay\n\n\nfunction commitUnmount(finishedRoot, current, renderPriorityLevel) {\n onCommitUnmount(current);\n\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n var updateQueue = current.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var _effect2 = effect,\n destroy = _effect2.destroy,\n tag = _effect2.tag;\n\n if (destroy !== undefined) {\n if ((tag & Passive$1) !== NoFlags$1) {\n enqueuePendingPassiveHookEffectUnmount(current, effect);\n } else {\n {\n safelyCallDestroy(current, destroy);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n safelyDetachRef(current);\n var instance = current.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(current, instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n safelyDetachRef(current);\n return;\n }\n\n case HostPortal:\n {\n // TODO: this is recursive.\n // We are also not using this parent because\n // the portal will get pushed immediately.\n {\n unmountHostComponents(finishedRoot, current);\n }\n\n return;\n }\n\n case FundamentalComponent:\n {\n\n return;\n }\n\n case DehydratedFragment:\n {\n\n return;\n }\n\n case ScopeComponent:\n {\n\n return;\n }\n }\n}\n\nfunction commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {\n // While we're inside a removed host node we don't want to call\n // removeChild on the inner nodes because they're removed by the top\n // call anyway. We also want to call componentWillUnmount on all\n // composites before this host node is removed from the tree. Therefore\n // we do an inner loop while we're still inside the host node.\n var node = root;\n\n while (true) {\n commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.\n // Skip portals because commitUnmount() currently visits them recursively.\n\n if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.\n // If we don't use mutation we drill down into portals here instead.\n node.tag !== HostPortal)) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === root) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === root) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction detachFiberMutation(fiber) {\n // Cut off the return pointers to disconnect it from the tree. Ideally, we\n // should clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child. This child\n // itself will be GC:ed when the parent updates the next time.\n // Note: we cannot null out sibling here, otherwise it can cause issues\n // with findDOMNode and how it requires the sibling field to carry out\n // traversal in a later effect. See PR #16820. We now clear the sibling\n // field after effects, see: detachFiberAfterEffects.\n //\n // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.\n // It may be required if the current component is an error boundary,\n // and one of its descendants throws while unmounting a passive effect.\n fiber.alternate = null;\n fiber.child = null;\n fiber.dependencies = null;\n fiber.firstEffect = null;\n fiber.lastEffect = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.return = null;\n fiber.updateQueue = null;\n\n {\n fiber._debugOwner = null;\n }\n}\n\nfunction getHostParentFiber(fiber) {\n var parent = fiber.return;\n\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n\n parent = parent.return;\n }\n\n {\n {\n throw Error( \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n}\n\nfunction getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n // TODO: Find a more efficient way to do this.\n var node = fiber;\n\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node.return === null || isHostParent(node.return)) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n\n while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.flags & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n } // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n\n\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child.return = node;\n node = node.child;\n }\n } // Check if this host node is stable or about to be placed.\n\n\n if (!(node.flags & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n}\n\nfunction commitPlacement(finishedWork) {\n\n\n var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n var parent;\n var isContainer;\n var parentStateNode = parentFiber.stateNode;\n\n switch (parentFiber.tag) {\n case HostComponent:\n parent = parentStateNode;\n isContainer = false;\n break;\n\n case HostRoot:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case HostPortal:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case FundamentalComponent:\n\n // eslint-disable-next-line-no-fallthrough\n\n default:\n {\n {\n throw Error( \"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n }\n\n if (parentFiber.flags & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(parent); // Clear ContentReset from the effect tag\n\n parentFiber.flags &= ~ContentReset;\n }\n\n var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n if (isContainer) {\n insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);\n } else {\n insertOrAppendPlacementNode(finishedWork, before, parent);\n }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI ) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertInContainerBefore(parent, stateNode, before);\n } else {\n appendChildToContainer(parent, stateNode);\n }\n } else if (tag === HostPortal) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI ) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertBefore(parent, stateNode, before);\n } else {\n appendChild(parent, stateNode);\n }\n } else if (tag === HostPortal) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction unmountHostComponents(finishedRoot, current, renderPriorityLevel) {\n // We only have the top Fiber that was deleted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = current; // Each iteration, currentParent is populated with node's host parent if not\n // currentParentIsValid.\n\n var currentParentIsValid = false; // Note: these two variables *must* always be updated together.\n\n var currentParent;\n var currentParentIsContainer;\n\n while (true) {\n if (!currentParentIsValid) {\n var parent = node.return;\n\n findParent: while (true) {\n if (!(parent !== null)) {\n {\n throw Error( \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var parentStateNode = parent.stateNode;\n\n switch (parent.tag) {\n case HostComponent:\n currentParent = parentStateNode;\n currentParentIsContainer = false;\n break findParent;\n\n case HostRoot:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n\n case HostPortal:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n\n }\n\n parent = parent.return;\n }\n\n currentParentIsValid = true;\n }\n\n if (node.tag === HostComponent || node.tag === HostText) {\n commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the\n // node from the tree.\n\n if (currentParentIsContainer) {\n removeChildFromContainer(currentParent, node.stateNode);\n } else {\n removeChild(currentParent, node.stateNode);\n } // Don't visit children because we already visited them.\n\n } else if (node.tag === HostPortal) {\n if (node.child !== null) {\n // When we go into a portal, it becomes the parent to remove from.\n // We will reassign it back when we pop the portal on the way up.\n currentParent = node.stateNode.containerInfo;\n currentParentIsContainer = true; // Visit children because portals might contain host components.\n\n node.child.return = node;\n node = node.child;\n continue;\n }\n } else {\n commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.\n\n if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n }\n\n if (node === current) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === current) {\n return;\n }\n\n node = node.return;\n\n if (node.tag === HostPortal) {\n // When we go out of the portal, we need to restore the parent.\n // Since we don't keep a stack of them, we will search for it.\n currentParentIsValid = false;\n }\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction commitDeletion(finishedRoot, current, renderPriorityLevel) {\n {\n // Recursively delete all host nodes from the parent.\n // Detach refs and call componentWillUnmount() on the whole subtree.\n unmountHostComponents(finishedRoot, current);\n }\n\n var alternate = current.alternate;\n detachFiberMutation(current);\n\n if (alternate !== null) {\n detachFiberMutation(alternate);\n }\n}\n\nfunction commitWork(current, finishedWork) {\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n // Layout effects are destroyed during the mutation phase so that all\n // destroy functions for all fibers are called before any create functions.\n // This prevents sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n {\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork);\n }\n\n return;\n }\n\n case ClassComponent:\n {\n return;\n }\n\n case HostComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (instance != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n if (updatePayload !== null) {\n commitUpdate(instance, updatePayload, type, oldProps, newProps);\n }\n }\n\n return;\n }\n\n case HostText:\n {\n if (!(finishedWork.stateNode !== null)) {\n {\n throw Error( \"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldText = current !== null ? current.memoizedProps : newText;\n commitTextUpdate(textInstance, oldText, newText);\n return;\n }\n\n case HostRoot:\n {\n {\n var _root = finishedWork.stateNode;\n\n if (_root.hydrate) {\n // We've just hydrated. No need to hydrate again.\n _root.hydrate = false;\n commitHydratedContainer(_root.containerInfo);\n }\n }\n\n return;\n }\n\n case Profiler:\n {\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseComponent(finishedWork);\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n {\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case IncompleteClassComponent:\n {\n return;\n }\n\n case FundamentalComponent:\n {\n\n break;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n var newState = finishedWork.memoizedState;\n var isHidden = newState !== null;\n hideOrUnhideAllChildren(finishedWork, isHidden);\n return;\n }\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction commitSuspenseComponent(finishedWork) {\n var newState = finishedWork.memoizedState;\n\n if (newState !== null) {\n markCommitTimeOfFallback();\n\n {\n // Hide the Offscreen component that contains the primary children. TODO:\n // Ideally, this effect would have been scheduled on the Offscreen fiber\n // itself. That's how unhiding works: the Offscreen component schedules an\n // effect on itself. However, in this case, the component didn't complete,\n // so the fiber was never added to the effect list in the normal path. We\n // could have appended it to the effect list in the Suspense component's\n // second pass, but doing it this way is less complicated. This would be\n // simpler if we got rid of the effect list and traversed the tree, like\n // we're planning to do.\n var primaryChildParent = finishedWork.child;\n hideOrUnhideAllChildren(primaryChildParent, true);\n }\n }\n}\n\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n\n var newState = finishedWork.memoizedState;\n\n if (newState === null) {\n var current = finishedWork.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n\n if (suspenseInstance !== null) {\n commitHydratedSuspenseInstance(suspenseInstance);\n }\n }\n }\n }\n}\n\nfunction attachSuspenseRetryListeners(finishedWork) {\n // If this boundary just timed out, then it will have a set of wakeables.\n // For each wakeable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var wakeables = finishedWork.updateQueue;\n\n if (wakeables !== null) {\n finishedWork.updateQueue = null;\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n wakeables.forEach(function (wakeable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n if (!retryCache.has(wakeable)) {\n {\n if (wakeable.__reactDoNotTraceInteractions !== true) {\n retry = tracing.unstable_wrap(retry);\n }\n }\n\n retryCache.add(wakeable);\n wakeable.then(retry, retry);\n }\n });\n }\n} // This function detects when a Suspense boundary goes from visible to hidden.\n// It returns false if the boundary is already hidden.\n// TODO: Use an effect tag.\n\n\nfunction isSuspenseBoundaryBeingHidden(current, finishedWork) {\n if (current !== null) {\n var oldState = current.memoizedState;\n\n if (oldState === null || oldState.dehydrated !== null) {\n var newState = finishedWork.memoizedState;\n return newState !== null && newState.dehydrated === null;\n }\n }\n\n return false;\n}\n\nfunction commitResetTextContent(current) {\n\n resetTextContent(current.stateNode);\n}\n\nvar COMPONENT_TYPE = 0;\nvar HAS_PSEUDO_CLASS_TYPE = 1;\nvar ROLE_TYPE = 2;\nvar TEST_NAME_TYPE = 3;\nvar TEXT_TYPE = 4;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor$1 = Symbol.for;\n COMPONENT_TYPE = symbolFor$1('selector.component');\n HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');\n ROLE_TYPE = symbolFor$1('selector.role');\n TEST_NAME_TYPE = symbolFor$1('selector.test_id');\n TEXT_TYPE = symbolFor$1('selector.text');\n}\nvar commitHooks = [];\nfunction onCommitRoot$1() {\n {\n commitHooks.forEach(function (commitHook) {\n return commitHook();\n });\n }\n}\n\nvar ceil = Math.ceil;\nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;\nvar NoContext =\n/* */\n0;\nvar BatchedContext =\n/* */\n1;\nvar EventContext =\n/* */\n2;\nvar DiscreteEventContext =\n/* */\n4;\nvar LegacyUnbatchedContext =\n/* */\n8;\nvar RenderContext =\n/* */\n16;\nvar CommitContext =\n/* */\n32;\nvar RetryAfterError =\n/* */\n64;\nvar RootIncomplete = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5; // Describes where we are in the React execution stack\n\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The lanes we're rendering\n\nvar workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree\n// This is a superset of the lanes we started working on at the root. The only\n// case where it's different from `workInProgressRootRenderLanes` is when we\n// enter a subtree that is hidden and needs to be unhidden: Suspense and\n// Offscreen component.\n//\n// Most things in the work loop should deal with workInProgressRootRenderLanes.\n// Most things in begin/complete phases should deal with subtreeRenderLanes.\n\nvar subtreeRenderLanes = NoLanes;\nvar subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // \"Included\" lanes refer to lanes that were worked on during this render. It's\n// slightly different than `renderLanes` because `renderLanes` can change as you\n// enter and exit an Offscreen tree. This value is the combination of all render\n// lanes for the entire render phase.\n\nvar workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only\n// includes unprocessed updates, not work in bailed out children.\n\nvar workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\nvar workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.\n\nvar workInProgressRootPingedLanes = NoLanes;\nvar mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train\n// model where we don't commit new loading states in too quick succession.\n\nvar globalMostRecentFallbackTime = 0;\nvar FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering\n// more and prefer CPU suspense heuristics instead.\n\nvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n// suspense heuristics and opt out of rendering more content.\n\nvar RENDER_TIMEOUT_MS = 500;\n\nfunction resetRenderTimer() {\n workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;\n}\n\nfunction getRenderTargetTime() {\n return workInProgressRootRenderTargetTime;\n}\nvar nextEffect = null;\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsRenderPriority = NoPriority$1;\nvar pendingPassiveEffectsLanes = NoLanes;\nvar pendingPassiveHookEffectsMount = [];\nvar pendingPassiveHookEffectsUnmount = [];\nvar rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes\n// during the commit phase. This enables them to be traced across components\n// that spawn new work during render. E.g. hidden boundaries, suspended SSR\n// hydration or SuspenseList.\n// TODO: Can use a bitmask instead of an array\n\nvar spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their\n// event times as simultaneous, even if the actual clock time has advanced\n// between the first and second call.\n\nvar currentEventTime = NoTimestamp;\nvar currentEventWipLanes = NoLanes;\nvar currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.\n// We warn about state updates for unmounted components differently in this case.\n\nvar isFlushingPassiveEffects = false;\nvar focusedInstanceHandle = null;\nvar shouldFireAfterActiveInstanceBlur = false;\nfunction getWorkInProgressRoot() {\n return workInProgressRoot;\n}\nfunction requestEventTime() {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // We're inside React, so it's fine to read the actual time.\n return now();\n } // We're not inside React, so we may be in the middle of a browser event.\n\n\n if (currentEventTime !== NoTimestamp) {\n // Use the same start time for all updates until we enter React again.\n return currentEventTime;\n } // This is the first update since React yielded. Compute a new start time.\n\n\n currentEventTime = now();\n return currentEventTime;\n}\nfunction requestUpdateLane(fiber) {\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & BlockingMode) === NoMode) {\n return SyncLane;\n } else if ((mode & ConcurrentMode) === NoMode) {\n return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;\n } // The algorithm for assigning an update to a lane should be stable for all\n // updates at the same priority within the same event. To do this, the inputs\n // to the algorithm must be the same. For example, we use the `renderLanes`\n // to avoid choosing a lane that is already in the middle of rendering.\n //\n // However, the \"included\" lanes could be mutated in between updates in the\n // same event, like if you perform an update inside `flushSync`. Or any other\n // code path that might call `prepareFreshStack`.\n //\n // The trick we use is to cache the first of each of these inputs within an\n // event. Then reset the cached values once we can be sure the event is over.\n // Our heuristic for that is whenever we enter a concurrent work loop.\n //\n // We'll do the same for `currentEventPendingLanes` below.\n\n\n if (currentEventWipLanes === NoLanes) {\n currentEventWipLanes = workInProgressRootIncludedLanes;\n }\n\n var isTransition = requestCurrentTransition() !== NoTransition;\n\n if (isTransition) {\n if (currentEventPendingLanes !== NoLanes) {\n currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;\n }\n\n return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);\n } // TODO: Remove this dependency on the Scheduler priority.\n // To do that, we're replacing it with an update lane priority.\n\n\n var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.\n // This couples React to the Scheduler internals, so we're replacing it\n // with the currentUpdateLanePriority above. As an example of how this\n // could be problematic, if we're not inside `Scheduler.runWithPriority`,\n // then we'll get the priority of the current running Scheduler task,\n // which is probably not what we want.\n\n var lane;\n\n if ( // TODO: Temporary. We're removing the concept of discrete updates.\n (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {\n lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);\n } else {\n var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);\n\n lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);\n }\n\n return lane;\n}\n\nfunction requestRetryLane(fiber) {\n // This is a fork of `requestUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & BlockingMode) === NoMode) {\n return SyncLane;\n } else if ((mode & ConcurrentMode) === NoMode) {\n return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;\n } // See `requestUpdateLane` for explanation of `currentEventWipLanes`\n\n\n if (currentEventWipLanes === NoLanes) {\n currentEventWipLanes = workInProgressRootIncludedLanes;\n }\n\n return findRetryLane(currentEventWipLanes);\n}\n\nfunction scheduleUpdateOnFiber(fiber, lane, eventTime) {\n checkForNestedUpdates();\n warnAboutRenderPhaseUpdatesInDEV(fiber);\n var root = markUpdateLaneFromFiberToRoot(fiber, lane);\n\n if (root === null) {\n warnAboutUpdateOnUnmountedFiberInDEV(fiber);\n return null;\n } // Mark that the root has a pending update.\n\n\n markRootUpdated(root, lane, eventTime);\n\n if (root === workInProgressRoot) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that there was an interleaved update work on this root. Unless the\n // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render\n // phase update. In that case, we don't treat render phase updates as if\n // they were interleaved, for backwards compat reasons.\n {\n workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);\n }\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: Make sure this doesn't override pings that happen while we've\n // already started rendering.\n markRootSuspended$1(root, workInProgressRootRenderLanes);\n }\n } // TODO: requestUpdateLanePriority also reads the priority. Pass the\n // priority as an argument to that function and this one.\n\n\n var priorityLevel = getCurrentPriorityLevel();\n\n if (lane === SyncLane) {\n if ( // Check if we're inside unbatchedUpdates\n (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering\n (executionContext & (RenderContext | CommitContext)) === NoContext) {\n // Register pending interactions on the root to avoid losing traced interaction data.\n schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed\n // root inside of batchedUpdates should be synchronous, but layout updates\n // should be deferred until the end of the batch.\n\n performSyncWorkOnRoot(root);\n } else {\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, lane);\n\n if (executionContext === NoContext) {\n // Flush the synchronous work now, unless we're already working or inside\n // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n // scheduleCallbackForFiber to preserve the ability to schedule a callback\n // without immediately flushing it. We only do this for user-initiated\n // updates, to preserve historical behavior of legacy mode.\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n } else {\n // Schedule a discrete update but only if it's not Sync.\n if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered\n // discrete, even inside a discrete event.\n priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {\n // This is the result of a discrete event. Track the lowest priority\n // discrete update per root so we can flush them early, if needed.\n if (rootsWithPendingDiscreteUpdates === null) {\n rootsWithPendingDiscreteUpdates = new Set([root]);\n } else {\n rootsWithPendingDiscreteUpdates.add(root);\n }\n } // Schedule other updates after in case the callback is sync.\n\n\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, lane);\n } // We use this when assigning a lane for a transition inside\n // `requestUpdateLane`. We assume it's the same as the root being updated,\n // since in the common case of a single root app it probably is. If it's not\n // the same root, then it's not a huge deal, we just might batch more stuff\n // together more than necessary.\n\n\n mostRecentlyUpdatedRoot = root;\n} // This is split into a separate function so we can mark a fiber with pending\n// work without treating it as a typical update that originates from an event;\n// e.g. retrying a Suspense boundary isn't an update, but it does schedule work\n// on a fiber.\n\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n // Update the source fiber's lanes\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n var alternate = sourceFiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n }\n\n {\n if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = sourceFiber;\n var parent = sourceFiber.return;\n\n while (parent !== null) {\n parent.childLanes = mergeLanes(parent.childLanes, lane);\n alternate = parent.alternate;\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n } else {\n {\n if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n }\n }\n\n node = parent;\n parent = parent.return;\n }\n\n if (node.tag === HostRoot) {\n var root = node.stateNode;\n return root;\n } else {\n return null;\n }\n} // Use this function to schedule a task for a root. There's only one task per\n// root; if a task was already scheduled, we'll check to make sure the priority\n// of the existing task is the same as the priority of the next level that the\n// root has work on. This function is called on every update, and right before\n// exiting a task.\n\n\nfunction ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that\n// goes through Scheduler.\n\n\nfunction performConcurrentWorkOnRoot(root) {\n // Since we know we're in a React event, we can clear the current\n // event time. The next update will compute a new event time.\n currentEventTime = NoTimestamp;\n currentEventWipLanes = NoLanes;\n currentEventPendingLanes = NoLanes;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n } // Flush any pending passive effects before deciding which lanes to work on,\n // in case they schedule additional work.\n\n\n var originalCallbackNode = root.callbackNode;\n var didFlushPassiveEffects = flushPassiveEffects();\n\n if (didFlushPassiveEffects) {\n // Something in the passive effect phase may have canceled the current task.\n // Check if the task node for this root was changed.\n if (root.callbackNode !== originalCallbackNode) {\n // The current task was canceled. Exit. We don't need to call\n // `ensureRootIsScheduled` because the check above implies either that\n // there's a new task, or that there's no remaining work on this root.\n return null;\n }\n } // Determine the next expiration time to work on, using the fields stored\n // on the root.\n\n\n var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (lanes === NoLanes) {\n // Defensive coding. This is never expected to happen.\n return null;\n }\n\n var exitStatus = renderRootConcurrent(root, lanes);\n\n if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {\n // The render included lanes that were updated during the render phase.\n // For example, when unhiding a hidden tree, we include all the lanes\n // that were previously skipped when the tree was hidden. That set of\n // lanes is a superset of the lanes we started rendering with.\n //\n // So we'll throw out the current work and restart.\n prepareFreshStack(root, NoLanes);\n } else if (exitStatus !== RootIncomplete) {\n if (exitStatus === RootErrored) {\n executionContext |= RetryAfterError; // If an error occurred during hydration,\n // discard server response and fall back to client side render.\n\n if (root.hydrate) {\n root.hydrate = false;\n clearContainer(root.containerInfo);\n } // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n\n\n lanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (lanes !== NoLanes) {\n exitStatus = renderRootSync(root, lanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n } // We now have a consistent tree. The next step is either to commit it,\n // or, if something suspended, wait to commit it after a timeout.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n finishConcurrentRender(root, exitStatus, lanes);\n }\n\n ensureRootIsScheduled(root, now());\n\n if (root.callbackNode === originalCallbackNode) {\n // The task node scheduled for this root is the same one that's\n // currently executed. Need to return a continuation.\n return performConcurrentWorkOnRoot.bind(null, root);\n }\n\n return null;\n}\n\nfunction finishConcurrentRender(root, exitStatus, lanes) {\n switch (exitStatus) {\n case RootIncomplete:\n case RootFatalErrored:\n {\n {\n {\n throw Error( \"Root did not complete. This is a bug in React.\" );\n }\n }\n }\n // Flow knows about invariant, so it complains if I add a break\n // statement, but eslint doesn't know about invariant, so it complains\n // if I do. eslint-disable-next-line no-fallthrough\n\n case RootErrored:\n {\n // We should have already attempted to retry this tree. If we reached\n // this point, it errored again. Commit it.\n commitRoot(root);\n break;\n }\n\n case RootSuspended:\n {\n markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we\n // should immediately commit it or wait a bit.\n\n if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope\n !shouldForceFlushFallbacksInDEV()) {\n // This render only included retries, no updates. Throttle committing\n // retries so that we don't show too many loading states too quickly.\n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.\n\n if (msUntilTimeout > 10) {\n var nextLanes = getNextLanes(root, NoLanes);\n\n if (nextLanes !== NoLanes) {\n // There's additional work on this root.\n break;\n }\n\n var suspendedLanes = root.suspendedLanes;\n\n if (!isSubsetOfLanes(suspendedLanes, lanes)) {\n // We should prefer to render the fallback of at the last\n // suspended level. Ping the last suspended level to try\n // rendering it again.\n // FIXME: What if the suspended lanes are Idle? Should not restart.\n var eventTime = requestEventTime();\n markRootPinged(root, suspendedLanes);\n break;\n } // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n\n\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root);\n break;\n }\n\n case RootSuspendedWithDelay:\n {\n markRootSuspended$1(root, lanes);\n\n if (includesOnlyTransitions(lanes)) {\n // This is a transition, so we should exit without committing a\n // placeholder and without scheduling a timeout. Delay indefinitely\n // until we receive more data.\n break;\n }\n\n if (!shouldForceFlushFallbacksInDEV()) {\n // This is not a transition, but we did trigger an avoided state.\n // Schedule a placeholder to display after a short delay, using the Just\n // Noticeable Difference.\n // TODO: Is the JND optimization worth the added complexity? If this is\n // the only reason we track the event time, then probably not.\n // Consider removing.\n var mostRecentEventTime = getMostRecentEventTime(root, lanes);\n var eventTimeMs = mostRecentEventTime;\n var timeElapsedMs = now() - eventTimeMs;\n\n var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.\n\n\n if (_msUntilTimeout > 10) {\n // Instead of committing the fallback immediately, wait for more data\n // to arrive.\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);\n break;\n }\n } // Commit the placeholder.\n\n\n commitRoot(root);\n break;\n }\n\n case RootCompleted:\n {\n // The work completed. Ready to commit.\n commitRoot(root);\n break;\n }\n\n default:\n {\n {\n {\n throw Error( \"Unknown root exit status.\" );\n }\n }\n }\n }\n}\n\nfunction markRootSuspended$1(root, suspendedLanes) {\n // When suspending, we should always exclude lanes that were pinged or (more\n // rarely, since we try to avoid it) updated during the render phase.\n // TODO: Lol maybe there's a better way to factor this besides this\n // obnoxiously named function :)\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);\n markRootSuspended(root, suspendedLanes);\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root) {\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n }\n\n flushPassiveEffects();\n var lanes;\n var exitStatus;\n\n if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {\n // There's a partial tree, and at least one of its lanes has expired. Finish\n // rendering it before rendering the rest of the expired work.\n lanes = workInProgressRootRenderLanes;\n exitStatus = renderRootSync(root, lanes);\n\n if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {\n // The render included lanes that were updated during the render phase.\n // For example, when unhiding a hidden tree, we include all the lanes\n // that were previously skipped when the tree was hidden. That set of\n // lanes is a superset of the lanes we started rendering with.\n //\n // Note that this only happens when part of the tree is rendered\n // concurrently. If the whole tree is rendered synchronously, then there\n // are no interleaved events.\n lanes = getNextLanes(root, lanes);\n exitStatus = renderRootSync(root, lanes);\n }\n } else {\n lanes = getNextLanes(root, NoLanes);\n exitStatus = renderRootSync(root, lanes);\n }\n\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n executionContext |= RetryAfterError; // If an error occurred during hydration,\n // discard server response and fall back to client side render.\n\n if (root.hydrate) {\n root.hydrate = false;\n clearContainer(root.containerInfo);\n } // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n\n\n lanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (lanes !== NoLanes) {\n exitStatus = renderRootSync(root, lanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n } // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n ensureRootIsScheduled(root, now());\n return null;\n}\nfunction flushDiscreteUpdates() {\n // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.\n // However, `act` uses `batchedUpdates`, so there's no way to distinguish\n // those two cases. Need to fix this before exposing flushDiscreteUpdates\n // as a public API.\n if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');\n }\n } // We're already rendering, so we can't synchronously flush pending work.\n // This is probably a nested event dispatch triggered by a lifecycle/effect,\n // like `el.focus()`. Exit.\n\n\n return;\n }\n\n flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that\n // they fire before the next serial event.\n\n flushPassiveEffects();\n}\n\nfunction flushPendingDiscreteUpdates() {\n if (rootsWithPendingDiscreteUpdates !== null) {\n // For each root with pending discrete updates, schedule a callback to\n // immediately flush them.\n var roots = rootsWithPendingDiscreteUpdates;\n rootsWithPendingDiscreteUpdates = null;\n roots.forEach(function (root) {\n markDiscreteUpdatesExpired(root);\n ensureRootIsScheduled(root, now());\n });\n } // Now flush the immediate queue.\n\n\n flushSyncCallbackQueue();\n}\n\nfunction batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n}\nfunction batchedEventUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= EventContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n}\nfunction discreteUpdates$1(fn, a, b, c, d) {\n var prevExecutionContext = executionContext;\n executionContext |= DiscreteEventContext;\n\n {\n try {\n return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n }\n}\nfunction unbatchedUpdates(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext &= ~BatchedContext;\n executionContext |= LegacyUnbatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n}\nfunction flushSync(fn, a) {\n var prevExecutionContext = executionContext;\n\n if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {\n {\n 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.');\n }\n\n return fn(a);\n }\n\n executionContext |= BatchedContext;\n\n {\n try {\n if (fn) {\n return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));\n } else {\n return undefined;\n }\n } finally {\n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n // Note that this will happen even if batchedUpdates is higher up\n // the stack.\n\n flushSyncCallbackQueue();\n }\n }\n}\nfunction pushRenderLanes(fiber, lanes) {\n push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);\n subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);\n workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);\n}\nfunction popRenderLanes(fiber) {\n subtreeRenderLanes = subtreeRenderLanesCursor.current;\n pop(subtreeRenderLanesCursor, fiber);\n}\n\nfunction prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n var timeoutHandle = root.timeoutHandle;\n\n if (timeoutHandle !== noTimeout) {\n // The root previous suspended and scheduled a timeout to commit a fallback\n // state. Now that we have additional work, cancel the timeout.\n root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above\n\n cancelTimeout(timeoutHandle);\n }\n\n if (workInProgress !== null) {\n var interruptedWork = workInProgress.return;\n\n while (interruptedWork !== null) {\n unwindInterruptedWork(interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n }\n\n workInProgressRoot = root;\n workInProgress = createWorkInProgress(root.current, null);\n workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;\n workInProgressRootExitStatus = RootIncomplete;\n workInProgressRootFatalError = null;\n workInProgressRootSkippedLanes = NoLanes;\n workInProgressRootUpdatedLanes = NoLanes;\n workInProgressRootPingedLanes = NoLanes;\n\n {\n spawnedWorkDuringRender = null;\n }\n\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n}\n\nfunction handleError(root, thrownValue) {\n do {\n var erroredWork = workInProgress;\n\n try {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksAfterThrow();\n resetCurrentFiber(); // TODO: I found and added this missing line while investigating a\n // separate issue. Write a regression test using string refs.\n\n ReactCurrentOwner$2.current = null;\n\n if (erroredWork === null || erroredWork.return === null) {\n // Expected to be working on a non-root fiber. This is a fatal error\n // because there's no ancestor that can handle it; the root is\n // supposed to capture all errors that weren't caught by an error\n // boundary.\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n // sibling, or the parent if there are no siblings. But since the root\n // has no siblings nor a parent, we set it to null. Usually this is\n // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n // intentionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return;\n }\n\n if (enableProfilerTimer && erroredWork.mode & ProfileMode) {\n // Record the time spent rendering before an error was thrown. This\n // avoids inaccurate Profiler durations in the case of a\n // suspended render.\n stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);\n }\n\n throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);\n completeUnitOfWork(erroredWork);\n } catch (yetAnotherThrownValue) {\n // Something in the return path also threw.\n thrownValue = yetAnotherThrownValue;\n\n if (workInProgress === erroredWork && erroredWork !== null) {\n // If this boundary has already errored, then we had trouble processing\n // the error. Bubble it to the next boundary.\n erroredWork = erroredWork.return;\n workInProgress = erroredWork;\n } else {\n erroredWork = workInProgress;\n }\n\n continue;\n } // Return to the normal work loop.\n\n\n return;\n } while (true);\n}\n\nfunction pushDispatcher() {\n var prevDispatcher = ReactCurrentDispatcher$2.current;\n ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;\n\n if (prevDispatcher === null) {\n // The React isomorphic package does not include a default dispatcher.\n // Instead the first renderer will lazily attach one, in order to give\n // nicer error messages.\n return ContextOnlyDispatcher;\n } else {\n return prevDispatcher;\n }\n}\n\nfunction popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher$2.current = prevDispatcher;\n}\n\nfunction pushInteractions(root) {\n {\n var prevInteractions = tracing.__interactionsRef.current;\n tracing.__interactionsRef.current = root.memoizedInteractions;\n return prevInteractions;\n }\n}\n\nfunction popInteractions(prevInteractions) {\n {\n tracing.__interactionsRef.current = prevInteractions;\n }\n}\n\nfunction markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now();\n}\nfunction markSkippedUpdateLanes(lane) {\n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n}\nfunction renderDidSuspend() {\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootSuspended;\n }\n}\nfunction renderDidSuspendDelayIfPossible() {\n if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {\n workInProgressRootExitStatus = RootSuspendedWithDelay;\n } // Check if there are updates that we skipped tree that might have unblocked\n // this render.\n\n\n if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {\n // Mark the current render as suspended so that we switch to working on\n // the updates that were skipped. Usually we only suspend at the end of\n // the render phase.\n // TODO: We should probably always mark the root as suspended immediately\n // (inside this function), since by suspending at the end of the render\n // phase introduces a potential mistake where we suspend lanes that were\n // pinged or updated while we were rendering.\n markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);\n }\n}\nfunction renderDidError() {\n if (workInProgressRootExitStatus !== RootCompleted) {\n workInProgressRootExitStatus = RootErrored;\n }\n} // Called during render to determine if anything has suspended.\n// Returns false if we're not sure.\n\nfunction renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n}\n\nfunction renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n prepareFreshStack(root, lanes);\n startWorkOnPendingInteractions(root, lanes);\n }\n\n var prevInteractions = pushInteractions(root);\n\n do {\n try {\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n\n {\n popInteractions(prevInteractions);\n }\n\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n {\n {\n throw Error( \"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes;\n return workInProgressRootExitStatus;\n} // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n/** @noinline */\n\n\nfunction workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n resetRenderTimer();\n prepareFreshStack(root, lanes);\n startWorkOnPendingInteractions(root, lanes);\n }\n\n var prevInteractions = pushInteractions(root);\n\n do {\n try {\n workLoopConcurrent();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n\n {\n popInteractions(prevInteractions);\n }\n\n popDispatcher(prevDispatcher);\n executionContext = prevExecutionContext;\n\n\n if (workInProgress !== null) {\n\n return RootIncomplete;\n } else {\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // Return the final exit status.\n\n return workInProgressRootExitStatus;\n }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction performUnitOfWork(unitOfWork) {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = unitOfWork.alternate;\n setCurrentFiber(unitOfWork);\n var next;\n\n if ( (unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n }\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$2.current = null;\n}\n\nfunction completeUnitOfWork(unitOfWork) {\n // Attempt to complete the current unit of work, then move to the next\n // sibling. If there are no more siblings, return to the parent fiber.\n var completedWork = unitOfWork;\n\n do {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = completedWork.alternate;\n var returnFiber = completedWork.return; // Check if the work completed or if something threw.\n\n if ((completedWork.flags & Incomplete) === NoFlags) {\n setCurrentFiber(completedWork);\n var next = void 0;\n\n if ( (completedWork.mode & ProfileMode) === NoMode) {\n next = completeWork(current, completedWork, subtreeRenderLanes);\n } else {\n startProfilerTimer(completedWork);\n next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n }\n\n resetCurrentFiber();\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n workInProgress = next;\n return;\n }\n\n resetChildLanes(completedWork);\n\n if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete\n (returnFiber.flags & Incomplete) === NoFlags) {\n // Append all the effects of the subtree and this fiber onto the effect\n // list of the parent. The completion order of the children affects the\n // side-effect order.\n if (returnFiber.firstEffect === null) {\n returnFiber.firstEffect = completedWork.firstEffect;\n }\n\n if (completedWork.lastEffect !== null) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = completedWork.firstEffect;\n }\n\n returnFiber.lastEffect = completedWork.lastEffect;\n } // If this fiber had side-effects, we append it AFTER the children's\n // side-effects. We can perform certain side-effects earlier if needed,\n // by doing multiple passes over the effect list. We don't want to\n // schedule our own side-effect on our own list because if end up\n // reusing children we'll schedule this effect onto itself since we're\n // at the end.\n\n\n var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect\n // list. PerformedWork effect is read by React DevTools but shouldn't be\n // committed.\n\n if (flags > PerformedWork) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = completedWork;\n } else {\n returnFiber.firstEffect = completedWork;\n }\n\n returnFiber.lastEffect = completedWork;\n }\n }\n } else {\n // This fiber did not complete because something threw. Pop values off\n // the stack without entering the complete phase. If this is a boundary,\n // capture values if possible.\n var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time.\n\n\n if (_next !== null) {\n // If completing this work spawned new work, do that next. We'll come\n // back here again.\n // Since we're restarting, remove anything that is not a host effect\n // from the effect tag.\n _next.flags &= HostEffectMask;\n workInProgress = _next;\n return;\n }\n\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = completedWork.actualDuration;\n var child = completedWork.child;\n\n while (child !== null) {\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n }\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its effect list.\n returnFiber.firstEffect = returnFiber.lastEffect = null;\n returnFiber.flags |= Incomplete;\n }\n }\n\n var siblingFiber = completedWork.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n workInProgress = siblingFiber;\n return;\n } // Otherwise, return to the parent\n\n\n completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = completedWork;\n } while (completedWork !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootCompleted;\n }\n}\n\nfunction resetChildLanes(completedWork) {\n if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`\n // to switch statement in `completeWork`.\n (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {\n // The children of this component are hidden. Don't bubble their\n // expiration times.\n return;\n }\n\n var newChildLanes = NoLanes; // Bubble up the earliest expiration time.\n\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var actualDuration = completedWork.actualDuration;\n var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n // When work is done, it should bubble to the parent's actualDuration. If\n // the fiber has not been cloned though, (meaning no work was done), then\n // this value will reflect the amount of time spent working on a previous\n // render. In that case it should not bubble. We determine whether it was\n // cloned by comparing the child pointer.\n\n var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;\n var child = completedWork.child;\n\n while (child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n\n if (shouldBubbleActualDurations) {\n actualDuration += child.actualDuration;\n }\n\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n\n var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;\n\n if (isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = completedWork.child;\n\n if (primaryChildFragment !== null) {\n treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n\n while (_child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n _child = _child.sibling;\n }\n }\n\n completedWork.childLanes = newChildLanes;\n}\n\nfunction commitRoot(root) {\n var renderPriorityLevel = getCurrentPriorityLevel();\n runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));\n return null;\n}\n\nfunction commitRootImpl(root, renderPriorityLevel) {\n do {\n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n // means `flushPassiveEffects` will sometimes result in additional\n // passive effects. So we need to keep flushing in a loop until there are\n // no more pending effects.\n // TODO: Might be better if `flushPassiveEffects` did not automatically\n // flush synchronous work at the end, to avoid factoring hazards like this.\n flushPassiveEffects();\n } while (rootWithPendingPassiveEffects !== null);\n\n flushRenderPhaseStrictModeWarningsInDEV();\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n }\n\n var finishedWork = root.finishedWork;\n var lanes = root.finishedLanes;\n\n if (finishedWork === null) {\n\n return null;\n }\n\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n\n if (!(finishedWork !== root.current)) {\n {\n throw Error( \"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // commitRoot never returns a continuation; it always finishes synchronously.\n // So we can clear these now to allow a new callback to be scheduled.\n\n\n root.callbackNode = null; // Update the first and last pending times on this root. The new first\n // pending time is whatever is left on the root fiber.\n\n var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);\n markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of\n // `flushDiscreteUpdates` starts a useless render pass which may cancels\n // a scheduled timeout.\n\n if (rootsWithPendingDiscreteUpdates !== null) {\n if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {\n rootsWithPendingDiscreteUpdates.delete(root);\n }\n }\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n workInProgressRootRenderLanes = NoLanes;\n } // Get the list of effects.\n\n\n var firstEffect;\n\n if (finishedWork.flags > PerformedWork) {\n // A fiber's effect list consists only of its children, not itself. So if\n // the root has an effect, we need to add it to the end of the list. The\n // resulting list is the set that would belong to the root's parent, if it\n // had one; that is, all the effects in the tree including the root.\n if (finishedWork.lastEffect !== null) {\n finishedWork.lastEffect.nextEffect = finishedWork;\n firstEffect = finishedWork.firstEffect;\n } else {\n firstEffect = finishedWork;\n }\n } else {\n // There is no effect on the root.\n firstEffect = finishedWork.firstEffect;\n }\n\n if (firstEffect !== null) {\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles\n\n ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n // of the effect list for each phase: all mutation effects come before all\n // layout effects, and so on.\n // The first phase a \"before mutation\" phase. We use this phase to read the\n // state of the host tree right before we mutate it. This is where\n // getSnapshotBeforeUpdate is called.\n\n focusedInstanceHandle = prepareForCommit(root.containerInfo);\n shouldFireAfterActiveInstanceBlur = false;\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitBeforeMutationEffects, null);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var error = clearCaughtError();\n captureCommitPhaseError(nextEffect, error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null); // We no longer need to track the active instance fiber\n\n\n focusedInstanceHandle = null;\n\n {\n // Mark the current commit time to be shared by all Profilers in this\n // batch. This enables them to be grouped later.\n recordCommitTime();\n } // The next phase is the mutation phase, where we mutate the host tree.\n\n\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after\n // the mutation phase, so that the previous tree is still current during\n // componentWillUnmount, but before the layout phase, so that the finished\n // work is current during componentDidMount/Update.\n\n root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n // the host tree after it's been mutated. The idiomatic use case for this is\n // layout, but class component lifecycles also fire here for legacy reasons.\n\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error2 = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error2);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an\n // opportunity to paint.\n\n requestPaint();\n\n {\n popInteractions(prevInteractions);\n }\n\n executionContext = prevExecutionContext;\n } else {\n // No effects.\n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n // no effects.\n // TODO: Maybe there's a better way to report this.\n\n {\n recordCommitTime();\n }\n }\n\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n if (rootDoesHavePassiveEffects) {\n // This commit has passive effects. Stash a reference to them. But don't\n // schedule a callback until after flushing layout work.\n rootDoesHavePassiveEffects = false;\n rootWithPendingPassiveEffects = root;\n pendingPassiveEffectsLanes = lanes;\n pendingPassiveEffectsRenderPriority = renderPriorityLevel;\n } else {\n // We are done with the effect chain at this point so let's clear the\n // nextEffect pointers to assist with GC. If we have passive effects, we'll\n // clear this in flushPassiveEffects.\n nextEffect = firstEffect;\n\n while (nextEffect !== null) {\n var nextNextEffect = nextEffect.nextEffect;\n nextEffect.nextEffect = null;\n\n if (nextEffect.flags & Deletion) {\n detachFiberAfterEffects(nextEffect);\n }\n\n nextEffect = nextNextEffect;\n }\n } // Read this again, since an effect might have updated it\n\n\n remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n\n if (remainingLanes !== NoLanes) {\n {\n if (spawnedWorkDuringRender !== null) {\n var expirationTimes = spawnedWorkDuringRender;\n spawnedWorkDuringRender = null;\n\n for (var i = 0; i < expirationTimes.length; i++) {\n scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);\n }\n }\n\n schedulePendingInteractions(root, remainingLanes);\n }\n } else {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n\n {\n if (!rootDidHavePassiveEffects) {\n // If there are no passive effects, then we can complete the pending interactions.\n // Otherwise, we'll wait until after the passive effects are flushed.\n // Wait to do this until after remaining work has been scheduled,\n // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.\n finishPendingInteractions(root, lanes);\n }\n }\n\n if (remainingLanes === SyncLane) {\n // Count the number of times the root synchronously re-renders without\n // finishing. If there are too many, it indicates an infinite update loop.\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n }\n\n onCommitRoot(finishedWork.stateNode, renderPriorityLevel);\n\n {\n onCommitRoot$1();\n } // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n\n ensureRootIsScheduled(root, now());\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var _error3 = firstUncaughtError;\n firstUncaughtError = null;\n throw _error3;\n }\n\n if ((executionContext & LegacyUnbatchedContext) !== NoContext) {\n // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired\n // synchronously, but layout updates should be deferred until the end\n // of the batch.\n\n\n return null;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncCallbackQueue();\n\n return null;\n}\n\nfunction commitBeforeMutationEffects() {\n while (nextEffect !== null) {\n var current = nextEffect.alternate;\n\n if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {\n if ((nextEffect.flags & Deletion) !== NoFlags) {\n if (doesFiberContain(nextEffect, focusedInstanceHandle)) {\n shouldFireAfterActiveInstanceBlur = true;\n }\n } else {\n // TODO: Move this out of the hot path using a dedicated effect tag.\n if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {\n shouldFireAfterActiveInstanceBlur = true;\n }\n }\n }\n\n var flags = nextEffect.flags;\n\n if ((flags & Snapshot) !== NoFlags) {\n setCurrentFiber(nextEffect);\n commitBeforeMutationLifeCycles(current, nextEffect);\n resetCurrentFiber();\n }\n\n if ((flags & Passive) !== NoFlags) {\n // If there are passive effects, schedule a callback to flush at\n // the earliest opportunity.\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction commitMutationEffects(root, renderPriorityLevel) {\n // TODO: Should probably move the bulk of this function to commitWork.\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var flags = nextEffect.flags;\n\n if (flags & ContentReset) {\n commitResetTextContent(nextEffect);\n }\n\n if (flags & Ref) {\n var current = nextEffect.alternate;\n\n if (current !== null) {\n commitDetachRef(current);\n }\n } // The following switch statement is only concerned about placement,\n // updates, and deletions. To avoid needing to add a case for every possible\n // bitmap value, we remove the secondary effects from the effect tag and\n // switch on that value.\n\n\n var primaryFlags = flags & (Placement | Update | Deletion | Hydrating);\n\n switch (primaryFlags) {\n case Placement:\n {\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted does\n // and isMounted is deprecated anyway so we should be able to kill this.\n\n nextEffect.flags &= ~Placement;\n break;\n }\n\n case PlacementAndUpdate:\n {\n // Placement\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n\n nextEffect.flags &= ~Placement; // Update\n\n var _current = nextEffect.alternate;\n commitWork(_current, nextEffect);\n break;\n }\n\n case Hydrating:\n {\n nextEffect.flags &= ~Hydrating;\n break;\n }\n\n case HydratingAndUpdate:\n {\n nextEffect.flags &= ~Hydrating; // Update\n\n var _current2 = nextEffect.alternate;\n commitWork(_current2, nextEffect);\n break;\n }\n\n case Update:\n {\n var _current3 = nextEffect.alternate;\n commitWork(_current3, nextEffect);\n break;\n }\n\n case Deletion:\n {\n commitDeletion(root, nextEffect);\n break;\n }\n }\n\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction commitLayoutEffects(root, committedLanes) {\n\n\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var flags = nextEffect.flags;\n\n if (flags & (Update | Callback)) {\n var current = nextEffect.alternate;\n commitLifeCycles(root, current, nextEffect);\n }\n\n {\n if (flags & Ref) {\n commitAttachRef(nextEffect);\n }\n }\n\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction flushPassiveEffects() {\n // Returns whether passive effects were flushed.\n if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {\n var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;\n pendingPassiveEffectsRenderPriority = NoPriority$1;\n\n {\n return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);\n }\n }\n\n return false;\n}\nfunction enqueuePendingPassiveHookEffectMount(fiber, effect) {\n pendingPassiveHookEffectsMount.push(effect, fiber);\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n}\nfunction enqueuePendingPassiveHookEffectUnmount(fiber, effect) {\n pendingPassiveHookEffectsUnmount.push(effect, fiber);\n\n {\n fiber.flags |= PassiveUnmountPendingDev;\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.flags |= PassiveUnmountPendingDev;\n }\n }\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n}\n\nfunction invokePassiveEffectCreate(effect) {\n var create = effect.create;\n effect.destroy = create();\n}\n\nfunction flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n }\n\n var root = rootWithPendingPassiveEffects;\n var lanes = pendingPassiveEffectsLanes;\n rootWithPendingPassiveEffects = null;\n pendingPassiveEffectsLanes = NoLanes;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Cannot flush passive effects while already rendering.\" );\n }\n }\n\n {\n isFlushingPassiveEffects = true;\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called\n // before ANY passive effect create functions are called.\n // Otherwise effects in sibling components might interfere with each other.\n // e.g. a destroy function in one component may unintentionally override a ref\n // value set by a create function in another component.\n // Layout effects have the same constraint.\n // First pass: Destroy stale passive effects.\n\n var unmountEffects = pendingPassiveHookEffectsUnmount;\n pendingPassiveHookEffectsUnmount = [];\n\n for (var i = 0; i < unmountEffects.length; i += 2) {\n var _effect = unmountEffects[i];\n var fiber = unmountEffects[i + 1];\n var destroy = _effect.destroy;\n _effect.destroy = undefined;\n\n {\n fiber.flags &= ~PassiveUnmountPendingDev;\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.flags &= ~PassiveUnmountPendingDev;\n }\n }\n\n if (typeof destroy === 'function') {\n {\n setCurrentFiber(fiber);\n\n {\n invokeGuardedCallback(null, destroy, null);\n }\n\n if (hasCaughtError()) {\n if (!(fiber !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var error = clearCaughtError();\n captureCommitPhaseError(fiber, error);\n }\n\n resetCurrentFiber();\n }\n }\n } // Second pass: Create new passive effects.\n\n\n var mountEffects = pendingPassiveHookEffectsMount;\n pendingPassiveHookEffectsMount = [];\n\n for (var _i = 0; _i < mountEffects.length; _i += 2) {\n var _effect2 = mountEffects[_i];\n var _fiber = mountEffects[_i + 1];\n\n {\n setCurrentFiber(_fiber);\n\n {\n invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);\n }\n\n if (hasCaughtError()) {\n if (!(_fiber !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error4 = clearCaughtError();\n\n captureCommitPhaseError(_fiber, _error4);\n }\n\n resetCurrentFiber();\n }\n } // Note: This currently assumes there are no passive effects on the root fiber\n // because the root is not part of its own effect list.\n // This could change in the future.\n\n\n var effect = root.current.firstEffect;\n\n while (effect !== null) {\n var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC\n\n effect.nextEffect = null;\n\n if (effect.flags & Deletion) {\n detachFiberAfterEffects(effect);\n }\n\n effect = nextNextEffect;\n }\n\n {\n popInteractions(prevInteractions);\n finishPendingInteractions(root, lanes);\n }\n\n {\n isFlushingPassiveEffects = false;\n }\n\n executionContext = prevExecutionContext;\n flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n\n nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;\n return true;\n}\n\nfunction isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n}\nfunction markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n}\n\nfunction prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n}\n\nvar onUncaughtError = prepareToThrowUncaughtError;\n\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n enqueueUpdate(rootFiber, update);\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, SyncLane);\n }\n}\n\nfunction captureCommitPhaseError(sourceFiber, error) {\n if (sourceFiber.tag === HostRoot) {\n // Error was thrown at the root. There is no parent, so the root\n // itself should capture it.\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n return;\n }\n\n var fiber = sourceFiber.return;\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n enqueueUpdate(fiber, update);\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, SyncLane);\n } else {\n // This component has already been unmounted.\n // We can't schedule any follow up work for the root because the fiber is already unmounted,\n // but we can still call the log-only boundary so the error isn't swallowed.\n //\n // TODO This is only a temporary bandaid for the old reconciler fork.\n // We can delete this special case once the new fork is merged.\n if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n try {\n instance.componentDidCatch(error, errorInfo);\n } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?\n // This is kind of an edge case.\n }\n }\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(wakeable);\n }\n\n var eventTime = requestEventTime();\n markRootPinged(root, pingedLanes);\n\n if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\n // Received a ping at the same priority level at which we're currently\n // rendering. We might want to restart this render. This should mirror\n // the logic of whether or not a root suspends once it completes.\n // TODO: If we're rendering sync either due to Sync, Batched or expired,\n // we should probably never restart.\n // If we're suspended with delay, or if it's a retry, we'll always suspend\n // so we can always restart.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Restart from the root.\n prepareFreshStack(root, NoLanes);\n } else {\n // Even though we can't restart right now, we might get an\n // opportunity later. So we mark this render as having a ping.\n workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n }\n }\n\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, pingedLanes);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n // The boundary fiber (a Suspense component or SuspenseList component)\n // previously was rendered in its fallback state. One of the promises that\n // suspended it has resolved, which means at least part of the tree was\n // likely unblocked. Try rendering again, at a new expiration time.\n if (retryLane === NoLane) {\n retryLane = requestRetryLane(boundaryFiber);\n } // TODO: Special case idle priority?\n\n\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);\n\n if (root !== null) {\n markRootUpdated(root, retryLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, retryLane);\n }\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = NoLane; // Default\n\n var retryCache;\n\n {\n retryCache = boundaryFiber.stateNode;\n }\n\n if (retryCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(wakeable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n} // Computes the next Just Noticeable Difference (JND) boundary.\n// The theory is that a person can't tell the difference between small differences in time.\n// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable\n// difference in the experience. However, waiting for longer might mean that we can avoid\n// showing an intermediate loading state. The longer we have already waited, the harder it\n// is to tell small differences in time. Therefore, the longer we've already waited,\n// the longer we can wait additionally. At some point we have to give up though.\n// We pick a train model where the next boundary commits at a consistent schedule.\n// These particular numbers are vague estimates. We expect to adjust them based on research.\n\nfunction jnd(timeElapsed) {\n return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;\n}\n\nfunction checkForNestedUpdates() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = null;\n\n {\n {\n throw Error( \"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\" );\n }\n }\n }\n\n {\n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n\n error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n }\n }\n}\n\nfunction flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n\n {\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n }\n}\n\nvar didWarnStateUpdateForNotYetMountedComponent = null;\n\nfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n // We let the other warning about render phase updates deal with this one.\n return;\n }\n\n if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {\n return;\n }\n\n var tag = fiber.tag;\n\n if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentName(fiber.type) || 'ReactComponent';\n\n if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n }\n\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n 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.');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = null;\n\nfunction warnAboutUpdateOnUnmountedFiberInDEV(fiber) {\n {\n var tag = fiber.tag;\n\n if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // If there are pending passive effects unmounts for this Fiber,\n // we can assume that they would have prevented this update.\n\n\n if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentName(fiber.type) || 'ReactComponent';\n\n if (didWarnStateUpdateForUnmountedComponent !== null) {\n if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForUnmountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForUnmountedComponent = new Set([componentName]);\n }\n\n if (isFlushingPassiveEffects) ; else {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n 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');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\n\nvar beginWork$1;\n\n{\n var dummyFiber = null;\n\n beginWork$1 = function (current, unitOfWork, lanes) {\n // If a component throws an error, we replay it again in a synchronously\n // dispatched event, so that the debugger will treat it as an uncaught\n // error See ReactErrorUtils for more information.\n // Before entering the begin phase, copy the work-in-progress onto a dummy\n // fiber. If beginWork throws, we'll use this to reset the state.\n var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n try {\n return beginWork(current, unitOfWork, lanes);\n } catch (originalError) {\n if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises. Treat everything else like an error.\n throw originalError;\n } // Keep this code in sync with handleError; any changes here must have\n // corresponding changes there.\n\n\n resetContextDependencies();\n resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the\n // same fiber again.\n // Unwind the failed stack frame\n\n unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.\n\n assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if ( unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n } // Run beginWork again.\n\n\n invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);\n\n if (hasCaughtError()) {\n var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.\n // Rethrow this error instead of the original one.\n\n throw replayError;\n } else {\n // This branch is reachable if the render phase is impure.\n throw originalError;\n }\n }\n };\n}\n\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentName(fiber.type) || 'Unknown';\n\n 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);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n if (!didWarnAboutUpdateInRender) {\n error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n\n didWarnAboutUpdateInRender = true;\n }\n\n break;\n }\n }\n }\n }\n} // a 'shared' variable that changes when act() opens/closes in tests.\n\n\nvar IsThisRendererActing = {\n current: false\n};\nfunction warnIfNotScopedWithMatchingAct(fiber) {\n {\n if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n 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.\n '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.\n 'import TestRenderer fr' + \"om react-test-renderer';\\n\" + 'const {act} = TestRenderer;\\n' + '// ...\\n' + 'act(() => ...);');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\nfunction warnIfNotCurrentlyActingEffectsInDEV(fiber) {\n {\n if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n 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));\n }\n }\n}\n\nfunction warnIfNotCurrentlyActingUpdatesInDEV(fiber) {\n {\n if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n 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));\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\n\nvar warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.\n\nvar didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked\n// scheduler is the actual recommendation. The alternative could be a testing build,\n// a new lib, or whatever; we dunno just yet. This message is for early adopters\n// to get their tests right.\n\nfunction warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n 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.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}\n\nfunction computeThreadID(root, lane) {\n // Interaction threads are unique per root and expiration time.\n // NOTE: Intentionally unsound cast. All that matters is that it's a number\n // and it represents a batch of work. Could make a helper function instead,\n // but meh this is fine for now.\n return lane * 1000 + root.interactionThreadID;\n}\n\nfunction markSpawnedWork(lane) {\n\n if (spawnedWorkDuringRender === null) {\n spawnedWorkDuringRender = [lane];\n } else {\n spawnedWorkDuringRender.push(lane);\n }\n}\n\nfunction scheduleInteractions(root, lane, interactions) {\n\n if (interactions.size > 0) {\n var pendingInteractionMap = root.pendingInteractionMap;\n var pendingInteractions = pendingInteractionMap.get(lane);\n\n if (pendingInteractions != null) {\n interactions.forEach(function (interaction) {\n if (!pendingInteractions.has(interaction)) {\n // Update the pending async work count for previously unscheduled interaction.\n interaction.__count++;\n }\n\n pendingInteractions.add(interaction);\n });\n } else {\n pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.\n\n interactions.forEach(function (interaction) {\n interaction.__count++;\n });\n }\n\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, lane);\n subscriber.onWorkScheduled(interactions, threadID);\n }\n }\n}\n\nfunction schedulePendingInteractions(root, lane) {\n\n scheduleInteractions(root, lane, tracing.__interactionsRef.current);\n}\n\nfunction startWorkOnPendingInteractions(root, lanes) {\n // we can accurately attribute time spent working on it, And so that cascading\n // work triggered during the render phase will be associated with it.\n\n\n var interactions = new Set();\n root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {\n if (includesSomeLane(lanes, scheduledLane)) {\n scheduledInteractions.forEach(function (interaction) {\n return interactions.add(interaction);\n });\n }\n }); // Store the current set of interactions on the FiberRoot for a few reasons:\n // We can re-use it in hot functions like performConcurrentWorkOnRoot()\n // without having to recalculate it. We will also use it in commitWork() to\n // pass to any Profiler onRender() hooks. This also provides DevTools with a\n // way to access it when the onCommitRoot() hook is called.\n\n root.memoizedInteractions = interactions;\n\n if (interactions.size > 0) {\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, lanes);\n\n try {\n subscriber.onWorkStarted(interactions, threadID);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n }\n }\n }\n}\n\nfunction finishPendingInteractions(root, committedLanes) {\n\n var remainingLanesAfterCommit = root.pendingLanes;\n var subscriber;\n\n try {\n subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null && root.memoizedInteractions.size > 0) {\n // FIXME: More than one lane can finish in a single commit.\n var threadID = computeThreadID(root, committedLanes);\n subscriber.onWorkStopped(root.memoizedInteractions, threadID);\n }\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n } finally {\n // Clear completed interactions from the pending Map.\n // Unless the render was suspended or cascading work was scheduled,\n // In which case leave pending interactions until the subsequent render.\n var pendingInteractionMap = root.pendingInteractionMap;\n pendingInteractionMap.forEach(function (scheduledInteractions, lane) {\n // Only decrement the pending interaction count if we're done.\n // If there's still work at the current priority,\n // That indicates that we are waiting for suspense data.\n if (!includesSomeLane(remainingLanesAfterCommit, lane)) {\n pendingInteractionMap.delete(lane);\n scheduledInteractions.forEach(function (interaction) {\n interaction.__count--;\n\n if (subscriber !== null && interaction.__count === 0) {\n try {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n }\n }\n });\n }\n });\n }\n} // `act` testing API\n\nfunction shouldForceFlushFallbacksInDEV() {\n // Never force flush in production. This function should get stripped out.\n return actingUpdatesScopeDepth > 0;\n}\n// so we can tell if any async act() calls try to run in parallel.\n\n\nvar actingUpdatesScopeDepth = 0;\n\nfunction detachFiberAfterEffects(fiber) {\n fiber.sibling = null;\n fiber.stateNode = null;\n}\n\nvar resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\nvar failedBoundaries = null;\nvar setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n};\nfunction resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n}\nfunction resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n // Check if we're dealing with a real forwardRef. Don't want to crash early.\n if (type !== null && type !== undefined && typeof type.render === 'function') {\n // ForwardRef is special because its resolved .type is an object,\n // but it's possible that we only have its inner render function in the map.\n // If that inner render function is different, we'll build a new forwardRef type.\n var currentRender = resolveFunctionForHotReloading(type.render);\n\n if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n\n return syntheticType;\n }\n }\n\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\n }\n\n var prevType = fiber.elementType;\n var nextType = element.type; // If we got here, we know types aren't === equal.\n\n var needsCompareFamilies = false;\n var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case FunctionComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n // We don't know the inner type yet.\n // We're going to assume that the lazy inner type is stable,\n // and so it is sufficient to avoid reconciling it away.\n // We're not going to unwrap or actually use the new lazy type.\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case ForwardRef:\n {\n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ($$typeofNextType === REACT_MEMO_TYPE) {\n // TODO: if it was but can no longer be simple,\n // we shouldn't set this.\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n default:\n return false;\n } // Check if both types have a family and it's the same one.\n\n\n if (needsCompareFamilies) {\n // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n // This means both of them need to be registered to preserve state.\n // If we unwrapped and compared the inner types for wrappers instead,\n // then we would risk falsely saying two separate memo(Foo)\n // calls are equivalent because they wrap the same Foo function.\n var prevFamily = resolveFamily(prevType);\n\n if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n\n return false;\n }\n}\nfunction markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n if (typeof WeakSet !== 'function') {\n return;\n }\n\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n\n failedBoundaries.add(fiber);\n }\n}\nvar scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n var staleFamilies = update.staleFamilies,\n updatedFamilies = update.updatedFamilies;\n flushPassiveEffects();\n flushSync(function () {\n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n });\n }\n};\nvar scheduleRoot = function (root, element) {\n {\n if (root.context !== emptyContextObject) {\n // Super edge case: root has a legacy _renderSubtree context\n // but we don't know the parentComponent so we can't pass it.\n // Just ignore. We'll delete this with _renderSubtree code path later.\n return;\n }\n\n flushPassiveEffects();\n flushSync(function () {\n updateContainer(element, root, null, null);\n });\n }\n};\n\nfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n {\n var alternate = fiber.alternate,\n child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n\n var needsRender = false;\n var needsRemount = false;\n\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\n\n if (family !== undefined) {\n if (staleFamilies.has(family)) {\n needsRemount = true;\n } else if (updatedFamilies.has(family)) {\n if (tag === ClassComponent) {\n needsRemount = true;\n } else {\n needsRender = true;\n }\n }\n }\n }\n\n if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n\n if (needsRemount || needsRender) {\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n }\n }\n}\n\nvar findHostInstancesForRefresh = function (root, families) {\n {\n var hostInstances = new Set();\n var types = new Set(families.map(function (family) {\n return family.current;\n }));\n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n return hostInstances;\n }\n};\n\nfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n {\n var child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n var didMatch = false;\n\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\n }\n }\n\n if (didMatch) {\n // We have a match. This only drills down to the closest host components.\n // There's no need to search deeper because for the purpose of giving\n // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n findHostInstancesForFiberShallowly(fiber, hostInstances);\n } else {\n // If there's no match, maybe there will be one further down in the child tree.\n if (child !== null) {\n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n }\n }\n\n if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n}\n\nfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n\n var node = fiber;\n\n while (true) {\n switch (node.tag) {\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n\n node = node.return;\n }\n }\n}\n\nfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\n\n while (true) {\n if (node.tag === HostComponent) {\n // We got a match.\n foundHostInstances = true;\n hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === fiber) {\n return foundHostInstances;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n return false;\n}\n\nvar hasBadMapPolyfill;\n\n{\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n\n new Map([[nonExtensibleObject, null]]);\n new Set([nonExtensibleObject]);\n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n}\n\nvar debugCounter = 1;\n\nfunction FiberNode(tag, pendingProps, key, mode) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.elementType = null;\n this.type = null;\n this.stateNode = null; // Fiber\n\n this.return = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n this.ref = null;\n this.pendingProps = pendingProps;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n this.dependencies = null;\n this.mode = mode; // Effects\n\n this.flags = NoFlags;\n this.nextEffect = null;\n this.firstEffect = null;\n this.lastEffect = null;\n this.lanes = NoLanes;\n this.childLanes = NoLanes;\n this.alternate = null;\n\n {\n // Note: The following is done to avoid a v8 performance cliff.\n //\n // Initializing the fields below to smis and later updating them with\n // double values will cause Fibers to end up having separate shapes.\n // This behavior/bug has something to do with Object.preventExtension().\n // Fortunately this only impacts DEV builds.\n // Unfortunately it makes React unusably slow for some applications.\n // To work around this, initialize the fields below with doubles.\n //\n // Learn more about this here:\n // https://github.com/facebook/react/issues/14365\n // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n this.actualDuration = Number.NaN;\n this.actualStartTime = Number.NaN;\n this.selfBaseDuration = Number.NaN;\n this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n // This won't trigger the performance cliff mentioned above,\n // and it simplifies other profiler code (including DevTools).\n\n this.actualDuration = 0;\n this.actualStartTime = -1;\n this.selfBaseDuration = 0;\n this.treeBaseDuration = 0;\n }\n\n {\n // This isn't directly used but is handy for debugging internals:\n this._debugID = debugCounter++;\n this._debugSource = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\n\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n} // This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n// more difficult to predict when they get optimized and they are almost\n// never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n// always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n// to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n// is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n// compatible.\n\n\nvar createFiber = function (tag, pendingProps, key, mode) {\n // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, pendingProps, key, mode);\n};\n\nfunction shouldConstruct$1(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n\n return IndeterminateComponent;\n} // This is used to create an alternate fiber to do work on.\n\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.flags = NoFlags; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n }; // These will be overridden during the parent's reconciliation\n\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n\n return workInProgress;\n} // Used to reuse a Fiber for a second pass.\n\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n // This resets the Fiber to what createFiber or createWorkInProgress would\n // have set the values to before during the first pass. Ideally this wouldn't\n // be necessary but unfortunately many code paths reads from the workInProgress\n // when they should be reading from current and writing to workInProgress.\n // We assume pendingProps, index, key, ref, return are still untouched to\n // avoid doing another reconciliation.\n // Reset the effect tag but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.flags &= Placement; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childLanes = NoLanes;\n workInProgress.lanes = renderLanes;\n workInProgress.child = null;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n workInProgress.stateNode = null;\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = 0;\n workInProgress.treeBaseDuration = 0;\n }\n } else {\n // Reset to the cloned values that createWorkInProgress would've.\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n };\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n }\n\n return workInProgress;\n}\nfunction createHostRootFiber(tag) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode | BlockingMode | StrictMode;\n } else if (tag === BlockingRoot) {\n mode = BlockingMode | StrictMode;\n } else {\n mode = NoMode;\n }\n\n if ( isDevToolsPresent) {\n // Always collect profile timings when DevTools are present.\n // This enables DevTools to start capturing timing at any point\n // Without some nodes in the tree having empty base times.\n mode |= ProfileMode;\n }\n\n return createFiber(HostRoot, null, null, mode);\n}\nfunction createFiberFromTypeAndProps(type, // React$ElementType\nkey, pendingProps, owner, mode, lanes) {\n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n var resolvedType = type;\n\n if (typeof type === 'function') {\n if (shouldConstruct$1(type)) {\n fiberTag = ClassComponent;\n\n {\n resolvedType = resolveClassForHotReloading(resolvedType);\n }\n } else {\n {\n resolvedType = resolveFunctionForHotReloading(resolvedType);\n }\n }\n } else if (typeof type === 'string') {\n fiberTag = HostComponent;\n } else {\n getTag: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n\n case REACT_DEBUG_TRACING_MODE_TYPE:\n fiberTag = Mode;\n mode |= DebugTracingMode;\n break;\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictMode;\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n case REACT_LEGACY_HIDDEN_TYPE:\n return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);\n\n case REACT_SCOPE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n default:\n {\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = ContextProvider;\n break getTag;\n\n case REACT_CONTEXT_TYPE:\n // This is a consumer\n fiberTag = ContextConsumer;\n break getTag;\n\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n\n break getTag;\n\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\n\n case REACT_BLOCK_TYPE:\n fiberTag = Block;\n break getTag;\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n }\n\n var ownerName = owner ? getComponentName(owner.type) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n\n {\n {\n throw Error( \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" + (type == null ? type : typeof type) + \".\" + info );\n }\n }\n }\n }\n }\n\n var fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.lanes = lanes;\n\n {\n fiber._debugOwner = owner;\n }\n\n return fiber;\n}\nfunction createFiberFromElement(element, mode, lanes) {\n var owner = null;\n\n {\n owner = element._owner;\n }\n\n var type = element.type;\n var key = element.key;\n var pendingProps = element.props;\n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);\n\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n\n return fiber;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.lanes = lanes;\n return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {\n {\n if (typeof pendingProps.id !== 'string') {\n error('Profiler must specify an \"id\" as a prop');\n }\n }\n\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.\n\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.type = REACT_PROFILER_TYPE;\n fiber.lanes = lanes;\n\n {\n fiber.stateNode = {\n effectDuration: 0,\n passiveEffectDuration: 0\n };\n }\n\n return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n fiber.type = REACT_SUSPENSE_TYPE;\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n\n {\n // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n fiber.type = REACT_SUSPENSE_LIST_TYPE;\n }\n\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n {\n fiber.type = REACT_OFFSCREEN_TYPE;\n }\n\n fiber.elementType = REACT_OFFSCREEN_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {\n var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n {\n fiber.type = REACT_LEGACY_HIDDEN_TYPE;\n }\n\n fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromText(content, mode, lanes) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.\n\n fiber.elementType = 'DELETED';\n fiber.type = 'DELETED';\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.lanes = lanes;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n} // Used for stashing WIP properties to replay failed work in DEV.\n\nfunction assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n } // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.flags = source.flags;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.lanes = source.lanes;\n target.childLanes = source.childLanes;\n target.alternate = source.alternate;\n\n {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}\n\nfunction FiberRootNode(containerInfo, tag, hydrate) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.current = null;\n this.pingCache = null;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.context = null;\n this.pendingContext = null;\n this.hydrate = hydrate;\n this.callbackNode = null;\n this.callbackPriority = NoLanePriority;\n this.eventTimes = createLaneMap(NoLanes);\n this.expirationTimes = createLaneMap(NoTimestamp);\n this.pendingLanes = NoLanes;\n this.suspendedLanes = NoLanes;\n this.pingedLanes = NoLanes;\n this.expiredLanes = NoLanes;\n this.mutableReadLanes = NoLanes;\n this.finishedLanes = NoLanes;\n this.entangledLanes = NoLanes;\n this.entanglements = createLaneMap(NoLanes);\n\n {\n this.mutableSourceEagerHydrationData = null;\n }\n\n {\n this.interactionThreadID = tracing.unstable_getThreadID();\n this.memoizedInteractions = new Set();\n this.pendingInteractionMap = new Map();\n }\n\n {\n switch (tag) {\n case BlockingRoot:\n this._debugRootType = 'createBlockingRoot()';\n break;\n\n case ConcurrentRoot:\n this._debugRootType = 'createRoot()';\n break;\n\n case LegacyRoot:\n this._debugRootType = 'createLegacyRoot()';\n break;\n }\n }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {\n var root = new FiberRootNode(containerInfo, tag, hydrate);\n // stateNode is any.\n\n\n var uninitializedFiber = createHostRootFiber(tag);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n initializeUpdateQueue(uninitializedFiber);\n return root;\n}\n\n// This ensures that the version used for server rendering matches the one\n// that is eventually read during hydration.\n// If they don't match there's a potential tear and a full deopt render is required.\n\nfunction registerMutableSourceForHydration(root, mutableSource) {\n var getVersion = mutableSource._getVersion;\n var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n // Retaining it forever may interfere with GC.\n\n if (root.mutableSourceEagerHydrationData == null) {\n root.mutableSourceEagerHydrationData = [mutableSource, version];\n } else {\n root.mutableSourceEagerHydrationData.push(mutableSource, version);\n }\n}\n\nfunction createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\n\nvar didWarnAboutNestedUpdates;\nvar didWarnAboutFindNodeInStrictMode;\n\n{\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n}\n\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n\n return parentContext;\n}\n\nfunction findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n } else {\n {\n {\n throw Error( \"Argument appears to not be a ReactComponent. Keys: \" + Object.keys(component) );\n }\n }\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictMode) {\n var componentName = getComponentName(fiber.type) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n var previousFiber = current;\n\n try {\n setCurrentFiber(hostFiber);\n\n if (fiber.mode & StrictMode) {\n 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);\n } else {\n 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);\n }\n } finally {\n // Ideally this should reset to previous but this shouldn't be called in\n // render and there's another warning for that anyway.\n if (previousFiber) {\n setCurrentFiber(previousFiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n\n return hostFiber.stateNode;\n }\n}\n\nfunction createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {\n return createFiberRoot(containerInfo, tag, hydrate);\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n\n var current$1 = container.current;\n var eventTime = requestEventTime();\n\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfUnmockedScheduler(current$1);\n warnIfNotScopedWithMatchingAct(current$1);\n }\n }\n\n var lane = requestUpdateLane(current$1);\n\n var context = getContextForSubtree(parentComponent);\n\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n {\n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n\n error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');\n }\n }\n\n var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: element\n };\n callback = callback === undefined ? null : callback;\n\n if (callback !== null) {\n {\n if (typeof callback !== 'function') {\n error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(current$1, update);\n scheduleUpdateOnFiber(current$1, lane, eventTime);\n return lane;\n}\nfunction getPublicRootInstance(container) {\n var containerFiber = container.current;\n\n if (!containerFiber.child) {\n return null;\n }\n\n switch (containerFiber.child.tag) {\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n\n default:\n return containerFiber.child.stateNode;\n }\n}\n\nfunction markRetryLaneImpl(fiber, retryLane) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n }\n} // Increases the priority of thennables when they resolve within this boundary.\n\n\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryLaneImpl(alternate, retryLane);\n }\n}\n\nfunction attemptUserBlockingHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = InputDiscreteHydrationLane;\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptContinuousHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = SelectiveHydrationLane;\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptHydrationAtCurrentPriority$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority other than synchronously flush it.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction runWithPriority$2(priority, fn) {\n\n try {\n setCurrentUpdateLanePriority(priority);\n return fn();\n } finally {\n }\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.tag === FundamentalComponent) {\n return hostFiber.stateNode.instance;\n }\n\n return hostFiber.stateNode;\n}\n\nvar shouldSuspendImpl = function (fiber) {\n return false;\n};\n\nfunction shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideHookStateDeletePath = null;\nvar overrideHookStateRenamePath = null;\nvar overrideProps = null;\nvar overridePropsDeletePath = null;\nvar overridePropsRenamePath = null;\nvar scheduleUpdate = null;\nvar setSuspenseHandler = null;\n\n{\n var copyWithDeleteImpl = function (obj, path, index) {\n var key = path[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);\n\n if (index + 1 === path.length) {\n if (Array.isArray(updated)) {\n updated.splice(key, 1);\n } else {\n delete updated[key];\n }\n\n return updated;\n } // $FlowFixMe number or string is fine here\n\n\n updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n return updated;\n };\n\n var copyWithDelete = function (obj, path) {\n return copyWithDeleteImpl(obj, path, 0);\n };\n\n var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n var oldKey = oldPath[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);\n\n if (index + 1 === oldPath.length) {\n var newKey = newPath[index]; // $FlowFixMe number or string is fine here\n\n updated[newKey] = updated[oldKey];\n\n if (Array.isArray(updated)) {\n updated.splice(oldKey, 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe number or string is fine here\n updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here\n obj[oldKey], oldPath, newPath, index + 1);\n }\n\n return updated;\n };\n\n var copyWithRename = function (obj, oldPath, newPath) {\n if (oldPath.length !== newPath.length) {\n warn('copyWithRename() expects paths of the same length');\n\n return;\n } else {\n for (var i = 0; i < newPath.length - 1; i++) {\n if (oldPath[i] !== newPath[i]) {\n warn('copyWithRename() expects paths to be the same except for the deepest key');\n\n return;\n }\n }\n }\n\n return copyWithRenameImpl(obj, oldPath, newPath, 0);\n };\n\n var copyWithSetImpl = function (obj, path, index, value) {\n if (index >= path.length) {\n return value;\n }\n\n var key = path[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n };\n\n var findHook = function (fiber, id) {\n // For now, the \"id\" of stateful hooks is just the stateful hook index.\n // This may change in the future with e.g. nested hooks.\n var currentHook = fiber.memoizedState;\n\n while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n\n return currentHook;\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithSet(hook.memoizedState, path, value);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n };\n\n overrideHookStateDeletePath = function (fiber, id, path) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithDelete(hook.memoizedState, path);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n };\n\n overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n overridePropsDeletePath = function (fiber, path) {\n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n overridePropsRenamePath = function (fiber, oldPath, newPath) {\n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n scheduleUpdate = function (fiber) {\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n}\n\nfunction findHostInstanceByFiber(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n}\n\nfunction emptyFindFiberByHostInstance(instance) {\n return null;\n}\n\nfunction getCurrentFiberForDevTools() {\n return current;\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals({\n bundleType: devToolsConfig.bundleType,\n version: devToolsConfig.version,\n rendererPackageName: devToolsConfig.rendererPackageName,\n rendererConfig: devToolsConfig.rendererConfig,\n overrideHookState: overrideHookState,\n overrideHookStateDeletePath: overrideHookStateDeletePath,\n overrideHookStateRenamePath: overrideHookStateRenamePath,\n overrideProps: overrideProps,\n overridePropsDeletePath: overridePropsDeletePath,\n overridePropsRenamePath: overridePropsRenamePath,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: findHostInstanceByFiber,\n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\n // React Refresh\n findHostInstancesForRefresh: findHostInstancesForRefresh ,\n scheduleRefresh: scheduleRefresh ,\n scheduleRoot: scheduleRoot ,\n setRefreshHandler: setRefreshHandler ,\n // Enables DevTools to append owner stacks to error messages in DEV mode.\n getCurrentFiber: getCurrentFiberForDevTools \n });\n}\n\nfunction ReactDOMRoot(container, options) {\n this._internalRoot = createRootImpl(container, ConcurrentRoot, options);\n}\n\nfunction ReactDOMBlockingRoot(container, tag, options) {\n this._internalRoot = createRootImpl(container, tag, options);\n}\n\nReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {\n var root = this._internalRoot;\n\n {\n if (typeof arguments[1] === 'function') {\n error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n\n var container = root.containerInfo;\n\n if (container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(root.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + \"root.unmount() to empty a root's container.\");\n }\n }\n }\n }\n\n updateContainer(children, root, null, null);\n};\n\nReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {\n {\n if (typeof arguments[0] === 'function') {\n error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n }\n\n var root = this._internalRoot;\n var container = root.containerInfo;\n updateContainer(null, root, null, function () {\n unmarkContainerAsRoot(container);\n });\n};\n\nfunction createRootImpl(container, tag, options) {\n // Tag is either LegacyRoot or Concurrent Root\n var hydrate = options != null && options.hydrate === true;\n var hydrationCallbacks = options != null && options.hydrationOptions || null;\n var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;\n var root = createContainer(container, tag, hydrate);\n markContainerAsRoot(root.current, container);\n var containerNodeType = container.nodeType;\n\n {\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n }\n\n if (mutableSources) {\n for (var i = 0; i < mutableSources.length; i++) {\n var mutableSource = mutableSources[i];\n registerMutableSourceForHydration(root, mutableSource);\n }\n }\n\n return root;\n}\nfunction createLegacyRoot(container, options) {\n return new ReactDOMBlockingRoot(container, LegacyRoot, options);\n}\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\nvar warnedAboutHydrateAPI = false;\n\n{\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n }\n }\n }\n\n var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\n\n if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n 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.');\n }\n\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');\n }\n };\n}\n\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\n\nfunction shouldHydrateDueToLegacyHeuristic(container) {\n var rootElement = getReactRootElementInContainer(container);\n return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));\n}\n\nfunction legacyCreateRootFromDOMContainer(container, forceHydrate) {\n var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.\n\n if (!shouldHydrate) {\n var warned = false;\n var rootSibling;\n\n while (rootSibling = container.lastChild) {\n {\n if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {\n warned = true;\n\n error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');\n }\n }\n\n container.removeChild(rootSibling);\n }\n }\n\n {\n if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {\n warnedAboutHydrateAPI = true;\n\n 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.');\n }\n }\n\n return createLegacyRoot(container, shouldHydrate ? {\n hydrate: true\n } : undefined);\n}\n\nfunction warnOnInvalidCallback$1(callback, callerName) {\n {\n if (callback !== null && typeof callback !== 'function') {\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n }\n}\n\nfunction legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n } // TODO: Without `any` type, Flow says \"Property cannot be accessed on any\n // member of intersection type.\" Whyyyyyy.\n\n\n var root = container._reactRootContainer;\n var fiberRoot;\n\n if (!root) {\n // Initial mount\n root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n originalCallback.call(instance);\n };\n } // Initial mount should not be batched.\n\n\n unbatchedUpdates(function () {\n updateContainer(children, fiberRoot, parentComponent, callback);\n });\n } else {\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n\n _originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, fiberRoot, parentComponent, callback);\n }\n\n return getPublicRootInstance(fiberRoot);\n}\n\nfunction findDOMNode(componentOrElement) {\n {\n var owner = ReactCurrentOwner$3.current;\n\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n if (!warnedAboutRefsInRender) {\n error('%s is accessing findDOMNode inside its render(). ' + '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(owner.type) || 'A component');\n }\n\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n\n if (componentOrElement == null) {\n return null;\n }\n\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n}\nfunction hydrate(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n}\nfunction render(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n }\n }\n\n return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n}\nfunction unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n if (!isValidContainer(containerNode)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n if (!(parentComponent != null && has(parentComponent))) {\n {\n throw Error( \"parentComponent must be a valid React Component\" );\n }\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nfunction unmountComponentAtNode(container) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"unmountComponentAtNode(...): Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\n\n if (renderedByDifferentReact) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n }\n } // Unmount should not be batched.\n\n\n unbatchedUpdates(function () {\n legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n // $FlowFixMe This should probably use `delete container._reactRootContainer`\n container._reactRootContainer = null;\n unmarkContainerAsRoot(container);\n });\n }); // If you call unmountComponentAtNode twice in quick succession, you'll\n // get `true` twice. That's probably fine?\n\n return true;\n } else {\n {\n var _rootEl = getReactRootElementInContainer(container);\n\n var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;\n\n if (hasNonRootReactChild) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n }\n }\n\n return false;\n }\n}\n\nsetAttemptUserBlockingHydration(attemptUserBlockingHydration$1);\nsetAttemptContinuousHydration(attemptContinuousHydration$1);\nsetAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\nsetAttemptHydrationAtPriority(runWithPriority$2);\nvar didWarnAboutUnstableCreatePortal = false;\n\n{\n if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype\n Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n 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');\n }\n}\n\nsetRestoreImplementation(restoreControlledState$3);\nsetBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);\n\nfunction createPortal$1(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n } // TODO: pass ReactDOM portal implementation as third argument\n // $FlowFixMe The Flow type is opaque but there's no way to actually create it.\n\n\n return createPortal(children, container, null, key);\n}\n\nfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nfunction unstable_createPortal(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n {\n if (!didWarnAboutUnstableCreatePortal) {\n didWarnAboutUnstableCreatePortal = true;\n\n 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.');\n }\n }\n\n return createPortal$1(children, container, key);\n}\n\nvar Internals = {\n // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.\n // This is an array for better minification.\n Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?\n IsThisRendererActing]\n};\nvar foundDevTools = injectIntoDevTools({\n findFiberByHostInstance: getClosestInstanceFromNode,\n bundleType: 1 ,\n version: ReactVersion,\n rendererPackageName: 'react-dom'\n});\n\n{\n if (!foundDevTools && canUseDOM && window.top === window.self) {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n if (/^(https?|file):$/.test(protocol)) {\n // eslint-disable-next-line react-internal/no-production-logging\n 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');\n }\n }\n }\n}\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\nexports.createPortal = createPortal$1;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync;\nexports.hydrate = hydrate;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_createPortal = unstable_createPortal;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.version = ReactVersion;\n })();\n}\n"]},"metadata":{},"sourceType":"script"}