PluginProbe
Gutenberg / 23.7.2
Gutenberg v23.7.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.7.2, at build/scripts/vendors/react.js

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