PluginProbe
Gutenberg / 23.6.2
Gutenberg v23.6.2
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / scripts / vendors / react.js

react.js in Gutenberg 23.6.2, at build/scripts/vendors/react.js

1,907 lines 80.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";
2 var React = (() => {
3 var __getOwnPropNames = Object.getOwnPropertyNames;
4 var __commonJS = (cb, mod) => function __require() {
5 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
6 };
7
8 // ../../node_modules/react/cjs/react.development.js
9 var require_react_development = __commonJS({
10 "../../node_modules/react/cjs/react.development.js"(exports, module) {
11 "use strict";
12 if (true) {
13 (function() {
14 "use strict";
15 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
16 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
17 }
18 var ReactVersion = "18.3.1";
19 var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
20 var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
21 var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
22 var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
23 var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
24 var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
25 var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
26 var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
27 var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
28 var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
29 var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
30 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
31 var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
32 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
33 var FAUX_ITERATOR_SYMBOL = "@@iterator";
34 function getIteratorFn(maybeIterable) {
35 if (maybeIterable === null || typeof maybeIterable !== "object") {
36 return null;
37 }
38 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
39 if (typeof maybeIterator === "function") {
40 return maybeIterator;
41 }
42 return null;
43 }
44 var ReactCurrentDispatcher = {
45 /**
46 * @internal
47 * @type {ReactComponent}
48 */
49 current: null
50 };
51 var ReactCurrentBatchConfig = {
52 transition: null
53 };
54 var ReactCurrentActQueue = {
55 current: null,
56 // Used to reproduce behavior of `batchedUpdates` in legacy mode.
57 isBatchingLegacy: false,
58 didScheduleLegacyUpdate: false
59 };
60 var ReactCurrentOwner = {
61 /**
62 * @internal
63 * @type {ReactComponent}
64 */
65 current: null
66 };
67 var ReactDebugCurrentFrame = {};
68 var currentExtraStackFrame = null;
69 function setExtraStackFrame(stack) {
70 {
71 currentExtraStackFrame = stack;
72 }
73 }
74 {
75 ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
76 {
77 currentExtraStackFrame = stack;
78 }
79 };
80 ReactDebugCurrentFrame.getCurrentStack = null;
81 ReactDebugCurrentFrame.getStackAddendum = function() {
82 var stack = "";
83 if (currentExtraStackFrame) {
84 stack += currentExtraStackFrame;
85 }
86 var impl = ReactDebugCurrentFrame.getCurrentStack;
87 if (impl) {
88 stack += impl() || "";
89 }
90 return stack;
91 };
92 }
93 var enableScopeAPI = false;
94 var enableCacheElement = false;
95 var enableTransitionTracing = false;
96 var enableLegacyHidden = false;
97 var enableDebugTracing = false;
98 var ReactSharedInternals = {
99 ReactCurrentDispatcher,
100 ReactCurrentBatchConfig,
101 ReactCurrentOwner
102 };
103 {
104 ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
105 ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
106 }
107 function warn(format) {
108 {
109 {
110 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
111 args[_key - 1] = arguments[_key];
112 }
113 printWarning("warn", format, args);
114 }
115 }
116 }
117 function error(format) {
118 {
119 {
120 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
121 args[_key2 - 1] = arguments[_key2];
122 }
123 printWarning("error", format, args);
124 }
125 }
126 }
127 function printWarning(level, format, args) {
128 {
129 var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
130 var stack = ReactDebugCurrentFrame2.getStackAddendum();
131 if (stack !== "") {
132 format += "%s";
133 args = args.concat([stack]);
134 }
135 var argsWithFormat = args.map(function(item) {
136 return String(item);
137 });
138 argsWithFormat.unshift("Warning: " + format);
139 Function.prototype.apply.call(console[level], console, argsWithFormat);
140 }
141 }
142 var didWarnStateUpdateForUnmountedComponent = {};
143 function warnNoop(publicInstance, callerName) {
144 {
145 var _constructor = publicInstance.constructor;
146 var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
147 var warningKey = componentName + "." + callerName;
148 if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
149 return;
150 }
151 error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName);
152 didWarnStateUpdateForUnmountedComponent[warningKey] = true;
153 }
154 }
155 var ReactNoopUpdateQueue = {
156 /**
157 * Checks whether or not this composite component is mounted.
158 * @param {ReactClass} publicInstance The instance we want to test.
159 * @return {boolean} True if mounted, false otherwise.
160 * @protected
161 * @final
162 */
163 isMounted: function(publicInstance) {
164 return false;
165 },
166 /**
167 * Forces an update. This should only be invoked when it is known with
168 * certainty that we are **not** in a DOM transaction.
169 *
170 * You may want to call this when you know that some deeper aspect of the
171 * component's state has changed but `setState` was not called.
172 *
173 * This will not invoke `shouldComponentUpdate`, but it will invoke
174 * `componentWillUpdate` and `componentDidUpdate`.
175 *
176 * @param {ReactClass} publicInstance The instance that should rerender.
177 * @param {?function} callback Called after component is updated.
178 * @param {?string} callerName name of the calling function in the public API.
179 * @internal
180 */
181 enqueueForceUpdate: function(publicInstance, callback, callerName) {
182 warnNoop(publicInstance, "forceUpdate");
183 },
184 /**
185 * Replaces all of the state. Always use this or `setState` to mutate state.
186 * You should treat `this.state` as immutable.
187 *
188 * There is no guarantee that `this.state` will be immediately updated, so
189 * accessing `this.state` after calling this method may return the old value.
190 *
191 * @param {ReactClass} publicInstance The instance that should rerender.
192 * @param {object} completeState Next state.
193 * @param {?function} callback Called after component is updated.
194 * @param {?string} callerName name of the calling function in the public API.
195 * @internal
196 */
197 enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
198 warnNoop(publicInstance, "replaceState");
199 },
200 /**
201 * Sets a subset of the state. This only exists because _pendingState is
202 * internal. This provides a merging strategy that is not available to deep
203 * properties which is confusing. TODO: Expose pendingState or don't use it
204 * during the merge.
205 *
206 * @param {ReactClass} publicInstance The instance that should rerender.
207 * @param {object} partialState Next partial state to be merged with state.
208 * @param {?function} callback Called after component is updated.
209 * @param {?string} Name of the calling function in the public API.
210 * @internal
211 */
212 enqueueSetState: function(publicInstance, partialState, callback, callerName) {
213 warnNoop(publicInstance, "setState");
214 }
215 };
216 var assign = Object.assign;
217 var emptyObject = {};
218 {
219 Object.freeze(emptyObject);
220 }
221 function Component(props, context, updater) {
222 this.props = props;
223 this.context = context;
224 this.refs = emptyObject;
225 this.updater = updater || ReactNoopUpdateQueue;
226 }
227 Component.prototype.isReactComponent = {};
228 Component.prototype.setState = function(partialState, callback) {
229 if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
230 throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
231 }
232 this.updater.enqueueSetState(this, partialState, callback, "setState");
233 };
234 Component.prototype.forceUpdate = function(callback) {
235 this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
236 };
237 {
238 var deprecatedAPIs = {
239 isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
240 replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
241 };
242 var defineDeprecationWarning = function(methodName, info) {
243 Object.defineProperty(Component.prototype, methodName, {
244 get: function() {
245 warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
246 return void 0;
247 }
248 });
249 };
250 for (var fnName in deprecatedAPIs) {
251 if (deprecatedAPIs.hasOwnProperty(fnName)) {
252 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
253 }
254 }
255 }
256 function ComponentDummy() {
257 }
258 ComponentDummy.prototype = Component.prototype;
259 function PureComponent(props, context, updater) {
260 this.props = props;
261 this.context = context;
262 this.refs = emptyObject;
263 this.updater = updater || ReactNoopUpdateQueue;
264 }
265 var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
266 pureComponentPrototype.constructor = PureComponent;
267 assign(pureComponentPrototype, Component.prototype);
268 pureComponentPrototype.isPureReactComponent = true;
269 function createRef() {
270 var refObject = {
271 current: null
272 };
273 {
274 Object.seal(refObject);
275 }
276 return refObject;
277 }
278 var isArrayImpl = Array.isArray;
279 function isArray(a) {
280 return isArrayImpl(a);
281 }
282 function typeName(value) {
283 {
284 var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
285 var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
286 return type;
287 }
288 }
289 function willCoercionThrow(value) {
290 {
291 try {
292 testStringCoercion(value);
293 return false;
294 } catch (e) {
295 return true;
296 }
297 }
298 }
299 function testStringCoercion(value) {
300 return "" + value;
301 }
302 function checkKeyStringCoercion(value) {
303 {
304 if (willCoercionThrow(value)) {
305 error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
306 return testStringCoercion(value);
307 }
308 }
309 }
310 function getWrappedName(outerType, innerType, wrapperName) {
311 var displayName = outerType.displayName;
312 if (displayName) {
313 return displayName;
314 }
315 var functionName = innerType.displayName || innerType.name || "";
316 return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
317 }
318 function getContextName(type) {
319 return type.displayName || "Context";
320 }
321 function getComponentNameFromType(type) {
322 if (type == null) {
323 return null;
324 }
325 {
326 if (typeof type.tag === "number") {
327 error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
328 }
329 }
330 if (typeof type === "function") {
331 return type.displayName || type.name || null;
332 }
333 if (typeof type === "string") {
334 return type;
335 }
336 switch (type) {
337 case REACT_FRAGMENT_TYPE:
338 return "Fragment";
339 case REACT_PORTAL_TYPE:
340 return "Portal";
341 case REACT_PROFILER_TYPE:
342 return "Profiler";
343 case REACT_STRICT_MODE_TYPE:
344 return "StrictMode";
345 case REACT_SUSPENSE_TYPE:
346 return "Suspense";
347 case REACT_SUSPENSE_LIST_TYPE:
348 return "SuspenseList";
349 }
350 if (typeof type === "object") {
351 switch (type.$$typeof) {
352 case REACT_CONTEXT_TYPE:
353 var context = type;
354 return getContextName(context) + ".Consumer";
355 case REACT_PROVIDER_TYPE:
356 var provider = type;
357 return getContextName(provider._context) + ".Provider";
358 case REACT_FORWARD_REF_TYPE:
359 return getWrappedName(type, type.render, "ForwardRef");
360 case REACT_MEMO_TYPE:
361 var outerName = type.displayName || null;
362 if (outerName !== null) {
363 return outerName;
364 }
365 return getComponentNameFromType(type.type) || "Memo";
366 case REACT_LAZY_TYPE: {
367 var lazyComponent = type;
368 var payload = lazyComponent._payload;
369 var init = lazyComponent._init;
370 try {
371 return getComponentNameFromType(init(payload));
372 } catch (x) {
373 return null;
374 }
375 }
376 }
377 }
378 return null;
379 }
380 var hasOwnProperty = Object.prototype.hasOwnProperty;
381 var RESERVED_PROPS = {
382 key: true,
383 ref: true,
384 __self: true,
385 __source: true
386 };
387 var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
388 {
389 didWarnAboutStringRefs = {};
390 }
391 function hasValidRef(config) {
392 {
393 if (hasOwnProperty.call(config, "ref")) {
394 var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
395 if (getter && getter.isReactWarning) {
396 return false;
397 }
398 }
399 }
400 return config.ref !== void 0;
401 }
402 function hasValidKey(config) {
403 {
404 if (hasOwnProperty.call(config, "key")) {
405 var getter = Object.getOwnPropertyDescriptor(config, "key").get;
406 if (getter && getter.isReactWarning) {
407 return false;
408 }
409 }
410 }
411 return config.key !== void 0;
412 }
413 function defineKeyPropWarningGetter(props, displayName) {
414 var warnAboutAccessingKey = function() {
415 {
416 if (!specialPropKeyWarningShown) {
417 specialPropKeyWarningShown = true;
418 error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
419 }
420 }
421 };
422 warnAboutAccessingKey.isReactWarning = true;
423 Object.defineProperty(props, "key", {
424 get: warnAboutAccessingKey,
425 configurable: true
426 });
427 }
428 function defineRefPropWarningGetter(props, displayName) {
429 var warnAboutAccessingRef = function() {
430 {
431 if (!specialPropRefWarningShown) {
432 specialPropRefWarningShown = true;
433 error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
434 }
435 }
436 };
437 warnAboutAccessingRef.isReactWarning = true;
438 Object.defineProperty(props, "ref", {
439 get: warnAboutAccessingRef,
440 configurable: true
441 });
442 }
443 function warnIfStringRefCannotBeAutoConverted(config) {
444 {
445 if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
446 var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
447 if (!didWarnAboutStringRefs[componentName]) {
448 error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
449 didWarnAboutStringRefs[componentName] = true;
450 }
451 }
452 }
453 }
454 var ReactElement = function(type, key, ref, self, source, owner, props) {
455 var element = {
456 // This tag allows us to uniquely identify this as a React Element
457 $$typeof: REACT_ELEMENT_TYPE,
458 // Built-in properties that belong on the element
459 type,
460 key,
461 ref,
462 props,
463 // Record the component responsible for creating this element.
464 _owner: owner
465 };
466 {
467 element._store = {};
468 Object.defineProperty(element._store, "validated", {
469 configurable: false,
470 enumerable: false,
471 writable: true,
472 value: false
473 });
474 Object.defineProperty(element, "_self", {
475 configurable: false,
476 enumerable: false,
477 writable: false,
478 value: self
479 });
480 Object.defineProperty(element, "_source", {
481 configurable: false,
482 enumerable: false,
483 writable: false,
484 value: source
485 });
486 if (Object.freeze) {
487 Object.freeze(element.props);
488 Object.freeze(element);
489 }
490 }
491 return element;
492 };
493 function createElement(type, config, children) {
494 var propName;
495 var props = {};
496 var key = null;
497 var ref = null;
498 var self = null;
499 var source = null;
500 if (config != null) {
501 if (hasValidRef(config)) {
502 ref = config.ref;
503 {
504 warnIfStringRefCannotBeAutoConverted(config);
505 }
506 }
507 if (hasValidKey(config)) {
508 {
509 checkKeyStringCoercion(config.key);
510 }
511 key = "" + config.key;
512 }
513 self = config.__self === void 0 ? null : config.__self;
514 source = config.__source === void 0 ? null : config.__source;
515 for (propName in config) {
516 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
517 props[propName] = config[propName];
518 }
519 }
520 }
521 var childrenLength = arguments.length - 2;
522 if (childrenLength === 1) {
523 props.children = children;
524 } else if (childrenLength > 1) {
525 var childArray = Array(childrenLength);
526 for (var i = 0; i < childrenLength; i++) {
527 childArray[i] = arguments[i + 2];
528 }
529 {
530 if (Object.freeze) {
531 Object.freeze(childArray);
532 }
533 }
534 props.children = childArray;
535 }
536 if (type && type.defaultProps) {
537 var defaultProps = type.defaultProps;
538 for (propName in defaultProps) {
539 if (props[propName] === void 0) {
540 props[propName] = defaultProps[propName];
541 }
542 }
543 }
544 {
545 if (key || ref) {
546 var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
547 if (key) {
548 defineKeyPropWarningGetter(props, displayName);
549 }
550 if (ref) {
551 defineRefPropWarningGetter(props, displayName);
552 }
553 }
554 }
555 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
556 }
557 function cloneAndReplaceKey(oldElement, newKey) {
558 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
559 return newElement;
560 }
561 function cloneElement(element, config, children) {
562 if (element === null || element === void 0) {
563 throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
564 }
565 var propName;
566 var props = assign({}, element.props);
567 var key = element.key;
568 var ref = element.ref;
569 var self = element._self;
570 var source = element._source;
571 var owner = element._owner;
572 if (config != null) {
573 if (hasValidRef(config)) {
574 ref = config.ref;
575 owner = ReactCurrentOwner.current;
576 }
577 if (hasValidKey(config)) {
578 {
579 checkKeyStringCoercion(config.key);
580 }
581 key = "" + config.key;
582 }
583 var defaultProps;
584 if (element.type && element.type.defaultProps) {
585 defaultProps = element.type.defaultProps;
586 }
587 for (propName in config) {
588 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
589 if (config[propName] === void 0 && defaultProps !== void 0) {
590 props[propName] = defaultProps[propName];
591 } else {
592 props[propName] = config[propName];
593 }
594 }
595 }
596 }
597 var childrenLength = arguments.length - 2;
598 if (childrenLength === 1) {
599 props.children = children;
600 } else if (childrenLength > 1) {
601 var childArray = Array(childrenLength);
602 for (var i = 0; i < childrenLength; i++) {
603 childArray[i] = arguments[i + 2];
604 }
605 props.children = childArray;
606 }
607 return ReactElement(element.type, key, ref, self, source, owner, props);
608 }
609 function isValidElement(object) {
610 return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
611 }
612 var SEPARATOR = ".";
613 var SUBSEPARATOR = ":";
614 function escape(key) {
615 var escapeRegex = /[=:]/g;
616 var escaperLookup = {
617 "=": "=0",
618 ":": "=2"
619 };
620 var escapedString = key.replace(escapeRegex, function(match) {
621 return escaperLookup[match];
622 });
623 return "$" + escapedString;
624 }
625 var didWarnAboutMaps = false;
626 var userProvidedKeyEscapeRegex = /\/+/g;
627 function escapeUserProvidedKey(text) {
628 return text.replace(userProvidedKeyEscapeRegex, "$&/");
629 }
630 function getElementKey(element, index) {
631 if (typeof element === "object" && element !== null && element.key != null) {
632 {
633 checkKeyStringCoercion(element.key);
634 }
635 return escape("" + element.key);
636 }
637 return index.toString(36);
638 }
639 function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
640 var type = typeof children;
641 if (type === "undefined" || type === "boolean") {
642 children = null;
643 }
644 var invokeCallback = false;
645 if (children === null) {
646 invokeCallback = true;
647 } else {
648 switch (type) {
649 case "string":
650 case "number":
651 invokeCallback = true;
652 break;
653 case "object":
654 switch (children.$$typeof) {
655 case REACT_ELEMENT_TYPE:
656 case REACT_PORTAL_TYPE:
657 invokeCallback = true;
658 }
659 }
660 }
661 if (invokeCallback) {
662 var _child = children;
663 var mappedChild = callback(_child);
664 var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
665 if (isArray(mappedChild)) {
666 var escapedChildKey = "";
667 if (childKey != null) {
668 escapedChildKey = escapeUserProvidedKey(childKey) + "/";
669 }
670 mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
671 return c;
672 });
673 } else if (mappedChild != null) {
674 if (isValidElement(mappedChild)) {
675 {
676 if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
677 checkKeyStringCoercion(mappedChild.key);
678 }
679 }
680 mappedChild = cloneAndReplaceKey(
681 mappedChild,
682 // Keep both the (mapped) and old keys if they differ, just as
683 // traverseAllChildren used to do for objects as children
684 escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
685 (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
686 // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
687 // eslint-disable-next-line react-internal/safe-string-coercion
688 escapeUserProvidedKey("" + mappedChild.key) + "/"
689 ) : "") + childKey
690 );
691 }
692 array.push(mappedChild);
693 }
694 return 1;
695 }
696 var child;
697 var nextName;
698 var subtreeCount = 0;
699 var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
700 if (isArray(children)) {
701 for (var i = 0; i < children.length; i++) {
702 child = children[i];
703 nextName = nextNamePrefix + getElementKey(child, i);
704 subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
705 }
706 } else {
707 var iteratorFn = getIteratorFn(children);
708 if (typeof iteratorFn === "function") {
709 var iterableChildren = children;
710 {
711 if (iteratorFn === iterableChildren.entries) {
712 if (!didWarnAboutMaps) {
713 warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
714 }
715 didWarnAboutMaps = true;
716 }
717 }
718 var iterator = iteratorFn.call(iterableChildren);
719 var step;
720 var ii = 0;
721 while (!(step = iterator.next()).done) {
722 child = step.value;
723 nextName = nextNamePrefix + getElementKey(child, ii++);
724 subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
725 }
726 } else if (type === "object") {
727 var childrenString = String(children);
728 throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
729 }
730 }
731 return subtreeCount;
732 }
733 function mapChildren(children, func, context) {
734 if (children == null) {
735 return children;
736 }
737 var result = [];
738 var count = 0;
739 mapIntoArray(children, result, "", "", function(child) {
740 return func.call(context, child, count++);
741 });
742 return result;
743 }
744 function countChildren(children) {
745 var n = 0;
746 mapChildren(children, function() {
747 n++;
748 });
749 return n;
750 }
751 function forEachChildren(children, forEachFunc, forEachContext) {
752 mapChildren(children, function() {
753 forEachFunc.apply(this, arguments);
754 }, forEachContext);
755 }
756 function toArray(children) {
757 return mapChildren(children, function(child) {
758 return child;
759 }) || [];
760 }
761 function onlyChild(children) {
762 if (!isValidElement(children)) {
763 throw new Error("React.Children.only expected to receive a single React element child.");
764 }
765 return children;
766 }
767 function createContext(defaultValue) {
768 var context = {
769 $$typeof: REACT_CONTEXT_TYPE,
770 // As a workaround to support multiple concurrent renderers, we categorize
771 // some renderers as primary and others as secondary. We only expect
772 // there to be two concurrent renderers at most: React Native (primary) and
773 // Fabric (secondary); React DOM (primary) and React ART (secondary).
774 // Secondary renderers store their context values on separate fields.
775 _currentValue: defaultValue,
776 _currentValue2: defaultValue,
777 // Used to track how many concurrent renderers this context currently
778 // supports within in a single renderer. Such as parallel server rendering.
779 _threadCount: 0,
780 // These are circular
781 Provider: null,
782 Consumer: null,
783 // Add these to use same hidden class in VM as ServerContext
784 _defaultValue: null,
785 _globalName: null
786 };
787 context.Provider = {
788 $$typeof: REACT_PROVIDER_TYPE,
789 _context: context
790 };
791 var hasWarnedAboutUsingNestedContextConsumers = false;
792 var hasWarnedAboutUsingConsumerProvider = false;
793 var hasWarnedAboutDisplayNameOnConsumer = false;
794 {
795 var Consumer = {
796 $$typeof: REACT_CONTEXT_TYPE,
797 _context: context
798 };
799 Object.defineProperties(Consumer, {
800 Provider: {
801 get: function() {
802 if (!hasWarnedAboutUsingConsumerProvider) {
803 hasWarnedAboutUsingConsumerProvider = true;
804 error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
805 }
806 return context.Provider;
807 },
808 set: function(_Provider) {
809 context.Provider = _Provider;
810 }
811 },
812 _currentValue: {
813 get: function() {
814 return context._currentValue;
815 },
816 set: function(_currentValue) {
817 context._currentValue = _currentValue;
818 }
819 },
820 _currentValue2: {
821 get: function() {
822 return context._currentValue2;
823 },
824 set: function(_currentValue2) {
825 context._currentValue2 = _currentValue2;
826 }
827 },
828 _threadCount: {
829 get: function() {
830 return context._threadCount;
831 },
832 set: function(_threadCount) {
833 context._threadCount = _threadCount;
834 }
835 },
836 Consumer: {
837 get: function() {
838 if (!hasWarnedAboutUsingNestedContextConsumers) {
839 hasWarnedAboutUsingNestedContextConsumers = true;
840 error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
841 }
842 return context.Consumer;
843 }
844 },
845 displayName: {
846 get: function() {
847 return context.displayName;
848 },
849 set: function(displayName) {
850 if (!hasWarnedAboutDisplayNameOnConsumer) {
851 warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
852 hasWarnedAboutDisplayNameOnConsumer = true;
853 }
854 }
855 }
856 });
857 context.Consumer = Consumer;
858 }
859 {
860 context._currentRenderer = null;
861 context._currentRenderer2 = null;
862 }
863 return context;
864 }
865 var Uninitialized = -1;
866 var Pending = 0;
867 var Resolved = 1;
868 var Rejected = 2;
869 function lazyInitializer(payload) {
870 if (payload._status === Uninitialized) {
871 var ctor = payload._result;
872 var thenable = ctor();
873 thenable.then(function(moduleObject2) {
874 if (payload._status === Pending || payload._status === Uninitialized) {
875 var resolved = payload;
876 resolved._status = Resolved;
877 resolved._result = moduleObject2;
878 }
879 }, function(error2) {
880 if (payload._status === Pending || payload._status === Uninitialized) {
881 var rejected = payload;
882 rejected._status = Rejected;
883 rejected._result = error2;
884 }
885 });
886 if (payload._status === Uninitialized) {
887 var pending = payload;
888 pending._status = Pending;
889 pending._result = thenable;
890 }
891 }
892 if (payload._status === Resolved) {
893 var moduleObject = payload._result;
894 {
895 if (moduleObject === void 0) {
896 error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
897 }
898 }
899 {
900 if (!("default" in moduleObject)) {
901 error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
902 }
903 }
904 return moduleObject.default;
905 } else {
906 throw payload._result;
907 }
908 }
909 function lazy(ctor) {
910 var payload = {
911 // We use these fields to store the result.
912 _status: Uninitialized,
913 _result: ctor
914 };
915 var lazyType = {
916 $$typeof: REACT_LAZY_TYPE,
917 _payload: payload,
918 _init: lazyInitializer
919 };
920 {
921 var defaultProps;
922 var propTypes;
923 Object.defineProperties(lazyType, {
924 defaultProps: {
925 configurable: true,
926 get: function() {
927 return defaultProps;
928 },
929 set: function(newDefaultProps) {
930 error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
931 defaultProps = newDefaultProps;
932 Object.defineProperty(lazyType, "defaultProps", {
933 enumerable: true
934 });
935 }
936 },
937 propTypes: {
938 configurable: true,
939 get: function() {
940 return propTypes;
941 },
942 set: function(newPropTypes) {
943 error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
944 propTypes = newPropTypes;
945 Object.defineProperty(lazyType, "propTypes", {
946 enumerable: true
947 });
948 }
949 }
950 });
951 }
952 return lazyType;
953 }
954 function forwardRef(render) {
955 {
956 if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
957 error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
958 } else if (typeof render !== "function") {
959 error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
960 } else {
961 if (render.length !== 0 && render.length !== 2) {
962 error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
963 }
964 }
965 if (render != null) {
966 if (render.defaultProps != null || render.propTypes != null) {
967 error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
968 }
969 }
970 }
971 var elementType = {
972 $$typeof: REACT_FORWARD_REF_TYPE,
973 render
974 };
975 {
976 var ownName;
977 Object.defineProperty(elementType, "displayName", {
978 enumerable: false,
979 configurable: true,
980 get: function() {
981 return ownName;
982 },
983 set: function(name) {
984 ownName = name;
985 if (!render.name && !render.displayName) {
986 render.displayName = name;
987 }
988 }
989 });
990 }
991 return elementType;
992 }
993 var REACT_MODULE_REFERENCE;
994 {
995 REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
996 }
997 function isValidElementType(type) {
998 if (typeof type === "string" || typeof type === "function") {
999 return true;
1000 }
1001 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
1002 return true;
1003 }
1004 if (typeof type === "object" && type !== null) {
1005 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
1006 // types supported by any Flight configuration anywhere since
1007 // we don't know which Flight build this will end up being used
1008 // with.
1009 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
1010 return true;
1011 }
1012 }
1013 return false;
1014 }
1015 function memo(type, compare) {
1016 {
1017 if (!isValidElementType(type)) {
1018 error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
1019 }
1020 }
1021 var elementType = {
1022 $$typeof: REACT_MEMO_TYPE,
1023 type,
1024 compare: compare === void 0 ? null : compare
1025 };
1026 {
1027 var ownName;
1028 Object.defineProperty(elementType, "displayName", {
1029 enumerable: false,
1030 configurable: true,
1031 get: function() {
1032 return ownName;
1033 },
1034 set: function(name) {
1035 ownName = name;
1036 if (!type.name && !type.displayName) {
1037 type.displayName = name;
1038 }
1039 }
1040 });
1041 }
1042 return elementType;
1043 }
1044 function resolveDispatcher() {
1045 var dispatcher = ReactCurrentDispatcher.current;
1046 {
1047 if (dispatcher === null) {
1048 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.");
1049 }
1050 }
1051 return dispatcher;
1052 }
1053 function useContext(Context) {
1054 var dispatcher = resolveDispatcher();
1055 {
1056 if (Context._context !== void 0) {
1057 var realContext = Context._context;
1058 if (realContext.Consumer === Context) {
1059 error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
1060 } else if (realContext.Provider === Context) {
1061 error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1062 }
1063 }
1064 }
1065 return dispatcher.useContext(Context);
1066 }
1067 function useState(initialState) {
1068 var dispatcher = resolveDispatcher();
1069 return dispatcher.useState(initialState);
1070 }
1071 function useReducer(reducer, initialArg, init) {
1072 var dispatcher = resolveDispatcher();
1073 return dispatcher.useReducer(reducer, initialArg, init);
1074 }
1075 function useRef(initialValue) {
1076 var dispatcher = resolveDispatcher();
1077 return dispatcher.useRef(initialValue);
1078 }
1079 function useEffect(create, deps) {
1080 var dispatcher = resolveDispatcher();
1081 return dispatcher.useEffect(create, deps);
1082 }
1083 function useInsertionEffect(create, deps) {
1084 var dispatcher = resolveDispatcher();
1085 return dispatcher.useInsertionEffect(create, deps);
1086 }
1087 function useLayoutEffect(create, deps) {
1088 var dispatcher = resolveDispatcher();
1089 return dispatcher.useLayoutEffect(create, deps);
1090 }
1091 function useCallback(callback, deps) {
1092 var dispatcher = resolveDispatcher();
1093 return dispatcher.useCallback(callback, deps);
1094 }
1095 function useMemo(create, deps) {
1096 var dispatcher = resolveDispatcher();
1097 return dispatcher.useMemo(create, deps);
1098 }
1099 function useImperativeHandle(ref, create, deps) {
1100 var dispatcher = resolveDispatcher();
1101 return dispatcher.useImperativeHandle(ref, create, deps);
1102 }
1103 function useDebugValue(value, formatterFn) {
1104 {
1105 var dispatcher = resolveDispatcher();
1106 return dispatcher.useDebugValue(value, formatterFn);
1107 }
1108 }
1109 function useTransition() {
1110 var dispatcher = resolveDispatcher();
1111 return dispatcher.useTransition();
1112 }
1113 function useDeferredValue(value) {
1114 var dispatcher = resolveDispatcher();
1115 return dispatcher.useDeferredValue(value);
1116 }
1117 function useId() {
1118 var dispatcher = resolveDispatcher();
1119 return dispatcher.useId();
1120 }
1121 function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1122 var dispatcher = resolveDispatcher();
1123 return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1124 }
1125 var disabledDepth = 0;
1126 var prevLog;
1127 var prevInfo;
1128 var prevWarn;
1129 var prevError;
1130 var prevGroup;
1131 var prevGroupCollapsed;
1132 var prevGroupEnd;
1133 function disabledLog() {
1134 }
1135 disabledLog.__reactDisabledLog = true;
1136 function disableLogs() {
1137 {
1138 if (disabledDepth === 0) {
1139 prevLog = console.log;
1140 prevInfo = console.info;
1141 prevWarn = console.warn;
1142 prevError = console.error;
1143 prevGroup = console.group;
1144 prevGroupCollapsed = console.groupCollapsed;
1145 prevGroupEnd = console.groupEnd;
1146 var props = {
1147 configurable: true,
1148 enumerable: true,
1149 value: disabledLog,
1150 writable: true
1151 };
1152 Object.defineProperties(console, {
1153 info: props,
1154 log: props,
1155 warn: props,
1156 error: props,
1157 group: props,
1158 groupCollapsed: props,
1159 groupEnd: props
1160 });
1161 }
1162 disabledDepth++;
1163 }
1164 }
1165 function reenableLogs() {
1166 {
1167 disabledDepth--;
1168 if (disabledDepth === 0) {
1169 var props = {
1170 configurable: true,
1171 enumerable: true,
1172 writable: true
1173 };
1174 Object.defineProperties(console, {
1175 log: assign({}, props, {
1176 value: prevLog
1177 }),
1178 info: assign({}, props, {
1179 value: prevInfo
1180 }),
1181 warn: assign({}, props, {
1182 value: prevWarn
1183 }),
1184 error: assign({}, props, {
1185 value: prevError
1186 }),
1187 group: assign({}, props, {
1188 value: prevGroup
1189 }),
1190 groupCollapsed: assign({}, props, {
1191 value: prevGroupCollapsed
1192 }),
1193 groupEnd: assign({}, props, {
1194 value: prevGroupEnd
1195 })
1196 });
1197 }
1198 if (disabledDepth < 0) {
1199 error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1200 }
1201 }
1202 }
1203 var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1204 var prefix;
1205 function describeBuiltInComponentFrame(name, source, ownerFn) {
1206 {
1207 if (prefix === void 0) {
1208 try {
1209 throw Error();
1210 } catch (x) {
1211 var match = x.stack.trim().match(/\n( *(at )?)/);
1212 prefix = match && match[1] || "";
1213 }
1214 }
1215 return "\n" + prefix + name;
1216 }
1217 }
1218 var reentry = false;
1219 var componentFrameCache;
1220 {
1221 var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
1222 componentFrameCache = new PossiblyWeakMap();
1223 }
1224 function describeNativeComponentFrame(fn, construct) {
1225 if (!fn || reentry) {
1226 return "";
1227 }
1228 {
1229 var frame = componentFrameCache.get(fn);
1230 if (frame !== void 0) {
1231 return frame;
1232 }
1233 }
1234 var control;
1235 reentry = true;
1236 var previousPrepareStackTrace = Error.prepareStackTrace;
1237 Error.prepareStackTrace = void 0;
1238 var previousDispatcher;
1239 {
1240 previousDispatcher = ReactCurrentDispatcher$1.current;
1241 ReactCurrentDispatcher$1.current = null;
1242 disableLogs();
1243 }
1244 try {
1245 if (construct) {
1246 var Fake = function() {
1247 throw Error();
1248 };
1249 Object.defineProperty(Fake.prototype, "props", {
1250 set: function() {
1251 throw Error();
1252 }
1253 });
1254 if (typeof Reflect === "object" && Reflect.construct) {
1255 try {
1256 Reflect.construct(Fake, []);
1257 } catch (x) {
1258 control = x;
1259 }
1260 Reflect.construct(fn, [], Fake);
1261 } else {
1262 try {
1263 Fake.call();
1264 } catch (x) {
1265 control = x;
1266 }
1267 fn.call(Fake.prototype);
1268 }
1269 } else {
1270 try {
1271 throw Error();
1272 } catch (x) {
1273 control = x;
1274 }
1275 fn();
1276 }
1277 } catch (sample) {
1278 if (sample && control && typeof sample.stack === "string") {
1279 var sampleLines = sample.stack.split("\n");
1280 var controlLines = control.stack.split("\n");
1281 var s = sampleLines.length - 1;
1282 var c = controlLines.length - 1;
1283 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
1284 c--;
1285 }
1286 for (; s >= 1 && c >= 0; s--, c--) {
1287 if (sampleLines[s] !== controlLines[c]) {
1288 if (s !== 1 || c !== 1) {
1289 do {
1290 s--;
1291 c--;
1292 if (c < 0 || sampleLines[s] !== controlLines[c]) {
1293 var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
1294 if (fn.displayName && _frame.includes("<anonymous>")) {
1295 _frame = _frame.replace("<anonymous>", fn.displayName);
1296 }
1297 {
1298 if (typeof fn === "function") {
1299 componentFrameCache.set(fn, _frame);
1300 }
1301 }
1302 return _frame;
1303 }
1304 } while (s >= 1 && c >= 0);
1305 }
1306 break;
1307 }
1308 }
1309 }
1310 } finally {
1311 reentry = false;
1312 {
1313 ReactCurrentDispatcher$1.current = previousDispatcher;
1314 reenableLogs();
1315 }
1316 Error.prepareStackTrace = previousPrepareStackTrace;
1317 }
1318 var name = fn ? fn.displayName || fn.name : "";
1319 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1320 {
1321 if (typeof fn === "function") {
1322 componentFrameCache.set(fn, syntheticFrame);
1323 }
1324 }
1325 return syntheticFrame;
1326 }
1327 function describeFunctionComponentFrame(fn, source, ownerFn) {
1328 {
1329 return describeNativeComponentFrame(fn, false);
1330 }
1331 }
1332 function shouldConstruct(Component2) {
1333 var prototype = Component2.prototype;
1334 return !!(prototype && prototype.isReactComponent);
1335 }
1336 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1337 if (type == null) {
1338 return "";
1339 }
1340 if (typeof type === "function") {
1341 {
1342 return describeNativeComponentFrame(type, shouldConstruct(type));
1343 }
1344 }
1345 if (typeof type === "string") {
1346 return describeBuiltInComponentFrame(type);
1347 }
1348 switch (type) {
1349 case REACT_SUSPENSE_TYPE:
1350 return describeBuiltInComponentFrame("Suspense");
1351 case REACT_SUSPENSE_LIST_TYPE:
1352 return describeBuiltInComponentFrame("SuspenseList");
1353 }
1354 if (typeof type === "object") {
1355 switch (type.$$typeof) {
1356 case REACT_FORWARD_REF_TYPE:
1357 return describeFunctionComponentFrame(type.render);
1358 case REACT_MEMO_TYPE:
1359 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1360 case REACT_LAZY_TYPE: {
1361 var lazyComponent = type;
1362 var payload = lazyComponent._payload;
1363 var init = lazyComponent._init;
1364 try {
1365 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1366 } catch (x) {
1367 }
1368 }
1369 }
1370 }
1371 return "";
1372 }
1373 var loggedTypeFailures = {};
1374 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1375 function setCurrentlyValidatingElement(element) {
1376 {
1377 if (element) {
1378 var owner = element._owner;
1379 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1380 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1381 } else {
1382 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1383 }
1384 }
1385 }
1386 function checkPropTypes(typeSpecs, values, location, componentName, element) {
1387 {
1388 var has = Function.call.bind(hasOwnProperty);
1389 for (var typeSpecName in typeSpecs) {
1390 if (has(typeSpecs, typeSpecName)) {
1391 var error$1 = void 0;
1392 try {
1393 if (typeof typeSpecs[typeSpecName] !== "function") {
1394 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`.");
1395 err.name = "Invariant Violation";
1396 throw err;
1397 }
1398 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1399 } catch (ex) {
1400 error$1 = ex;
1401 }
1402 if (error$1 && !(error$1 instanceof Error)) {
1403 setCurrentlyValidatingElement(element);
1404 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);
1405 setCurrentlyValidatingElement(null);
1406 }
1407 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
1408 loggedTypeFailures[error$1.message] = true;
1409 setCurrentlyValidatingElement(element);
1410 error("Failed %s type: %s", location, error$1.message);
1411 setCurrentlyValidatingElement(null);
1412 }
1413 }
1414 }
1415 }
1416 }
1417 function setCurrentlyValidatingElement$1(element) {
1418 {
1419 if (element) {
1420 var owner = element._owner;
1421 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1422 setExtraStackFrame(stack);
1423 } else {
1424 setExtraStackFrame(null);
1425 }
1426 }
1427 }
1428 var propTypesMisspellWarningShown;
1429 {
1430 propTypesMisspellWarningShown = false;
1431 }
1432 function getDeclarationErrorAddendum() {
1433 if (ReactCurrentOwner.current) {
1434 var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1435 if (name) {
1436 return "\n\nCheck the render method of `" + name + "`.";
1437 }
1438 }
1439 return "";
1440 }
1441 function getSourceInfoErrorAddendum(source) {
1442 if (source !== void 0) {
1443 var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1444 var lineNumber = source.lineNumber;
1445 return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1446 }
1447 return "";
1448 }
1449 function getSourceInfoErrorAddendumForProps(elementProps) {
1450 if (elementProps !== null && elementProps !== void 0) {
1451 return getSourceInfoErrorAddendum(elementProps.__source);
1452 }
1453 return "";
1454 }
1455 var ownerHasKeyUseWarning = {};
1456 function getCurrentComponentErrorInfo(parentType) {
1457 var info = getDeclarationErrorAddendum();
1458 if (!info) {
1459 var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1460 if (parentName) {
1461 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1462 }
1463 }
1464 return info;
1465 }
1466 function validateExplicitKey(element, parentType) {
1467 if (!element._store || element._store.validated || element.key != null) {
1468 return;
1469 }
1470 element._store.validated = true;
1471 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1472 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1473 return;
1474 }
1475 ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1476 var childOwner = "";
1477 if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1478 childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1479 }
1480 {
1481 setCurrentlyValidatingElement$1(element);
1482 error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
1483 setCurrentlyValidatingElement$1(null);
1484 }
1485 }
1486 function validateChildKeys(node, parentType) {
1487 if (typeof node !== "object") {
1488 return;
1489 }
1490 if (isArray(node)) {
1491 for (var i = 0; i < node.length; i++) {
1492 var child = node[i];
1493 if (isValidElement(child)) {
1494 validateExplicitKey(child, parentType);
1495 }
1496 }
1497 } else if (isValidElement(node)) {
1498 if (node._store) {
1499 node._store.validated = true;
1500 }
1501 } else if (node) {
1502 var iteratorFn = getIteratorFn(node);
1503 if (typeof iteratorFn === "function") {
1504 if (iteratorFn !== node.entries) {
1505 var iterator = iteratorFn.call(node);
1506 var step;
1507 while (!(step = iterator.next()).done) {
1508 if (isValidElement(step.value)) {
1509 validateExplicitKey(step.value, parentType);
1510 }
1511 }
1512 }
1513 }
1514 }
1515 }
1516 function validatePropTypes(element) {
1517 {
1518 var type = element.type;
1519 if (type === null || type === void 0 || typeof type === "string") {
1520 return;
1521 }
1522 var propTypes;
1523 if (typeof type === "function") {
1524 propTypes = type.propTypes;
1525 } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1526 // Inner props are checked in the reconciler.
1527 type.$$typeof === REACT_MEMO_TYPE)) {
1528 propTypes = type.propTypes;
1529 } else {
1530 return;
1531 }
1532 if (propTypes) {
1533 var name = getComponentNameFromType(type);
1534 checkPropTypes(propTypes, element.props, "prop", name, element);
1535 } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
1536 propTypesMisspellWarningShown = true;
1537 var _name = getComponentNameFromType(type);
1538 error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
1539 }
1540 if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
1541 error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1542 }
1543 }
1544 }
1545 function validateFragmentProps(fragment) {
1546 {
1547 var keys = Object.keys(fragment.props);
1548 for (var i = 0; i < keys.length; i++) {
1549 var key = keys[i];
1550 if (key !== "children" && key !== "key") {
1551 setCurrentlyValidatingElement$1(fragment);
1552 error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
1553 setCurrentlyValidatingElement$1(null);
1554 break;
1555 }
1556 }
1557 if (fragment.ref !== null) {
1558 setCurrentlyValidatingElement$1(fragment);
1559 error("Invalid attribute `ref` supplied to `React.Fragment`.");
1560 setCurrentlyValidatingElement$1(null);
1561 }
1562 }
1563 }
1564 function createElementWithValidation(type, props, children) {
1565 var validType = isValidElementType(type);
1566 if (!validType) {
1567 var info = "";
1568 if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
1569 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.";
1570 }
1571 var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1572 if (sourceInfo) {
1573 info += sourceInfo;
1574 } else {
1575 info += getDeclarationErrorAddendum();
1576 }
1577 var typeString;
1578 if (type === null) {
1579 typeString = "null";
1580 } else if (isArray(type)) {
1581 typeString = "array";
1582 } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
1583 typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1584 info = " Did you accidentally export a JSX literal instead of a component?";
1585 } else {
1586 typeString = typeof type;
1587 }
1588 {
1589 error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
1590 }
1591 }
1592 var element = createElement.apply(this, arguments);
1593 if (element == null) {
1594 return element;
1595 }
1596 if (validType) {
1597 for (var i = 2; i < arguments.length; i++) {
1598 validateChildKeys(arguments[i], type);
1599 }
1600 }
1601 if (type === REACT_FRAGMENT_TYPE) {
1602 validateFragmentProps(element);
1603 } else {
1604 validatePropTypes(element);
1605 }
1606 return element;
1607 }
1608 var didWarnAboutDeprecatedCreateFactory = false;
1609 function createFactoryWithValidation(type) {
1610 var validatedFactory = createElementWithValidation.bind(null, type);
1611 validatedFactory.type = type;
1612 {
1613 if (!didWarnAboutDeprecatedCreateFactory) {
1614 didWarnAboutDeprecatedCreateFactory = true;
1615 warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
1616 }
1617 Object.defineProperty(validatedFactory, "type", {
1618 enumerable: false,
1619 get: function() {
1620 warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
1621 Object.defineProperty(this, "type", {
1622 value: type
1623 });
1624 return type;
1625 }
1626 });
1627 }
1628 return validatedFactory;
1629 }
1630 function cloneElementWithValidation(element, props, children) {
1631 var newElement = cloneElement.apply(this, arguments);
1632 for (var i = 2; i < arguments.length; i++) {
1633 validateChildKeys(arguments[i], newElement.type);
1634 }
1635 validatePropTypes(newElement);
1636 return newElement;
1637 }
1638 function startTransition(scope, options) {
1639 var prevTransition = ReactCurrentBatchConfig.transition;
1640 ReactCurrentBatchConfig.transition = {};
1641 var currentTransition = ReactCurrentBatchConfig.transition;
1642 {
1643 ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
1644 }
1645 try {
1646 scope();
1647 } finally {
1648 ReactCurrentBatchConfig.transition = prevTransition;
1649 {
1650 if (prevTransition === null && currentTransition._updatedFibers) {
1651 var updatedFibersCount = currentTransition._updatedFibers.size;
1652 if (updatedFibersCount > 10) {
1653 warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
1654 }
1655 currentTransition._updatedFibers.clear();
1656 }
1657 }
1658 }
1659 }
1660 var didWarnAboutMessageChannel = false;
1661 var enqueueTaskImpl = null;
1662 function enqueueTask(task) {
1663 if (enqueueTaskImpl === null) {
1664 try {
1665 var requireString = ("require" + Math.random()).slice(0, 7);
1666 var nodeRequire = module && module[requireString];
1667 enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate;
1668 } catch (_err) {
1669 enqueueTaskImpl = function(callback) {
1670 {
1671 if (didWarnAboutMessageChannel === false) {
1672 didWarnAboutMessageChannel = true;
1673 if (typeof MessageChannel === "undefined") {
1674 error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.");
1675 }
1676 }
1677 }
1678 var channel = new MessageChannel();
1679 channel.port1.onmessage = callback;
1680 channel.port2.postMessage(void 0);
1681 };
1682 }
1683 }
1684 return enqueueTaskImpl(task);
1685 }
1686 var actScopeDepth = 0;
1687 var didWarnNoAwaitAct = false;
1688 function act(callback) {
1689 {
1690 var prevActScopeDepth = actScopeDepth;
1691 actScopeDepth++;
1692 if (ReactCurrentActQueue.current === null) {
1693 ReactCurrentActQueue.current = [];
1694 }
1695 var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1696 var result;
1697 try {
1698 ReactCurrentActQueue.isBatchingLegacy = true;
1699 result = callback();
1700 if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1701 var queue = ReactCurrentActQueue.current;
1702 if (queue !== null) {
1703 ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1704 flushActQueue(queue);
1705 }
1706 }
1707 } catch (error2) {
1708 popActScope(prevActScopeDepth);
1709 throw error2;
1710 } finally {
1711 ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
1712 }
1713 if (result !== null && typeof result === "object" && typeof result.then === "function") {
1714 var thenableResult = result;
1715 var wasAwaited = false;
1716 var thenable = {
1717 then: function(resolve, reject) {
1718 wasAwaited = true;
1719 thenableResult.then(function(returnValue2) {
1720 popActScope(prevActScopeDepth);
1721 if (actScopeDepth === 0) {
1722 recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
1723 } else {
1724 resolve(returnValue2);
1725 }
1726 }, function(error2) {
1727 popActScope(prevActScopeDepth);
1728 reject(error2);
1729 });
1730 }
1731 };
1732 {
1733 if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
1734 Promise.resolve().then(function() {
1735 }).then(function() {
1736 if (!wasAwaited) {
1737 didWarnNoAwaitAct = true;
1738 error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);");
1739 }
1740 });
1741 }
1742 }
1743 return thenable;
1744 } else {
1745 var returnValue = result;
1746 popActScope(prevActScopeDepth);
1747 if (actScopeDepth === 0) {
1748 var _queue = ReactCurrentActQueue.current;
1749 if (_queue !== null) {
1750 flushActQueue(_queue);
1751 ReactCurrentActQueue.current = null;
1752 }
1753 var _thenable = {
1754 then: function(resolve, reject) {
1755 if (ReactCurrentActQueue.current === null) {
1756 ReactCurrentActQueue.current = [];
1757 recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1758 } else {
1759 resolve(returnValue);
1760 }
1761 }
1762 };
1763 return _thenable;
1764 } else {
1765 var _thenable2 = {
1766 then: function(resolve, reject) {
1767 resolve(returnValue);
1768 }
1769 };
1770 return _thenable2;
1771 }
1772 }
1773 }
1774 }
1775 function popActScope(prevActScopeDepth) {
1776 {
1777 if (prevActScopeDepth !== actScopeDepth - 1) {
1778 error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
1779 }
1780 actScopeDepth = prevActScopeDepth;
1781 }
1782 }
1783 function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1784 {
1785 var queue = ReactCurrentActQueue.current;
1786 if (queue !== null) {
1787 try {
1788 flushActQueue(queue);
1789 enqueueTask(function() {
1790 if (queue.length === 0) {
1791 ReactCurrentActQueue.current = null;
1792 resolve(returnValue);
1793 } else {
1794 recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1795 }
1796 });
1797 } catch (error2) {
1798 reject(error2);
1799 }
1800 } else {
1801 resolve(returnValue);
1802 }
1803 }
1804 }
1805 var isFlushing = false;
1806 function flushActQueue(queue) {
1807 {
1808 if (!isFlushing) {
1809 isFlushing = true;
1810 var i = 0;
1811 try {
1812 for (; i < queue.length; i++) {
1813 var callback = queue[i];
1814 do {
1815 callback = callback(true);
1816 } while (callback !== null);
1817 }
1818 queue.length = 0;
1819 } catch (error2) {
1820 queue = queue.slice(i + 1);
1821 throw error2;
1822 } finally {
1823 isFlushing = false;
1824 }
1825 }
1826 }
1827 }
1828 var createElement$1 = createElementWithValidation;
1829 var cloneElement$1 = cloneElementWithValidation;
1830 var createFactory = createFactoryWithValidation;
1831 var Children = {
1832 map: mapChildren,
1833 forEach: forEachChildren,
1834 count: countChildren,
1835 toArray,
1836 only: onlyChild
1837 };
1838 exports.Children = Children;
1839 exports.Component = Component;
1840 exports.Fragment = REACT_FRAGMENT_TYPE;
1841 exports.Profiler = REACT_PROFILER_TYPE;
1842 exports.PureComponent = PureComponent;
1843 exports.StrictMode = REACT_STRICT_MODE_TYPE;
1844 exports.Suspense = REACT_SUSPENSE_TYPE;
1845 exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
1846 exports.act = act;
1847 exports.cloneElement = cloneElement$1;
1848 exports.createContext = createContext;
1849 exports.createElement = createElement$1;
1850 exports.createFactory = createFactory;
1851 exports.createRef = createRef;
1852 exports.forwardRef = forwardRef;
1853 exports.isValidElement = isValidElement;
1854 exports.lazy = lazy;
1855 exports.memo = memo;
1856 exports.startTransition = startTransition;
1857 exports.unstable_act = act;
1858 exports.useCallback = useCallback;
1859 exports.useContext = useContext;
1860 exports.useDebugValue = useDebugValue;
1861 exports.useDeferredValue = useDeferredValue;
1862 exports.useEffect = useEffect;
1863 exports.useId = useId;
1864 exports.useImperativeHandle = useImperativeHandle;
1865 exports.useInsertionEffect = useInsertionEffect;
1866 exports.useLayoutEffect = useLayoutEffect;
1867 exports.useMemo = useMemo;
1868 exports.useReducer = useReducer;
1869 exports.useRef = useRef;
1870 exports.useState = useState;
1871 exports.useSyncExternalStore = useSyncExternalStore;
1872 exports.useTransition = useTransition;
1873 exports.version = ReactVersion;
1874 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
1875 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1876 }
1877 })();
1878 }
1879 }
1880 });
1881
1882 // ../../node_modules/react/index.js
1883 var require_react = __commonJS({
1884 "../../node_modules/react/index.js"(exports, module) {
1885 if (false) {
1886 module.exports = null;
1887 } else {
1888 module.exports = require_react_development();
1889 }
1890 }
1891 });
1892 return require_react();
1893 })();
1894 /*! Bundled license information:
1895
1896 react/cjs/react.development.js:
1897 (**
1898 * @license React
1899 * react.development.js
1900 *
1901 * Copyright (c) Facebook, Inc. and its affiliates.
1902 *
1903 * This source code is licensed under the MIT license found in the
1904 * LICENSE file in the root directory of this source tree.
1905 *)
1906 */
1907