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

1,005 lines 46.9 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 (function() {
13 function defineDeprecationWarning(methodName, info) {
14 Object.defineProperty(Component.prototype, methodName, {
15 get: function() {
16 console.warn(
17 "%s(...) is deprecated in plain JavaScript React classes. %s",
18 info[0],
19 info[1]
20 );
21 }
22 });
23 }
24 function getIteratorFn(maybeIterable) {
25 if (null === maybeIterable || "object" !== typeof maybeIterable)
26 return null;
27 maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
28 return "function" === typeof maybeIterable ? maybeIterable : null;
29 }
30 function warnNoop(publicInstance, callerName) {
31 publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
32 var warningKey = publicInstance + "." + callerName;
33 didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
34 "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.",
35 callerName,
36 publicInstance
37 ), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
38 }
39 function Component(props, context, updater) {
40 this.props = props;
41 this.context = context;
42 this.refs = emptyObject;
43 this.updater = updater || ReactNoopUpdateQueue;
44 }
45 function ComponentDummy() {
46 }
47 function PureComponent(props, context, updater) {
48 this.props = props;
49 this.context = context;
50 this.refs = emptyObject;
51 this.updater = updater || ReactNoopUpdateQueue;
52 }
53 function noop() {
54 }
55 function testStringCoercion(value) {
56 return "" + value;
57 }
58 function checkKeyStringCoercion(value) {
59 try {
60 testStringCoercion(value);
61 var JSCompiler_inline_result = false;
62 } catch (e) {
63 JSCompiler_inline_result = true;
64 }
65 if (JSCompiler_inline_result) {
66 JSCompiler_inline_result = console;
67 var JSCompiler_temp_const = JSCompiler_inline_result.error;
68 var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
69 JSCompiler_temp_const.call(
70 JSCompiler_inline_result,
71 "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
72 JSCompiler_inline_result$jscomp$0
73 );
74 return testStringCoercion(value);
75 }
76 }
77 function getComponentNameFromType(type) {
78 if (null == type) return null;
79 if ("function" === typeof type)
80 return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
81 if ("string" === typeof type) return type;
82 switch (type) {
83 case REACT_FRAGMENT_TYPE:
84 return "Fragment";
85 case REACT_PROFILER_TYPE:
86 return "Profiler";
87 case REACT_STRICT_MODE_TYPE:
88 return "StrictMode";
89 case REACT_SUSPENSE_TYPE:
90 return "Suspense";
91 case REACT_SUSPENSE_LIST_TYPE:
92 return "SuspenseList";
93 case REACT_ACTIVITY_TYPE:
94 return "Activity";
95 }
96 if ("object" === typeof type)
97 switch ("number" === typeof type.tag && console.error(
98 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
99 ), type.$$typeof) {
100 case REACT_PORTAL_TYPE:
101 return "Portal";
102 case REACT_CONTEXT_TYPE:
103 return type.displayName || "Context";
104 case REACT_CONSUMER_TYPE:
105 return (type._context.displayName || "Context") + ".Consumer";
106 case REACT_FORWARD_REF_TYPE:
107 var innerType = type.render;
108 type = type.displayName;
109 type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
110 return type;
111 case REACT_MEMO_TYPE:
112 return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
113 case REACT_LAZY_TYPE:
114 innerType = type._payload;
115 type = type._init;
116 try {
117 return getComponentNameFromType(type(innerType));
118 } catch (x) {
119 }
120 }
121 return null;
122 }
123 function getTaskName(type) {
124 if (type === REACT_FRAGMENT_TYPE) return "<>";
125 if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
126 return "<...>";
127 try {
128 var name = getComponentNameFromType(type);
129 return name ? "<" + name + ">" : "<...>";
130 } catch (x) {
131 return "<...>";
132 }
133 }
134 function getOwner() {
135 var dispatcher = ReactSharedInternals.A;
136 return null === dispatcher ? null : dispatcher.getOwner();
137 }
138 function UnknownOwner() {
139 return Error("react-stack-top-frame");
140 }
141 function hasValidKey(config) {
142 if (hasOwnProperty.call(config, "key")) {
143 var getter = Object.getOwnPropertyDescriptor(config, "key").get;
144 if (getter && getter.isReactWarning) return false;
145 }
146 return void 0 !== config.key;
147 }
148 function defineKeyPropWarningGetter(props, displayName) {
149 function warnAboutAccessingKey() {
150 specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
151 "%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://react.dev/link/special-props)",
152 displayName
153 ));
154 }
155 warnAboutAccessingKey.isReactWarning = true;
156 Object.defineProperty(props, "key", {
157 get: warnAboutAccessingKey,
158 configurable: true
159 });
160 }
161 function elementRefGetterWithDeprecationWarning() {
162 var componentName = getComponentNameFromType(this.type);
163 didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
164 "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
165 ));
166 componentName = this.props.ref;
167 return void 0 !== componentName ? componentName : null;
168 }
169 function ReactElement(type, key, props, owner, debugStack, debugTask) {
170 var refProp = props.ref;
171 type = {
172 $$typeof: REACT_ELEMENT_TYPE,
173 type,
174 key,
175 props,
176 _owner: owner
177 };
178 null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
179 enumerable: false,
180 get: elementRefGetterWithDeprecationWarning
181 }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
182 type._store = {};
183 Object.defineProperty(type._store, "validated", {
184 configurable: false,
185 enumerable: false,
186 writable: true,
187 value: 0
188 });
189 Object.defineProperty(type, "_debugInfo", {
190 configurable: false,
191 enumerable: false,
192 writable: true,
193 value: null
194 });
195 Object.defineProperty(type, "_debugStack", {
196 configurable: false,
197 enumerable: false,
198 writable: true,
199 value: debugStack
200 });
201 Object.defineProperty(type, "_debugTask", {
202 configurable: false,
203 enumerable: false,
204 writable: true,
205 value: debugTask
206 });
207 Object.freeze && (Object.freeze(type.props), Object.freeze(type));
208 return type;
209 }
210 function cloneAndReplaceKey(oldElement, newKey) {
211 newKey = ReactElement(
212 oldElement.type,
213 newKey,
214 oldElement.props,
215 oldElement._owner,
216 oldElement._debugStack,
217 oldElement._debugTask
218 );
219 oldElement._store && (newKey._store.validated = oldElement._store.validated);
220 return newKey;
221 }
222 function validateChildKeys(node) {
223 isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
224 }
225 function isValidElement(object) {
226 return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
227 }
228 function escape(key) {
229 var escaperLookup = { "=": "=0", ":": "=2" };
230 return "$" + key.replace(/[=:]/g, function(match) {
231 return escaperLookup[match];
232 });
233 }
234 function getElementKey(element, index) {
235 return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
236 }
237 function resolveThenable(thenable) {
238 switch (thenable.status) {
239 case "fulfilled":
240 return thenable.value;
241 case "rejected":
242 throw thenable.reason;
243 default:
244 switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
245 function(fulfilledValue) {
246 "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
247 },
248 function(error) {
249 "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
250 }
251 )), thenable.status) {
252 case "fulfilled":
253 return thenable.value;
254 case "rejected":
255 throw thenable.reason;
256 }
257 }
258 throw thenable;
259 }
260 function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
261 var type = typeof children;
262 if ("undefined" === type || "boolean" === type) children = null;
263 var invokeCallback = false;
264 if (null === children) invokeCallback = true;
265 else
266 switch (type) {
267 case "bigint":
268 case "string":
269 case "number":
270 invokeCallback = true;
271 break;
272 case "object":
273 switch (children.$$typeof) {
274 case REACT_ELEMENT_TYPE:
275 case REACT_PORTAL_TYPE:
276 invokeCallback = true;
277 break;
278 case REACT_LAZY_TYPE:
279 return invokeCallback = children._init, mapIntoArray(
280 invokeCallback(children._payload),
281 array,
282 escapedPrefix,
283 nameSoFar,
284 callback
285 );
286 }
287 }
288 if (invokeCallback) {
289 invokeCallback = children;
290 callback = callback(invokeCallback);
291 var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
292 isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
293 return c;
294 })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
295 callback,
296 escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
297 userProvidedKeyEscapeRegex,
298 "$&/"
299 ) + "/") + childKey
300 ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
301 return 1;
302 }
303 invokeCallback = 0;
304 childKey = "" === nameSoFar ? "." : nameSoFar + ":";
305 if (isArrayImpl(children))
306 for (var i = 0; i < children.length; i++)
307 nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
308 nameSoFar,
309 array,
310 escapedPrefix,
311 type,
312 callback
313 );
314 else if (i = getIteratorFn(children), "function" === typeof i)
315 for (i === children.entries && (didWarnAboutMaps || console.warn(
316 "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
317 ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
318 nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
319 nameSoFar,
320 array,
321 escapedPrefix,
322 type,
323 callback
324 );
325 else if ("object" === type) {
326 if ("function" === typeof children.then)
327 return mapIntoArray(
328 resolveThenable(children),
329 array,
330 escapedPrefix,
331 nameSoFar,
332 callback
333 );
334 array = String(children);
335 throw Error(
336 "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
337 );
338 }
339 return invokeCallback;
340 }
341 function mapChildren(children, func, context) {
342 if (null == children) return children;
343 var result = [], count = 0;
344 mapIntoArray(children, result, "", "", function(child) {
345 return func.call(context, child, count++);
346 });
347 return result;
348 }
349 function lazyInitializer(payload) {
350 if (-1 === payload._status) {
351 var ioInfo = payload._ioInfo;
352 null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
353 ioInfo = payload._result;
354 var thenable = ioInfo();
355 thenable.then(
356 function(moduleObject) {
357 if (0 === payload._status || -1 === payload._status) {
358 payload._status = 1;
359 payload._result = moduleObject;
360 var _ioInfo = payload._ioInfo;
361 null != _ioInfo && (_ioInfo.end = performance.now());
362 void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
363 }
364 },
365 function(error) {
366 if (0 === payload._status || -1 === payload._status) {
367 payload._status = 2;
368 payload._result = error;
369 var _ioInfo2 = payload._ioInfo;
370 null != _ioInfo2 && (_ioInfo2.end = performance.now());
371 void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
372 }
373 }
374 );
375 ioInfo = payload._ioInfo;
376 if (null != ioInfo) {
377 ioInfo.value = thenable;
378 var displayName = thenable.displayName;
379 "string" === typeof displayName && (ioInfo.name = displayName);
380 }
381 -1 === payload._status && (payload._status = 0, payload._result = thenable);
382 }
383 if (1 === payload._status)
384 return ioInfo = payload._result, void 0 === ioInfo && console.error(
385 "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?",
386 ioInfo
387 ), "default" in ioInfo || console.error(
388 "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
389 ioInfo
390 ), ioInfo.default;
391 throw payload._result;
392 }
393 function resolveDispatcher() {
394 var dispatcher = ReactSharedInternals.H;
395 null === dispatcher && console.error(
396 "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://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
397 );
398 return dispatcher;
399 }
400 function releaseAsyncTransition() {
401 ReactSharedInternals.asyncTransitions--;
402 }
403 function enqueueTask(task) {
404 if (null === enqueueTaskImpl)
405 try {
406 var requireString = ("require" + Math.random()).slice(0, 7);
407 enqueueTaskImpl = (module && module[requireString]).call(
408 module,
409 "timers"
410 ).setImmediate;
411 } catch (_err) {
412 enqueueTaskImpl = function(callback) {
413 false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
414 "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."
415 ));
416 var channel = new MessageChannel();
417 channel.port1.onmessage = callback;
418 channel.port2.postMessage(void 0);
419 };
420 }
421 return enqueueTaskImpl(task);
422 }
423 function aggregateErrors(errors) {
424 return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
425 }
426 function popActScope(prevActQueue, prevActScopeDepth) {
427 prevActScopeDepth !== actScopeDepth - 1 && console.error(
428 "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
429 );
430 actScopeDepth = prevActScopeDepth;
431 }
432 function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
433 var queue = ReactSharedInternals.actQueue;
434 if (null !== queue)
435 if (0 !== queue.length)
436 try {
437 flushActQueue(queue);
438 enqueueTask(function() {
439 return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
440 });
441 return;
442 } catch (error) {
443 ReactSharedInternals.thrownErrors.push(error);
444 }
445 else ReactSharedInternals.actQueue = null;
446 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
447 }
448 function flushActQueue(queue) {
449 if (!isFlushing) {
450 isFlushing = true;
451 var i = 0;
452 try {
453 for (; i < queue.length; i++) {
454 var callback = queue[i];
455 do {
456 ReactSharedInternals.didUsePromise = false;
457 var continuation = callback(false);
458 if (null !== continuation) {
459 if (ReactSharedInternals.didUsePromise) {
460 queue[i] = callback;
461 queue.splice(0, i);
462 return;
463 }
464 callback = continuation;
465 } else break;
466 } while (1);
467 }
468 queue.length = 0;
469 } catch (error) {
470 queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
471 } finally {
472 isFlushing = false;
473 }
474 }
475 }
476 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
477 var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
478 isMounted: function() {
479 return false;
480 },
481 enqueueForceUpdate: function(publicInstance) {
482 warnNoop(publicInstance, "forceUpdate");
483 },
484 enqueueReplaceState: function(publicInstance) {
485 warnNoop(publicInstance, "replaceState");
486 },
487 enqueueSetState: function(publicInstance) {
488 warnNoop(publicInstance, "setState");
489 }
490 }, assign = Object.assign, emptyObject = {};
491 Object.freeze(emptyObject);
492 Component.prototype.isReactComponent = {};
493 Component.prototype.setState = function(partialState, callback) {
494 if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
495 throw Error(
496 "takes an object of state variables to update or a function which returns an object of state variables."
497 );
498 this.updater.enqueueSetState(this, partialState, callback, "setState");
499 };
500 Component.prototype.forceUpdate = function(callback) {
501 this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
502 };
503 var deprecatedAPIs = {
504 isMounted: [
505 "isMounted",
506 "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
507 ],
508 replaceState: [
509 "replaceState",
510 "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
511 ]
512 };
513 for (fnName in deprecatedAPIs)
514 deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
515 ComponentDummy.prototype = Component.prototype;
516 deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
517 deprecatedAPIs.constructor = PureComponent;
518 assign(deprecatedAPIs, Component.prototype);
519 deprecatedAPIs.isPureReactComponent = true;
520 var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
521 H: null,
522 A: null,
523 T: null,
524 S: null,
525 actQueue: null,
526 asyncTransitions: 0,
527 isBatchingLegacy: false,
528 didScheduleLegacyUpdate: false,
529 didUsePromise: false,
530 thrownErrors: [],
531 getCurrentStack: null,
532 recentlyCreatedOwnerStacks: 0
533 }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
534 return null;
535 };
536 deprecatedAPIs = {
537 react_stack_bottom_frame: function(callStackForError) {
538 return callStackForError();
539 }
540 };
541 var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
542 var didWarnAboutElementRef = {};
543 var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
544 deprecatedAPIs,
545 UnknownOwner
546 )();
547 var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
548 var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
549 if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
550 var event = new window.ErrorEvent("error", {
551 bubbles: true,
552 cancelable: true,
553 message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
554 error
555 });
556 if (!window.dispatchEvent(event)) return;
557 } else if ("object" === typeof process && "function" === typeof process.emit) {
558 process.emit("uncaughtException", error);
559 return;
560 }
561 console.error(error);
562 }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
563 queueMicrotask(function() {
564 return queueMicrotask(callback);
565 });
566 } : enqueueTask;
567 deprecatedAPIs = Object.freeze({
568 __proto__: null,
569 c: function(size) {
570 return resolveDispatcher().useMemoCache(size);
571 }
572 });
573 var fnName = {
574 map: mapChildren,
575 forEach: function(children, forEachFunc, forEachContext) {
576 mapChildren(
577 children,
578 function() {
579 forEachFunc.apply(this, arguments);
580 },
581 forEachContext
582 );
583 },
584 count: function(children) {
585 var n = 0;
586 mapChildren(children, function() {
587 n++;
588 });
589 return n;
590 },
591 toArray: function(children) {
592 return mapChildren(children, function(child) {
593 return child;
594 }) || [];
595 },
596 only: function(children) {
597 if (!isValidElement(children))
598 throw Error(
599 "React.Children.only expected to receive a single React element child."
600 );
601 return children;
602 }
603 };
604 exports.Activity = REACT_ACTIVITY_TYPE;
605 exports.Children = fnName;
606 exports.Component = Component;
607 exports.Fragment = REACT_FRAGMENT_TYPE;
608 exports.Profiler = REACT_PROFILER_TYPE;
609 exports.PureComponent = PureComponent;
610 exports.StrictMode = REACT_STRICT_MODE_TYPE;
611 exports.Suspense = REACT_SUSPENSE_TYPE;
612 exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
613 exports.__COMPILER_RUNTIME = deprecatedAPIs;
614 exports.act = function(callback) {
615 var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
616 actScopeDepth++;
617 var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
618 try {
619 var result = callback();
620 } catch (error) {
621 ReactSharedInternals.thrownErrors.push(error);
622 }
623 if (0 < ReactSharedInternals.thrownErrors.length)
624 throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
625 if (null !== result && "object" === typeof result && "function" === typeof result.then) {
626 var thenable = result;
627 queueSeveralMicrotasks(function() {
628 didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
629 "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 () => ...);"
630 ));
631 });
632 return {
633 then: function(resolve, reject) {
634 didAwaitActCall = true;
635 thenable.then(
636 function(returnValue) {
637 popActScope(prevActQueue, prevActScopeDepth);
638 if (0 === prevActScopeDepth) {
639 try {
640 flushActQueue(queue), enqueueTask(function() {
641 return recursivelyFlushAsyncActWork(
642 returnValue,
643 resolve,
644 reject
645 );
646 });
647 } catch (error$0) {
648 ReactSharedInternals.thrownErrors.push(error$0);
649 }
650 if (0 < ReactSharedInternals.thrownErrors.length) {
651 var _thrownError = aggregateErrors(
652 ReactSharedInternals.thrownErrors
653 );
654 ReactSharedInternals.thrownErrors.length = 0;
655 reject(_thrownError);
656 }
657 } else resolve(returnValue);
658 },
659 function(error) {
660 popActScope(prevActQueue, prevActScopeDepth);
661 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
662 ReactSharedInternals.thrownErrors
663 ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
664 }
665 );
666 }
667 };
668 }
669 var returnValue$jscomp$0 = result;
670 popActScope(prevActQueue, prevActScopeDepth);
671 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
672 didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
673 "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
674 ));
675 }), ReactSharedInternals.actQueue = null);
676 if (0 < ReactSharedInternals.thrownErrors.length)
677 throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
678 return {
679 then: function(resolve, reject) {
680 didAwaitActCall = true;
681 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
682 return recursivelyFlushAsyncActWork(
683 returnValue$jscomp$0,
684 resolve,
685 reject
686 );
687 })) : resolve(returnValue$jscomp$0);
688 }
689 };
690 };
691 exports.cache = function(fn) {
692 return function() {
693 return fn.apply(null, arguments);
694 };
695 };
696 exports.cacheSignal = function() {
697 return null;
698 };
699 exports.captureOwnerStack = function() {
700 var getCurrentStack = ReactSharedInternals.getCurrentStack;
701 return null === getCurrentStack ? null : getCurrentStack();
702 };
703 exports.cloneElement = function(element, config, children) {
704 if (null === element || void 0 === element)
705 throw Error(
706 "The argument must be a React element, but you passed " + element + "."
707 );
708 var props = assign({}, element.props), key = element.key, owner = element._owner;
709 if (null != config) {
710 var JSCompiler_inline_result;
711 a: {
712 if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
713 config,
714 "ref"
715 ).get) && JSCompiler_inline_result.isReactWarning) {
716 JSCompiler_inline_result = false;
717 break a;
718 }
719 JSCompiler_inline_result = void 0 !== config.ref;
720 }
721 JSCompiler_inline_result && (owner = getOwner());
722 hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
723 for (propName in config)
724 !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
725 }
726 var propName = arguments.length - 2;
727 if (1 === propName) props.children = children;
728 else if (1 < propName) {
729 JSCompiler_inline_result = Array(propName);
730 for (var i = 0; i < propName; i++)
731 JSCompiler_inline_result[i] = arguments[i + 2];
732 props.children = JSCompiler_inline_result;
733 }
734 props = ReactElement(
735 element.type,
736 key,
737 props,
738 owner,
739 element._debugStack,
740 element._debugTask
741 );
742 for (key = 2; key < arguments.length; key++)
743 validateChildKeys(arguments[key]);
744 return props;
745 };
746 exports.createContext = function(defaultValue) {
747 defaultValue = {
748 $$typeof: REACT_CONTEXT_TYPE,
749 _currentValue: defaultValue,
750 _currentValue2: defaultValue,
751 _threadCount: 0,
752 Provider: null,
753 Consumer: null
754 };
755 defaultValue.Provider = defaultValue;
756 defaultValue.Consumer = {
757 $$typeof: REACT_CONSUMER_TYPE,
758 _context: defaultValue
759 };
760 defaultValue._currentRenderer = null;
761 defaultValue._currentRenderer2 = null;
762 return defaultValue;
763 };
764 exports.createElement = function(type, config, children) {
765 for (var i = 2; i < arguments.length; i++)
766 validateChildKeys(arguments[i]);
767 i = {};
768 var key = null;
769 if (null != config)
770 for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
771 "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
772 )), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
773 hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
774 var childrenLength = arguments.length - 2;
775 if (1 === childrenLength) i.children = children;
776 else if (1 < childrenLength) {
777 for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
778 childArray[_i] = arguments[_i + 2];
779 Object.freeze && Object.freeze(childArray);
780 i.children = childArray;
781 }
782 if (type && type.defaultProps)
783 for (propName in childrenLength = type.defaultProps, childrenLength)
784 void 0 === i[propName] && (i[propName] = childrenLength[propName]);
785 key && defineKeyPropWarningGetter(
786 i,
787 "function" === typeof type ? type.displayName || type.name || "Unknown" : type
788 );
789 var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
790 return ReactElement(
791 type,
792 key,
793 i,
794 getOwner(),
795 propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
796 propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
797 );
798 };
799 exports.createRef = function() {
800 var refObject = { current: null };
801 Object.seal(refObject);
802 return refObject;
803 };
804 exports.forwardRef = function(render) {
805 null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
806 "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
807 ) : "function" !== typeof render ? console.error(
808 "forwardRef requires a render function but was given %s.",
809 null === render ? "null" : typeof render
810 ) : 0 !== render.length && 2 !== render.length && console.error(
811 "forwardRef render functions accept exactly two parameters: props and ref. %s",
812 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
813 );
814 null != render && null != render.defaultProps && console.error(
815 "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
816 );
817 var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
818 Object.defineProperty(elementType, "displayName", {
819 enumerable: false,
820 configurable: true,
821 get: function() {
822 return ownName;
823 },
824 set: function(name) {
825 ownName = name;
826 render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
827 }
828 });
829 return elementType;
830 };
831 exports.isValidElement = isValidElement;
832 exports.lazy = function(ctor) {
833 ctor = { _status: -1, _result: ctor };
834 var lazyType = {
835 $$typeof: REACT_LAZY_TYPE,
836 _payload: ctor,
837 _init: lazyInitializer
838 }, ioInfo = {
839 name: "lazy",
840 start: -1,
841 end: -1,
842 value: null,
843 owner: null,
844 debugStack: Error("react-stack-top-frame"),
845 debugTask: console.createTask ? console.createTask("lazy()") : null
846 };
847 ctor._ioInfo = ioInfo;
848 lazyType._debugInfo = [{ awaited: ioInfo }];
849 return lazyType;
850 };
851 exports.memo = function(type, compare) {
852 null == type && console.error(
853 "memo: The first argument must be a component. Instead received: %s",
854 null === type ? "null" : typeof type
855 );
856 compare = {
857 $$typeof: REACT_MEMO_TYPE,
858 type,
859 compare: void 0 === compare ? null : compare
860 };
861 var ownName;
862 Object.defineProperty(compare, "displayName", {
863 enumerable: false,
864 configurable: true,
865 get: function() {
866 return ownName;
867 },
868 set: function(name) {
869 ownName = name;
870 type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
871 }
872 });
873 return compare;
874 };
875 exports.startTransition = function(scope) {
876 var prevTransition = ReactSharedInternals.T, currentTransition = {};
877 currentTransition._updatedFibers = /* @__PURE__ */ new Set();
878 ReactSharedInternals.T = currentTransition;
879 try {
880 var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
881 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
882 "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
883 } catch (error) {
884 reportGlobalError(error);
885 } finally {
886 null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
887 "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."
888 )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
889 "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
890 ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
891 }
892 };
893 exports.unstable_useCacheRefresh = function() {
894 return resolveDispatcher().useCacheRefresh();
895 };
896 exports.use = function(usable) {
897 return resolveDispatcher().use(usable);
898 };
899 exports.useActionState = function(action, initialState, permalink) {
900 return resolveDispatcher().useActionState(
901 action,
902 initialState,
903 permalink
904 );
905 };
906 exports.useCallback = function(callback, deps) {
907 return resolveDispatcher().useCallback(callback, deps);
908 };
909 exports.useContext = function(Context) {
910 var dispatcher = resolveDispatcher();
911 Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
912 "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
913 );
914 return dispatcher.useContext(Context);
915 };
916 exports.useDebugValue = function(value, formatterFn) {
917 return resolveDispatcher().useDebugValue(value, formatterFn);
918 };
919 exports.useDeferredValue = function(value, initialValue) {
920 return resolveDispatcher().useDeferredValue(value, initialValue);
921 };
922 exports.useEffect = function(create, deps) {
923 null == create && console.warn(
924 "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
925 );
926 return resolveDispatcher().useEffect(create, deps);
927 };
928 exports.useEffectEvent = function(callback) {
929 return resolveDispatcher().useEffectEvent(callback);
930 };
931 exports.useId = function() {
932 return resolveDispatcher().useId();
933 };
934 exports.useImperativeHandle = function(ref, create, deps) {
935 return resolveDispatcher().useImperativeHandle(ref, create, deps);
936 };
937 exports.useInsertionEffect = function(create, deps) {
938 null == create && console.warn(
939 "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
940 );
941 return resolveDispatcher().useInsertionEffect(create, deps);
942 };
943 exports.useLayoutEffect = function(create, deps) {
944 null == create && console.warn(
945 "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
946 );
947 return resolveDispatcher().useLayoutEffect(create, deps);
948 };
949 exports.useMemo = function(create, deps) {
950 return resolveDispatcher().useMemo(create, deps);
951 };
952 exports.useOptimistic = function(passthrough, reducer) {
953 return resolveDispatcher().useOptimistic(passthrough, reducer);
954 };
955 exports.useReducer = function(reducer, initialArg, init) {
956 return resolveDispatcher().useReducer(reducer, initialArg, init);
957 };
958 exports.useRef = function(initialValue) {
959 return resolveDispatcher().useRef(initialValue);
960 };
961 exports.useState = function(initialState) {
962 return resolveDispatcher().useState(initialState);
963 };
964 exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
965 return resolveDispatcher().useSyncExternalStore(
966 subscribe,
967 getSnapshot,
968 getServerSnapshot
969 );
970 };
971 exports.useTransition = function() {
972 return resolveDispatcher().useTransition();
973 };
974 exports.version = "19.2.4";
975 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
976 })();
977 }
978 });
979
980 // node_modules/react/index.js
981 var require_react = __commonJS({
982 "node_modules/react/index.js"(exports, module) {
983 if (false) {
984 module.exports = null;
985 } else {
986 module.exports = require_react_development();
987 }
988 }
989 });
990 return require_react();
991 })();
992 /*! Bundled license information:
993
994 react/cjs/react.development.js:
995 (**
996 * @license React
997 * react.development.js
998 *
999 * Copyright (c) Meta Platforms, Inc. and affiliates.
1000 *
1001 * This source code is licensed under the MIT license found in the
1002 * LICENSE file in the root directory of this source tree.
1003 *)
1004 */
1005