@egov3/system-design 1.2.49 → 1.2.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,2778 +1,1799 @@
1
1
  var react = {exports: {}};
2
2
 
3
- var react_production_min = {};
3
+ var react_production = {};
4
4
 
5
5
  /**
6
6
  * @license React
7
- * react.production.min.js
7
+ * react.production.js
8
8
  *
9
- * Copyright (c) Facebook, Inc. and its affiliates.
9
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
10
10
  *
11
11
  * This source code is licensed under the MIT license found in the
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
- var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return "function"===typeof a?a:null}
15
- var B={isMounted:function(){return !1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B;}E.prototype.isReactComponent={};
16
- E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState");};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate");};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B;}var H=G.prototype=new F;
17
- H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};
18
- function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f;}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return {$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}
19
- function N(a,b){return {$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return "object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return "$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return "object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
20
- function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0;}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k=
21
- a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c);}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}
22
- function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b;},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b;});-1===a._status&&(a._status=0,a._result=b);}if(1===a._status)return a._result.default;throw a._result;}
23
- var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};function X(){throw Error("act(...) is not supported in production builds of React.");}
24
- react_production_min.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments);},e);},count:function(a){var b=0;S(a,function(){b++;});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};react_production_min.Component=E;react_production_min.Fragment=p;react_production_min.Profiler=r;react_production_min.PureComponent=G;react_production_min.StrictMode=q;react_production_min.Suspense=w;
25
- react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;react_production_min.act=X;
26
- react_production_min.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f]);}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);
27
- for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g;}return {$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};react_production_min.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};react_production_min.createElement=M;react_production_min.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};react_production_min.createRef=function(){return {current:null}};
28
- react_production_min.forwardRef=function(a){return {$$typeof:v,render:a}};react_production_min.isValidElement=O;react_production_min.lazy=function(a){return {$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};react_production_min.memo=function(a,b){return {$$typeof:x,type:a,compare:void 0===b?null:b}};react_production_min.startTransition=function(a){var b=V.transition;V.transition={};try{a();}finally{V.transition=b;}};react_production_min.unstable_act=X;react_production_min.useCallback=function(a,b){return U.current.useCallback(a,b)};react_production_min.useContext=function(a){return U.current.useContext(a)};
29
- react_production_min.useDebugValue=function(){};react_production_min.useDeferredValue=function(a){return U.current.useDeferredValue(a)};react_production_min.useEffect=function(a,b){return U.current.useEffect(a,b)};react_production_min.useId=function(){return U.current.useId()};react_production_min.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};react_production_min.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};react_production_min.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};
30
- react_production_min.useMemo=function(a,b){return U.current.useMemo(a,b)};react_production_min.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};react_production_min.useRef=function(a){return U.current.useRef(a)};react_production_min.useState=function(a){return U.current.useState(a)};react_production_min.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};react_production_min.useTransition=function(){return U.current.useTransition()};react_production_min.version="18.3.1";
31
-
32
- var react_development = {exports: {}};
33
-
34
- /**
35
- * @license React
36
- * react.development.js
37
- *
38
- * Copyright (c) Facebook, Inc. and its affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- */
43
-
44
- (function (module, exports) {
45
-
46
- if (process.env.NODE_ENV !== "production") {
47
- (function() {
48
-
49
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
50
- if (
51
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
52
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
53
- 'function'
54
- ) {
55
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
56
- }
57
- var ReactVersion = '18.3.1';
58
-
59
- // ATTENTION
60
- // When adding new symbols to this file,
61
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
62
- // The Symbol used to tag the ReactElement-like types.
63
- var REACT_ELEMENT_TYPE = Symbol.for('react.element');
64
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
65
- var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
66
- var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
67
- var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
68
- var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
69
- var REACT_CONTEXT_TYPE = Symbol.for('react.context');
70
- var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
71
- var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
72
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
73
- var REACT_MEMO_TYPE = Symbol.for('react.memo');
74
- var REACT_LAZY_TYPE = Symbol.for('react.lazy');
75
- var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
76
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
77
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
14
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
15
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
16
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
17
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
18
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
19
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
20
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
21
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
22
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
23
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
24
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
25
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
78
26
  function getIteratorFn(maybeIterable) {
79
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
80
- return null;
81
- }
82
-
83
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
84
-
85
- if (typeof maybeIterator === 'function') {
86
- return maybeIterator;
87
- }
88
-
89
- return null;
90
- }
91
-
92
- /**
93
- * Keeps track of the current dispatcher.
94
- */
95
- var ReactCurrentDispatcher = {
96
- /**
97
- * @internal
98
- * @type {ReactComponent}
99
- */
100
- current: null
101
- };
102
-
103
- /**
104
- * Keeps track of the current batch's configuration such as how long an update
105
- * should suspend for if it needs to.
106
- */
107
- var ReactCurrentBatchConfig = {
108
- transition: null
109
- };
110
-
111
- var ReactCurrentActQueue = {
112
- current: null,
113
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
114
- isBatchingLegacy: false,
115
- didScheduleLegacyUpdate: false
116
- };
117
-
118
- /**
119
- * Keeps track of the current owner.
120
- *
121
- * The current owner is the component who should own any components that are
122
- * currently being constructed.
123
- */
124
- var ReactCurrentOwner = {
125
- /**
126
- * @internal
127
- * @type {ReactComponent}
128
- */
129
- current: null
130
- };
131
-
132
- var ReactDebugCurrentFrame = {};
133
- var currentExtraStackFrame = null;
134
- function setExtraStackFrame(stack) {
135
- {
136
- currentExtraStackFrame = stack;
137
- }
138
- }
139
-
140
- {
141
- ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
142
- {
143
- currentExtraStackFrame = stack;
144
- }
145
- }; // Stack implementation injected by the current renderer.
146
-
147
-
148
- ReactDebugCurrentFrame.getCurrentStack = null;
149
-
150
- ReactDebugCurrentFrame.getStackAddendum = function () {
151
- var stack = ''; // Add an extra top frame while an element is being validated
152
-
153
- if (currentExtraStackFrame) {
154
- stack += currentExtraStackFrame;
155
- } // Delegate to the injected renderer-specific implementation
156
-
157
-
158
- var impl = ReactDebugCurrentFrame.getCurrentStack;
159
-
160
- if (impl) {
161
- stack += impl() || '';
162
- }
163
-
164
- return stack;
165
- };
166
- }
167
-
168
- // -----------------------------------------------------------------------------
169
-
170
- var enableScopeAPI = false; // Experimental Create Event Handle API.
171
- var enableCacheElement = false;
172
- var enableTransitionTracing = false; // No known bugs, but needs performance testing
173
-
174
- var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
175
- // stuff. Intended to enable React core members to more easily debug scheduling
176
- // issues in DEV builds.
177
-
178
- var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
179
-
180
- var ReactSharedInternals = {
181
- ReactCurrentDispatcher: ReactCurrentDispatcher,
182
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
183
- ReactCurrentOwner: ReactCurrentOwner
184
- };
185
-
186
- {
187
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
188
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
189
- }
190
-
191
- // by calls to these methods by a Babel plugin.
192
- //
193
- // In PROD (or in packages without access to React internals),
194
- // they are left as they are instead.
195
-
196
- function warn(format) {
197
- {
198
- {
199
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
200
- args[_key - 1] = arguments[_key];
201
- }
202
-
203
- printWarning('warn', format, args);
204
- }
205
- }
206
- }
207
- function error(format) {
208
- {
209
- {
210
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
211
- args[_key2 - 1] = arguments[_key2];
212
- }
213
-
214
- printWarning('error', format, args);
215
- }
216
- }
217
- }
218
-
219
- function printWarning(level, format, args) {
220
- // When changing this logic, you might want to also
221
- // update consoleWithStackDev.www.js as well.
222
- {
223
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
224
- var stack = ReactDebugCurrentFrame.getStackAddendum();
225
-
226
- if (stack !== '') {
227
- format += '%s';
228
- args = args.concat([stack]);
229
- } // eslint-disable-next-line react-internal/safe-string-coercion
230
-
231
-
232
- var argsWithFormat = args.map(function (item) {
233
- return String(item);
234
- }); // Careful: RN currently depends on this prefix
235
-
236
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
237
- // breaks IE9: https://github.com/facebook/react/issues/13610
238
- // eslint-disable-next-line react-internal/no-production-logging
239
-
240
- Function.prototype.apply.call(console[level], console, argsWithFormat);
241
- }
242
- }
243
-
244
- var didWarnStateUpdateForUnmountedComponent = {};
245
-
246
- function warnNoop(publicInstance, callerName) {
247
- {
248
- var _constructor = publicInstance.constructor;
249
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
250
- var warningKey = componentName + "." + callerName;
251
-
252
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
253
- return;
254
- }
255
-
256
- 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);
257
-
258
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
259
- }
27
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
28
+ maybeIterable =
29
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
30
+ maybeIterable["@@iterator"];
31
+ return "function" === typeof maybeIterable ? maybeIterable : null;
260
32
  }
261
- /**
262
- * This is the abstract API for an update queue.
263
- */
264
-
265
-
266
33
  var ReactNoopUpdateQueue = {
267
- /**
268
- * Checks whether or not this composite component is mounted.
269
- * @param {ReactClass} publicInstance The instance we want to test.
270
- * @return {boolean} True if mounted, false otherwise.
271
- * @protected
272
- * @final
273
- */
274
- isMounted: function (publicInstance) {
275
- return false;
276
- },
277
-
278
- /**
279
- * Forces an update. This should only be invoked when it is known with
280
- * certainty that we are **not** in a DOM transaction.
281
- *
282
- * You may want to call this when you know that some deeper aspect of the
283
- * component's state has changed but `setState` was not called.
284
- *
285
- * This will not invoke `shouldComponentUpdate`, but it will invoke
286
- * `componentWillUpdate` and `componentDidUpdate`.
287
- *
288
- * @param {ReactClass} publicInstance The instance that should rerender.
289
- * @param {?function} callback Called after component is updated.
290
- * @param {?string} callerName name of the calling function in the public API.
291
- * @internal
292
- */
293
- enqueueForceUpdate: function (publicInstance, callback, callerName) {
294
- warnNoop(publicInstance, 'forceUpdate');
34
+ isMounted: function () {
35
+ return !1;
36
+ },
37
+ enqueueForceUpdate: function () {},
38
+ enqueueReplaceState: function () {},
39
+ enqueueSetState: function () {}
295
40
  },
296
-
297
- /**
298
- * Replaces all of the state. Always use this or `setState` to mutate state.
299
- * You should treat `this.state` as immutable.
300
- *
301
- * There is no guarantee that `this.state` will be immediately updated, so
302
- * accessing `this.state` after calling this method may return the old value.
303
- *
304
- * @param {ReactClass} publicInstance The instance that should rerender.
305
- * @param {object} completeState Next state.
306
- * @param {?function} callback Called after component is updated.
307
- * @param {?string} callerName name of the calling function in the public API.
308
- * @internal
309
- */
310
- enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
311
- warnNoop(publicInstance, 'replaceState');
312
- },
313
-
314
- /**
315
- * Sets a subset of the state. This only exists because _pendingState is
316
- * internal. This provides a merging strategy that is not available to deep
317
- * properties which is confusing. TODO: Expose pendingState or don't use it
318
- * during the merge.
319
- *
320
- * @param {ReactClass} publicInstance The instance that should rerender.
321
- * @param {object} partialState Next partial state to be merged with state.
322
- * @param {?function} callback Called after component is updated.
323
- * @param {?string} Name of the calling function in the public API.
324
- * @internal
325
- */
326
- enqueueSetState: function (publicInstance, partialState, callback, callerName) {
327
- warnNoop(publicInstance, 'setState');
328
- }
329
- };
330
-
331
- var assign = Object.assign;
332
-
333
- var emptyObject = {};
334
-
335
- {
336
- Object.freeze(emptyObject);
337
- }
338
- /**
339
- * Base class helpers for the updating state of a component.
340
- */
341
-
342
-
41
+ assign = Object.assign,
42
+ emptyObject = {};
343
43
  function Component(props, context, updater) {
344
44
  this.props = props;
345
- this.context = context; // If a component has string refs, we will assign a different object later.
346
-
347
- this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
348
- // renderer.
349
-
45
+ this.context = context;
46
+ this.refs = emptyObject;
350
47
  this.updater = updater || ReactNoopUpdateQueue;
351
48
  }
352
-
353
49
  Component.prototype.isReactComponent = {};
354
- /**
355
- * Sets a subset of the state. Always use this to mutate
356
- * state. You should treat `this.state` as immutable.
357
- *
358
- * There is no guarantee that `this.state` will be immediately updated, so
359
- * accessing `this.state` after calling this method may return the old value.
360
- *
361
- * There is no guarantee that calls to `setState` will run synchronously,
362
- * as they may eventually be batched together. You can provide an optional
363
- * callback that will be executed when the call to setState is actually
364
- * completed.
365
- *
366
- * When a function is provided to setState, it will be called at some point in
367
- * the future (not synchronously). It will be called with the up to date
368
- * component arguments (state, props, context). These values can be different
369
- * from this.* because your function may be called after receiveProps but before
370
- * shouldComponentUpdate, and this new state, props, and context will not yet be
371
- * assigned to this.
372
- *
373
- * @param {object|function} partialState Next partial state or function to
374
- * produce next partial state to be merged with current state.
375
- * @param {?function} callback Called after state is updated.
376
- * @final
377
- * @protected
378
- */
379
-
380
50
  Component.prototype.setState = function (partialState, callback) {
381
- if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
382
- throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
383
- }
384
-
385
- this.updater.enqueueSetState(this, partialState, callback, 'setState');
51
+ if (
52
+ "object" !== typeof partialState &&
53
+ "function" !== typeof partialState &&
54
+ null != partialState
55
+ )
56
+ throw Error(
57
+ "takes an object of state variables to update or a function which returns an object of state variables."
58
+ );
59
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
386
60
  };
387
- /**
388
- * Forces an update. This should only be invoked when it is known with
389
- * certainty that we are **not** in a DOM transaction.
390
- *
391
- * You may want to call this when you know that some deeper aspect of the
392
- * component's state has changed but `setState` was not called.
393
- *
394
- * This will not invoke `shouldComponentUpdate`, but it will invoke
395
- * `componentWillUpdate` and `componentDidUpdate`.
396
- *
397
- * @param {?function} callback Called after update is complete.
398
- * @final
399
- * @protected
400
- */
401
-
402
-
403
61
  Component.prototype.forceUpdate = function (callback) {
404
- this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
62
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
405
63
  };
406
- /**
407
- * Deprecated APIs. These APIs used to exist on classic React classes but since
408
- * we would like to deprecate them, we're not going to move them over to this
409
- * modern base class. Instead, we define a getter that warns if it's accessed.
410
- */
411
-
412
-
413
- {
414
- var deprecatedAPIs = {
415
- isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
416
- replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
417
- };
418
-
419
- var defineDeprecationWarning = function (methodName, info) {
420
- Object.defineProperty(Component.prototype, methodName, {
421
- get: function () {
422
- warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
423
-
424
- return undefined;
425
- }
426
- });
427
- };
428
-
429
- for (var fnName in deprecatedAPIs) {
430
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
431
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
432
- }
433
- }
434
- }
435
-
436
64
  function ComponentDummy() {}
437
-
438
65
  ComponentDummy.prototype = Component.prototype;
439
- /**
440
- * Convenience component with default shallow equality check for sCU.
441
- */
442
-
443
66
  function PureComponent(props, context, updater) {
444
67
  this.props = props;
445
- this.context = context; // If a component has string refs, we will assign a different object later.
446
-
68
+ this.context = context;
447
69
  this.refs = emptyObject;
448
70
  this.updater = updater || ReactNoopUpdateQueue;
449
71
  }
450
-
451
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
452
- pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
453
-
72
+ var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
73
+ pureComponentPrototype.constructor = PureComponent;
454
74
  assign(pureComponentPrototype, Component.prototype);
455
- pureComponentPrototype.isPureReactComponent = true;
456
-
457
- // an immutable object with a single mutable value
458
- function createRef() {
459
- var refObject = {
460
- current: null
75
+ pureComponentPrototype.isPureReactComponent = !0;
76
+ var isArrayImpl = Array.isArray,
77
+ ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null },
78
+ hasOwnProperty = Object.prototype.hasOwnProperty;
79
+ function ReactElement(type, key, self, source, owner, props) {
80
+ self = props.ref;
81
+ return {
82
+ $$typeof: REACT_ELEMENT_TYPE,
83
+ type: type,
84
+ key: key,
85
+ ref: void 0 !== self ? self : null,
86
+ props: props
461
87
  };
462
-
463
- {
464
- Object.seal(refObject);
465
- }
466
-
467
- return refObject;
468
88
  }
469
-
470
- var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
471
-
472
- function isArray(a) {
473
- return isArrayImpl(a);
89
+ function cloneAndReplaceKey(oldElement, newKey) {
90
+ return ReactElement(
91
+ oldElement.type,
92
+ newKey,
93
+ void 0,
94
+ void 0,
95
+ void 0,
96
+ oldElement.props
97
+ );
474
98
  }
475
-
476
- /*
477
- * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
478
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
479
- *
480
- * The functions in this module will throw an easier-to-understand,
481
- * easier-to-debug exception with a clear errors message message explaining the
482
- * problem. (Instead of a confusing exception thrown inside the implementation
483
- * of the `value` object).
484
- */
485
- // $FlowFixMe only called in DEV, so void return is not possible.
486
- function typeName(value) {
487
- {
488
- // toStringTag is needed for namespaced types like Temporal.Instant
489
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
490
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
491
- return type;
492
- }
493
- } // $FlowFixMe only called in DEV, so void return is not possible.
494
-
495
-
496
- function willCoercionThrow(value) {
497
- {
498
- try {
499
- testStringCoercion(value);
500
- return false;
501
- } catch (e) {
502
- return true;
503
- }
504
- }
99
+ function isValidElement(object) {
100
+ return (
101
+ "object" === typeof object &&
102
+ null !== object &&
103
+ object.$$typeof === REACT_ELEMENT_TYPE
104
+ );
505
105
  }
506
-
507
- function testStringCoercion(value) {
508
- // If you ended up here by following an exception call stack, here's what's
509
- // happened: you supplied an object or symbol value to React (as a prop, key,
510
- // DOM attribute, CSS property, string ref, etc.) and when React tried to
511
- // coerce it to a string using `'' + value`, an exception was thrown.
512
- //
513
- // The most common types that will cause this exception are `Symbol` instances
514
- // and Temporal objects like `Temporal.Instant`. But any object that has a
515
- // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
516
- // exception. (Library authors do this to prevent users from using built-in
517
- // numeric operators like `+` or comparison operators like `>=` because custom
518
- // methods are needed to perform accurate arithmetic or comparison.)
519
- //
520
- // To fix the problem, coerce this object or symbol value to a string before
521
- // passing it to React. The most reliable way is usually `String(value)`.
522
- //
523
- // To find which value is throwing, check the browser or debugger console.
524
- // Before this exception was thrown, there should be `console.error` output
525
- // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
526
- // problem and how that type was used: key, atrribute, input value prop, etc.
527
- // In most cases, this console output also shows the component and its
528
- // ancestor components where the exception happened.
529
- //
530
- // eslint-disable-next-line react-internal/safe-string-coercion
531
- return '' + value;
106
+ function escape(key) {
107
+ var escaperLookup = { "=": "=0", ":": "=2" };
108
+ return (
109
+ "$" +
110
+ key.replace(/[=:]/g, function (match) {
111
+ return escaperLookup[match];
112
+ })
113
+ );
532
114
  }
533
- function checkKeyStringCoercion(value) {
534
- {
535
- if (willCoercionThrow(value)) {
536
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
537
-
538
- return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
539
- }
115
+ var userProvidedKeyEscapeRegex = /\/+/g;
116
+ function getElementKey(element, index) {
117
+ return "object" === typeof element && null !== element && null != element.key
118
+ ? escape("" + element.key)
119
+ : index.toString(36);
120
+ }
121
+ function noop$1() {}
122
+ function resolveThenable(thenable) {
123
+ switch (thenable.status) {
124
+ case "fulfilled":
125
+ return thenable.value;
126
+ case "rejected":
127
+ throw thenable.reason;
128
+ default:
129
+ switch (
130
+ ("string" === typeof thenable.status
131
+ ? thenable.then(noop$1, noop$1)
132
+ : ((thenable.status = "pending"),
133
+ thenable.then(
134
+ function (fulfilledValue) {
135
+ "pending" === thenable.status &&
136
+ ((thenable.status = "fulfilled"),
137
+ (thenable.value = fulfilledValue));
138
+ },
139
+ function (error) {
140
+ "pending" === thenable.status &&
141
+ ((thenable.status = "rejected"), (thenable.reason = error));
142
+ }
143
+ )),
144
+ thenable.status)
145
+ ) {
146
+ case "fulfilled":
147
+ return thenable.value;
148
+ case "rejected":
149
+ throw thenable.reason;
150
+ }
540
151
  }
152
+ throw thenable;
541
153
  }
542
-
543
- function getWrappedName(outerType, innerType, wrapperName) {
544
- var displayName = outerType.displayName;
545
-
546
- if (displayName) {
547
- return displayName;
548
- }
549
-
550
- var functionName = innerType.displayName || innerType.name || '';
551
- return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
552
- } // Keep in sync with react-reconciler/getComponentNameFromFiber
553
-
554
-
555
- function getContextName(type) {
556
- return type.displayName || 'Context';
557
- } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
558
-
559
-
560
- function getComponentNameFromType(type) {
561
- if (type == null) {
562
- // Host root, text node or just invalid type.
563
- return null;
564
- }
565
-
566
- {
567
- if (typeof type.tag === 'number') {
568
- error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
569
- }
570
- }
571
-
572
- if (typeof type === 'function') {
573
- return type.displayName || type.name || null;
574
- }
575
-
576
- if (typeof type === 'string') {
577
- return type;
578
- }
579
-
580
- switch (type) {
581
- case REACT_FRAGMENT_TYPE:
582
- return 'Fragment';
583
-
584
- case REACT_PORTAL_TYPE:
585
- return 'Portal';
586
-
587
- case REACT_PROFILER_TYPE:
588
- return 'Profiler';
589
-
590
- case REACT_STRICT_MODE_TYPE:
591
- return 'StrictMode';
592
-
593
- case REACT_SUSPENSE_TYPE:
594
- return 'Suspense';
595
-
596
- case REACT_SUSPENSE_LIST_TYPE:
597
- return 'SuspenseList';
598
-
599
- }
600
-
601
- if (typeof type === 'object') {
602
- switch (type.$$typeof) {
603
- case REACT_CONTEXT_TYPE:
604
- var context = type;
605
- return getContextName(context) + '.Consumer';
606
-
607
- case REACT_PROVIDER_TYPE:
608
- var provider = type;
609
- return getContextName(provider._context) + '.Provider';
610
-
611
- case REACT_FORWARD_REF_TYPE:
612
- return getWrappedName(type, type.render, 'ForwardRef');
613
-
614
- case REACT_MEMO_TYPE:
615
- var outerName = type.displayName || null;
616
-
617
- if (outerName !== null) {
618
- return outerName;
619
- }
620
-
621
- return getComponentNameFromType(type.type) || 'Memo';
622
-
623
- case REACT_LAZY_TYPE:
624
- {
625
- var lazyComponent = type;
626
- var payload = lazyComponent._payload;
627
- var init = lazyComponent._init;
628
-
629
- try {
630
- return getComponentNameFromType(init(payload));
631
- } catch (x) {
632
- return null;
633
- }
154
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
155
+ var type = typeof children;
156
+ if ("undefined" === type || "boolean" === type) children = null;
157
+ var invokeCallback = !1;
158
+ if (null === children) invokeCallback = !0;
159
+ else
160
+ switch (type) {
161
+ case "bigint":
162
+ case "string":
163
+ case "number":
164
+ invokeCallback = !0;
165
+ break;
166
+ case "object":
167
+ switch (children.$$typeof) {
168
+ case REACT_ELEMENT_TYPE:
169
+ case REACT_PORTAL_TYPE:
170
+ invokeCallback = !0;
171
+ break;
172
+ case REACT_LAZY_TYPE:
173
+ return (
174
+ (invokeCallback = children._init),
175
+ mapIntoArray(
176
+ invokeCallback(children._payload),
177
+ array,
178
+ escapedPrefix,
179
+ nameSoFar,
180
+ callback
181
+ )
182
+ );
634
183
  }
635
-
636
- // eslint-disable-next-line no-fallthrough
637
184
  }
638
- }
639
-
640
- return null;
185
+ if (invokeCallback)
186
+ return (
187
+ (callback = callback(children)),
188
+ (invokeCallback =
189
+ "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
190
+ isArrayImpl(callback)
191
+ ? ((escapedPrefix = ""),
192
+ null != invokeCallback &&
193
+ (escapedPrefix =
194
+ invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
195
+ mapIntoArray(callback, array, escapedPrefix, "", function (c) {
196
+ return c;
197
+ }))
198
+ : null != callback &&
199
+ (isValidElement(callback) &&
200
+ (callback = cloneAndReplaceKey(
201
+ callback,
202
+ escapedPrefix +
203
+ (null == callback.key ||
204
+ (children && children.key === callback.key)
205
+ ? ""
206
+ : ("" + callback.key).replace(
207
+ userProvidedKeyEscapeRegex,
208
+ "$&/"
209
+ ) + "/") +
210
+ invokeCallback
211
+ )),
212
+ array.push(callback)),
213
+ 1
214
+ );
215
+ invokeCallback = 0;
216
+ var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
217
+ if (isArrayImpl(children))
218
+ for (var i = 0; i < children.length; i++)
219
+ (nameSoFar = children[i]),
220
+ (type = nextNamePrefix + getElementKey(nameSoFar, i)),
221
+ (invokeCallback += mapIntoArray(
222
+ nameSoFar,
223
+ array,
224
+ escapedPrefix,
225
+ type,
226
+ callback
227
+ ));
228
+ else if (((i = getIteratorFn(children)), "function" === typeof i))
229
+ for (
230
+ children = i.call(children), i = 0;
231
+ !(nameSoFar = children.next()).done;
232
+
233
+ )
234
+ (nameSoFar = nameSoFar.value),
235
+ (type = nextNamePrefix + getElementKey(nameSoFar, i++)),
236
+ (invokeCallback += mapIntoArray(
237
+ nameSoFar,
238
+ array,
239
+ escapedPrefix,
240
+ type,
241
+ callback
242
+ ));
243
+ else if ("object" === type) {
244
+ if ("function" === typeof children.then)
245
+ return mapIntoArray(
246
+ resolveThenable(children),
247
+ array,
248
+ escapedPrefix,
249
+ nameSoFar,
250
+ callback
251
+ );
252
+ array = String(children);
253
+ throw Error(
254
+ "Objects are not valid as a React child (found: " +
255
+ ("[object Object]" === array
256
+ ? "object with keys {" + Object.keys(children).join(", ") + "}"
257
+ : array) +
258
+ "). If you meant to render a collection of children, use an array instead."
259
+ );
260
+ }
261
+ return invokeCallback;
641
262
  }
642
-
643
- var hasOwnProperty = Object.prototype.hasOwnProperty;
644
-
645
- var RESERVED_PROPS = {
646
- key: true,
647
- ref: true,
648
- __self: true,
649
- __source: true
650
- };
651
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
652
-
653
- {
654
- didWarnAboutStringRefs = {};
263
+ function mapChildren(children, func, context) {
264
+ if (null == children) return children;
265
+ var result = [],
266
+ count = 0;
267
+ mapIntoArray(children, result, "", "", function (child) {
268
+ return func.call(context, child, count++);
269
+ });
270
+ return result;
655
271
  }
656
-
657
- function hasValidRef(config) {
658
- {
659
- if (hasOwnProperty.call(config, 'ref')) {
660
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
661
-
662
- if (getter && getter.isReactWarning) {
663
- return false;
272
+ function lazyInitializer(payload) {
273
+ if (-1 === payload._status) {
274
+ var ctor = payload._result;
275
+ ctor = ctor();
276
+ ctor.then(
277
+ function (moduleObject) {
278
+ if (0 === payload._status || -1 === payload._status)
279
+ (payload._status = 1), (payload._result = moduleObject);
280
+ },
281
+ function (error) {
282
+ if (0 === payload._status || -1 === payload._status)
283
+ (payload._status = 2), (payload._result = error);
664
284
  }
665
- }
285
+ );
286
+ -1 === payload._status && ((payload._status = 0), (payload._result = ctor));
287
+ }
288
+ if (1 === payload._status) return payload._result.default;
289
+ throw payload._result;
290
+ }
291
+ var reportGlobalError =
292
+ "function" === typeof reportError
293
+ ? reportError
294
+ : function (error) {
295
+ if (
296
+ "object" === typeof window &&
297
+ "function" === typeof window.ErrorEvent
298
+ ) {
299
+ var event = new window.ErrorEvent("error", {
300
+ bubbles: !0,
301
+ cancelable: !0,
302
+ message:
303
+ "object" === typeof error &&
304
+ null !== error &&
305
+ "string" === typeof error.message
306
+ ? String(error.message)
307
+ : String(error),
308
+ error: error
309
+ });
310
+ if (!window.dispatchEvent(event)) return;
311
+ } else if (
312
+ "object" === typeof process &&
313
+ "function" === typeof process.emit
314
+ ) {
315
+ process.emit("uncaughtException", error);
316
+ return;
317
+ }
318
+ console.error(error);
319
+ };
320
+ function noop() {}
321
+ react_production.Children = {
322
+ map: mapChildren,
323
+ forEach: function (children, forEachFunc, forEachContext) {
324
+ mapChildren(
325
+ children,
326
+ function () {
327
+ forEachFunc.apply(this, arguments);
328
+ },
329
+ forEachContext
330
+ );
331
+ },
332
+ count: function (children) {
333
+ var n = 0;
334
+ mapChildren(children, function () {
335
+ n++;
336
+ });
337
+ return n;
338
+ },
339
+ toArray: function (children) {
340
+ return (
341
+ mapChildren(children, function (child) {
342
+ return child;
343
+ }) || []
344
+ );
345
+ },
346
+ only: function (children) {
347
+ if (!isValidElement(children))
348
+ throw Error(
349
+ "React.Children.only expected to receive a single React element child."
350
+ );
351
+ return children;
666
352
  }
667
-
668
- return config.ref !== undefined;
669
- }
670
-
671
- function hasValidKey(config) {
672
- {
673
- if (hasOwnProperty.call(config, 'key')) {
674
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
675
-
676
- if (getter && getter.isReactWarning) {
677
- return false;
678
- }
679
- }
353
+ };
354
+ react_production.Component = Component;
355
+ react_production.Fragment = REACT_FRAGMENT_TYPE;
356
+ react_production.Profiler = REACT_PROFILER_TYPE;
357
+ react_production.PureComponent = PureComponent;
358
+ react_production.StrictMode = REACT_STRICT_MODE_TYPE;
359
+ react_production.Suspense = REACT_SUSPENSE_TYPE;
360
+ react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
361
+ ReactSharedInternals;
362
+ react_production.__COMPILER_RUNTIME = {
363
+ __proto__: null,
364
+ c: function (size) {
365
+ return ReactSharedInternals.H.useMemoCache(size);
680
366
  }
681
-
682
- return config.key !== undefined;
683
- }
684
-
685
- function defineKeyPropWarningGetter(props, displayName) {
686
- var warnAboutAccessingKey = function () {
687
- {
688
- if (!specialPropKeyWarningShown) {
689
- specialPropKeyWarningShown = true;
690
-
691
- 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);
692
- }
693
- }
694
- };
695
-
696
- warnAboutAccessingKey.isReactWarning = true;
697
- Object.defineProperty(props, 'key', {
698
- get: warnAboutAccessingKey,
699
- configurable: true
700
- });
701
- }
702
-
703
- function defineRefPropWarningGetter(props, displayName) {
704
- var warnAboutAccessingRef = function () {
705
- {
706
- if (!specialPropRefWarningShown) {
707
- specialPropRefWarningShown = true;
708
-
709
- 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);
710
- }
711
- }
712
- };
713
-
714
- warnAboutAccessingRef.isReactWarning = true;
715
- Object.defineProperty(props, 'ref', {
716
- get: warnAboutAccessingRef,
717
- configurable: true
718
- });
719
- }
720
-
721
- function warnIfStringRefCannotBeAutoConverted(config) {
722
- {
723
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
724
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
725
-
726
- if (!didWarnAboutStringRefs[componentName]) {
727
- 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);
728
-
729
- didWarnAboutStringRefs[componentName] = true;
730
- }
731
- }
732
- }
733
- }
734
- /**
735
- * Factory method to create a new React element. This no longer adheres to
736
- * the class pattern, so do not use new to call it. Also, instanceof check
737
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
738
- * if something is a React Element.
739
- *
740
- * @param {*} type
741
- * @param {*} props
742
- * @param {*} key
743
- * @param {string|object} ref
744
- * @param {*} owner
745
- * @param {*} self A *temporary* helper to detect places where `this` is
746
- * different from the `owner` when React.createElement is called, so that we
747
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
748
- * functions, and as long as `this` and owner are the same, there will be no
749
- * change in behavior.
750
- * @param {*} source An annotation object (added by a transpiler or otherwise)
751
- * indicating filename, line number, and/or other information.
752
- * @internal
753
- */
754
-
755
-
756
- var ReactElement = function (type, key, ref, self, source, owner, props) {
757
- var element = {
758
- // This tag allows us to uniquely identify this as a React Element
759
- $$typeof: REACT_ELEMENT_TYPE,
760
- // Built-in properties that belong on the element
761
- type: type,
762
- key: key,
763
- ref: ref,
764
- props: props,
765
- // Record the component responsible for creating this element.
766
- _owner: owner
367
+ };
368
+ react_production.cache = function (fn) {
369
+ return function () {
370
+ return fn.apply(null, arguments);
767
371
  };
768
-
769
- {
770
- // The validation flag is currently mutative. We put it on
771
- // an external backing store so that we can freeze the whole object.
772
- // This can be replaced with a WeakMap once they are implemented in
773
- // commonly used development environments.
774
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
775
- // the validation flag non-enumerable (where possible, which should
776
- // include every environment we run tests in), so the test framework
777
- // ignores it.
778
-
779
- Object.defineProperty(element._store, 'validated', {
780
- configurable: false,
781
- enumerable: false,
782
- writable: true,
783
- value: false
784
- }); // self and source are DEV only properties.
785
-
786
- Object.defineProperty(element, '_self', {
787
- configurable: false,
788
- enumerable: false,
789
- writable: false,
790
- value: self
791
- }); // Two elements created in two different places should be considered
792
- // equal for testing purposes and therefore we hide it from enumeration.
793
-
794
- Object.defineProperty(element, '_source', {
795
- configurable: false,
796
- enumerable: false,
797
- writable: false,
798
- value: source
799
- });
800
-
801
- if (Object.freeze) {
802
- Object.freeze(element.props);
803
- Object.freeze(element);
804
- }
805
- }
806
-
807
- return element;
808
372
  };
809
- /**
810
- * Create and return a new ReactElement of the given type.
811
- * See https://reactjs.org/docs/react-api.html#createelement
812
- */
813
-
814
- function createElement(type, config, children) {
815
- var propName; // Reserved names are extracted
816
-
817
- var props = {};
818
- var key = null;
819
- var ref = null;
820
- var self = null;
821
- var source = null;
822
-
823
- if (config != null) {
824
- if (hasValidRef(config)) {
825
- ref = config.ref;
826
-
827
- {
828
- warnIfStringRefCannotBeAutoConverted(config);
829
- }
830
- }
831
-
832
- if (hasValidKey(config)) {
833
- {
834
- checkKeyStringCoercion(config.key);
835
- }
836
-
837
- key = '' + config.key;
838
- }
839
-
840
- self = config.__self === undefined ? null : config.__self;
841
- source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
842
-
843
- for (propName in config) {
844
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
845
- props[propName] = config[propName];
846
- }
847
- }
848
- } // Children can be more than one argument, and those are transferred onto
849
- // the newly allocated props object.
850
-
851
-
852
- var childrenLength = arguments.length - 2;
853
-
854
- if (childrenLength === 1) {
855
- props.children = children;
856
- } else if (childrenLength > 1) {
857
- var childArray = Array(childrenLength);
858
-
859
- for (var i = 0; i < childrenLength; i++) {
860
- childArray[i] = arguments[i + 2];
861
- }
862
-
863
- {
864
- if (Object.freeze) {
865
- Object.freeze(childArray);
866
- }
867
- }
868
-
869
- props.children = childArray;
870
- } // Resolve default props
871
-
872
-
873
- if (type && type.defaultProps) {
874
- var defaultProps = type.defaultProps;
875
-
876
- for (propName in defaultProps) {
877
- if (props[propName] === undefined) {
878
- props[propName] = defaultProps[propName];
879
- }
880
- }
881
- }
882
-
883
- {
884
- if (key || ref) {
885
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
886
-
887
- if (key) {
888
- defineKeyPropWarningGetter(props, displayName);
889
- }
890
-
891
- if (ref) {
892
- defineRefPropWarningGetter(props, displayName);
893
- }
894
- }
895
- }
896
-
897
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
898
- }
899
- function cloneAndReplaceKey(oldElement, newKey) {
900
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
901
- return newElement;
902
- }
903
- /**
904
- * Clone and return a new ReactElement using element as the starting point.
905
- * See https://reactjs.org/docs/react-api.html#cloneelement
906
- */
907
-
908
- function cloneElement(element, config, children) {
909
- if (element === null || element === undefined) {
910
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
911
- }
912
-
913
- var propName; // Original props are copied
914
-
915
- var props = assign({}, element.props); // Reserved names are extracted
916
-
917
- var key = element.key;
918
- var ref = element.ref; // Self is preserved since the owner is preserved.
919
-
920
- var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
921
- // transpiler, and the original source is probably a better indicator of the
922
- // true owner.
923
-
924
- var source = element._source; // Owner will be preserved, unless ref is overridden
925
-
926
- var owner = element._owner;
927
-
928
- if (config != null) {
929
- if (hasValidRef(config)) {
930
- // Silently steal the ref from the parent.
931
- ref = config.ref;
932
- owner = ReactCurrentOwner.current;
933
- }
934
-
935
- if (hasValidKey(config)) {
936
- {
937
- checkKeyStringCoercion(config.key);
938
- }
939
-
940
- key = '' + config.key;
941
- } // Remaining properties override existing props
942
-
943
-
944
- var defaultProps;
945
-
946
- if (element.type && element.type.defaultProps) {
947
- defaultProps = element.type.defaultProps;
948
- }
949
-
950
- for (propName in config) {
951
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
952
- if (config[propName] === undefined && defaultProps !== undefined) {
953
- // Resolve default props
954
- props[propName] = defaultProps[propName];
955
- } else {
956
- props[propName] = config[propName];
957
- }
958
- }
959
- }
960
- } // Children can be more than one argument, and those are transferred onto
961
- // the newly allocated props object.
962
-
963
-
964
- var childrenLength = arguments.length - 2;
965
-
966
- if (childrenLength === 1) {
967
- props.children = children;
968
- } else if (childrenLength > 1) {
969
- var childArray = Array(childrenLength);
970
-
971
- for (var i = 0; i < childrenLength; i++) {
373
+ react_production.cloneElement = function (element, config, children) {
374
+ if (null === element || void 0 === element)
375
+ throw Error(
376
+ "The argument must be a React element, but you passed " + element + "."
377
+ );
378
+ var props = assign({}, element.props),
379
+ key = element.key,
380
+ owner = void 0;
381
+ if (null != config)
382
+ for (propName in (void 0 !== config.ref && (owner = void 0),
383
+ void 0 !== config.key && (key = "" + config.key),
384
+ config))
385
+ !hasOwnProperty.call(config, propName) ||
386
+ "key" === propName ||
387
+ "__self" === propName ||
388
+ "__source" === propName ||
389
+ ("ref" === propName && void 0 === config.ref) ||
390
+ (props[propName] = config[propName]);
391
+ var propName = arguments.length - 2;
392
+ if (1 === propName) props.children = children;
393
+ else if (1 < propName) {
394
+ for (var childArray = Array(propName), i = 0; i < propName; i++)
972
395
  childArray[i] = arguments[i + 2];
973
- }
974
-
975
396
  props.children = childArray;
976
397
  }
977
-
978
- return ReactElement(element.type, key, ref, self, source, owner, props);
979
- }
980
- /**
981
- * Verifies the object is a ReactElement.
982
- * See https://reactjs.org/docs/react-api.html#isvalidelement
983
- * @param {?object} object
984
- * @return {boolean} True if `object` is a ReactElement.
985
- * @final
986
- */
987
-
988
- function isValidElement(object) {
989
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
990
- }
991
-
992
- var SEPARATOR = '.';
993
- var SUBSEPARATOR = ':';
994
- /**
995
- * Escape and wrap key so it is safe to use as a reactid
996
- *
997
- * @param {string} key to be escaped.
998
- * @return {string} the escaped key.
999
- */
1000
-
1001
- function escape(key) {
1002
- var escapeRegex = /[=:]/g;
1003
- var escaperLookup = {
1004
- '=': '=0',
1005
- ':': '=2'
1006
- };
1007
- var escapedString = key.replace(escapeRegex, function (match) {
1008
- return escaperLookup[match];
1009
- });
1010
- return '$' + escapedString;
1011
- }
1012
- /**
1013
- * TODO: Test that a single child and an array with one item have the same key
1014
- * pattern.
1015
- */
1016
-
1017
-
1018
- var didWarnAboutMaps = false;
1019
- var userProvidedKeyEscapeRegex = /\/+/g;
1020
-
1021
- function escapeUserProvidedKey(text) {
1022
- return text.replace(userProvidedKeyEscapeRegex, '$&/');
1023
- }
1024
- /**
1025
- * Generate a key string that identifies a element within a set.
1026
- *
1027
- * @param {*} element A element that could contain a manual key.
1028
- * @param {number} index Index that is used if a manual key is not provided.
1029
- * @return {string}
1030
- */
1031
-
1032
-
1033
- function getElementKey(element, index) {
1034
- // Do some typechecking here since we call this blindly. We want to ensure
1035
- // that we don't block potential future ES APIs.
1036
- if (typeof element === 'object' && element !== null && element.key != null) {
1037
- // Explicit key
1038
- {
1039
- checkKeyStringCoercion(element.key);
1040
- }
1041
-
1042
- return escape('' + element.key);
1043
- } // Implicit key determined by the index in the set
1044
-
1045
-
1046
- return index.toString(36);
1047
- }
1048
-
1049
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
1050
- var type = typeof children;
1051
-
1052
- if (type === 'undefined' || type === 'boolean') {
1053
- // All of the above are perceived as null.
1054
- children = null;
1055
- }
1056
-
1057
- var invokeCallback = false;
1058
-
1059
- if (children === null) {
1060
- invokeCallback = true;
1061
- } else {
1062
- switch (type) {
1063
- case 'string':
1064
- case 'number':
1065
- invokeCallback = true;
1066
- break;
1067
-
1068
- case 'object':
1069
- switch (children.$$typeof) {
1070
- case REACT_ELEMENT_TYPE:
1071
- case REACT_PORTAL_TYPE:
1072
- invokeCallback = true;
1073
- }
1074
-
1075
- }
1076
- }
1077
-
1078
- if (invokeCallback) {
1079
- var _child = children;
1080
- var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
1081
- // so that it's consistent if the number of children grows:
1082
-
1083
- var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
1084
-
1085
- if (isArray(mappedChild)) {
1086
- var escapedChildKey = '';
1087
-
1088
- if (childKey != null) {
1089
- escapedChildKey = escapeUserProvidedKey(childKey) + '/';
1090
- }
1091
-
1092
- mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
1093
- return c;
1094
- });
1095
- } else if (mappedChild != null) {
1096
- if (isValidElement(mappedChild)) {
1097
- {
1098
- // The `if` statement here prevents auto-disabling of the safe
1099
- // coercion ESLint rule, so we must manually disable it below.
1100
- // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
1101
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
1102
- checkKeyStringCoercion(mappedChild.key);
1103
- }
1104
- }
1105
-
1106
- mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
1107
- // traverseAllChildren used to do for objects as children
1108
- escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
1109
- mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
1110
- // eslint-disable-next-line react-internal/safe-string-coercion
1111
- escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
1112
- }
1113
-
1114
- array.push(mappedChild);
1115
- }
1116
-
1117
- return 1;
1118
- }
1119
-
1120
- var child;
1121
- var nextName;
1122
- var subtreeCount = 0; // Count of children found in the current subtree.
1123
-
1124
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1125
-
1126
- if (isArray(children)) {
1127
- for (var i = 0; i < children.length; i++) {
1128
- child = children[i];
1129
- nextName = nextNamePrefix + getElementKey(child, i);
1130
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
1131
- }
1132
- } else {
1133
- var iteratorFn = getIteratorFn(children);
1134
-
1135
- if (typeof iteratorFn === 'function') {
1136
- var iterableChildren = children;
1137
-
1138
- {
1139
- // Warn about using Maps as children
1140
- if (iteratorFn === iterableChildren.entries) {
1141
- if (!didWarnAboutMaps) {
1142
- warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
1143
- }
1144
-
1145
- didWarnAboutMaps = true;
1146
- }
1147
- }
1148
-
1149
- var iterator = iteratorFn.call(iterableChildren);
1150
- var step;
1151
- var ii = 0;
1152
-
1153
- while (!(step = iterator.next()).done) {
1154
- child = step.value;
1155
- nextName = nextNamePrefix + getElementKey(child, ii++);
1156
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
1157
- }
1158
- } else if (type === 'object') {
1159
- // eslint-disable-next-line react-internal/safe-string-coercion
1160
- var childrenString = String(children);
1161
- 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.');
1162
- }
1163
- }
1164
-
1165
- return subtreeCount;
1166
- }
1167
-
1168
- /**
1169
- * Maps children that are typically specified as `props.children`.
1170
- *
1171
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
1172
- *
1173
- * The provided mapFunction(child, index) will be called for each
1174
- * leaf child.
1175
- *
1176
- * @param {?*} children Children tree container.
1177
- * @param {function(*, int)} func The map function.
1178
- * @param {*} context Context for mapFunction.
1179
- * @return {object} Object containing the ordered map of results.
1180
- */
1181
- function mapChildren(children, func, context) {
1182
- if (children == null) {
1183
- return children;
1184
- }
1185
-
1186
- var result = [];
1187
- var count = 0;
1188
- mapIntoArray(children, result, '', '', function (child) {
1189
- return func.call(context, child, count++);
1190
- });
1191
- return result;
1192
- }
1193
- /**
1194
- * Count the number of children that are typically specified as
1195
- * `props.children`.
1196
- *
1197
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
1198
- *
1199
- * @param {?*} children Children tree container.
1200
- * @return {number} The number of children.
1201
- */
1202
-
1203
-
1204
- function countChildren(children) {
1205
- var n = 0;
1206
- mapChildren(children, function () {
1207
- n++; // Don't return anything
1208
- });
1209
- return n;
1210
- }
1211
-
1212
- /**
1213
- * Iterates through children that are typically specified as `props.children`.
1214
- *
1215
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
1216
- *
1217
- * The provided forEachFunc(child, index) will be called for each
1218
- * leaf child.
1219
- *
1220
- * @param {?*} children Children tree container.
1221
- * @param {function(*, int)} forEachFunc
1222
- * @param {*} forEachContext Context for forEachContext.
1223
- */
1224
- function forEachChildren(children, forEachFunc, forEachContext) {
1225
- mapChildren(children, function () {
1226
- forEachFunc.apply(this, arguments); // Don't return anything.
1227
- }, forEachContext);
1228
- }
1229
- /**
1230
- * Flatten a children object (typically specified as `props.children`) and
1231
- * return an array with appropriately re-keyed children.
1232
- *
1233
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1234
- */
1235
-
1236
-
1237
- function toArray(children) {
1238
- return mapChildren(children, function (child) {
1239
- return child;
1240
- }) || [];
1241
- }
1242
- /**
1243
- * Returns the first child in a collection of children and verifies that there
1244
- * is only one child in the collection.
1245
- *
1246
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1247
- *
1248
- * The current implementation of this function assumes that a single child gets
1249
- * passed without a wrapper, but the purpose of this helper function is to
1250
- * abstract away the particular structure of children.
1251
- *
1252
- * @param {?object} children Child collection structure.
1253
- * @return {ReactElement} The first and only `ReactElement` contained in the
1254
- * structure.
1255
- */
1256
-
1257
-
1258
- function onlyChild(children) {
1259
- if (!isValidElement(children)) {
1260
- throw new Error('React.Children.only expected to receive a single React element child.');
1261
- }
1262
-
1263
- return children;
1264
- }
1265
-
1266
- function createContext(defaultValue) {
1267
- // TODO: Second argument used to be an optional `calculateChangedBits`
1268
- // function. Warn to reserve for future use?
1269
- var context = {
398
+ return ReactElement(element.type, key, void 0, void 0, owner, props);
399
+ };
400
+ react_production.createContext = function (defaultValue) {
401
+ defaultValue = {
1270
402
  $$typeof: REACT_CONTEXT_TYPE,
1271
- // As a workaround to support multiple concurrent renderers, we categorize
1272
- // some renderers as primary and others as secondary. We only expect
1273
- // there to be two concurrent renderers at most: React Native (primary) and
1274
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
1275
- // Secondary renderers store their context values on separate fields.
1276
403
  _currentValue: defaultValue,
1277
404
  _currentValue2: defaultValue,
1278
- // Used to track how many concurrent renderers this context currently
1279
- // supports within in a single renderer. Such as parallel server rendering.
1280
405
  _threadCount: 0,
1281
- // These are circular
1282
406
  Provider: null,
1283
- Consumer: null,
1284
- // Add these to use same hidden class in VM as ServerContext
1285
- _defaultValue: null,
1286
- _globalName: null
407
+ Consumer: null
1287
408
  };
1288
- context.Provider = {
1289
- $$typeof: REACT_PROVIDER_TYPE,
1290
- _context: context
409
+ defaultValue.Provider = defaultValue;
410
+ defaultValue.Consumer = {
411
+ $$typeof: REACT_CONSUMER_TYPE,
412
+ _context: defaultValue
1291
413
  };
1292
- var hasWarnedAboutUsingNestedContextConsumers = false;
1293
- var hasWarnedAboutUsingConsumerProvider = false;
1294
- var hasWarnedAboutDisplayNameOnConsumer = false;
1295
-
1296
- {
1297
- // A separate object, but proxies back to the original context object for
1298
- // backwards compatibility. It has a different $$typeof, so we can properly
1299
- // warn for the incorrect usage of Context as a Consumer.
1300
- var Consumer = {
1301
- $$typeof: REACT_CONTEXT_TYPE,
1302
- _context: context
1303
- }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
1304
-
1305
- Object.defineProperties(Consumer, {
1306
- Provider: {
1307
- get: function () {
1308
- if (!hasWarnedAboutUsingConsumerProvider) {
1309
- hasWarnedAboutUsingConsumerProvider = true;
1310
-
1311
- 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?');
1312
- }
1313
-
1314
- return context.Provider;
1315
- },
1316
- set: function (_Provider) {
1317
- context.Provider = _Provider;
1318
- }
1319
- },
1320
- _currentValue: {
1321
- get: function () {
1322
- return context._currentValue;
1323
- },
1324
- set: function (_currentValue) {
1325
- context._currentValue = _currentValue;
1326
- }
1327
- },
1328
- _currentValue2: {
1329
- get: function () {
1330
- return context._currentValue2;
1331
- },
1332
- set: function (_currentValue2) {
1333
- context._currentValue2 = _currentValue2;
1334
- }
1335
- },
1336
- _threadCount: {
1337
- get: function () {
1338
- return context._threadCount;
1339
- },
1340
- set: function (_threadCount) {
1341
- context._threadCount = _threadCount;
1342
- }
1343
- },
1344
- Consumer: {
1345
- get: function () {
1346
- if (!hasWarnedAboutUsingNestedContextConsumers) {
1347
- hasWarnedAboutUsingNestedContextConsumers = true;
1348
-
1349
- 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?');
1350
- }
1351
-
1352
- return context.Consumer;
1353
- }
1354
- },
1355
- displayName: {
1356
- get: function () {
1357
- return context.displayName;
1358
- },
1359
- set: function (displayName) {
1360
- if (!hasWarnedAboutDisplayNameOnConsumer) {
1361
- warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
1362
-
1363
- hasWarnedAboutDisplayNameOnConsumer = true;
1364
- }
1365
- }
1366
- }
1367
- }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
1368
-
1369
- context.Consumer = Consumer;
1370
- }
1371
-
1372
- {
1373
- context._currentRenderer = null;
1374
- context._currentRenderer2 = null;
1375
- }
1376
-
1377
- return context;
1378
- }
1379
-
1380
- var Uninitialized = -1;
1381
- var Pending = 0;
1382
- var Resolved = 1;
1383
- var Rejected = 2;
1384
-
1385
- function lazyInitializer(payload) {
1386
- if (payload._status === Uninitialized) {
1387
- var ctor = payload._result;
1388
- var thenable = ctor(); // Transition to the next state.
1389
- // This might throw either because it's missing or throws. If so, we treat it
1390
- // as still uninitialized and try again next time. Which is the same as what
1391
- // happens if the ctor or any wrappers processing the ctor throws. This might
1392
- // end up fixing it if the resolution was a concurrency bug.
1393
-
1394
- thenable.then(function (moduleObject) {
1395
- if (payload._status === Pending || payload._status === Uninitialized) {
1396
- // Transition to the next state.
1397
- var resolved = payload;
1398
- resolved._status = Resolved;
1399
- resolved._result = moduleObject;
1400
- }
1401
- }, function (error) {
1402
- if (payload._status === Pending || payload._status === Uninitialized) {
1403
- // Transition to the next state.
1404
- var rejected = payload;
1405
- rejected._status = Rejected;
1406
- rejected._result = error;
1407
- }
1408
- });
1409
-
1410
- if (payload._status === Uninitialized) {
1411
- // In case, we're still uninitialized, then we're waiting for the thenable
1412
- // to resolve. Set it as pending in the meantime.
1413
- var pending = payload;
1414
- pending._status = Pending;
1415
- pending._result = thenable;
1416
- }
1417
- }
1418
-
1419
- if (payload._status === Resolved) {
1420
- var moduleObject = payload._result;
1421
-
1422
- {
1423
- if (moduleObject === undefined) {
1424
- error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1425
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
1426
- }
1427
- }
1428
-
1429
- {
1430
- if (!('default' in moduleObject)) {
1431
- error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
1432
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
1433
- }
1434
- }
1435
-
1436
- return moduleObject.default;
1437
- } else {
1438
- throw payload._result;
414
+ return defaultValue;
415
+ };
416
+ react_production.createElement = function (type, config, children) {
417
+ var propName,
418
+ props = {},
419
+ key = null;
420
+ if (null != config)
421
+ for (propName in (void 0 !== config.key && (key = "" + config.key), config))
422
+ hasOwnProperty.call(config, propName) &&
423
+ "key" !== propName &&
424
+ "__self" !== propName &&
425
+ "__source" !== propName &&
426
+ (props[propName] = config[propName]);
427
+ var childrenLength = arguments.length - 2;
428
+ if (1 === childrenLength) props.children = children;
429
+ else if (1 < childrenLength) {
430
+ for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
431
+ childArray[i] = arguments[i + 2];
432
+ props.children = childArray;
1439
433
  }
1440
- }
1441
-
1442
- function lazy(ctor) {
1443
- var payload = {
1444
- // We use these fields to store the result.
1445
- _status: Uninitialized,
1446
- _result: ctor
1447
- };
1448
- var lazyType = {
434
+ if (type && type.defaultProps)
435
+ for (propName in ((childrenLength = type.defaultProps), childrenLength))
436
+ void 0 === props[propName] &&
437
+ (props[propName] = childrenLength[propName]);
438
+ return ReactElement(type, key, void 0, void 0, null, props);
439
+ };
440
+ react_production.createRef = function () {
441
+ return { current: null };
442
+ };
443
+ react_production.forwardRef = function (render) {
444
+ return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
445
+ };
446
+ react_production.isValidElement = isValidElement;
447
+ react_production.lazy = function (ctor) {
448
+ return {
1449
449
  $$typeof: REACT_LAZY_TYPE,
1450
- _payload: payload,
450
+ _payload: { _status: -1, _result: ctor },
1451
451
  _init: lazyInitializer
1452
452
  };
1453
-
1454
- {
1455
- // In production, this would just set it on the object.
1456
- var defaultProps;
1457
- var propTypes; // $FlowFixMe
1458
-
1459
- Object.defineProperties(lazyType, {
1460
- defaultProps: {
1461
- configurable: true,
1462
- get: function () {
1463
- return defaultProps;
1464
- },
1465
- set: function (newDefaultProps) {
1466
- 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.');
1467
-
1468
- defaultProps = newDefaultProps; // Match production behavior more closely:
1469
- // $FlowFixMe
1470
-
1471
- Object.defineProperty(lazyType, 'defaultProps', {
1472
- enumerable: true
1473
- });
1474
- }
1475
- },
1476
- propTypes: {
1477
- configurable: true,
1478
- get: function () {
1479
- return propTypes;
1480
- },
1481
- set: function (newPropTypes) {
1482
- 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.');
1483
-
1484
- propTypes = newPropTypes; // Match production behavior more closely:
1485
- // $FlowFixMe
1486
-
1487
- Object.defineProperty(lazyType, 'propTypes', {
1488
- enumerable: true
1489
- });
1490
- }
1491
- }
1492
- });
1493
- }
1494
-
1495
- return lazyType;
1496
- }
1497
-
1498
- function forwardRef(render) {
1499
- {
1500
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
1501
- error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
1502
- } else if (typeof render !== 'function') {
1503
- error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
1504
- } else {
1505
- if (render.length !== 0 && render.length !== 2) {
1506
- 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.');
1507
- }
1508
- }
1509
-
1510
- if (render != null) {
1511
- if (render.defaultProps != null || render.propTypes != null) {
1512
- error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
1513
- }
1514
- }
1515
- }
1516
-
1517
- var elementType = {
1518
- $$typeof: REACT_FORWARD_REF_TYPE,
1519
- render: render
1520
- };
1521
-
1522
- {
1523
- var ownName;
1524
- Object.defineProperty(elementType, 'displayName', {
1525
- enumerable: false,
1526
- configurable: true,
1527
- get: function () {
1528
- return ownName;
1529
- },
1530
- set: function (name) {
1531
- ownName = name; // The inner component shouldn't inherit this display name in most cases,
1532
- // because the component may be used elsewhere.
1533
- // But it's nice for anonymous functions to inherit the name,
1534
- // so that our component-stack generation logic will display their frames.
1535
- // An anonymous function generally suggests a pattern like:
1536
- // React.forwardRef((props, ref) => {...});
1537
- // This kind of inner function is not used elsewhere so the side effect is okay.
1538
-
1539
- if (!render.name && !render.displayName) {
1540
- render.displayName = name;
1541
- }
1542
- }
1543
- });
1544
- }
1545
-
1546
- return elementType;
1547
- }
1548
-
1549
- var REACT_MODULE_REFERENCE;
1550
-
1551
- {
1552
- REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
1553
- }
1554
-
1555
- function isValidElementType(type) {
1556
- if (typeof type === 'string' || typeof type === 'function') {
1557
- return true;
1558
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1559
-
1560
-
1561
- 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 ) {
1562
- return true;
1563
- }
1564
-
1565
- if (typeof type === 'object' && type !== null) {
1566
- 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
1567
- // types supported by any Flight configuration anywhere since
1568
- // we don't know which Flight build this will end up being used
1569
- // with.
1570
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
1571
- return true;
1572
- }
1573
- }
1574
-
1575
- return false;
1576
- }
1577
-
1578
- function memo(type, compare) {
1579
- {
1580
- if (!isValidElementType(type)) {
1581
- error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
1582
- }
1583
- }
1584
-
1585
- var elementType = {
453
+ };
454
+ react_production.memo = function (type, compare) {
455
+ return {
1586
456
  $$typeof: REACT_MEMO_TYPE,
1587
457
  type: type,
1588
- compare: compare === undefined ? null : compare
458
+ compare: void 0 === compare ? null : compare
1589
459
  };
1590
-
1591
- {
1592
- var ownName;
1593
- Object.defineProperty(elementType, 'displayName', {
1594
- enumerable: false,
1595
- configurable: true,
1596
- get: function () {
1597
- return ownName;
1598
- },
1599
- set: function (name) {
1600
- ownName = name; // The inner component shouldn't inherit this display name in most cases,
1601
- // because the component may be used elsewhere.
1602
- // But it's nice for anonymous functions to inherit the name,
1603
- // so that our component-stack generation logic will display their frames.
1604
- // An anonymous function generally suggests a pattern like:
1605
- // React.memo((props) => {...});
1606
- // This kind of inner function is not used elsewhere so the side effect is okay.
1607
-
1608
- if (!type.name && !type.displayName) {
1609
- type.displayName = name;
1610
- }
1611
- }
1612
- });
1613
- }
1614
-
1615
- return elementType;
1616
- }
1617
-
1618
- function resolveDispatcher() {
1619
- var dispatcher = ReactCurrentDispatcher.current;
1620
-
1621
- {
1622
- if (dispatcher === null) {
1623
- 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:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
1624
- }
1625
- } // Will result in a null access error if accessed outside render phase. We
1626
- // intentionally don't throw our own error because this is in a hot path.
1627
- // Also helps ensure this is inlined.
1628
-
1629
-
1630
- return dispatcher;
1631
- }
1632
- function useContext(Context) {
1633
- var dispatcher = resolveDispatcher();
1634
-
1635
- {
1636
- // TODO: add a more generic warning for invalid values.
1637
- if (Context._context !== undefined) {
1638
- var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
1639
- // and nobody should be using this in existing code.
1640
-
1641
- if (realContext.Consumer === Context) {
1642
- 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?');
1643
- } else if (realContext.Provider === Context) {
1644
- error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
1645
- }
1646
- }
1647
- }
1648
-
1649
- return dispatcher.useContext(Context);
1650
- }
1651
- function useState(initialState) {
1652
- var dispatcher = resolveDispatcher();
1653
- return dispatcher.useState(initialState);
1654
- }
1655
- function useReducer(reducer, initialArg, init) {
1656
- var dispatcher = resolveDispatcher();
1657
- return dispatcher.useReducer(reducer, initialArg, init);
1658
- }
1659
- function useRef(initialValue) {
1660
- var dispatcher = resolveDispatcher();
1661
- return dispatcher.useRef(initialValue);
1662
- }
1663
- function useEffect(create, deps) {
1664
- var dispatcher = resolveDispatcher();
1665
- return dispatcher.useEffect(create, deps);
1666
- }
1667
- function useInsertionEffect(create, deps) {
1668
- var dispatcher = resolveDispatcher();
1669
- return dispatcher.useInsertionEffect(create, deps);
1670
- }
1671
- function useLayoutEffect(create, deps) {
1672
- var dispatcher = resolveDispatcher();
1673
- return dispatcher.useLayoutEffect(create, deps);
1674
- }
1675
- function useCallback(callback, deps) {
1676
- var dispatcher = resolveDispatcher();
1677
- return dispatcher.useCallback(callback, deps);
1678
- }
1679
- function useMemo(create, deps) {
1680
- var dispatcher = resolveDispatcher();
1681
- return dispatcher.useMemo(create, deps);
1682
- }
1683
- function useImperativeHandle(ref, create, deps) {
1684
- var dispatcher = resolveDispatcher();
1685
- return dispatcher.useImperativeHandle(ref, create, deps);
1686
- }
1687
- function useDebugValue(value, formatterFn) {
1688
- {
1689
- var dispatcher = resolveDispatcher();
1690
- return dispatcher.useDebugValue(value, formatterFn);
1691
- }
1692
- }
1693
- function useTransition() {
1694
- var dispatcher = resolveDispatcher();
1695
- return dispatcher.useTransition();
1696
- }
1697
- function useDeferredValue(value) {
1698
- var dispatcher = resolveDispatcher();
1699
- return dispatcher.useDeferredValue(value);
1700
- }
1701
- function useId() {
1702
- var dispatcher = resolveDispatcher();
1703
- return dispatcher.useId();
1704
- }
1705
- function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1706
- var dispatcher = resolveDispatcher();
1707
- return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1708
- }
1709
-
1710
- // Helpers to patch console.logs to avoid logging during side-effect free
1711
- // replaying on render function. This currently only patches the object
1712
- // lazily which won't cover if the log function was extracted eagerly.
1713
- // We could also eagerly patch the method.
1714
- var disabledDepth = 0;
1715
- var prevLog;
1716
- var prevInfo;
1717
- var prevWarn;
1718
- var prevError;
1719
- var prevGroup;
1720
- var prevGroupCollapsed;
1721
- var prevGroupEnd;
1722
-
1723
- function disabledLog() {}
1724
-
1725
- disabledLog.__reactDisabledLog = true;
1726
- function disableLogs() {
1727
- {
1728
- if (disabledDepth === 0) {
1729
- /* eslint-disable react-internal/no-production-logging */
1730
- prevLog = console.log;
1731
- prevInfo = console.info;
1732
- prevWarn = console.warn;
1733
- prevError = console.error;
1734
- prevGroup = console.group;
1735
- prevGroupCollapsed = console.groupCollapsed;
1736
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
1737
-
1738
- var props = {
1739
- configurable: true,
1740
- enumerable: true,
1741
- value: disabledLog,
1742
- writable: true
1743
- }; // $FlowFixMe Flow thinks console is immutable.
1744
-
1745
- Object.defineProperties(console, {
1746
- info: props,
1747
- log: props,
1748
- warn: props,
1749
- error: props,
1750
- group: props,
1751
- groupCollapsed: props,
1752
- groupEnd: props
1753
- });
1754
- /* eslint-enable react-internal/no-production-logging */
1755
- }
1756
-
1757
- disabledDepth++;
1758
- }
1759
- }
1760
- function reenableLogs() {
1761
- {
1762
- disabledDepth--;
1763
-
1764
- if (disabledDepth === 0) {
1765
- /* eslint-disable react-internal/no-production-logging */
1766
- var props = {
1767
- configurable: true,
1768
- enumerable: true,
1769
- writable: true
1770
- }; // $FlowFixMe Flow thinks console is immutable.
1771
-
1772
- Object.defineProperties(console, {
1773
- log: assign({}, props, {
1774
- value: prevLog
1775
- }),
1776
- info: assign({}, props, {
1777
- value: prevInfo
1778
- }),
1779
- warn: assign({}, props, {
1780
- value: prevWarn
1781
- }),
1782
- error: assign({}, props, {
1783
- value: prevError
1784
- }),
1785
- group: assign({}, props, {
1786
- value: prevGroup
1787
- }),
1788
- groupCollapsed: assign({}, props, {
1789
- value: prevGroupCollapsed
1790
- }),
1791
- groupEnd: assign({}, props, {
1792
- value: prevGroupEnd
1793
- })
1794
- });
1795
- /* eslint-enable react-internal/no-production-logging */
1796
- }
1797
-
1798
- if (disabledDepth < 0) {
1799
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
1800
- }
1801
- }
1802
- }
1803
-
1804
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1805
- var prefix;
1806
- function describeBuiltInComponentFrame(name, source, ownerFn) {
1807
- {
1808
- if (prefix === undefined) {
1809
- // Extract the VM specific prefix used by each line.
1810
- try {
1811
- throw Error();
1812
- } catch (x) {
1813
- var match = x.stack.trim().match(/\n( *(at )?)/);
1814
- prefix = match && match[1] || '';
1815
- }
1816
- } // We use the prefix to ensure our stacks line up with native stack frames.
1817
-
1818
-
1819
- return '\n' + prefix + name;
1820
- }
1821
- }
1822
- var reentry = false;
1823
- var componentFrameCache;
1824
-
1825
- {
1826
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
1827
- componentFrameCache = new PossiblyWeakMap();
1828
- }
1829
-
1830
- function describeNativeComponentFrame(fn, construct) {
1831
- // If something asked for a stack inside a fake render, it should get ignored.
1832
- if ( !fn || reentry) {
1833
- return '';
1834
- }
1835
-
1836
- {
1837
- var frame = componentFrameCache.get(fn);
1838
-
1839
- if (frame !== undefined) {
1840
- return frame;
1841
- }
1842
- }
1843
-
1844
- var control;
1845
- reentry = true;
1846
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
1847
-
1848
- Error.prepareStackTrace = undefined;
1849
- var previousDispatcher;
1850
-
1851
- {
1852
- previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
1853
- // for warnings.
1854
-
1855
- ReactCurrentDispatcher$1.current = null;
1856
- disableLogs();
1857
- }
1858
-
460
+ };
461
+ react_production.startTransition = function (scope) {
462
+ var prevTransition = ReactSharedInternals.T,
463
+ currentTransition = {};
464
+ ReactSharedInternals.T = currentTransition;
1859
465
  try {
1860
- // This should throw.
1861
- if (construct) {
1862
- // Something should be setting the props in the constructor.
1863
- var Fake = function () {
1864
- throw Error();
1865
- }; // $FlowFixMe
1866
-
1867
-
1868
- Object.defineProperty(Fake.prototype, 'props', {
1869
- set: function () {
1870
- // We use a throwing setter instead of frozen or non-writable props
1871
- // because that won't throw in a non-strict mode function.
1872
- throw Error();
1873
- }
1874
- });
1875
-
1876
- if (typeof Reflect === 'object' && Reflect.construct) {
1877
- // We construct a different control for this case to include any extra
1878
- // frames added by the construct call.
1879
- try {
1880
- Reflect.construct(Fake, []);
1881
- } catch (x) {
1882
- control = x;
1883
- }
1884
-
1885
- Reflect.construct(fn, [], Fake);
1886
- } else {
1887
- try {
1888
- Fake.call();
1889
- } catch (x) {
1890
- control = x;
1891
- }
1892
-
1893
- fn.call(Fake.prototype);
1894
- }
1895
- } else {
1896
- try {
1897
- throw Error();
1898
- } catch (x) {
1899
- control = x;
1900
- }
1901
-
1902
- fn();
1903
- }
1904
- } catch (sample) {
1905
- // This is inlined manually because closure doesn't do it for us.
1906
- if (sample && control && typeof sample.stack === 'string') {
1907
- // This extracts the first frame from the sample that isn't also in the control.
1908
- // Skipping one frame that we assume is the frame that calls the two.
1909
- var sampleLines = sample.stack.split('\n');
1910
- var controlLines = control.stack.split('\n');
1911
- var s = sampleLines.length - 1;
1912
- var c = controlLines.length - 1;
1913
-
1914
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
1915
- // We expect at least one stack frame to be shared.
1916
- // Typically this will be the root most one. However, stack frames may be
1917
- // cut off due to maximum stack limits. In this case, one maybe cut off
1918
- // earlier than the other. We assume that the sample is longer or the same
1919
- // and there for cut off earlier. So we should find the root most frame in
1920
- // the sample somewhere in the control.
1921
- c--;
1922
- }
1923
-
1924
- for (; s >= 1 && c >= 0; s--, c--) {
1925
- // Next we find the first one that isn't the same which should be the
1926
- // frame that called our sample function and the control.
1927
- if (sampleLines[s] !== controlLines[c]) {
1928
- // In V8, the first line is describing the message but other VMs don't.
1929
- // If we're about to return the first line, and the control is also on the same
1930
- // line, that's a pretty good indicator that our sample threw at same line as
1931
- // the control. I.e. before we entered the sample frame. So we ignore this result.
1932
- // This can happen if you passed a class to function component, or non-function.
1933
- if (s !== 1 || c !== 1) {
1934
- do {
1935
- s--;
1936
- c--; // We may still have similar intermediate frames from the construct call.
1937
- // The next one that isn't the same should be our match though.
1938
-
1939
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
1940
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
1941
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
1942
- // but we have a user-provided "displayName"
1943
- // splice it in to make the stack more readable.
1944
-
1945
-
1946
- if (fn.displayName && _frame.includes('<anonymous>')) {
1947
- _frame = _frame.replace('<anonymous>', fn.displayName);
1948
- }
1949
-
1950
- {
1951
- if (typeof fn === 'function') {
1952
- componentFrameCache.set(fn, _frame);
1953
- }
1954
- } // Return the line we found.
1955
-
1956
-
1957
- return _frame;
1958
- }
1959
- } while (s >= 1 && c >= 0);
1960
- }
1961
-
1962
- break;
1963
- }
1964
- }
1965
- }
466
+ var returnValue = scope(),
467
+ onStartTransitionFinish = ReactSharedInternals.S;
468
+ null !== onStartTransitionFinish &&
469
+ onStartTransitionFinish(currentTransition, returnValue);
470
+ "object" === typeof returnValue &&
471
+ null !== returnValue &&
472
+ "function" === typeof returnValue.then &&
473
+ returnValue.then(noop, reportGlobalError);
474
+ } catch (error) {
475
+ reportGlobalError(error);
1966
476
  } finally {
1967
- reentry = false;
1968
-
1969
- {
1970
- ReactCurrentDispatcher$1.current = previousDispatcher;
1971
- reenableLogs();
1972
- }
1973
-
1974
- Error.prepareStackTrace = previousPrepareStackTrace;
1975
- } // Fallback to just using the name if we couldn't make it throw.
1976
-
1977
-
1978
- var name = fn ? fn.displayName || fn.name : '';
1979
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
1980
-
1981
- {
1982
- if (typeof fn === 'function') {
1983
- componentFrameCache.set(fn, syntheticFrame);
1984
- }
1985
- }
1986
-
1987
- return syntheticFrame;
1988
- }
1989
- function describeFunctionComponentFrame(fn, source, ownerFn) {
1990
- {
1991
- return describeNativeComponentFrame(fn, false);
1992
- }
1993
- }
1994
-
1995
- function shouldConstruct(Component) {
1996
- var prototype = Component.prototype;
1997
- return !!(prototype && prototype.isReactComponent);
1998
- }
1999
-
2000
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2001
-
2002
- if (type == null) {
2003
- return '';
2004
- }
2005
-
2006
- if (typeof type === 'function') {
2007
- {
2008
- return describeNativeComponentFrame(type, shouldConstruct(type));
2009
- }
2010
- }
2011
-
2012
- if (typeof type === 'string') {
2013
- return describeBuiltInComponentFrame(type);
2014
- }
2015
-
2016
- switch (type) {
2017
- case REACT_SUSPENSE_TYPE:
2018
- return describeBuiltInComponentFrame('Suspense');
2019
-
2020
- case REACT_SUSPENSE_LIST_TYPE:
2021
- return describeBuiltInComponentFrame('SuspenseList');
2022
- }
2023
-
2024
- if (typeof type === 'object') {
2025
- switch (type.$$typeof) {
2026
- case REACT_FORWARD_REF_TYPE:
2027
- return describeFunctionComponentFrame(type.render);
2028
-
2029
- case REACT_MEMO_TYPE:
2030
- // Memo may contain any component type so we recursively resolve it.
2031
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2032
-
2033
- case REACT_LAZY_TYPE:
2034
- {
2035
- var lazyComponent = type;
2036
- var payload = lazyComponent._payload;
2037
- var init = lazyComponent._init;
2038
-
2039
- try {
2040
- // Lazy may contain any component type so we recursively resolve it.
2041
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2042
- } catch (x) {}
2043
- }
2044
- }
2045
- }
2046
-
2047
- return '';
2048
- }
2049
-
2050
- var loggedTypeFailures = {};
2051
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2052
-
2053
- function setCurrentlyValidatingElement(element) {
2054
- {
2055
- if (element) {
2056
- var owner = element._owner;
2057
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2058
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2059
- } else {
2060
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2061
- }
2062
- }
2063
- }
2064
-
2065
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
2066
- {
2067
- // $FlowFixMe This is okay but Flow doesn't know it.
2068
- var has = Function.call.bind(hasOwnProperty);
2069
-
2070
- for (var typeSpecName in typeSpecs) {
2071
- if (has(typeSpecs, typeSpecName)) {
2072
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
2073
- // fail the render phase where it didn't fail before. So we log it.
2074
- // After these have been cleaned up, we'll let them throw.
2075
-
2076
- try {
2077
- // This is intentionally an invariant that gets caught. It's the same
2078
- // behavior as without this statement except with a better message.
2079
- if (typeof typeSpecs[typeSpecName] !== 'function') {
2080
- // eslint-disable-next-line react-internal/prod-error-codes
2081
- 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`.');
2082
- err.name = 'Invariant Violation';
2083
- throw err;
2084
- }
2085
-
2086
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
2087
- } catch (ex) {
2088
- error$1 = ex;
2089
- }
2090
-
2091
- if (error$1 && !(error$1 instanceof Error)) {
2092
- setCurrentlyValidatingElement(element);
2093
-
2094
- 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);
2095
-
2096
- setCurrentlyValidatingElement(null);
2097
- }
2098
-
2099
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2100
- // Only monitor this failure once because there tends to be a lot of the
2101
- // same error.
2102
- loggedTypeFailures[error$1.message] = true;
2103
- setCurrentlyValidatingElement(element);
2104
-
2105
- error('Failed %s type: %s', location, error$1.message);
2106
-
2107
- setCurrentlyValidatingElement(null);
2108
- }
2109
- }
2110
- }
2111
- }
2112
- }
2113
-
2114
- function setCurrentlyValidatingElement$1(element) {
2115
- {
2116
- if (element) {
2117
- var owner = element._owner;
2118
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2119
- setExtraStackFrame(stack);
2120
- } else {
2121
- setExtraStackFrame(null);
2122
- }
477
+ ReactSharedInternals.T = prevTransition;
2123
478
  }
2124
- }
2125
-
2126
- var propTypesMisspellWarningShown;
2127
-
2128
- {
2129
- propTypesMisspellWarningShown = false;
2130
- }
2131
-
2132
- function getDeclarationErrorAddendum() {
2133
- if (ReactCurrentOwner.current) {
2134
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
2135
-
2136
- if (name) {
2137
- return '\n\nCheck the render method of `' + name + '`.';
2138
- }
2139
- }
2140
-
2141
- return '';
2142
- }
2143
-
2144
- function getSourceInfoErrorAddendum(source) {
2145
- if (source !== undefined) {
2146
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2147
- var lineNumber = source.lineNumber;
2148
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
2149
- }
2150
-
2151
- return '';
2152
- }
2153
-
2154
- function getSourceInfoErrorAddendumForProps(elementProps) {
2155
- if (elementProps !== null && elementProps !== undefined) {
2156
- return getSourceInfoErrorAddendum(elementProps.__source);
2157
- }
2158
-
2159
- return '';
2160
- }
2161
- /**
2162
- * Warn if there's no key explicitly set on dynamic arrays of children or
2163
- * object keys are not valid. This allows us to keep track of children between
2164
- * updates.
2165
- */
2166
-
2167
-
2168
- var ownerHasKeyUseWarning = {};
2169
-
2170
- function getCurrentComponentErrorInfo(parentType) {
2171
- var info = getDeclarationErrorAddendum();
2172
-
2173
- if (!info) {
2174
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
2175
-
2176
- if (parentName) {
2177
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2178
- }
2179
- }
2180
-
2181
- return info;
2182
- }
2183
- /**
2184
- * Warn if the element doesn't have an explicit key assigned to it.
2185
- * This element is in an array. The array could grow and shrink or be
2186
- * reordered. All children that haven't already been validated are required to
2187
- * have a "key" property assigned to it. Error statuses are cached so a warning
2188
- * will only be shown once.
2189
- *
2190
- * @internal
2191
- * @param {ReactElement} element Element that requires a key.
2192
- * @param {*} parentType element's parent's type.
2193
- */
2194
-
2195
-
2196
- function validateExplicitKey(element, parentType) {
2197
- if (!element._store || element._store.validated || element.key != null) {
2198
- return;
2199
- }
2200
-
2201
- element._store.validated = true;
2202
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2203
-
2204
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2205
- return;
2206
- }
2207
-
2208
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
2209
- // property, it may be the creator of the child that's responsible for
2210
- // assigning it a key.
2211
-
2212
- var childOwner = '';
2213
-
2214
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
2215
- // Give the component that originally created this child.
2216
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2217
- }
2218
-
2219
- {
2220
- setCurrentlyValidatingElement$1(element);
2221
-
2222
- 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);
2223
-
2224
- setCurrentlyValidatingElement$1(null);
2225
- }
2226
- }
2227
- /**
2228
- * Ensure that every element either is passed in a static location, in an
2229
- * array with an explicit keys property defined, or in an object literal
2230
- * with valid key property.
2231
- *
2232
- * @internal
2233
- * @param {ReactNode} node Statically passed child of any type.
2234
- * @param {*} parentType node's parent's type.
2235
- */
2236
-
2237
-
2238
- function validateChildKeys(node, parentType) {
2239
- if (typeof node !== 'object') {
2240
- return;
2241
- }
2242
-
2243
- if (isArray(node)) {
2244
- for (var i = 0; i < node.length; i++) {
2245
- var child = node[i];
2246
-
2247
- if (isValidElement(child)) {
2248
- validateExplicitKey(child, parentType);
2249
- }
2250
- }
2251
- } else if (isValidElement(node)) {
2252
- // This element was passed in a valid location.
2253
- if (node._store) {
2254
- node._store.validated = true;
2255
- }
2256
- } else if (node) {
2257
- var iteratorFn = getIteratorFn(node);
2258
-
2259
- if (typeof iteratorFn === 'function') {
2260
- // Entry iterators used to provide implicit keys,
2261
- // but now we print a separate warning for them later.
2262
- if (iteratorFn !== node.entries) {
2263
- var iterator = iteratorFn.call(node);
2264
- var step;
2265
-
2266
- while (!(step = iterator.next()).done) {
2267
- if (isValidElement(step.value)) {
2268
- validateExplicitKey(step.value, parentType);
2269
- }
2270
- }
2271
- }
2272
- }
2273
- }
2274
- }
2275
- /**
2276
- * Given an element, validate that its props follow the propTypes definition,
2277
- * provided by the type.
2278
- *
2279
- * @param {ReactElement} element
2280
- */
2281
-
2282
-
2283
- function validatePropTypes(element) {
2284
- {
2285
- var type = element.type;
2286
-
2287
- if (type === null || type === undefined || typeof type === 'string') {
2288
- return;
2289
- }
2290
-
2291
- var propTypes;
2292
-
2293
- if (typeof type === 'function') {
2294
- propTypes = type.propTypes;
2295
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
2296
- // Inner props are checked in the reconciler.
2297
- type.$$typeof === REACT_MEMO_TYPE)) {
2298
- propTypes = type.propTypes;
2299
- } else {
2300
- return;
2301
- }
2302
-
2303
- if (propTypes) {
2304
- // Intentionally inside to avoid triggering lazy initializers:
2305
- var name = getComponentNameFromType(type);
2306
- checkPropTypes(propTypes, element.props, 'prop', name, element);
2307
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
2308
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
2309
-
2310
- var _name = getComponentNameFromType(type);
479
+ };
480
+ react_production.unstable_useCacheRefresh = function () {
481
+ return ReactSharedInternals.H.useCacheRefresh();
482
+ };
483
+ react_production.use = function (usable) {
484
+ return ReactSharedInternals.H.use(usable);
485
+ };
486
+ react_production.useActionState = function (action, initialState, permalink) {
487
+ return ReactSharedInternals.H.useActionState(action, initialState, permalink);
488
+ };
489
+ react_production.useCallback = function (callback, deps) {
490
+ return ReactSharedInternals.H.useCallback(callback, deps);
491
+ };
492
+ react_production.useContext = function (Context) {
493
+ return ReactSharedInternals.H.useContext(Context);
494
+ };
495
+ react_production.useDebugValue = function () {};
496
+ react_production.useDeferredValue = function (value, initialValue) {
497
+ return ReactSharedInternals.H.useDeferredValue(value, initialValue);
498
+ };
499
+ react_production.useEffect = function (create, createDeps, update) {
500
+ var dispatcher = ReactSharedInternals.H;
501
+ if ("function" === typeof update)
502
+ throw Error(
503
+ "useEffect CRUD overload is not enabled in this build of React."
504
+ );
505
+ return dispatcher.useEffect(create, createDeps);
506
+ };
507
+ react_production.useId = function () {
508
+ return ReactSharedInternals.H.useId();
509
+ };
510
+ react_production.useImperativeHandle = function (ref, create, deps) {
511
+ return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
512
+ };
513
+ react_production.useInsertionEffect = function (create, deps) {
514
+ return ReactSharedInternals.H.useInsertionEffect(create, deps);
515
+ };
516
+ react_production.useLayoutEffect = function (create, deps) {
517
+ return ReactSharedInternals.H.useLayoutEffect(create, deps);
518
+ };
519
+ react_production.useMemo = function (create, deps) {
520
+ return ReactSharedInternals.H.useMemo(create, deps);
521
+ };
522
+ react_production.useOptimistic = function (passthrough, reducer) {
523
+ return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
524
+ };
525
+ react_production.useReducer = function (reducer, initialArg, init) {
526
+ return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
527
+ };
528
+ react_production.useRef = function (initialValue) {
529
+ return ReactSharedInternals.H.useRef(initialValue);
530
+ };
531
+ react_production.useState = function (initialState) {
532
+ return ReactSharedInternals.H.useState(initialState);
533
+ };
534
+ react_production.useSyncExternalStore = function (
535
+ subscribe,
536
+ getSnapshot,
537
+ getServerSnapshot
538
+ ) {
539
+ return ReactSharedInternals.H.useSyncExternalStore(
540
+ subscribe,
541
+ getSnapshot,
542
+ getServerSnapshot
543
+ );
544
+ };
545
+ react_production.useTransition = function () {
546
+ return ReactSharedInternals.H.useTransition();
547
+ };
548
+ react_production.version = "19.1.0";
2311
549
 
2312
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
2313
- }
550
+ var react_development = {exports: {}};
2314
551
 
2315
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
2316
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
2317
- }
2318
- }
2319
- }
2320
552
  /**
2321
- * Given a fragment, validate that it can only be provided with fragment props
2322
- * @param {ReactElement} fragment
553
+ * @license React
554
+ * react.development.js
555
+ *
556
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
557
+ *
558
+ * This source code is licensed under the MIT license found in the
559
+ * LICENSE file in the root directory of this source tree.
2323
560
  */
2324
561
 
2325
-
2326
- function validateFragmentProps(fragment) {
2327
- {
2328
- var keys = Object.keys(fragment.props);
2329
-
2330
- for (var i = 0; i < keys.length; i++) {
2331
- var key = keys[i];
2332
-
2333
- if (key !== 'children' && key !== 'key') {
2334
- setCurrentlyValidatingElement$1(fragment);
2335
-
2336
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
2337
-
2338
- setCurrentlyValidatingElement$1(null);
2339
- break;
2340
- }
2341
- }
2342
-
2343
- if (fragment.ref !== null) {
2344
- setCurrentlyValidatingElement$1(fragment);
2345
-
2346
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
2347
-
2348
- setCurrentlyValidatingElement$1(null);
2349
- }
2350
- }
2351
- }
2352
- function createElementWithValidation(type, props, children) {
2353
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
2354
- // succeed and there will likely be errors in render.
2355
-
2356
- if (!validType) {
2357
- var info = '';
2358
-
2359
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2360
- 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.";
562
+ (function (module, exports) {
563
+ "production" !== process.env.NODE_ENV &&
564
+ (function () {
565
+ function defineDeprecationWarning(methodName, info) {
566
+ Object.defineProperty(Component.prototype, methodName, {
567
+ get: function () {
568
+ console.warn(
569
+ "%s(...) is deprecated in plain JavaScript React classes. %s",
570
+ info[0],
571
+ info[1]
572
+ );
573
+ }
574
+ });
2361
575
  }
2362
-
2363
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
2364
-
2365
- if (sourceInfo) {
2366
- info += sourceInfo;
2367
- } else {
2368
- info += getDeclarationErrorAddendum();
576
+ function getIteratorFn(maybeIterable) {
577
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
578
+ return null;
579
+ maybeIterable =
580
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
581
+ maybeIterable["@@iterator"];
582
+ return "function" === typeof maybeIterable ? maybeIterable : null;
583
+ }
584
+ function warnNoop(publicInstance, callerName) {
585
+ publicInstance =
586
+ ((publicInstance = publicInstance.constructor) &&
587
+ (publicInstance.displayName || publicInstance.name)) ||
588
+ "ReactClass";
589
+ var warningKey = publicInstance + "." + callerName;
590
+ didWarnStateUpdateForUnmountedComponent[warningKey] ||
591
+ (console.error(
592
+ "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.",
593
+ callerName,
594
+ publicInstance
595
+ ),
596
+ (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));
597
+ }
598
+ function Component(props, context, updater) {
599
+ this.props = props;
600
+ this.context = context;
601
+ this.refs = emptyObject;
602
+ this.updater = updater || ReactNoopUpdateQueue;
603
+ }
604
+ function ComponentDummy() {}
605
+ function PureComponent(props, context, updater) {
606
+ this.props = props;
607
+ this.context = context;
608
+ this.refs = emptyObject;
609
+ this.updater = updater || ReactNoopUpdateQueue;
610
+ }
611
+ function testStringCoercion(value) {
612
+ return "" + value;
613
+ }
614
+ function checkKeyStringCoercion(value) {
615
+ try {
616
+ testStringCoercion(value);
617
+ var JSCompiler_inline_result = !1;
618
+ } catch (e) {
619
+ JSCompiler_inline_result = !0;
620
+ }
621
+ if (JSCompiler_inline_result) {
622
+ JSCompiler_inline_result = console;
623
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
624
+ var JSCompiler_inline_result$jscomp$0 =
625
+ ("function" === typeof Symbol &&
626
+ Symbol.toStringTag &&
627
+ value[Symbol.toStringTag]) ||
628
+ value.constructor.name ||
629
+ "Object";
630
+ JSCompiler_temp_const.call(
631
+ JSCompiler_inline_result,
632
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
633
+ JSCompiler_inline_result$jscomp$0
634
+ );
635
+ return testStringCoercion(value);
636
+ }
2369
637
  }
2370
-
2371
- var typeString;
2372
-
2373
- if (type === null) {
2374
- typeString = 'null';
2375
- } else if (isArray(type)) {
2376
- typeString = 'array';
2377
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
2378
- typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
2379
- info = ' Did you accidentally export a JSX literal instead of a component?';
2380
- } else {
2381
- typeString = typeof type;
638
+ function getComponentNameFromType(type) {
639
+ if (null == type) return null;
640
+ if ("function" === typeof type)
641
+ return type.$$typeof === REACT_CLIENT_REFERENCE
642
+ ? null
643
+ : type.displayName || type.name || null;
644
+ if ("string" === typeof type) return type;
645
+ switch (type) {
646
+ case REACT_FRAGMENT_TYPE:
647
+ return "Fragment";
648
+ case REACT_PROFILER_TYPE:
649
+ return "Profiler";
650
+ case REACT_STRICT_MODE_TYPE:
651
+ return "StrictMode";
652
+ case REACT_SUSPENSE_TYPE:
653
+ return "Suspense";
654
+ case REACT_SUSPENSE_LIST_TYPE:
655
+ return "SuspenseList";
656
+ case REACT_ACTIVITY_TYPE:
657
+ return "Activity";
658
+ }
659
+ if ("object" === typeof type)
660
+ switch (
661
+ ("number" === typeof type.tag &&
662
+ console.error(
663
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
664
+ ),
665
+ type.$$typeof)
666
+ ) {
667
+ case REACT_PORTAL_TYPE:
668
+ return "Portal";
669
+ case REACT_CONTEXT_TYPE:
670
+ return (type.displayName || "Context") + ".Provider";
671
+ case REACT_CONSUMER_TYPE:
672
+ return (type._context.displayName || "Context") + ".Consumer";
673
+ case REACT_FORWARD_REF_TYPE:
674
+ var innerType = type.render;
675
+ type = type.displayName;
676
+ type ||
677
+ ((type = innerType.displayName || innerType.name || ""),
678
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
679
+ return type;
680
+ case REACT_MEMO_TYPE:
681
+ return (
682
+ (innerType = type.displayName || null),
683
+ null !== innerType
684
+ ? innerType
685
+ : getComponentNameFromType(type.type) || "Memo"
686
+ );
687
+ case REACT_LAZY_TYPE:
688
+ innerType = type._payload;
689
+ type = type._init;
690
+ try {
691
+ return getComponentNameFromType(type(innerType));
692
+ } catch (x) {}
693
+ }
694
+ return null;
695
+ }
696
+ function getTaskName(type) {
697
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
698
+ if (
699
+ "object" === typeof type &&
700
+ null !== type &&
701
+ type.$$typeof === REACT_LAZY_TYPE
702
+ )
703
+ return "<...>";
704
+ try {
705
+ var name = getComponentNameFromType(type);
706
+ return name ? "<" + name + ">" : "<...>";
707
+ } catch (x) {
708
+ return "<...>";
709
+ }
2382
710
  }
2383
-
2384
- {
2385
- 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);
711
+ function getOwner() {
712
+ var dispatcher = ReactSharedInternals.A;
713
+ return null === dispatcher ? null : dispatcher.getOwner();
2386
714
  }
2387
- }
2388
-
2389
- var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
2390
- // TODO: Drop this when these are no longer allowed as the type argument.
2391
-
2392
- if (element == null) {
2393
- return element;
2394
- } // Skip key warning if the type isn't valid since our key validation logic
2395
- // doesn't expect a non-string/function type and can throw confusing errors.
2396
- // We don't want exception behavior to differ between dev and prod.
2397
- // (Rendering will throw with a helpful message and as soon as the type is
2398
- // fixed, the key warnings will appear.)
2399
-
2400
-
2401
- if (validType) {
2402
- for (var i = 2; i < arguments.length; i++) {
2403
- validateChildKeys(arguments[i], type);
715
+ function UnknownOwner() {
716
+ return Error("react-stack-top-frame");
2404
717
  }
2405
- }
2406
-
2407
- if (type === REACT_FRAGMENT_TYPE) {
2408
- validateFragmentProps(element);
2409
- } else {
2410
- validatePropTypes(element);
2411
- }
2412
-
2413
- return element;
2414
- }
2415
- var didWarnAboutDeprecatedCreateFactory = false;
2416
- function createFactoryWithValidation(type) {
2417
- var validatedFactory = createElementWithValidation.bind(null, type);
2418
- validatedFactory.type = type;
2419
-
2420
- {
2421
- if (!didWarnAboutDeprecatedCreateFactory) {
2422
- didWarnAboutDeprecatedCreateFactory = true;
2423
-
2424
- warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
2425
- } // Legacy hook: remove it
2426
-
2427
-
2428
- Object.defineProperty(validatedFactory, 'type', {
2429
- enumerable: false,
2430
- get: function () {
2431
- warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
2432
-
2433
- Object.defineProperty(this, 'type', {
2434
- value: type
2435
- });
2436
- return type;
718
+ function hasValidKey(config) {
719
+ if (hasOwnProperty.call(config, "key")) {
720
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
721
+ if (getter && getter.isReactWarning) return !1;
2437
722
  }
2438
- });
2439
- }
2440
-
2441
- return validatedFactory;
2442
- }
2443
- function cloneElementWithValidation(element, props, children) {
2444
- var newElement = cloneElement.apply(this, arguments);
2445
-
2446
- for (var i = 2; i < arguments.length; i++) {
2447
- validateChildKeys(arguments[i], newElement.type);
2448
- }
2449
-
2450
- validatePropTypes(newElement);
2451
- return newElement;
2452
- }
2453
-
2454
- function startTransition(scope, options) {
2455
- var prevTransition = ReactCurrentBatchConfig.transition;
2456
- ReactCurrentBatchConfig.transition = {};
2457
- var currentTransition = ReactCurrentBatchConfig.transition;
2458
-
2459
- {
2460
- ReactCurrentBatchConfig.transition._updatedFibers = new Set();
2461
- }
2462
-
2463
- try {
2464
- scope();
2465
- } finally {
2466
- ReactCurrentBatchConfig.transition = prevTransition;
2467
-
2468
- {
2469
- if (prevTransition === null && currentTransition._updatedFibers) {
2470
- var updatedFibersCount = currentTransition._updatedFibers.size;
2471
-
2472
- if (updatedFibersCount > 10) {
2473
- 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.');
2474
- }
2475
-
2476
- currentTransition._updatedFibers.clear();
723
+ return void 0 !== config.key;
724
+ }
725
+ function defineKeyPropWarningGetter(props, displayName) {
726
+ function warnAboutAccessingKey() {
727
+ specialPropKeyWarningShown ||
728
+ ((specialPropKeyWarningShown = !0),
729
+ console.error(
730
+ "%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)",
731
+ displayName
732
+ ));
2477
733
  }
734
+ warnAboutAccessingKey.isReactWarning = !0;
735
+ Object.defineProperty(props, "key", {
736
+ get: warnAboutAccessingKey,
737
+ configurable: !0
738
+ });
2478
739
  }
2479
- }
2480
- }
2481
-
2482
- var didWarnAboutMessageChannel = false;
2483
- var enqueueTaskImpl = null;
2484
- function enqueueTask(task) {
2485
- if (enqueueTaskImpl === null) {
2486
- try {
2487
- // read require off the module object to get around the bundlers.
2488
- // we don't want them to detect a require and bundle a Node polyfill.
2489
- var requireString = ('require' + Math.random()).slice(0, 7);
2490
- var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
2491
- // version of setImmediate, bypassing fake timers if any.
2492
-
2493
- enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
2494
- } catch (_err) {
2495
- // we're in a browser
2496
- // we can't use regular timers because they may still be faked
2497
- // so we try MessageChannel+postMessage instead
2498
- enqueueTaskImpl = function (callback) {
2499
- {
2500
- if (didWarnAboutMessageChannel === false) {
2501
- didWarnAboutMessageChannel = true;
2502
-
2503
- if (typeof MessageChannel === 'undefined') {
2504
- 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.');
740
+ function elementRefGetterWithDeprecationWarning() {
741
+ var componentName = getComponentNameFromType(this.type);
742
+ didWarnAboutElementRef[componentName] ||
743
+ ((didWarnAboutElementRef[componentName] = !0),
744
+ console.error(
745
+ "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."
746
+ ));
747
+ componentName = this.props.ref;
748
+ return void 0 !== componentName ? componentName : null;
749
+ }
750
+ function ReactElement(
751
+ type,
752
+ key,
753
+ self,
754
+ source,
755
+ owner,
756
+ props,
757
+ debugStack,
758
+ debugTask
759
+ ) {
760
+ self = props.ref;
761
+ type = {
762
+ $$typeof: REACT_ELEMENT_TYPE,
763
+ type: type,
764
+ key: key,
765
+ props: props,
766
+ _owner: owner
767
+ };
768
+ null !== (void 0 !== self ? self : null)
769
+ ? Object.defineProperty(type, "ref", {
770
+ enumerable: !1,
771
+ get: elementRefGetterWithDeprecationWarning
772
+ })
773
+ : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
774
+ type._store = {};
775
+ Object.defineProperty(type._store, "validated", {
776
+ configurable: !1,
777
+ enumerable: !1,
778
+ writable: !0,
779
+ value: 0
780
+ });
781
+ Object.defineProperty(type, "_debugInfo", {
782
+ configurable: !1,
783
+ enumerable: !1,
784
+ writable: !0,
785
+ value: null
786
+ });
787
+ Object.defineProperty(type, "_debugStack", {
788
+ configurable: !1,
789
+ enumerable: !1,
790
+ writable: !0,
791
+ value: debugStack
792
+ });
793
+ Object.defineProperty(type, "_debugTask", {
794
+ configurable: !1,
795
+ enumerable: !1,
796
+ writable: !0,
797
+ value: debugTask
798
+ });
799
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
800
+ return type;
801
+ }
802
+ function cloneAndReplaceKey(oldElement, newKey) {
803
+ newKey = ReactElement(
804
+ oldElement.type,
805
+ newKey,
806
+ void 0,
807
+ void 0,
808
+ oldElement._owner,
809
+ oldElement.props,
810
+ oldElement._debugStack,
811
+ oldElement._debugTask
812
+ );
813
+ oldElement._store &&
814
+ (newKey._store.validated = oldElement._store.validated);
815
+ return newKey;
816
+ }
817
+ function isValidElement(object) {
818
+ return (
819
+ "object" === typeof object &&
820
+ null !== object &&
821
+ object.$$typeof === REACT_ELEMENT_TYPE
822
+ );
823
+ }
824
+ function escape(key) {
825
+ var escaperLookup = { "=": "=0", ":": "=2" };
826
+ return (
827
+ "$" +
828
+ key.replace(/[=:]/g, function (match) {
829
+ return escaperLookup[match];
830
+ })
831
+ );
832
+ }
833
+ function getElementKey(element, index) {
834
+ return "object" === typeof element &&
835
+ null !== element &&
836
+ null != element.key
837
+ ? (checkKeyStringCoercion(element.key), escape("" + element.key))
838
+ : index.toString(36);
839
+ }
840
+ function noop$1() {}
841
+ function resolveThenable(thenable) {
842
+ switch (thenable.status) {
843
+ case "fulfilled":
844
+ return thenable.value;
845
+ case "rejected":
846
+ throw thenable.reason;
847
+ default:
848
+ switch (
849
+ ("string" === typeof thenable.status
850
+ ? thenable.then(noop$1, noop$1)
851
+ : ((thenable.status = "pending"),
852
+ thenable.then(
853
+ function (fulfilledValue) {
854
+ "pending" === thenable.status &&
855
+ ((thenable.status = "fulfilled"),
856
+ (thenable.value = fulfilledValue));
857
+ },
858
+ function (error) {
859
+ "pending" === thenable.status &&
860
+ ((thenable.status = "rejected"),
861
+ (thenable.reason = error));
862
+ }
863
+ )),
864
+ thenable.status)
865
+ ) {
866
+ case "fulfilled":
867
+ return thenable.value;
868
+ case "rejected":
869
+ throw thenable.reason;
870
+ }
871
+ }
872
+ throw thenable;
873
+ }
874
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
875
+ var type = typeof children;
876
+ if ("undefined" === type || "boolean" === type) children = null;
877
+ var invokeCallback = !1;
878
+ if (null === children) invokeCallback = !0;
879
+ else
880
+ switch (type) {
881
+ case "bigint":
882
+ case "string":
883
+ case "number":
884
+ invokeCallback = !0;
885
+ break;
886
+ case "object":
887
+ switch (children.$$typeof) {
888
+ case REACT_ELEMENT_TYPE:
889
+ case REACT_PORTAL_TYPE:
890
+ invokeCallback = !0;
891
+ break;
892
+ case REACT_LAZY_TYPE:
893
+ return (
894
+ (invokeCallback = children._init),
895
+ mapIntoArray(
896
+ invokeCallback(children._payload),
897
+ array,
898
+ escapedPrefix,
899
+ nameSoFar,
900
+ callback
901
+ )
902
+ );
2505
903
  }
904
+ }
905
+ if (invokeCallback) {
906
+ invokeCallback = children;
907
+ callback = callback(invokeCallback);
908
+ var childKey =
909
+ "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
910
+ isArrayImpl(callback)
911
+ ? ((escapedPrefix = ""),
912
+ null != childKey &&
913
+ (escapedPrefix =
914
+ childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
915
+ mapIntoArray(callback, array, escapedPrefix, "", function (c) {
916
+ return c;
917
+ }))
918
+ : null != callback &&
919
+ (isValidElement(callback) &&
920
+ (null != callback.key &&
921
+ ((invokeCallback && invokeCallback.key === callback.key) ||
922
+ checkKeyStringCoercion(callback.key)),
923
+ (escapedPrefix = cloneAndReplaceKey(
924
+ callback,
925
+ escapedPrefix +
926
+ (null == callback.key ||
927
+ (invokeCallback && invokeCallback.key === callback.key)
928
+ ? ""
929
+ : ("" + callback.key).replace(
930
+ userProvidedKeyEscapeRegex,
931
+ "$&/"
932
+ ) + "/") +
933
+ childKey
934
+ )),
935
+ "" !== nameSoFar &&
936
+ null != invokeCallback &&
937
+ isValidElement(invokeCallback) &&
938
+ null == invokeCallback.key &&
939
+ invokeCallback._store &&
940
+ !invokeCallback._store.validated &&
941
+ (escapedPrefix._store.validated = 2),
942
+ (callback = escapedPrefix)),
943
+ array.push(callback));
944
+ return 1;
945
+ }
946
+ invokeCallback = 0;
947
+ childKey = "" === nameSoFar ? "." : nameSoFar + ":";
948
+ if (isArrayImpl(children))
949
+ for (var i = 0; i < children.length; i++)
950
+ (nameSoFar = children[i]),
951
+ (type = childKey + getElementKey(nameSoFar, i)),
952
+ (invokeCallback += mapIntoArray(
953
+ nameSoFar,
954
+ array,
955
+ escapedPrefix,
956
+ type,
957
+ callback
958
+ ));
959
+ else if (((i = getIteratorFn(children)), "function" === typeof i))
960
+ for (
961
+ i === children.entries &&
962
+ (didWarnAboutMaps ||
963
+ console.warn(
964
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
965
+ ),
966
+ (didWarnAboutMaps = !0)),
967
+ children = i.call(children),
968
+ i = 0;
969
+ !(nameSoFar = children.next()).done;
970
+
971
+ )
972
+ (nameSoFar = nameSoFar.value),
973
+ (type = childKey + getElementKey(nameSoFar, i++)),
974
+ (invokeCallback += mapIntoArray(
975
+ nameSoFar,
976
+ array,
977
+ escapedPrefix,
978
+ type,
979
+ callback
980
+ ));
981
+ else if ("object" === type) {
982
+ if ("function" === typeof children.then)
983
+ return mapIntoArray(
984
+ resolveThenable(children),
985
+ array,
986
+ escapedPrefix,
987
+ nameSoFar,
988
+ callback
989
+ );
990
+ array = String(children);
991
+ throw Error(
992
+ "Objects are not valid as a React child (found: " +
993
+ ("[object Object]" === array
994
+ ? "object with keys {" + Object.keys(children).join(", ") + "}"
995
+ : array) +
996
+ "). If you meant to render a collection of children, use an array instead."
997
+ );
998
+ }
999
+ return invokeCallback;
1000
+ }
1001
+ function mapChildren(children, func, context) {
1002
+ if (null == children) return children;
1003
+ var result = [],
1004
+ count = 0;
1005
+ mapIntoArray(children, result, "", "", function (child) {
1006
+ return func.call(context, child, count++);
1007
+ });
1008
+ return result;
1009
+ }
1010
+ function lazyInitializer(payload) {
1011
+ if (-1 === payload._status) {
1012
+ var ctor = payload._result;
1013
+ ctor = ctor();
1014
+ ctor.then(
1015
+ function (moduleObject) {
1016
+ if (0 === payload._status || -1 === payload._status)
1017
+ (payload._status = 1), (payload._result = moduleObject);
1018
+ },
1019
+ function (error) {
1020
+ if (0 === payload._status || -1 === payload._status)
1021
+ (payload._status = 2), (payload._result = error);
2506
1022
  }
1023
+ );
1024
+ -1 === payload._status &&
1025
+ ((payload._status = 0), (payload._result = ctor));
1026
+ }
1027
+ if (1 === payload._status)
1028
+ return (
1029
+ (ctor = payload._result),
1030
+ void 0 === ctor &&
1031
+ console.error(
1032
+ "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?",
1033
+ ctor
1034
+ ),
1035
+ "default" in ctor ||
1036
+ console.error(
1037
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
1038
+ ctor
1039
+ ),
1040
+ ctor.default
1041
+ );
1042
+ throw payload._result;
1043
+ }
1044
+ function resolveDispatcher() {
1045
+ var dispatcher = ReactSharedInternals.H;
1046
+ null === dispatcher &&
1047
+ console.error(
1048
+ "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."
1049
+ );
1050
+ return dispatcher;
1051
+ }
1052
+ function noop() {}
1053
+ function enqueueTask(task) {
1054
+ if (null === enqueueTaskImpl)
1055
+ try {
1056
+ var requireString = ("require" + Math.random()).slice(0, 7);
1057
+ enqueueTaskImpl = (module && module[requireString]).call(
1058
+ module,
1059
+ "timers"
1060
+ ).setImmediate;
1061
+ } catch (_err) {
1062
+ enqueueTaskImpl = function (callback) {
1063
+ !1 === didWarnAboutMessageChannel &&
1064
+ ((didWarnAboutMessageChannel = !0),
1065
+ "undefined" === typeof MessageChannel &&
1066
+ console.error(
1067
+ "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."
1068
+ ));
1069
+ var channel = new MessageChannel();
1070
+ channel.port1.onmessage = callback;
1071
+ channel.port2.postMessage(void 0);
1072
+ };
2507
1073
  }
2508
-
2509
- var channel = new MessageChannel();
2510
- channel.port1.onmessage = callback;
2511
- channel.port2.postMessage(undefined);
2512
- };
2513
- }
2514
- }
2515
-
2516
- return enqueueTaskImpl(task);
2517
- }
2518
-
2519
- var actScopeDepth = 0;
2520
- var didWarnNoAwaitAct = false;
2521
- function act(callback) {
2522
- {
2523
- // `act` calls can be nested, so we track the depth. This represents the
2524
- // number of `act` scopes on the stack.
2525
- var prevActScopeDepth = actScopeDepth;
2526
- actScopeDepth++;
2527
-
2528
- if (ReactCurrentActQueue.current === null) {
2529
- // This is the outermost `act` scope. Initialize the queue. The reconciler
2530
- // will detect the queue and use it instead of Scheduler.
2531
- ReactCurrentActQueue.current = [];
2532
- }
2533
-
2534
- var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
2535
- var result;
2536
-
2537
- try {
2538
- // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
2539
- // set to `true` while the given callback is executed, not for updates
2540
- // triggered during an async event, because this is how the legacy
2541
- // implementation of `act` behaved.
2542
- ReactCurrentActQueue.isBatchingLegacy = true;
2543
- result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
2544
- // which flushed updates immediately after the scope function exits, even
2545
- // if it's an async function.
2546
-
2547
- if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
2548
- var queue = ReactCurrentActQueue.current;
2549
-
2550
- if (queue !== null) {
2551
- ReactCurrentActQueue.didScheduleLegacyUpdate = false;
2552
- flushActQueue(queue);
1074
+ return enqueueTaskImpl(task);
1075
+ }
1076
+ function aggregateErrors(errors) {
1077
+ return 1 < errors.length && "function" === typeof AggregateError
1078
+ ? new AggregateError(errors)
1079
+ : errors[0];
1080
+ }
1081
+ function popActScope(prevActQueue, prevActScopeDepth) {
1082
+ prevActScopeDepth !== actScopeDepth - 1 &&
1083
+ console.error(
1084
+ "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
1085
+ );
1086
+ actScopeDepth = prevActScopeDepth;
1087
+ }
1088
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1089
+ var queue = ReactSharedInternals.actQueue;
1090
+ if (null !== queue)
1091
+ if (0 !== queue.length)
1092
+ try {
1093
+ flushActQueue(queue);
1094
+ enqueueTask(function () {
1095
+ return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1096
+ });
1097
+ return;
1098
+ } catch (error) {
1099
+ ReactSharedInternals.thrownErrors.push(error);
1100
+ }
1101
+ else ReactSharedInternals.actQueue = null;
1102
+ 0 < ReactSharedInternals.thrownErrors.length
1103
+ ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
1104
+ (ReactSharedInternals.thrownErrors.length = 0),
1105
+ reject(queue))
1106
+ : resolve(returnValue);
1107
+ }
1108
+ function flushActQueue(queue) {
1109
+ if (!isFlushing) {
1110
+ isFlushing = !0;
1111
+ var i = 0;
1112
+ try {
1113
+ for (; i < queue.length; i++) {
1114
+ var callback = queue[i];
1115
+ do {
1116
+ ReactSharedInternals.didUsePromise = !1;
1117
+ var continuation = callback(!1);
1118
+ if (null !== continuation) {
1119
+ if (ReactSharedInternals.didUsePromise) {
1120
+ queue[i] = callback;
1121
+ queue.splice(0, i);
1122
+ return;
1123
+ }
1124
+ callback = continuation;
1125
+ } else break;
1126
+ } while (1);
1127
+ }
1128
+ queue.length = 0;
1129
+ } catch (error) {
1130
+ queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
1131
+ } finally {
1132
+ isFlushing = !1;
2553
1133
  }
2554
1134
  }
2555
- } catch (error) {
2556
- popActScope(prevActScopeDepth);
2557
- throw error;
2558
- } finally {
2559
- ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
2560
1135
  }
2561
-
2562
- if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
2563
- var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
2564
- // for it to resolve before exiting the current scope.
2565
-
2566
- var wasAwaited = false;
2567
- var thenable = {
2568
- then: function (resolve, reject) {
2569
- wasAwaited = true;
2570
- thenableResult.then(function (returnValue) {
2571
- popActScope(prevActScopeDepth);
2572
-
2573
- if (actScopeDepth === 0) {
2574
- // We've exited the outermost act scope. Recursively flush the
2575
- // queue until there's no remaining work.
2576
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2577
- } else {
2578
- resolve(returnValue);
2579
- }
2580
- }, function (error) {
2581
- // The callback threw an error.
2582
- popActScope(prevActScopeDepth);
2583
- reject(error);
2584
- });
2585
- }
2586
- };
2587
-
2588
- {
2589
- if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
2590
- // eslint-disable-next-line no-undef
2591
- Promise.resolve().then(function () {}).then(function () {
2592
- if (!wasAwaited) {
2593
- didWarnNoAwaitAct = true;
2594
-
2595
- 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 () => ...);');
2596
- }
2597
- });
1136
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1137
+ "function" ===
1138
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
1139
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1140
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
1141
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
1142
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
1143
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
1144
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1145
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
1146
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
1147
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
1148
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
1149
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
1150
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
1151
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
1152
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
1153
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
1154
+ didWarnStateUpdateForUnmountedComponent = {},
1155
+ ReactNoopUpdateQueue = {
1156
+ isMounted: function () {
1157
+ return !1;
1158
+ },
1159
+ enqueueForceUpdate: function (publicInstance) {
1160
+ warnNoop(publicInstance, "forceUpdate");
1161
+ },
1162
+ enqueueReplaceState: function (publicInstance) {
1163
+ warnNoop(publicInstance, "replaceState");
1164
+ },
1165
+ enqueueSetState: function (publicInstance) {
1166
+ warnNoop(publicInstance, "setState");
2598
1167
  }
1168
+ },
1169
+ assign = Object.assign,
1170
+ emptyObject = {};
1171
+ Object.freeze(emptyObject);
1172
+ Component.prototype.isReactComponent = {};
1173
+ Component.prototype.setState = function (partialState, callback) {
1174
+ if (
1175
+ "object" !== typeof partialState &&
1176
+ "function" !== typeof partialState &&
1177
+ null != partialState
1178
+ )
1179
+ throw Error(
1180
+ "takes an object of state variables to update or a function which returns an object of state variables."
1181
+ );
1182
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
1183
+ };
1184
+ Component.prototype.forceUpdate = function (callback) {
1185
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
1186
+ };
1187
+ var deprecatedAPIs = {
1188
+ isMounted: [
1189
+ "isMounted",
1190
+ "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
1191
+ ],
1192
+ replaceState: [
1193
+ "replaceState",
1194
+ "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
1195
+ ]
1196
+ },
1197
+ fnName;
1198
+ for (fnName in deprecatedAPIs)
1199
+ deprecatedAPIs.hasOwnProperty(fnName) &&
1200
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1201
+ ComponentDummy.prototype = Component.prototype;
1202
+ deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
1203
+ deprecatedAPIs.constructor = PureComponent;
1204
+ assign(deprecatedAPIs, Component.prototype);
1205
+ deprecatedAPIs.isPureReactComponent = !0;
1206
+ var isArrayImpl = Array.isArray,
1207
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
1208
+ ReactSharedInternals = {
1209
+ H: null,
1210
+ A: null,
1211
+ T: null,
1212
+ S: null,
1213
+ V: null,
1214
+ actQueue: null,
1215
+ isBatchingLegacy: !1,
1216
+ didScheduleLegacyUpdate: !1,
1217
+ didUsePromise: !1,
1218
+ thrownErrors: [],
1219
+ getCurrentStack: null,
1220
+ recentlyCreatedOwnerStacks: 0
1221
+ },
1222
+ hasOwnProperty = Object.prototype.hasOwnProperty,
1223
+ createTask = console.createTask
1224
+ ? console.createTask
1225
+ : function () {
1226
+ return null;
1227
+ };
1228
+ deprecatedAPIs = {
1229
+ "react-stack-bottom-frame": function (callStackForError) {
1230
+ return callStackForError();
2599
1231
  }
2600
-
2601
- return thenable;
2602
- } else {
2603
- var returnValue = result; // The callback is not an async function. Exit the current scope
2604
- // immediately, without awaiting.
2605
-
2606
- popActScope(prevActScopeDepth);
2607
-
2608
- if (actScopeDepth === 0) {
2609
- // Exiting the outermost act scope. Flush the queue.
2610
- var _queue = ReactCurrentActQueue.current;
2611
-
2612
- if (_queue !== null) {
2613
- flushActQueue(_queue);
2614
- ReactCurrentActQueue.current = null;
2615
- } // Return a thenable. If the user awaits it, we'll flush again in
2616
- // case additional work was scheduled by a microtask.
2617
-
2618
-
2619
- var _thenable = {
2620
- then: function (resolve, reject) {
2621
- // Confirm we haven't re-entered another `act` scope, in case
2622
- // the user does something weird like await the thenable
2623
- // multiple times.
2624
- if (ReactCurrentActQueue.current === null) {
2625
- // Recursively flush the queue until there's no remaining work.
2626
- ReactCurrentActQueue.current = [];
2627
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2628
- } else {
2629
- resolve(returnValue);
1232
+ };
1233
+ var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
1234
+ var didWarnAboutElementRef = {};
1235
+ var unknownOwnerDebugStack = deprecatedAPIs[
1236
+ "react-stack-bottom-frame"
1237
+ ].bind(deprecatedAPIs, UnknownOwner)();
1238
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1239
+ var didWarnAboutMaps = !1,
1240
+ userProvidedKeyEscapeRegex = /\/+/g,
1241
+ reportGlobalError =
1242
+ "function" === typeof reportError
1243
+ ? reportError
1244
+ : function (error) {
1245
+ if (
1246
+ "object" === typeof window &&
1247
+ "function" === typeof window.ErrorEvent
1248
+ ) {
1249
+ var event = new window.ErrorEvent("error", {
1250
+ bubbles: !0,
1251
+ cancelable: !0,
1252
+ message:
1253
+ "object" === typeof error &&
1254
+ null !== error &&
1255
+ "string" === typeof error.message
1256
+ ? String(error.message)
1257
+ : String(error),
1258
+ error: error
1259
+ });
1260
+ if (!window.dispatchEvent(event)) return;
1261
+ } else if (
1262
+ "object" === typeof process &&
1263
+ "function" === typeof process.emit
1264
+ ) {
1265
+ process.emit("uncaughtException", error);
1266
+ return;
1267
+ }
1268
+ console.error(error);
1269
+ },
1270
+ didWarnAboutMessageChannel = !1,
1271
+ enqueueTaskImpl = null,
1272
+ actScopeDepth = 0,
1273
+ didWarnNoAwaitAct = !1,
1274
+ isFlushing = !1,
1275
+ queueSeveralMicrotasks =
1276
+ "function" === typeof queueMicrotask
1277
+ ? function (callback) {
1278
+ queueMicrotask(function () {
1279
+ return queueMicrotask(callback);
1280
+ });
2630
1281
  }
2631
- }
2632
- };
2633
- return _thenable;
2634
- } else {
2635
- // Since we're inside a nested `act` scope, the returned thenable
2636
- // immediately resolves. The outer scope will flush the queue.
2637
- var _thenable2 = {
1282
+ : enqueueTask;
1283
+ deprecatedAPIs = Object.freeze({
1284
+ __proto__: null,
1285
+ c: function (size) {
1286
+ return resolveDispatcher().useMemoCache(size);
1287
+ }
1288
+ });
1289
+ exports.Children = {
1290
+ map: mapChildren,
1291
+ forEach: function (children, forEachFunc, forEachContext) {
1292
+ mapChildren(
1293
+ children,
1294
+ function () {
1295
+ forEachFunc.apply(this, arguments);
1296
+ },
1297
+ forEachContext
1298
+ );
1299
+ },
1300
+ count: function (children) {
1301
+ var n = 0;
1302
+ mapChildren(children, function () {
1303
+ n++;
1304
+ });
1305
+ return n;
1306
+ },
1307
+ toArray: function (children) {
1308
+ return (
1309
+ mapChildren(children, function (child) {
1310
+ return child;
1311
+ }) || []
1312
+ );
1313
+ },
1314
+ only: function (children) {
1315
+ if (!isValidElement(children))
1316
+ throw Error(
1317
+ "React.Children.only expected to receive a single React element child."
1318
+ );
1319
+ return children;
1320
+ }
1321
+ };
1322
+ exports.Component = Component;
1323
+ exports.Fragment = REACT_FRAGMENT_TYPE;
1324
+ exports.Profiler = REACT_PROFILER_TYPE;
1325
+ exports.PureComponent = PureComponent;
1326
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
1327
+ exports.Suspense = REACT_SUSPENSE_TYPE;
1328
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
1329
+ ReactSharedInternals;
1330
+ exports.__COMPILER_RUNTIME = deprecatedAPIs;
1331
+ exports.act = function (callback) {
1332
+ var prevActQueue = ReactSharedInternals.actQueue,
1333
+ prevActScopeDepth = actScopeDepth;
1334
+ actScopeDepth++;
1335
+ var queue = (ReactSharedInternals.actQueue =
1336
+ null !== prevActQueue ? prevActQueue : []),
1337
+ didAwaitActCall = !1;
1338
+ try {
1339
+ var result = callback();
1340
+ } catch (error) {
1341
+ ReactSharedInternals.thrownErrors.push(error);
1342
+ }
1343
+ if (0 < ReactSharedInternals.thrownErrors.length)
1344
+ throw (
1345
+ (popActScope(prevActQueue, prevActScopeDepth),
1346
+ (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
1347
+ (ReactSharedInternals.thrownErrors.length = 0),
1348
+ callback)
1349
+ );
1350
+ if (
1351
+ null !== result &&
1352
+ "object" === typeof result &&
1353
+ "function" === typeof result.then
1354
+ ) {
1355
+ var thenable = result;
1356
+ queueSeveralMicrotasks(function () {
1357
+ didAwaitActCall ||
1358
+ didWarnNoAwaitAct ||
1359
+ ((didWarnNoAwaitAct = !0),
1360
+ console.error(
1361
+ "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 () => ...);"
1362
+ ));
1363
+ });
1364
+ return {
2638
1365
  then: function (resolve, reject) {
2639
- resolve(returnValue);
1366
+ didAwaitActCall = !0;
1367
+ thenable.then(
1368
+ function (returnValue) {
1369
+ popActScope(prevActQueue, prevActScopeDepth);
1370
+ if (0 === prevActScopeDepth) {
1371
+ try {
1372
+ flushActQueue(queue),
1373
+ enqueueTask(function () {
1374
+ return recursivelyFlushAsyncActWork(
1375
+ returnValue,
1376
+ resolve,
1377
+ reject
1378
+ );
1379
+ });
1380
+ } catch (error$0) {
1381
+ ReactSharedInternals.thrownErrors.push(error$0);
1382
+ }
1383
+ if (0 < ReactSharedInternals.thrownErrors.length) {
1384
+ var _thrownError = aggregateErrors(
1385
+ ReactSharedInternals.thrownErrors
1386
+ );
1387
+ ReactSharedInternals.thrownErrors.length = 0;
1388
+ reject(_thrownError);
1389
+ }
1390
+ } else resolve(returnValue);
1391
+ },
1392
+ function (error) {
1393
+ popActScope(prevActQueue, prevActScopeDepth);
1394
+ 0 < ReactSharedInternals.thrownErrors.length
1395
+ ? ((error = aggregateErrors(
1396
+ ReactSharedInternals.thrownErrors
1397
+ )),
1398
+ (ReactSharedInternals.thrownErrors.length = 0),
1399
+ reject(error))
1400
+ : reject(error);
1401
+ }
1402
+ );
2640
1403
  }
2641
1404
  };
2642
- return _thenable2;
2643
1405
  }
2644
- }
2645
- }
2646
- }
2647
-
2648
- function popActScope(prevActScopeDepth) {
2649
- {
2650
- if (prevActScopeDepth !== actScopeDepth - 1) {
2651
- error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
2652
- }
2653
-
2654
- actScopeDepth = prevActScopeDepth;
2655
- }
2656
- }
2657
-
2658
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
2659
- {
2660
- var queue = ReactCurrentActQueue.current;
2661
-
2662
- if (queue !== null) {
2663
- try {
2664
- flushActQueue(queue);
2665
- enqueueTask(function () {
2666
- if (queue.length === 0) {
2667
- // No additional work was scheduled. Finish.
2668
- ReactCurrentActQueue.current = null;
2669
- resolve(returnValue);
2670
- } else {
2671
- // Keep flushing work until there's none left.
2672
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1406
+ var returnValue$jscomp$0 = result;
1407
+ popActScope(prevActQueue, prevActScopeDepth);
1408
+ 0 === prevActScopeDepth &&
1409
+ (flushActQueue(queue),
1410
+ 0 !== queue.length &&
1411
+ queueSeveralMicrotasks(function () {
1412
+ didAwaitActCall ||
1413
+ didWarnNoAwaitAct ||
1414
+ ((didWarnNoAwaitAct = !0),
1415
+ console.error(
1416
+ "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(() => ...)"
1417
+ ));
1418
+ }),
1419
+ (ReactSharedInternals.actQueue = null));
1420
+ if (0 < ReactSharedInternals.thrownErrors.length)
1421
+ throw (
1422
+ ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
1423
+ (ReactSharedInternals.thrownErrors.length = 0),
1424
+ callback)
1425
+ );
1426
+ return {
1427
+ then: function (resolve, reject) {
1428
+ didAwaitActCall = !0;
1429
+ 0 === prevActScopeDepth
1430
+ ? ((ReactSharedInternals.actQueue = queue),
1431
+ enqueueTask(function () {
1432
+ return recursivelyFlushAsyncActWork(
1433
+ returnValue$jscomp$0,
1434
+ resolve,
1435
+ reject
1436
+ );
1437
+ }))
1438
+ : resolve(returnValue$jscomp$0);
1439
+ }
1440
+ };
1441
+ };
1442
+ exports.cache = function (fn) {
1443
+ return function () {
1444
+ return fn.apply(null, arguments);
1445
+ };
1446
+ };
1447
+ exports.captureOwnerStack = function () {
1448
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
1449
+ return null === getCurrentStack ? null : getCurrentStack();
1450
+ };
1451
+ exports.cloneElement = function (element, config, children) {
1452
+ if (null === element || void 0 === element)
1453
+ throw Error(
1454
+ "The argument must be a React element, but you passed " +
1455
+ element +
1456
+ "."
1457
+ );
1458
+ var props = assign({}, element.props),
1459
+ key = element.key,
1460
+ owner = element._owner;
1461
+ if (null != config) {
1462
+ var JSCompiler_inline_result;
1463
+ a: {
1464
+ if (
1465
+ hasOwnProperty.call(config, "ref") &&
1466
+ (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1467
+ config,
1468
+ "ref"
1469
+ ).get) &&
1470
+ JSCompiler_inline_result.isReactWarning
1471
+ ) {
1472
+ JSCompiler_inline_result = !1;
1473
+ break a;
2673
1474
  }
2674
- });
2675
- } catch (error) {
2676
- reject(error);
1475
+ JSCompiler_inline_result = void 0 !== config.ref;
1476
+ }
1477
+ JSCompiler_inline_result && (owner = getOwner());
1478
+ hasValidKey(config) &&
1479
+ (checkKeyStringCoercion(config.key), (key = "" + config.key));
1480
+ for (propName in config)
1481
+ !hasOwnProperty.call(config, propName) ||
1482
+ "key" === propName ||
1483
+ "__self" === propName ||
1484
+ "__source" === propName ||
1485
+ ("ref" === propName && void 0 === config.ref) ||
1486
+ (props[propName] = config[propName]);
2677
1487
  }
2678
- } else {
2679
- resolve(returnValue);
2680
- }
2681
- }
2682
- }
2683
-
2684
- var isFlushing = false;
2685
-
2686
- function flushActQueue(queue) {
2687
- {
2688
- if (!isFlushing) {
2689
- // Prevent re-entrance.
2690
- isFlushing = true;
2691
- var i = 0;
2692
-
2693
- try {
2694
- for (; i < queue.length; i++) {
2695
- var callback = queue[i];
2696
-
2697
- do {
2698
- callback = callback(true);
2699
- } while (callback !== null);
1488
+ var propName = arguments.length - 2;
1489
+ if (1 === propName) props.children = children;
1490
+ else if (1 < propName) {
1491
+ JSCompiler_inline_result = Array(propName);
1492
+ for (var i = 0; i < propName; i++)
1493
+ JSCompiler_inline_result[i] = arguments[i + 2];
1494
+ props.children = JSCompiler_inline_result;
1495
+ }
1496
+ props = ReactElement(
1497
+ element.type,
1498
+ key,
1499
+ void 0,
1500
+ void 0,
1501
+ owner,
1502
+ props,
1503
+ element._debugStack,
1504
+ element._debugTask
1505
+ );
1506
+ for (key = 2; key < arguments.length; key++)
1507
+ (owner = arguments[key]),
1508
+ isValidElement(owner) && owner._store && (owner._store.validated = 1);
1509
+ return props;
1510
+ };
1511
+ exports.createContext = function (defaultValue) {
1512
+ defaultValue = {
1513
+ $$typeof: REACT_CONTEXT_TYPE,
1514
+ _currentValue: defaultValue,
1515
+ _currentValue2: defaultValue,
1516
+ _threadCount: 0,
1517
+ Provider: null,
1518
+ Consumer: null
1519
+ };
1520
+ defaultValue.Provider = defaultValue;
1521
+ defaultValue.Consumer = {
1522
+ $$typeof: REACT_CONSUMER_TYPE,
1523
+ _context: defaultValue
1524
+ };
1525
+ defaultValue._currentRenderer = null;
1526
+ defaultValue._currentRenderer2 = null;
1527
+ return defaultValue;
1528
+ };
1529
+ exports.createElement = function (type, config, children) {
1530
+ for (var i = 2; i < arguments.length; i++) {
1531
+ var node = arguments[i];
1532
+ isValidElement(node) && node._store && (node._store.validated = 1);
1533
+ }
1534
+ i = {};
1535
+ node = null;
1536
+ if (null != config)
1537
+ for (propName in (didWarnAboutOldJSXRuntime ||
1538
+ !("__self" in config) ||
1539
+ "key" in config ||
1540
+ ((didWarnAboutOldJSXRuntime = !0),
1541
+ console.warn(
1542
+ "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"
1543
+ )),
1544
+ hasValidKey(config) &&
1545
+ (checkKeyStringCoercion(config.key), (node = "" + config.key)),
1546
+ config))
1547
+ hasOwnProperty.call(config, propName) &&
1548
+ "key" !== propName &&
1549
+ "__self" !== propName &&
1550
+ "__source" !== propName &&
1551
+ (i[propName] = config[propName]);
1552
+ var childrenLength = arguments.length - 2;
1553
+ if (1 === childrenLength) i.children = children;
1554
+ else if (1 < childrenLength) {
1555
+ for (
1556
+ var childArray = Array(childrenLength), _i = 0;
1557
+ _i < childrenLength;
1558
+ _i++
1559
+ )
1560
+ childArray[_i] = arguments[_i + 2];
1561
+ Object.freeze && Object.freeze(childArray);
1562
+ i.children = childArray;
1563
+ }
1564
+ if (type && type.defaultProps)
1565
+ for (propName in ((childrenLength = type.defaultProps), childrenLength))
1566
+ void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1567
+ node &&
1568
+ defineKeyPropWarningGetter(
1569
+ i,
1570
+ "function" === typeof type
1571
+ ? type.displayName || type.name || "Unknown"
1572
+ : type
1573
+ );
1574
+ var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1575
+ return ReactElement(
1576
+ type,
1577
+ node,
1578
+ void 0,
1579
+ void 0,
1580
+ getOwner(),
1581
+ i,
1582
+ propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1583
+ propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1584
+ );
1585
+ };
1586
+ exports.createRef = function () {
1587
+ var refObject = { current: null };
1588
+ Object.seal(refObject);
1589
+ return refObject;
1590
+ };
1591
+ exports.forwardRef = function (render) {
1592
+ null != render && render.$$typeof === REACT_MEMO_TYPE
1593
+ ? console.error(
1594
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1595
+ )
1596
+ : "function" !== typeof render
1597
+ ? console.error(
1598
+ "forwardRef requires a render function but was given %s.",
1599
+ null === render ? "null" : typeof render
1600
+ )
1601
+ : 0 !== render.length &&
1602
+ 2 !== render.length &&
1603
+ console.error(
1604
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
1605
+ 1 === render.length
1606
+ ? "Did you forget to use the ref parameter?"
1607
+ : "Any additional parameter will be undefined."
1608
+ );
1609
+ null != render &&
1610
+ null != render.defaultProps &&
1611
+ console.error(
1612
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1613
+ );
1614
+ var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
1615
+ ownName;
1616
+ Object.defineProperty(elementType, "displayName", {
1617
+ enumerable: !1,
1618
+ configurable: !0,
1619
+ get: function () {
1620
+ return ownName;
1621
+ },
1622
+ set: function (name) {
1623
+ ownName = name;
1624
+ render.name ||
1625
+ render.displayName ||
1626
+ (Object.defineProperty(render, "name", { value: name }),
1627
+ (render.displayName = name));
2700
1628
  }
2701
-
2702
- queue.length = 0;
1629
+ });
1630
+ return elementType;
1631
+ };
1632
+ exports.isValidElement = isValidElement;
1633
+ exports.lazy = function (ctor) {
1634
+ return {
1635
+ $$typeof: REACT_LAZY_TYPE,
1636
+ _payload: { _status: -1, _result: ctor },
1637
+ _init: lazyInitializer
1638
+ };
1639
+ };
1640
+ exports.memo = function (type, compare) {
1641
+ null == type &&
1642
+ console.error(
1643
+ "memo: The first argument must be a component. Instead received: %s",
1644
+ null === type ? "null" : typeof type
1645
+ );
1646
+ compare = {
1647
+ $$typeof: REACT_MEMO_TYPE,
1648
+ type: type,
1649
+ compare: void 0 === compare ? null : compare
1650
+ };
1651
+ var ownName;
1652
+ Object.defineProperty(compare, "displayName", {
1653
+ enumerable: !1,
1654
+ configurable: !0,
1655
+ get: function () {
1656
+ return ownName;
1657
+ },
1658
+ set: function (name) {
1659
+ ownName = name;
1660
+ type.name ||
1661
+ type.displayName ||
1662
+ (Object.defineProperty(type, "name", { value: name }),
1663
+ (type.displayName = name));
1664
+ }
1665
+ });
1666
+ return compare;
1667
+ };
1668
+ exports.startTransition = function (scope) {
1669
+ var prevTransition = ReactSharedInternals.T,
1670
+ currentTransition = {};
1671
+ ReactSharedInternals.T = currentTransition;
1672
+ currentTransition._updatedFibers = new Set();
1673
+ try {
1674
+ var returnValue = scope(),
1675
+ onStartTransitionFinish = ReactSharedInternals.S;
1676
+ null !== onStartTransitionFinish &&
1677
+ onStartTransitionFinish(currentTransition, returnValue);
1678
+ "object" === typeof returnValue &&
1679
+ null !== returnValue &&
1680
+ "function" === typeof returnValue.then &&
1681
+ returnValue.then(noop, reportGlobalError);
2703
1682
  } catch (error) {
2704
- // If something throws, leave the remaining callbacks on the queue.
2705
- queue = queue.slice(i + 1);
2706
- throw error;
1683
+ reportGlobalError(error);
2707
1684
  } finally {
2708
- isFlushing = false;
1685
+ null === prevTransition &&
1686
+ currentTransition._updatedFibers &&
1687
+ ((scope = currentTransition._updatedFibers.size),
1688
+ currentTransition._updatedFibers.clear(),
1689
+ 10 < scope &&
1690
+ console.warn(
1691
+ "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."
1692
+ )),
1693
+ (ReactSharedInternals.T = prevTransition);
2709
1694
  }
2710
- }
2711
- }
2712
- }
2713
-
2714
- var createElement$1 = createElementWithValidation ;
2715
- var cloneElement$1 = cloneElementWithValidation ;
2716
- var createFactory = createFactoryWithValidation ;
2717
- var Children = {
2718
- map: mapChildren,
2719
- forEach: forEachChildren,
2720
- count: countChildren,
2721
- toArray: toArray,
2722
- only: onlyChild
2723
- };
2724
-
2725
- exports.Children = Children;
2726
- exports.Component = Component;
2727
- exports.Fragment = REACT_FRAGMENT_TYPE;
2728
- exports.Profiler = REACT_PROFILER_TYPE;
2729
- exports.PureComponent = PureComponent;
2730
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
2731
- exports.Suspense = REACT_SUSPENSE_TYPE;
2732
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
2733
- exports.act = act;
2734
- exports.cloneElement = cloneElement$1;
2735
- exports.createContext = createContext;
2736
- exports.createElement = createElement$1;
2737
- exports.createFactory = createFactory;
2738
- exports.createRef = createRef;
2739
- exports.forwardRef = forwardRef;
2740
- exports.isValidElement = isValidElement;
2741
- exports.lazy = lazy;
2742
- exports.memo = memo;
2743
- exports.startTransition = startTransition;
2744
- exports.unstable_act = act;
2745
- exports.useCallback = useCallback;
2746
- exports.useContext = useContext;
2747
- exports.useDebugValue = useDebugValue;
2748
- exports.useDeferredValue = useDeferredValue;
2749
- exports.useEffect = useEffect;
2750
- exports.useId = useId;
2751
- exports.useImperativeHandle = useImperativeHandle;
2752
- exports.useInsertionEffect = useInsertionEffect;
2753
- exports.useLayoutEffect = useLayoutEffect;
2754
- exports.useMemo = useMemo;
2755
- exports.useReducer = useReducer;
2756
- exports.useRef = useRef;
2757
- exports.useState = useState;
2758
- exports.useSyncExternalStore = useSyncExternalStore;
2759
- exports.useTransition = useTransition;
2760
- exports.version = ReactVersion;
2761
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
2762
- if (
2763
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
2764
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
2765
- 'function'
2766
- ) {
2767
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
2768
- }
2769
-
1695
+ };
1696
+ exports.unstable_useCacheRefresh = function () {
1697
+ return resolveDispatcher().useCacheRefresh();
1698
+ };
1699
+ exports.use = function (usable) {
1700
+ return resolveDispatcher().use(usable);
1701
+ };
1702
+ exports.useActionState = function (action, initialState, permalink) {
1703
+ return resolveDispatcher().useActionState(
1704
+ action,
1705
+ initialState,
1706
+ permalink
1707
+ );
1708
+ };
1709
+ exports.useCallback = function (callback, deps) {
1710
+ return resolveDispatcher().useCallback(callback, deps);
1711
+ };
1712
+ exports.useContext = function (Context) {
1713
+ var dispatcher = resolveDispatcher();
1714
+ Context.$$typeof === REACT_CONSUMER_TYPE &&
1715
+ console.error(
1716
+ "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1717
+ );
1718
+ return dispatcher.useContext(Context);
1719
+ };
1720
+ exports.useDebugValue = function (value, formatterFn) {
1721
+ return resolveDispatcher().useDebugValue(value, formatterFn);
1722
+ };
1723
+ exports.useDeferredValue = function (value, initialValue) {
1724
+ return resolveDispatcher().useDeferredValue(value, initialValue);
1725
+ };
1726
+ exports.useEffect = function (create, createDeps, update) {
1727
+ null == create &&
1728
+ console.warn(
1729
+ "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1730
+ );
1731
+ var dispatcher = resolveDispatcher();
1732
+ if ("function" === typeof update)
1733
+ throw Error(
1734
+ "useEffect CRUD overload is not enabled in this build of React."
1735
+ );
1736
+ return dispatcher.useEffect(create, createDeps);
1737
+ };
1738
+ exports.useId = function () {
1739
+ return resolveDispatcher().useId();
1740
+ };
1741
+ exports.useImperativeHandle = function (ref, create, deps) {
1742
+ return resolveDispatcher().useImperativeHandle(ref, create, deps);
1743
+ };
1744
+ exports.useInsertionEffect = function (create, deps) {
1745
+ null == create &&
1746
+ console.warn(
1747
+ "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1748
+ );
1749
+ return resolveDispatcher().useInsertionEffect(create, deps);
1750
+ };
1751
+ exports.useLayoutEffect = function (create, deps) {
1752
+ null == create &&
1753
+ console.warn(
1754
+ "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1755
+ );
1756
+ return resolveDispatcher().useLayoutEffect(create, deps);
1757
+ };
1758
+ exports.useMemo = function (create, deps) {
1759
+ return resolveDispatcher().useMemo(create, deps);
1760
+ };
1761
+ exports.useOptimistic = function (passthrough, reducer) {
1762
+ return resolveDispatcher().useOptimistic(passthrough, reducer);
1763
+ };
1764
+ exports.useReducer = function (reducer, initialArg, init) {
1765
+ return resolveDispatcher().useReducer(reducer, initialArg, init);
1766
+ };
1767
+ exports.useRef = function (initialValue) {
1768
+ return resolveDispatcher().useRef(initialValue);
1769
+ };
1770
+ exports.useState = function (initialState) {
1771
+ return resolveDispatcher().useState(initialState);
1772
+ };
1773
+ exports.useSyncExternalStore = function (
1774
+ subscribe,
1775
+ getSnapshot,
1776
+ getServerSnapshot
1777
+ ) {
1778
+ return resolveDispatcher().useSyncExternalStore(
1779
+ subscribe,
1780
+ getSnapshot,
1781
+ getServerSnapshot
1782
+ );
1783
+ };
1784
+ exports.useTransition = function () {
1785
+ return resolveDispatcher().useTransition();
1786
+ };
1787
+ exports.version = "19.1.0";
1788
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1789
+ "function" ===
1790
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
1791
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2770
1792
  })();
2771
- }
2772
1793
  }(react_development, react_development.exports));
2773
1794
 
2774
1795
  if (process.env.NODE_ENV === 'production') {
2775
- react.exports = react_production_min;
1796
+ react.exports = react_production;
2776
1797
  } else {
2777
1798
  react.exports = react_development.exports;
2778
1799
  }