@sparkstudio/authentication-ui 1.0.4 → 1.0.5

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/index.js CHANGED
@@ -1,3120 +1,5 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
26
-
27
- // node_modules/react/cjs/react.production.min.js
28
- var require_react_production_min = __commonJS({
29
- "node_modules/react/cjs/react.production.min.js"(exports) {
30
- "use strict";
31
- var l = /* @__PURE__ */ Symbol.for("react.element");
32
- var n = /* @__PURE__ */ Symbol.for("react.portal");
33
- var p = /* @__PURE__ */ Symbol.for("react.fragment");
34
- var q = /* @__PURE__ */ Symbol.for("react.strict_mode");
35
- var r = /* @__PURE__ */ Symbol.for("react.profiler");
36
- var t = /* @__PURE__ */ Symbol.for("react.provider");
37
- var u = /* @__PURE__ */ Symbol.for("react.context");
38
- var v = /* @__PURE__ */ Symbol.for("react.forward_ref");
39
- var w = /* @__PURE__ */ Symbol.for("react.suspense");
40
- var x = /* @__PURE__ */ Symbol.for("react.memo");
41
- var y = /* @__PURE__ */ Symbol.for("react.lazy");
42
- var z = Symbol.iterator;
43
- function A(a) {
44
- if (null === a || "object" !== typeof a) return null;
45
- a = z && a[z] || a["@@iterator"];
46
- return "function" === typeof a ? a : null;
47
- }
48
- var B = { isMounted: function() {
49
- return false;
50
- }, enqueueForceUpdate: function() {
51
- }, enqueueReplaceState: function() {
52
- }, enqueueSetState: function() {
53
- } };
54
- var C = Object.assign;
55
- var D = {};
56
- function E(a, b, e) {
57
- this.props = a;
58
- this.context = b;
59
- this.refs = D;
60
- this.updater = e || B;
61
- }
62
- E.prototype.isReactComponent = {};
63
- E.prototype.setState = function(a, b) {
64
- 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.");
65
- this.updater.enqueueSetState(this, a, b, "setState");
66
- };
67
- E.prototype.forceUpdate = function(a) {
68
- this.updater.enqueueForceUpdate(this, a, "forceUpdate");
69
- };
70
- function F() {
71
- }
72
- F.prototype = E.prototype;
73
- function G(a, b, e) {
74
- this.props = a;
75
- this.context = b;
76
- this.refs = D;
77
- this.updater = e || B;
78
- }
79
- var H = G.prototype = new F();
80
- H.constructor = G;
81
- C(H, E.prototype);
82
- H.isPureReactComponent = true;
83
- var I = Array.isArray;
84
- var J = Object.prototype.hasOwnProperty;
85
- var K = { current: null };
86
- var L = { key: true, ref: true, __self: true, __source: true };
87
- function M(a, b, e) {
88
- var d, c = {}, k = null, h = null;
89
- 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]);
90
- var g = arguments.length - 2;
91
- if (1 === g) c.children = e;
92
- else if (1 < g) {
93
- for (var f = Array(g), m = 0; m < g; m++) f[m] = arguments[m + 2];
94
- c.children = f;
95
- }
96
- if (a && a.defaultProps) for (d in g = a.defaultProps, g) void 0 === c[d] && (c[d] = g[d]);
97
- return { $$typeof: l, type: a, key: k, ref: h, props: c, _owner: K.current };
98
- }
99
- function N(a, b) {
100
- return { $$typeof: l, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner };
101
- }
102
- function O(a) {
103
- return "object" === typeof a && null !== a && a.$$typeof === l;
104
- }
105
- function escape(a) {
106
- var b = { "=": "=0", ":": "=2" };
107
- return "$" + a.replace(/[=:]/g, function(a2) {
108
- return b[a2];
109
- });
110
- }
111
- var P = /\/+/g;
112
- function Q(a, b) {
113
- return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
114
- }
115
- function R(a, b, e, d, c) {
116
- var k = typeof a;
117
- if ("undefined" === k || "boolean" === k) a = null;
118
- var h = false;
119
- if (null === a) h = true;
120
- else switch (k) {
121
- case "string":
122
- case "number":
123
- h = true;
124
- break;
125
- case "object":
126
- switch (a.$$typeof) {
127
- case l:
128
- case n:
129
- h = true;
130
- }
131
- }
132
- 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(a2) {
133
- return a2;
134
- })) : null != c && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
135
- h = 0;
136
- d = "" === d ? "." : d + ":";
137
- if (I(a)) for (var g = 0; g < a.length; g++) {
138
- k = a[g];
139
- var f = d + Q(k, g);
140
- h += R(k, b, e, f, c);
141
- }
142
- 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);
143
- 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.");
144
- return h;
145
- }
146
- function S(a, b, e) {
147
- if (null == a) return a;
148
- var d = [], c = 0;
149
- R(a, d, "", "", function(a2) {
150
- return b.call(e, a2, c++);
151
- });
152
- return d;
153
- }
154
- function T(a) {
155
- if (-1 === a._status) {
156
- var b = a._result;
157
- b = b();
158
- b.then(function(b2) {
159
- if (0 === a._status || -1 === a._status) a._status = 1, a._result = b2;
160
- }, function(b2) {
161
- if (0 === a._status || -1 === a._status) a._status = 2, a._result = b2;
162
- });
163
- -1 === a._status && (a._status = 0, a._result = b);
164
- }
165
- if (1 === a._status) return a._result.default;
166
- throw a._result;
167
- }
168
- var U = { current: null };
169
- var V = { transition: null };
170
- var W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K };
171
- function X() {
172
- throw Error("act(...) is not supported in production builds of React.");
173
- }
174
- exports.Children = { map: S, forEach: function(a, b, e) {
175
- S(a, function() {
176
- b.apply(this, arguments);
177
- }, e);
178
- }, count: function(a) {
179
- var b = 0;
180
- S(a, function() {
181
- b++;
182
- });
183
- return b;
184
- }, toArray: function(a) {
185
- return S(a, function(a2) {
186
- return a2;
187
- }) || [];
188
- }, only: function(a) {
189
- if (!O(a)) throw Error("React.Children.only expected to receive a single React element child.");
190
- return a;
191
- } };
192
- exports.Component = E;
193
- exports.Fragment = p;
194
- exports.Profiler = r;
195
- exports.PureComponent = G;
196
- exports.StrictMode = q;
197
- exports.Suspense = w;
198
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
199
- exports.act = X;
200
- exports.cloneElement = function(a, b, e) {
201
- if (null === a || void 0 === a) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
202
- var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner;
203
- if (null != b) {
204
- void 0 !== b.ref && (k = b.ref, h = K.current);
205
- void 0 !== b.key && (c = "" + b.key);
206
- if (a.type && a.type.defaultProps) var g = a.type.defaultProps;
207
- for (f in b) J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);
208
- }
209
- var f = arguments.length - 2;
210
- if (1 === f) d.children = e;
211
- else if (1 < f) {
212
- g = Array(f);
213
- for (var m = 0; m < f; m++) g[m] = arguments[m + 2];
214
- d.children = g;
215
- }
216
- return { $$typeof: l, type: a.type, key: c, ref: k, props: d, _owner: h };
217
- };
218
- exports.createContext = function(a) {
219
- a = { $$typeof: u, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null };
220
- a.Provider = { $$typeof: t, _context: a };
221
- return a.Consumer = a;
222
- };
223
- exports.createElement = M;
224
- exports.createFactory = function(a) {
225
- var b = M.bind(null, a);
226
- b.type = a;
227
- return b;
228
- };
229
- exports.createRef = function() {
230
- return { current: null };
231
- };
232
- exports.forwardRef = function(a) {
233
- return { $$typeof: v, render: a };
234
- };
235
- exports.isValidElement = O;
236
- exports.lazy = function(a) {
237
- return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T };
238
- };
239
- exports.memo = function(a, b) {
240
- return { $$typeof: x, type: a, compare: void 0 === b ? null : b };
241
- };
242
- exports.startTransition = function(a) {
243
- var b = V.transition;
244
- V.transition = {};
245
- try {
246
- a();
247
- } finally {
248
- V.transition = b;
249
- }
250
- };
251
- exports.unstable_act = X;
252
- exports.useCallback = function(a, b) {
253
- return U.current.useCallback(a, b);
254
- };
255
- exports.useContext = function(a) {
256
- return U.current.useContext(a);
257
- };
258
- exports.useDebugValue = function() {
259
- };
260
- exports.useDeferredValue = function(a) {
261
- return U.current.useDeferredValue(a);
262
- };
263
- exports.useEffect = function(a, b) {
264
- return U.current.useEffect(a, b);
265
- };
266
- exports.useId = function() {
267
- return U.current.useId();
268
- };
269
- exports.useImperativeHandle = function(a, b, e) {
270
- return U.current.useImperativeHandle(a, b, e);
271
- };
272
- exports.useInsertionEffect = function(a, b) {
273
- return U.current.useInsertionEffect(a, b);
274
- };
275
- exports.useLayoutEffect = function(a, b) {
276
- return U.current.useLayoutEffect(a, b);
277
- };
278
- exports.useMemo = function(a, b) {
279
- return U.current.useMemo(a, b);
280
- };
281
- exports.useReducer = function(a, b, e) {
282
- return U.current.useReducer(a, b, e);
283
- };
284
- exports.useRef = function(a) {
285
- return U.current.useRef(a);
286
- };
287
- exports.useState = function(a) {
288
- return U.current.useState(a);
289
- };
290
- exports.useSyncExternalStore = function(a, b, e) {
291
- return U.current.useSyncExternalStore(a, b, e);
292
- };
293
- exports.useTransition = function() {
294
- return U.current.useTransition();
295
- };
296
- exports.version = "18.3.1";
297
- }
298
- });
299
-
300
- // node_modules/react/cjs/react.development.js
301
- var require_react_development = __commonJS({
302
- "node_modules/react/cjs/react.development.js"(exports, module) {
303
- "use strict";
304
- if (process.env.NODE_ENV !== "production") {
305
- (function() {
306
- "use strict";
307
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
308
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
309
- }
310
- var ReactVersion = "18.3.1";
311
- var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
312
- var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
313
- var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
314
- var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
315
- var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
316
- var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
317
- var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
318
- var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
319
- var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
320
- var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
321
- var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
322
- var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
323
- var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
324
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
325
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
326
- function getIteratorFn(maybeIterable) {
327
- if (maybeIterable === null || typeof maybeIterable !== "object") {
328
- return null;
329
- }
330
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
331
- if (typeof maybeIterator === "function") {
332
- return maybeIterator;
333
- }
334
- return null;
335
- }
336
- var ReactCurrentDispatcher = {
337
- /**
338
- * @internal
339
- * @type {ReactComponent}
340
- */
341
- current: null
342
- };
343
- var ReactCurrentBatchConfig = {
344
- transition: null
345
- };
346
- var ReactCurrentActQueue = {
347
- current: null,
348
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
349
- isBatchingLegacy: false,
350
- didScheduleLegacyUpdate: false
351
- };
352
- var ReactCurrentOwner = {
353
- /**
354
- * @internal
355
- * @type {ReactComponent}
356
- */
357
- current: null
358
- };
359
- var ReactDebugCurrentFrame = {};
360
- var currentExtraStackFrame = null;
361
- function setExtraStackFrame(stack) {
362
- {
363
- currentExtraStackFrame = stack;
364
- }
365
- }
366
- {
367
- ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
368
- {
369
- currentExtraStackFrame = stack;
370
- }
371
- };
372
- ReactDebugCurrentFrame.getCurrentStack = null;
373
- ReactDebugCurrentFrame.getStackAddendum = function() {
374
- var stack = "";
375
- if (currentExtraStackFrame) {
376
- stack += currentExtraStackFrame;
377
- }
378
- var impl = ReactDebugCurrentFrame.getCurrentStack;
379
- if (impl) {
380
- stack += impl() || "";
381
- }
382
- return stack;
383
- };
384
- }
385
- var enableScopeAPI = false;
386
- var enableCacheElement = false;
387
- var enableTransitionTracing = false;
388
- var enableLegacyHidden = false;
389
- var enableDebugTracing = false;
390
- var ReactSharedInternals = {
391
- ReactCurrentDispatcher,
392
- ReactCurrentBatchConfig,
393
- ReactCurrentOwner
394
- };
395
- {
396
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
397
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
398
- }
399
- function warn(format) {
400
- {
401
- {
402
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
403
- args[_key - 1] = arguments[_key];
404
- }
405
- printWarning("warn", format, args);
406
- }
407
- }
408
- }
409
- function error(format) {
410
- {
411
- {
412
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
413
- args[_key2 - 1] = arguments[_key2];
414
- }
415
- printWarning("error", format, args);
416
- }
417
- }
418
- }
419
- function printWarning(level, format, args) {
420
- {
421
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
422
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
423
- if (stack !== "") {
424
- format += "%s";
425
- args = args.concat([stack]);
426
- }
427
- var argsWithFormat = args.map(function(item) {
428
- return String(item);
429
- });
430
- argsWithFormat.unshift("Warning: " + format);
431
- Function.prototype.apply.call(console[level], console, argsWithFormat);
432
- }
433
- }
434
- var didWarnStateUpdateForUnmountedComponent = {};
435
- function warnNoop(publicInstance, callerName) {
436
- {
437
- var _constructor = publicInstance.constructor;
438
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
439
- var warningKey = componentName + "." + callerName;
440
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
441
- return;
442
- }
443
- 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);
444
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
445
- }
446
- }
447
- var ReactNoopUpdateQueue = {
448
- /**
449
- * Checks whether or not this composite component is mounted.
450
- * @param {ReactClass} publicInstance The instance we want to test.
451
- * @return {boolean} True if mounted, false otherwise.
452
- * @protected
453
- * @final
454
- */
455
- isMounted: function(publicInstance) {
456
- return false;
457
- },
458
- /**
459
- * Forces an update. This should only be invoked when it is known with
460
- * certainty that we are **not** in a DOM transaction.
461
- *
462
- * You may want to call this when you know that some deeper aspect of the
463
- * component's state has changed but `setState` was not called.
464
- *
465
- * This will not invoke `shouldComponentUpdate`, but it will invoke
466
- * `componentWillUpdate` and `componentDidUpdate`.
467
- *
468
- * @param {ReactClass} publicInstance The instance that should rerender.
469
- * @param {?function} callback Called after component is updated.
470
- * @param {?string} callerName name of the calling function in the public API.
471
- * @internal
472
- */
473
- enqueueForceUpdate: function(publicInstance, callback, callerName) {
474
- warnNoop(publicInstance, "forceUpdate");
475
- },
476
- /**
477
- * Replaces all of the state. Always use this or `setState` to mutate state.
478
- * You should treat `this.state` as immutable.
479
- *
480
- * There is no guarantee that `this.state` will be immediately updated, so
481
- * accessing `this.state` after calling this method may return the old value.
482
- *
483
- * @param {ReactClass} publicInstance The instance that should rerender.
484
- * @param {object} completeState Next state.
485
- * @param {?function} callback Called after component is updated.
486
- * @param {?string} callerName name of the calling function in the public API.
487
- * @internal
488
- */
489
- enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
490
- warnNoop(publicInstance, "replaceState");
491
- },
492
- /**
493
- * Sets a subset of the state. This only exists because _pendingState is
494
- * internal. This provides a merging strategy that is not available to deep
495
- * properties which is confusing. TODO: Expose pendingState or don't use it
496
- * during the merge.
497
- *
498
- * @param {ReactClass} publicInstance The instance that should rerender.
499
- * @param {object} partialState Next partial state to be merged with state.
500
- * @param {?function} callback Called after component is updated.
501
- * @param {?string} Name of the calling function in the public API.
502
- * @internal
503
- */
504
- enqueueSetState: function(publicInstance, partialState, callback, callerName) {
505
- warnNoop(publicInstance, "setState");
506
- }
507
- };
508
- var assign = Object.assign;
509
- var emptyObject = {};
510
- {
511
- Object.freeze(emptyObject);
512
- }
513
- function Component(props, context, updater) {
514
- this.props = props;
515
- this.context = context;
516
- this.refs = emptyObject;
517
- this.updater = updater || ReactNoopUpdateQueue;
518
- }
519
- Component.prototype.isReactComponent = {};
520
- Component.prototype.setState = function(partialState, callback) {
521
- if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
522
- throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
523
- }
524
- this.updater.enqueueSetState(this, partialState, callback, "setState");
525
- };
526
- Component.prototype.forceUpdate = function(callback) {
527
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
528
- };
529
- {
530
- var deprecatedAPIs = {
531
- isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
532
- replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
533
- };
534
- var defineDeprecationWarning = function(methodName, info) {
535
- Object.defineProperty(Component.prototype, methodName, {
536
- get: function() {
537
- warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
538
- return void 0;
539
- }
540
- });
541
- };
542
- for (var fnName in deprecatedAPIs) {
543
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
544
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
545
- }
546
- }
547
- }
548
- function ComponentDummy() {
549
- }
550
- ComponentDummy.prototype = Component.prototype;
551
- function PureComponent(props, context, updater) {
552
- this.props = props;
553
- this.context = context;
554
- this.refs = emptyObject;
555
- this.updater = updater || ReactNoopUpdateQueue;
556
- }
557
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
558
- pureComponentPrototype.constructor = PureComponent;
559
- assign(pureComponentPrototype, Component.prototype);
560
- pureComponentPrototype.isPureReactComponent = true;
561
- function createRef() {
562
- var refObject = {
563
- current: null
564
- };
565
- {
566
- Object.seal(refObject);
567
- }
568
- return refObject;
569
- }
570
- var isArrayImpl = Array.isArray;
571
- function isArray(a) {
572
- return isArrayImpl(a);
573
- }
574
- function typeName(value) {
575
- {
576
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
577
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
578
- return type;
579
- }
580
- }
581
- function willCoercionThrow(value) {
582
- {
583
- try {
584
- testStringCoercion(value);
585
- return false;
586
- } catch (e) {
587
- return true;
588
- }
589
- }
590
- }
591
- function testStringCoercion(value) {
592
- return "" + value;
593
- }
594
- function checkKeyStringCoercion(value) {
595
- {
596
- if (willCoercionThrow(value)) {
597
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
598
- return testStringCoercion(value);
599
- }
600
- }
601
- }
602
- function getWrappedName(outerType, innerType, wrapperName) {
603
- var displayName = outerType.displayName;
604
- if (displayName) {
605
- return displayName;
606
- }
607
- var functionName = innerType.displayName || innerType.name || "";
608
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
609
- }
610
- function getContextName(type) {
611
- return type.displayName || "Context";
612
- }
613
- function getComponentNameFromType(type) {
614
- if (type == null) {
615
- return null;
616
- }
617
- {
618
- if (typeof type.tag === "number") {
619
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
620
- }
621
- }
622
- if (typeof type === "function") {
623
- return type.displayName || type.name || null;
624
- }
625
- if (typeof type === "string") {
626
- return type;
627
- }
628
- switch (type) {
629
- case REACT_FRAGMENT_TYPE:
630
- return "Fragment";
631
- case REACT_PORTAL_TYPE:
632
- return "Portal";
633
- case REACT_PROFILER_TYPE:
634
- return "Profiler";
635
- case REACT_STRICT_MODE_TYPE:
636
- return "StrictMode";
637
- case REACT_SUSPENSE_TYPE:
638
- return "Suspense";
639
- case REACT_SUSPENSE_LIST_TYPE:
640
- return "SuspenseList";
641
- }
642
- if (typeof type === "object") {
643
- switch (type.$$typeof) {
644
- case REACT_CONTEXT_TYPE:
645
- var context = type;
646
- return getContextName(context) + ".Consumer";
647
- case REACT_PROVIDER_TYPE:
648
- var provider = type;
649
- return getContextName(provider._context) + ".Provider";
650
- case REACT_FORWARD_REF_TYPE:
651
- return getWrappedName(type, type.render, "ForwardRef");
652
- case REACT_MEMO_TYPE:
653
- var outerName = type.displayName || null;
654
- if (outerName !== null) {
655
- return outerName;
656
- }
657
- return getComponentNameFromType(type.type) || "Memo";
658
- case REACT_LAZY_TYPE: {
659
- var lazyComponent = type;
660
- var payload = lazyComponent._payload;
661
- var init = lazyComponent._init;
662
- try {
663
- return getComponentNameFromType(init(payload));
664
- } catch (x) {
665
- return null;
666
- }
667
- }
668
- }
669
- }
670
- return null;
671
- }
672
- var hasOwnProperty = Object.prototype.hasOwnProperty;
673
- var RESERVED_PROPS = {
674
- key: true,
675
- ref: true,
676
- __self: true,
677
- __source: true
678
- };
679
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
680
- {
681
- didWarnAboutStringRefs = {};
682
- }
683
- function hasValidRef(config) {
684
- {
685
- if (hasOwnProperty.call(config, "ref")) {
686
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
687
- if (getter && getter.isReactWarning) {
688
- return false;
689
- }
690
- }
691
- }
692
- return config.ref !== void 0;
693
- }
694
- function hasValidKey(config) {
695
- {
696
- if (hasOwnProperty.call(config, "key")) {
697
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
698
- if (getter && getter.isReactWarning) {
699
- return false;
700
- }
701
- }
702
- }
703
- return config.key !== void 0;
704
- }
705
- function defineKeyPropWarningGetter(props, displayName) {
706
- var warnAboutAccessingKey = function() {
707
- {
708
- if (!specialPropKeyWarningShown) {
709
- specialPropKeyWarningShown = true;
710
- 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);
711
- }
712
- }
713
- };
714
- warnAboutAccessingKey.isReactWarning = true;
715
- Object.defineProperty(props, "key", {
716
- get: warnAboutAccessingKey,
717
- configurable: true
718
- });
719
- }
720
- function defineRefPropWarningGetter(props, displayName) {
721
- var warnAboutAccessingRef = function() {
722
- {
723
- if (!specialPropRefWarningShown) {
724
- specialPropRefWarningShown = true;
725
- 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);
726
- }
727
- }
728
- };
729
- warnAboutAccessingRef.isReactWarning = true;
730
- Object.defineProperty(props, "ref", {
731
- get: warnAboutAccessingRef,
732
- configurable: true
733
- });
734
- }
735
- function warnIfStringRefCannotBeAutoConverted(config) {
736
- {
737
- if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
738
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
739
- if (!didWarnAboutStringRefs[componentName]) {
740
- 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);
741
- didWarnAboutStringRefs[componentName] = true;
742
- }
743
- }
744
- }
745
- }
746
- var ReactElement = function(type, key, ref, self, source, owner, props) {
747
- var element = {
748
- // This tag allows us to uniquely identify this as a React Element
749
- $$typeof: REACT_ELEMENT_TYPE,
750
- // Built-in properties that belong on the element
751
- type,
752
- key,
753
- ref,
754
- props,
755
- // Record the component responsible for creating this element.
756
- _owner: owner
757
- };
758
- {
759
- element._store = {};
760
- Object.defineProperty(element._store, "validated", {
761
- configurable: false,
762
- enumerable: false,
763
- writable: true,
764
- value: false
765
- });
766
- Object.defineProperty(element, "_self", {
767
- configurable: false,
768
- enumerable: false,
769
- writable: false,
770
- value: self
771
- });
772
- Object.defineProperty(element, "_source", {
773
- configurable: false,
774
- enumerable: false,
775
- writable: false,
776
- value: source
777
- });
778
- if (Object.freeze) {
779
- Object.freeze(element.props);
780
- Object.freeze(element);
781
- }
782
- }
783
- return element;
784
- };
785
- function createElement(type, config, children) {
786
- var propName;
787
- var props = {};
788
- var key = null;
789
- var ref = null;
790
- var self = null;
791
- var source = null;
792
- if (config != null) {
793
- if (hasValidRef(config)) {
794
- ref = config.ref;
795
- {
796
- warnIfStringRefCannotBeAutoConverted(config);
797
- }
798
- }
799
- if (hasValidKey(config)) {
800
- {
801
- checkKeyStringCoercion(config.key);
802
- }
803
- key = "" + config.key;
804
- }
805
- self = config.__self === void 0 ? null : config.__self;
806
- source = config.__source === void 0 ? null : config.__source;
807
- for (propName in config) {
808
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
809
- props[propName] = config[propName];
810
- }
811
- }
812
- }
813
- var childrenLength = arguments.length - 2;
814
- if (childrenLength === 1) {
815
- props.children = children;
816
- } else if (childrenLength > 1) {
817
- var childArray = Array(childrenLength);
818
- for (var i = 0; i < childrenLength; i++) {
819
- childArray[i] = arguments[i + 2];
820
- }
821
- {
822
- if (Object.freeze) {
823
- Object.freeze(childArray);
824
- }
825
- }
826
- props.children = childArray;
827
- }
828
- if (type && type.defaultProps) {
829
- var defaultProps = type.defaultProps;
830
- for (propName in defaultProps) {
831
- if (props[propName] === void 0) {
832
- props[propName] = defaultProps[propName];
833
- }
834
- }
835
- }
836
- {
837
- if (key || ref) {
838
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
839
- if (key) {
840
- defineKeyPropWarningGetter(props, displayName);
841
- }
842
- if (ref) {
843
- defineRefPropWarningGetter(props, displayName);
844
- }
845
- }
846
- }
847
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
848
- }
849
- function cloneAndReplaceKey(oldElement, newKey) {
850
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
851
- return newElement;
852
- }
853
- function cloneElement(element, config, children) {
854
- if (element === null || element === void 0) {
855
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
856
- }
857
- var propName;
858
- var props = assign({}, element.props);
859
- var key = element.key;
860
- var ref = element.ref;
861
- var self = element._self;
862
- var source = element._source;
863
- var owner = element._owner;
864
- if (config != null) {
865
- if (hasValidRef(config)) {
866
- ref = config.ref;
867
- owner = ReactCurrentOwner.current;
868
- }
869
- if (hasValidKey(config)) {
870
- {
871
- checkKeyStringCoercion(config.key);
872
- }
873
- key = "" + config.key;
874
- }
875
- var defaultProps;
876
- if (element.type && element.type.defaultProps) {
877
- defaultProps = element.type.defaultProps;
878
- }
879
- for (propName in config) {
880
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
881
- if (config[propName] === void 0 && defaultProps !== void 0) {
882
- props[propName] = defaultProps[propName];
883
- } else {
884
- props[propName] = config[propName];
885
- }
886
- }
887
- }
888
- }
889
- var childrenLength = arguments.length - 2;
890
- if (childrenLength === 1) {
891
- props.children = children;
892
- } else if (childrenLength > 1) {
893
- var childArray = Array(childrenLength);
894
- for (var i = 0; i < childrenLength; i++) {
895
- childArray[i] = arguments[i + 2];
896
- }
897
- props.children = childArray;
898
- }
899
- return ReactElement(element.type, key, ref, self, source, owner, props);
900
- }
901
- function isValidElement(object) {
902
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
903
- }
904
- var SEPARATOR = ".";
905
- var SUBSEPARATOR = ":";
906
- function escape(key) {
907
- var escapeRegex = /[=:]/g;
908
- var escaperLookup = {
909
- "=": "=0",
910
- ":": "=2"
911
- };
912
- var escapedString = key.replace(escapeRegex, function(match) {
913
- return escaperLookup[match];
914
- });
915
- return "$" + escapedString;
916
- }
917
- var didWarnAboutMaps = false;
918
- var userProvidedKeyEscapeRegex = /\/+/g;
919
- function escapeUserProvidedKey(text) {
920
- return text.replace(userProvidedKeyEscapeRegex, "$&/");
921
- }
922
- function getElementKey(element, index) {
923
- if (typeof element === "object" && element !== null && element.key != null) {
924
- {
925
- checkKeyStringCoercion(element.key);
926
- }
927
- return escape("" + element.key);
928
- }
929
- return index.toString(36);
930
- }
931
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
932
- var type = typeof children;
933
- if (type === "undefined" || type === "boolean") {
934
- children = null;
935
- }
936
- var invokeCallback = false;
937
- if (children === null) {
938
- invokeCallback = true;
939
- } else {
940
- switch (type) {
941
- case "string":
942
- case "number":
943
- invokeCallback = true;
944
- break;
945
- case "object":
946
- switch (children.$$typeof) {
947
- case REACT_ELEMENT_TYPE:
948
- case REACT_PORTAL_TYPE:
949
- invokeCallback = true;
950
- }
951
- }
952
- }
953
- if (invokeCallback) {
954
- var _child = children;
955
- var mappedChild = callback(_child);
956
- var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
957
- if (isArray(mappedChild)) {
958
- var escapedChildKey = "";
959
- if (childKey != null) {
960
- escapedChildKey = escapeUserProvidedKey(childKey) + "/";
961
- }
962
- mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
963
- return c;
964
- });
965
- } else if (mappedChild != null) {
966
- if (isValidElement(mappedChild)) {
967
- {
968
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
969
- checkKeyStringCoercion(mappedChild.key);
970
- }
971
- }
972
- mappedChild = cloneAndReplaceKey(
973
- mappedChild,
974
- // Keep both the (mapped) and old keys if they differ, just as
975
- // traverseAllChildren used to do for objects as children
976
- escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
977
- (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
978
- // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
979
- // eslint-disable-next-line react-internal/safe-string-coercion
980
- escapeUserProvidedKey("" + mappedChild.key) + "/"
981
- ) : "") + childKey
982
- );
983
- }
984
- array.push(mappedChild);
985
- }
986
- return 1;
987
- }
988
- var child;
989
- var nextName;
990
- var subtreeCount = 0;
991
- var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
992
- if (isArray(children)) {
993
- for (var i = 0; i < children.length; i++) {
994
- child = children[i];
995
- nextName = nextNamePrefix + getElementKey(child, i);
996
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
997
- }
998
- } else {
999
- var iteratorFn = getIteratorFn(children);
1000
- if (typeof iteratorFn === "function") {
1001
- var iterableChildren = children;
1002
- {
1003
- if (iteratorFn === iterableChildren.entries) {
1004
- if (!didWarnAboutMaps) {
1005
- warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
1006
- }
1007
- didWarnAboutMaps = true;
1008
- }
1009
- }
1010
- var iterator = iteratorFn.call(iterableChildren);
1011
- var step;
1012
- var ii = 0;
1013
- while (!(step = iterator.next()).done) {
1014
- child = step.value;
1015
- nextName = nextNamePrefix + getElementKey(child, ii++);
1016
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
1017
- }
1018
- } else if (type === "object") {
1019
- var childrenString = String(children);
1020
- 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.");
1021
- }
1022
- }
1023
- return subtreeCount;
1024
- }
1025
- function mapChildren(children, func, context) {
1026
- if (children == null) {
1027
- return children;
1028
- }
1029
- var result = [];
1030
- var count = 0;
1031
- mapIntoArray(children, result, "", "", function(child) {
1032
- return func.call(context, child, count++);
1033
- });
1034
- return result;
1035
- }
1036
- function countChildren(children) {
1037
- var n = 0;
1038
- mapChildren(children, function() {
1039
- n++;
1040
- });
1041
- return n;
1042
- }
1043
- function forEachChildren(children, forEachFunc, forEachContext) {
1044
- mapChildren(children, function() {
1045
- forEachFunc.apply(this, arguments);
1046
- }, forEachContext);
1047
- }
1048
- function toArray(children) {
1049
- return mapChildren(children, function(child) {
1050
- return child;
1051
- }) || [];
1052
- }
1053
- function onlyChild(children) {
1054
- if (!isValidElement(children)) {
1055
- throw new Error("React.Children.only expected to receive a single React element child.");
1056
- }
1057
- return children;
1058
- }
1059
- function createContext2(defaultValue) {
1060
- var context = {
1061
- $$typeof: REACT_CONTEXT_TYPE,
1062
- // As a workaround to support multiple concurrent renderers, we categorize
1063
- // some renderers as primary and others as secondary. We only expect
1064
- // there to be two concurrent renderers at most: React Native (primary) and
1065
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
1066
- // Secondary renderers store their context values on separate fields.
1067
- _currentValue: defaultValue,
1068
- _currentValue2: defaultValue,
1069
- // Used to track how many concurrent renderers this context currently
1070
- // supports within in a single renderer. Such as parallel server rendering.
1071
- _threadCount: 0,
1072
- // These are circular
1073
- Provider: null,
1074
- Consumer: null,
1075
- // Add these to use same hidden class in VM as ServerContext
1076
- _defaultValue: null,
1077
- _globalName: null
1078
- };
1079
- context.Provider = {
1080
- $$typeof: REACT_PROVIDER_TYPE,
1081
- _context: context
1082
- };
1083
- var hasWarnedAboutUsingNestedContextConsumers = false;
1084
- var hasWarnedAboutUsingConsumerProvider = false;
1085
- var hasWarnedAboutDisplayNameOnConsumer = false;
1086
- {
1087
- var Consumer = {
1088
- $$typeof: REACT_CONTEXT_TYPE,
1089
- _context: context
1090
- };
1091
- Object.defineProperties(Consumer, {
1092
- Provider: {
1093
- get: function() {
1094
- if (!hasWarnedAboutUsingConsumerProvider) {
1095
- hasWarnedAboutUsingConsumerProvider = true;
1096
- 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?");
1097
- }
1098
- return context.Provider;
1099
- },
1100
- set: function(_Provider) {
1101
- context.Provider = _Provider;
1102
- }
1103
- },
1104
- _currentValue: {
1105
- get: function() {
1106
- return context._currentValue;
1107
- },
1108
- set: function(_currentValue) {
1109
- context._currentValue = _currentValue;
1110
- }
1111
- },
1112
- _currentValue2: {
1113
- get: function() {
1114
- return context._currentValue2;
1115
- },
1116
- set: function(_currentValue2) {
1117
- context._currentValue2 = _currentValue2;
1118
- }
1119
- },
1120
- _threadCount: {
1121
- get: function() {
1122
- return context._threadCount;
1123
- },
1124
- set: function(_threadCount) {
1125
- context._threadCount = _threadCount;
1126
- }
1127
- },
1128
- Consumer: {
1129
- get: function() {
1130
- if (!hasWarnedAboutUsingNestedContextConsumers) {
1131
- hasWarnedAboutUsingNestedContextConsumers = true;
1132
- 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?");
1133
- }
1134
- return context.Consumer;
1135
- }
1136
- },
1137
- displayName: {
1138
- get: function() {
1139
- return context.displayName;
1140
- },
1141
- set: function(displayName) {
1142
- if (!hasWarnedAboutDisplayNameOnConsumer) {
1143
- warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
1144
- hasWarnedAboutDisplayNameOnConsumer = true;
1145
- }
1146
- }
1147
- }
1148
- });
1149
- context.Consumer = Consumer;
1150
- }
1151
- {
1152
- context._currentRenderer = null;
1153
- context._currentRenderer2 = null;
1154
- }
1155
- return context;
1156
- }
1157
- var Uninitialized = -1;
1158
- var Pending = 0;
1159
- var Resolved = 1;
1160
- var Rejected = 2;
1161
- function lazyInitializer(payload) {
1162
- if (payload._status === Uninitialized) {
1163
- var ctor = payload._result;
1164
- var thenable = ctor();
1165
- thenable.then(function(moduleObject2) {
1166
- if (payload._status === Pending || payload._status === Uninitialized) {
1167
- var resolved = payload;
1168
- resolved._status = Resolved;
1169
- resolved._result = moduleObject2;
1170
- }
1171
- }, function(error2) {
1172
- if (payload._status === Pending || payload._status === Uninitialized) {
1173
- var rejected = payload;
1174
- rejected._status = Rejected;
1175
- rejected._result = error2;
1176
- }
1177
- });
1178
- if (payload._status === Uninitialized) {
1179
- var pending = payload;
1180
- pending._status = Pending;
1181
- pending._result = thenable;
1182
- }
1183
- }
1184
- if (payload._status === Resolved) {
1185
- var moduleObject = payload._result;
1186
- {
1187
- if (moduleObject === void 0) {
1188
- error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
1189
- }
1190
- }
1191
- {
1192
- if (!("default" in moduleObject)) {
1193
- error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
1194
- }
1195
- }
1196
- return moduleObject.default;
1197
- } else {
1198
- throw payload._result;
1199
- }
1200
- }
1201
- function lazy(ctor) {
1202
- var payload = {
1203
- // We use these fields to store the result.
1204
- _status: Uninitialized,
1205
- _result: ctor
1206
- };
1207
- var lazyType = {
1208
- $$typeof: REACT_LAZY_TYPE,
1209
- _payload: payload,
1210
- _init: lazyInitializer
1211
- };
1212
- {
1213
- var defaultProps;
1214
- var propTypes;
1215
- Object.defineProperties(lazyType, {
1216
- defaultProps: {
1217
- configurable: true,
1218
- get: function() {
1219
- return defaultProps;
1220
- },
1221
- set: function(newDefaultProps) {
1222
- 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.");
1223
- defaultProps = newDefaultProps;
1224
- Object.defineProperty(lazyType, "defaultProps", {
1225
- enumerable: true
1226
- });
1227
- }
1228
- },
1229
- propTypes: {
1230
- configurable: true,
1231
- get: function() {
1232
- return propTypes;
1233
- },
1234
- set: function(newPropTypes) {
1235
- 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.");
1236
- propTypes = newPropTypes;
1237
- Object.defineProperty(lazyType, "propTypes", {
1238
- enumerable: true
1239
- });
1240
- }
1241
- }
1242
- });
1243
- }
1244
- return lazyType;
1245
- }
1246
- function forwardRef(render) {
1247
- {
1248
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
1249
- error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
1250
- } else if (typeof render !== "function") {
1251
- error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
1252
- } else {
1253
- if (render.length !== 0 && render.length !== 2) {
1254
- 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.");
1255
- }
1256
- }
1257
- if (render != null) {
1258
- if (render.defaultProps != null || render.propTypes != null) {
1259
- error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
1260
- }
1261
- }
1262
- }
1263
- var elementType = {
1264
- $$typeof: REACT_FORWARD_REF_TYPE,
1265
- render
1266
- };
1267
- {
1268
- var ownName;
1269
- Object.defineProperty(elementType, "displayName", {
1270
- enumerable: false,
1271
- configurable: true,
1272
- get: function() {
1273
- return ownName;
1274
- },
1275
- set: function(name) {
1276
- ownName = name;
1277
- if (!render.name && !render.displayName) {
1278
- render.displayName = name;
1279
- }
1280
- }
1281
- });
1282
- }
1283
- return elementType;
1284
- }
1285
- var REACT_MODULE_REFERENCE;
1286
- {
1287
- REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
1288
- }
1289
- function isValidElementType(type) {
1290
- if (typeof type === "string" || typeof type === "function") {
1291
- return true;
1292
- }
1293
- 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) {
1294
- return true;
1295
- }
1296
- if (typeof type === "object" && type !== null) {
1297
- 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
1298
- // types supported by any Flight configuration anywhere since
1299
- // we don't know which Flight build this will end up being used
1300
- // with.
1301
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
1302
- return true;
1303
- }
1304
- }
1305
- return false;
1306
- }
1307
- function memo(type, compare) {
1308
- {
1309
- if (!isValidElementType(type)) {
1310
- error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
1311
- }
1312
- }
1313
- var elementType = {
1314
- $$typeof: REACT_MEMO_TYPE,
1315
- type,
1316
- compare: compare === void 0 ? null : compare
1317
- };
1318
- {
1319
- var ownName;
1320
- Object.defineProperty(elementType, "displayName", {
1321
- enumerable: false,
1322
- configurable: true,
1323
- get: function() {
1324
- return ownName;
1325
- },
1326
- set: function(name) {
1327
- ownName = name;
1328
- if (!type.name && !type.displayName) {
1329
- type.displayName = name;
1330
- }
1331
- }
1332
- });
1333
- }
1334
- return elementType;
1335
- }
1336
- function resolveDispatcher() {
1337
- var dispatcher = ReactCurrentDispatcher.current;
1338
- {
1339
- if (dispatcher === null) {
1340
- error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
1341
- }
1342
- }
1343
- return dispatcher;
1344
- }
1345
- function useContext2(Context) {
1346
- var dispatcher = resolveDispatcher();
1347
- {
1348
- if (Context._context !== void 0) {
1349
- var realContext = Context._context;
1350
- if (realContext.Consumer === Context) {
1351
- 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?");
1352
- } else if (realContext.Provider === Context) {
1353
- error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1354
- }
1355
- }
1356
- }
1357
- return dispatcher.useContext(Context);
1358
- }
1359
- function useState3(initialState) {
1360
- var dispatcher = resolveDispatcher();
1361
- return dispatcher.useState(initialState);
1362
- }
1363
- function useReducer(reducer, initialArg, init) {
1364
- var dispatcher = resolveDispatcher();
1365
- return dispatcher.useReducer(reducer, initialArg, init);
1366
- }
1367
- function useRef(initialValue) {
1368
- var dispatcher = resolveDispatcher();
1369
- return dispatcher.useRef(initialValue);
1370
- }
1371
- function useEffect2(create, deps) {
1372
- var dispatcher = resolveDispatcher();
1373
- return dispatcher.useEffect(create, deps);
1374
- }
1375
- function useInsertionEffect(create, deps) {
1376
- var dispatcher = resolveDispatcher();
1377
- return dispatcher.useInsertionEffect(create, deps);
1378
- }
1379
- function useLayoutEffect(create, deps) {
1380
- var dispatcher = resolveDispatcher();
1381
- return dispatcher.useLayoutEffect(create, deps);
1382
- }
1383
- function useCallback(callback, deps) {
1384
- var dispatcher = resolveDispatcher();
1385
- return dispatcher.useCallback(callback, deps);
1386
- }
1387
- function useMemo(create, deps) {
1388
- var dispatcher = resolveDispatcher();
1389
- return dispatcher.useMemo(create, deps);
1390
- }
1391
- function useImperativeHandle(ref, create, deps) {
1392
- var dispatcher = resolveDispatcher();
1393
- return dispatcher.useImperativeHandle(ref, create, deps);
1394
- }
1395
- function useDebugValue(value, formatterFn) {
1396
- {
1397
- var dispatcher = resolveDispatcher();
1398
- return dispatcher.useDebugValue(value, formatterFn);
1399
- }
1400
- }
1401
- function useTransition() {
1402
- var dispatcher = resolveDispatcher();
1403
- return dispatcher.useTransition();
1404
- }
1405
- function useDeferredValue(value) {
1406
- var dispatcher = resolveDispatcher();
1407
- return dispatcher.useDeferredValue(value);
1408
- }
1409
- function useId() {
1410
- var dispatcher = resolveDispatcher();
1411
- return dispatcher.useId();
1412
- }
1413
- function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1414
- var dispatcher = resolveDispatcher();
1415
- return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1416
- }
1417
- var disabledDepth = 0;
1418
- var prevLog;
1419
- var prevInfo;
1420
- var prevWarn;
1421
- var prevError;
1422
- var prevGroup;
1423
- var prevGroupCollapsed;
1424
- var prevGroupEnd;
1425
- function disabledLog() {
1426
- }
1427
- disabledLog.__reactDisabledLog = true;
1428
- function disableLogs() {
1429
- {
1430
- if (disabledDepth === 0) {
1431
- prevLog = console.log;
1432
- prevInfo = console.info;
1433
- prevWarn = console.warn;
1434
- prevError = console.error;
1435
- prevGroup = console.group;
1436
- prevGroupCollapsed = console.groupCollapsed;
1437
- prevGroupEnd = console.groupEnd;
1438
- var props = {
1439
- configurable: true,
1440
- enumerable: true,
1441
- value: disabledLog,
1442
- writable: true
1443
- };
1444
- Object.defineProperties(console, {
1445
- info: props,
1446
- log: props,
1447
- warn: props,
1448
- error: props,
1449
- group: props,
1450
- groupCollapsed: props,
1451
- groupEnd: props
1452
- });
1453
- }
1454
- disabledDepth++;
1455
- }
1456
- }
1457
- function reenableLogs() {
1458
- {
1459
- disabledDepth--;
1460
- if (disabledDepth === 0) {
1461
- var props = {
1462
- configurable: true,
1463
- enumerable: true,
1464
- writable: true
1465
- };
1466
- Object.defineProperties(console, {
1467
- log: assign({}, props, {
1468
- value: prevLog
1469
- }),
1470
- info: assign({}, props, {
1471
- value: prevInfo
1472
- }),
1473
- warn: assign({}, props, {
1474
- value: prevWarn
1475
- }),
1476
- error: assign({}, props, {
1477
- value: prevError
1478
- }),
1479
- group: assign({}, props, {
1480
- value: prevGroup
1481
- }),
1482
- groupCollapsed: assign({}, props, {
1483
- value: prevGroupCollapsed
1484
- }),
1485
- groupEnd: assign({}, props, {
1486
- value: prevGroupEnd
1487
- })
1488
- });
1489
- }
1490
- if (disabledDepth < 0) {
1491
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1492
- }
1493
- }
1494
- }
1495
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1496
- var prefix;
1497
- function describeBuiltInComponentFrame(name, source, ownerFn) {
1498
- {
1499
- if (prefix === void 0) {
1500
- try {
1501
- throw Error();
1502
- } catch (x) {
1503
- var match = x.stack.trim().match(/\n( *(at )?)/);
1504
- prefix = match && match[1] || "";
1505
- }
1506
- }
1507
- return "\n" + prefix + name;
1508
- }
1509
- }
1510
- var reentry = false;
1511
- var componentFrameCache;
1512
- {
1513
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
1514
- componentFrameCache = new PossiblyWeakMap();
1515
- }
1516
- function describeNativeComponentFrame(fn, construct) {
1517
- if (!fn || reentry) {
1518
- return "";
1519
- }
1520
- {
1521
- var frame = componentFrameCache.get(fn);
1522
- if (frame !== void 0) {
1523
- return frame;
1524
- }
1525
- }
1526
- var control;
1527
- reentry = true;
1528
- var previousPrepareStackTrace = Error.prepareStackTrace;
1529
- Error.prepareStackTrace = void 0;
1530
- var previousDispatcher;
1531
- {
1532
- previousDispatcher = ReactCurrentDispatcher$1.current;
1533
- ReactCurrentDispatcher$1.current = null;
1534
- disableLogs();
1535
- }
1536
- try {
1537
- if (construct) {
1538
- var Fake = function() {
1539
- throw Error();
1540
- };
1541
- Object.defineProperty(Fake.prototype, "props", {
1542
- set: function() {
1543
- throw Error();
1544
- }
1545
- });
1546
- if (typeof Reflect === "object" && Reflect.construct) {
1547
- try {
1548
- Reflect.construct(Fake, []);
1549
- } catch (x) {
1550
- control = x;
1551
- }
1552
- Reflect.construct(fn, [], Fake);
1553
- } else {
1554
- try {
1555
- Fake.call();
1556
- } catch (x) {
1557
- control = x;
1558
- }
1559
- fn.call(Fake.prototype);
1560
- }
1561
- } else {
1562
- try {
1563
- throw Error();
1564
- } catch (x) {
1565
- control = x;
1566
- }
1567
- fn();
1568
- }
1569
- } catch (sample) {
1570
- if (sample && control && typeof sample.stack === "string") {
1571
- var sampleLines = sample.stack.split("\n");
1572
- var controlLines = control.stack.split("\n");
1573
- var s = sampleLines.length - 1;
1574
- var c = controlLines.length - 1;
1575
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
1576
- c--;
1577
- }
1578
- for (; s >= 1 && c >= 0; s--, c--) {
1579
- if (sampleLines[s] !== controlLines[c]) {
1580
- if (s !== 1 || c !== 1) {
1581
- do {
1582
- s--;
1583
- c--;
1584
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
1585
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
1586
- if (fn.displayName && _frame.includes("<anonymous>")) {
1587
- _frame = _frame.replace("<anonymous>", fn.displayName);
1588
- }
1589
- {
1590
- if (typeof fn === "function") {
1591
- componentFrameCache.set(fn, _frame);
1592
- }
1593
- }
1594
- return _frame;
1595
- }
1596
- } while (s >= 1 && c >= 0);
1597
- }
1598
- break;
1599
- }
1600
- }
1601
- }
1602
- } finally {
1603
- reentry = false;
1604
- {
1605
- ReactCurrentDispatcher$1.current = previousDispatcher;
1606
- reenableLogs();
1607
- }
1608
- Error.prepareStackTrace = previousPrepareStackTrace;
1609
- }
1610
- var name = fn ? fn.displayName || fn.name : "";
1611
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1612
- {
1613
- if (typeof fn === "function") {
1614
- componentFrameCache.set(fn, syntheticFrame);
1615
- }
1616
- }
1617
- return syntheticFrame;
1618
- }
1619
- function describeFunctionComponentFrame(fn, source, ownerFn) {
1620
- {
1621
- return describeNativeComponentFrame(fn, false);
1622
- }
1623
- }
1624
- function shouldConstruct(Component2) {
1625
- var prototype = Component2.prototype;
1626
- return !!(prototype && prototype.isReactComponent);
1627
- }
1628
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1629
- if (type == null) {
1630
- return "";
1631
- }
1632
- if (typeof type === "function") {
1633
- {
1634
- return describeNativeComponentFrame(type, shouldConstruct(type));
1635
- }
1636
- }
1637
- if (typeof type === "string") {
1638
- return describeBuiltInComponentFrame(type);
1639
- }
1640
- switch (type) {
1641
- case REACT_SUSPENSE_TYPE:
1642
- return describeBuiltInComponentFrame("Suspense");
1643
- case REACT_SUSPENSE_LIST_TYPE:
1644
- return describeBuiltInComponentFrame("SuspenseList");
1645
- }
1646
- if (typeof type === "object") {
1647
- switch (type.$$typeof) {
1648
- case REACT_FORWARD_REF_TYPE:
1649
- return describeFunctionComponentFrame(type.render);
1650
- case REACT_MEMO_TYPE:
1651
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1652
- case REACT_LAZY_TYPE: {
1653
- var lazyComponent = type;
1654
- var payload = lazyComponent._payload;
1655
- var init = lazyComponent._init;
1656
- try {
1657
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1658
- } catch (x) {
1659
- }
1660
- }
1661
- }
1662
- }
1663
- return "";
1664
- }
1665
- var loggedTypeFailures = {};
1666
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1667
- function setCurrentlyValidatingElement(element) {
1668
- {
1669
- if (element) {
1670
- var owner = element._owner;
1671
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1672
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1673
- } else {
1674
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1675
- }
1676
- }
1677
- }
1678
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
1679
- {
1680
- var has = Function.call.bind(hasOwnProperty);
1681
- for (var typeSpecName in typeSpecs) {
1682
- if (has(typeSpecs, typeSpecName)) {
1683
- var error$1 = void 0;
1684
- try {
1685
- if (typeof typeSpecs[typeSpecName] !== "function") {
1686
- 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`.");
1687
- err.name = "Invariant Violation";
1688
- throw err;
1689
- }
1690
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1691
- } catch (ex) {
1692
- error$1 = ex;
1693
- }
1694
- if (error$1 && !(error$1 instanceof Error)) {
1695
- setCurrentlyValidatingElement(element);
1696
- 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);
1697
- setCurrentlyValidatingElement(null);
1698
- }
1699
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
1700
- loggedTypeFailures[error$1.message] = true;
1701
- setCurrentlyValidatingElement(element);
1702
- error("Failed %s type: %s", location, error$1.message);
1703
- setCurrentlyValidatingElement(null);
1704
- }
1705
- }
1706
- }
1707
- }
1708
- }
1709
- function setCurrentlyValidatingElement$1(element) {
1710
- {
1711
- if (element) {
1712
- var owner = element._owner;
1713
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1714
- setExtraStackFrame(stack);
1715
- } else {
1716
- setExtraStackFrame(null);
1717
- }
1718
- }
1719
- }
1720
- var propTypesMisspellWarningShown;
1721
- {
1722
- propTypesMisspellWarningShown = false;
1723
- }
1724
- function getDeclarationErrorAddendum() {
1725
- if (ReactCurrentOwner.current) {
1726
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1727
- if (name) {
1728
- return "\n\nCheck the render method of `" + name + "`.";
1729
- }
1730
- }
1731
- return "";
1732
- }
1733
- function getSourceInfoErrorAddendum(source) {
1734
- if (source !== void 0) {
1735
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1736
- var lineNumber = source.lineNumber;
1737
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1738
- }
1739
- return "";
1740
- }
1741
- function getSourceInfoErrorAddendumForProps(elementProps) {
1742
- if (elementProps !== null && elementProps !== void 0) {
1743
- return getSourceInfoErrorAddendum(elementProps.__source);
1744
- }
1745
- return "";
1746
- }
1747
- var ownerHasKeyUseWarning = {};
1748
- function getCurrentComponentErrorInfo(parentType) {
1749
- var info = getDeclarationErrorAddendum();
1750
- if (!info) {
1751
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1752
- if (parentName) {
1753
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1754
- }
1755
- }
1756
- return info;
1757
- }
1758
- function validateExplicitKey(element, parentType) {
1759
- if (!element._store || element._store.validated || element.key != null) {
1760
- return;
1761
- }
1762
- element._store.validated = true;
1763
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1764
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1765
- return;
1766
- }
1767
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1768
- var childOwner = "";
1769
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1770
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1771
- }
1772
- {
1773
- setCurrentlyValidatingElement$1(element);
1774
- 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);
1775
- setCurrentlyValidatingElement$1(null);
1776
- }
1777
- }
1778
- function validateChildKeys(node, parentType) {
1779
- if (typeof node !== "object") {
1780
- return;
1781
- }
1782
- if (isArray(node)) {
1783
- for (var i = 0; i < node.length; i++) {
1784
- var child = node[i];
1785
- if (isValidElement(child)) {
1786
- validateExplicitKey(child, parentType);
1787
- }
1788
- }
1789
- } else if (isValidElement(node)) {
1790
- if (node._store) {
1791
- node._store.validated = true;
1792
- }
1793
- } else if (node) {
1794
- var iteratorFn = getIteratorFn(node);
1795
- if (typeof iteratorFn === "function") {
1796
- if (iteratorFn !== node.entries) {
1797
- var iterator = iteratorFn.call(node);
1798
- var step;
1799
- while (!(step = iterator.next()).done) {
1800
- if (isValidElement(step.value)) {
1801
- validateExplicitKey(step.value, parentType);
1802
- }
1803
- }
1804
- }
1805
- }
1806
- }
1807
- }
1808
- function validatePropTypes(element) {
1809
- {
1810
- var type = element.type;
1811
- if (type === null || type === void 0 || typeof type === "string") {
1812
- return;
1813
- }
1814
- var propTypes;
1815
- if (typeof type === "function") {
1816
- propTypes = type.propTypes;
1817
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1818
- // Inner props are checked in the reconciler.
1819
- type.$$typeof === REACT_MEMO_TYPE)) {
1820
- propTypes = type.propTypes;
1821
- } else {
1822
- return;
1823
- }
1824
- if (propTypes) {
1825
- var name = getComponentNameFromType(type);
1826
- checkPropTypes(propTypes, element.props, "prop", name, element);
1827
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
1828
- propTypesMisspellWarningShown = true;
1829
- var _name = getComponentNameFromType(type);
1830
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
1831
- }
1832
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
1833
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1834
- }
1835
- }
1836
- }
1837
- function validateFragmentProps(fragment) {
1838
- {
1839
- var keys = Object.keys(fragment.props);
1840
- for (var i = 0; i < keys.length; i++) {
1841
- var key = keys[i];
1842
- if (key !== "children" && key !== "key") {
1843
- setCurrentlyValidatingElement$1(fragment);
1844
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
1845
- setCurrentlyValidatingElement$1(null);
1846
- break;
1847
- }
1848
- }
1849
- if (fragment.ref !== null) {
1850
- setCurrentlyValidatingElement$1(fragment);
1851
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
1852
- setCurrentlyValidatingElement$1(null);
1853
- }
1854
- }
1855
- }
1856
- function createElementWithValidation(type, props, children) {
1857
- var validType = isValidElementType(type);
1858
- if (!validType) {
1859
- var info = "";
1860
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
1861
- 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.";
1862
- }
1863
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1864
- if (sourceInfo) {
1865
- info += sourceInfo;
1866
- } else {
1867
- info += getDeclarationErrorAddendum();
1868
- }
1869
- var typeString;
1870
- if (type === null) {
1871
- typeString = "null";
1872
- } else if (isArray(type)) {
1873
- typeString = "array";
1874
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
1875
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1876
- info = " Did you accidentally export a JSX literal instead of a component?";
1877
- } else {
1878
- typeString = typeof type;
1879
- }
1880
- {
1881
- 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);
1882
- }
1883
- }
1884
- var element = createElement.apply(this, arguments);
1885
- if (element == null) {
1886
- return element;
1887
- }
1888
- if (validType) {
1889
- for (var i = 2; i < arguments.length; i++) {
1890
- validateChildKeys(arguments[i], type);
1891
- }
1892
- }
1893
- if (type === REACT_FRAGMENT_TYPE) {
1894
- validateFragmentProps(element);
1895
- } else {
1896
- validatePropTypes(element);
1897
- }
1898
- return element;
1899
- }
1900
- var didWarnAboutDeprecatedCreateFactory = false;
1901
- function createFactoryWithValidation(type) {
1902
- var validatedFactory = createElementWithValidation.bind(null, type);
1903
- validatedFactory.type = type;
1904
- {
1905
- if (!didWarnAboutDeprecatedCreateFactory) {
1906
- didWarnAboutDeprecatedCreateFactory = true;
1907
- warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
1908
- }
1909
- Object.defineProperty(validatedFactory, "type", {
1910
- enumerable: false,
1911
- get: function() {
1912
- warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
1913
- Object.defineProperty(this, "type", {
1914
- value: type
1915
- });
1916
- return type;
1917
- }
1918
- });
1919
- }
1920
- return validatedFactory;
1921
- }
1922
- function cloneElementWithValidation(element, props, children) {
1923
- var newElement = cloneElement.apply(this, arguments);
1924
- for (var i = 2; i < arguments.length; i++) {
1925
- validateChildKeys(arguments[i], newElement.type);
1926
- }
1927
- validatePropTypes(newElement);
1928
- return newElement;
1929
- }
1930
- function startTransition(scope, options) {
1931
- var prevTransition = ReactCurrentBatchConfig.transition;
1932
- ReactCurrentBatchConfig.transition = {};
1933
- var currentTransition = ReactCurrentBatchConfig.transition;
1934
- {
1935
- ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
1936
- }
1937
- try {
1938
- scope();
1939
- } finally {
1940
- ReactCurrentBatchConfig.transition = prevTransition;
1941
- {
1942
- if (prevTransition === null && currentTransition._updatedFibers) {
1943
- var updatedFibersCount = currentTransition._updatedFibers.size;
1944
- if (updatedFibersCount > 10) {
1945
- 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.");
1946
- }
1947
- currentTransition._updatedFibers.clear();
1948
- }
1949
- }
1950
- }
1951
- }
1952
- var didWarnAboutMessageChannel = false;
1953
- var enqueueTaskImpl = null;
1954
- function enqueueTask(task) {
1955
- if (enqueueTaskImpl === null) {
1956
- try {
1957
- var requireString = ("require" + Math.random()).slice(0, 7);
1958
- var nodeRequire = module && module[requireString];
1959
- enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate;
1960
- } catch (_err) {
1961
- enqueueTaskImpl = function(callback) {
1962
- {
1963
- if (didWarnAboutMessageChannel === false) {
1964
- didWarnAboutMessageChannel = true;
1965
- if (typeof MessageChannel === "undefined") {
1966
- 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.");
1967
- }
1968
- }
1969
- }
1970
- var channel = new MessageChannel();
1971
- channel.port1.onmessage = callback;
1972
- channel.port2.postMessage(void 0);
1973
- };
1974
- }
1975
- }
1976
- return enqueueTaskImpl(task);
1977
- }
1978
- var actScopeDepth = 0;
1979
- var didWarnNoAwaitAct = false;
1980
- function act(callback) {
1981
- {
1982
- var prevActScopeDepth = actScopeDepth;
1983
- actScopeDepth++;
1984
- if (ReactCurrentActQueue.current === null) {
1985
- ReactCurrentActQueue.current = [];
1986
- }
1987
- var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1988
- var result;
1989
- try {
1990
- ReactCurrentActQueue.isBatchingLegacy = true;
1991
- result = callback();
1992
- if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1993
- var queue = ReactCurrentActQueue.current;
1994
- if (queue !== null) {
1995
- ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1996
- flushActQueue(queue);
1997
- }
1998
- }
1999
- } catch (error2) {
2000
- popActScope(prevActScopeDepth);
2001
- throw error2;
2002
- } finally {
2003
- ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
2004
- }
2005
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
2006
- var thenableResult = result;
2007
- var wasAwaited = false;
2008
- var thenable = {
2009
- then: function(resolve, reject) {
2010
- wasAwaited = true;
2011
- thenableResult.then(function(returnValue2) {
2012
- popActScope(prevActScopeDepth);
2013
- if (actScopeDepth === 0) {
2014
- recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
2015
- } else {
2016
- resolve(returnValue2);
2017
- }
2018
- }, function(error2) {
2019
- popActScope(prevActScopeDepth);
2020
- reject(error2);
2021
- });
2022
- }
2023
- };
2024
- {
2025
- if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
2026
- Promise.resolve().then(function() {
2027
- }).then(function() {
2028
- if (!wasAwaited) {
2029
- didWarnNoAwaitAct = true;
2030
- 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 () => ...);");
2031
- }
2032
- });
2033
- }
2034
- }
2035
- return thenable;
2036
- } else {
2037
- var returnValue = result;
2038
- popActScope(prevActScopeDepth);
2039
- if (actScopeDepth === 0) {
2040
- var _queue = ReactCurrentActQueue.current;
2041
- if (_queue !== null) {
2042
- flushActQueue(_queue);
2043
- ReactCurrentActQueue.current = null;
2044
- }
2045
- var _thenable = {
2046
- then: function(resolve, reject) {
2047
- if (ReactCurrentActQueue.current === null) {
2048
- ReactCurrentActQueue.current = [];
2049
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2050
- } else {
2051
- resolve(returnValue);
2052
- }
2053
- }
2054
- };
2055
- return _thenable;
2056
- } else {
2057
- var _thenable2 = {
2058
- then: function(resolve, reject) {
2059
- resolve(returnValue);
2060
- }
2061
- };
2062
- return _thenable2;
2063
- }
2064
- }
2065
- }
2066
- }
2067
- function popActScope(prevActScopeDepth) {
2068
- {
2069
- if (prevActScopeDepth !== actScopeDepth - 1) {
2070
- error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
2071
- }
2072
- actScopeDepth = prevActScopeDepth;
2073
- }
2074
- }
2075
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
2076
- {
2077
- var queue = ReactCurrentActQueue.current;
2078
- if (queue !== null) {
2079
- try {
2080
- flushActQueue(queue);
2081
- enqueueTask(function() {
2082
- if (queue.length === 0) {
2083
- ReactCurrentActQueue.current = null;
2084
- resolve(returnValue);
2085
- } else {
2086
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
2087
- }
2088
- });
2089
- } catch (error2) {
2090
- reject(error2);
2091
- }
2092
- } else {
2093
- resolve(returnValue);
2094
- }
2095
- }
2096
- }
2097
- var isFlushing = false;
2098
- function flushActQueue(queue) {
2099
- {
2100
- if (!isFlushing) {
2101
- isFlushing = true;
2102
- var i = 0;
2103
- try {
2104
- for (; i < queue.length; i++) {
2105
- var callback = queue[i];
2106
- do {
2107
- callback = callback(true);
2108
- } while (callback !== null);
2109
- }
2110
- queue.length = 0;
2111
- } catch (error2) {
2112
- queue = queue.slice(i + 1);
2113
- throw error2;
2114
- } finally {
2115
- isFlushing = false;
2116
- }
2117
- }
2118
- }
2119
- }
2120
- var createElement$1 = createElementWithValidation;
2121
- var cloneElement$1 = cloneElementWithValidation;
2122
- var createFactory = createFactoryWithValidation;
2123
- var Children = {
2124
- map: mapChildren,
2125
- forEach: forEachChildren,
2126
- count: countChildren,
2127
- toArray,
2128
- only: onlyChild
2129
- };
2130
- exports.Children = Children;
2131
- exports.Component = Component;
2132
- exports.Fragment = REACT_FRAGMENT_TYPE;
2133
- exports.Profiler = REACT_PROFILER_TYPE;
2134
- exports.PureComponent = PureComponent;
2135
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
2136
- exports.Suspense = REACT_SUSPENSE_TYPE;
2137
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
2138
- exports.act = act;
2139
- exports.cloneElement = cloneElement$1;
2140
- exports.createContext = createContext2;
2141
- exports.createElement = createElement$1;
2142
- exports.createFactory = createFactory;
2143
- exports.createRef = createRef;
2144
- exports.forwardRef = forwardRef;
2145
- exports.isValidElement = isValidElement;
2146
- exports.lazy = lazy;
2147
- exports.memo = memo;
2148
- exports.startTransition = startTransition;
2149
- exports.unstable_act = act;
2150
- exports.useCallback = useCallback;
2151
- exports.useContext = useContext2;
2152
- exports.useDebugValue = useDebugValue;
2153
- exports.useDeferredValue = useDeferredValue;
2154
- exports.useEffect = useEffect2;
2155
- exports.useId = useId;
2156
- exports.useImperativeHandle = useImperativeHandle;
2157
- exports.useInsertionEffect = useInsertionEffect;
2158
- exports.useLayoutEffect = useLayoutEffect;
2159
- exports.useMemo = useMemo;
2160
- exports.useReducer = useReducer;
2161
- exports.useRef = useRef;
2162
- exports.useState = useState3;
2163
- exports.useSyncExternalStore = useSyncExternalStore;
2164
- exports.useTransition = useTransition;
2165
- exports.version = ReactVersion;
2166
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
2167
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
2168
- }
2169
- })();
2170
- }
2171
- }
2172
- });
2173
-
2174
- // node_modules/react/index.js
2175
- var require_react = __commonJS({
2176
- "node_modules/react/index.js"(exports, module) {
2177
- "use strict";
2178
- if (process.env.NODE_ENV === "production") {
2179
- module.exports = require_react_production_min();
2180
- } else {
2181
- module.exports = require_react_development();
2182
- }
2183
- }
2184
- });
2185
-
2186
- // node_modules/react/cjs/react-jsx-runtime.production.min.js
2187
- var require_react_jsx_runtime_production_min = __commonJS({
2188
- "node_modules/react/cjs/react-jsx-runtime.production.min.js"(exports) {
2189
- "use strict";
2190
- var f = require_react();
2191
- var k = /* @__PURE__ */ Symbol.for("react.element");
2192
- var l = /* @__PURE__ */ Symbol.for("react.fragment");
2193
- var m = Object.prototype.hasOwnProperty;
2194
- var n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner;
2195
- var p = { key: true, ref: true, __self: true, __source: true };
2196
- function q(c, a, g) {
2197
- var b, d = {}, e = null, h = null;
2198
- void 0 !== g && (e = "" + g);
2199
- void 0 !== a.key && (e = "" + a.key);
2200
- void 0 !== a.ref && (h = a.ref);
2201
- for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
2202
- if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
2203
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
2204
- }
2205
- exports.Fragment = l;
2206
- exports.jsx = q;
2207
- exports.jsxs = q;
2208
- }
2209
- });
2210
-
2211
- // node_modules/react/cjs/react-jsx-runtime.development.js
2212
- var require_react_jsx_runtime_development = __commonJS({
2213
- "node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
2214
- "use strict";
2215
- if (process.env.NODE_ENV !== "production") {
2216
- (function() {
2217
- "use strict";
2218
- var React = require_react();
2219
- var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
2220
- var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
2221
- var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
2222
- var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
2223
- var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
2224
- var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
2225
- var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
2226
- var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
2227
- var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
2228
- var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
2229
- var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
2230
- var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
2231
- var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
2232
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
2233
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
2234
- function getIteratorFn(maybeIterable) {
2235
- if (maybeIterable === null || typeof maybeIterable !== "object") {
2236
- return null;
2237
- }
2238
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2239
- if (typeof maybeIterator === "function") {
2240
- return maybeIterator;
2241
- }
2242
- return null;
2243
- }
2244
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2245
- function error(format) {
2246
- {
2247
- {
2248
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2249
- args[_key2 - 1] = arguments[_key2];
2250
- }
2251
- printWarning("error", format, args);
2252
- }
2253
- }
2254
- }
2255
- function printWarning(level, format, args) {
2256
- {
2257
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
2258
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
2259
- if (stack !== "") {
2260
- format += "%s";
2261
- args = args.concat([stack]);
2262
- }
2263
- var argsWithFormat = args.map(function(item) {
2264
- return String(item);
2265
- });
2266
- argsWithFormat.unshift("Warning: " + format);
2267
- Function.prototype.apply.call(console[level], console, argsWithFormat);
2268
- }
2269
- }
2270
- var enableScopeAPI = false;
2271
- var enableCacheElement = false;
2272
- var enableTransitionTracing = false;
2273
- var enableLegacyHidden = false;
2274
- var enableDebugTracing = false;
2275
- var REACT_MODULE_REFERENCE;
2276
- {
2277
- REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
2278
- }
2279
- function isValidElementType(type) {
2280
- if (typeof type === "string" || typeof type === "function") {
2281
- return true;
2282
- }
2283
- 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) {
2284
- return true;
2285
- }
2286
- if (typeof type === "object" && type !== null) {
2287
- 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
2288
- // types supported by any Flight configuration anywhere since
2289
- // we don't know which Flight build this will end up being used
2290
- // with.
2291
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
2292
- return true;
2293
- }
2294
- }
2295
- return false;
2296
- }
2297
- function getWrappedName(outerType, innerType, wrapperName) {
2298
- var displayName = outerType.displayName;
2299
- if (displayName) {
2300
- return displayName;
2301
- }
2302
- var functionName = innerType.displayName || innerType.name || "";
2303
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
2304
- }
2305
- function getContextName(type) {
2306
- return type.displayName || "Context";
2307
- }
2308
- function getComponentNameFromType(type) {
2309
- if (type == null) {
2310
- return null;
2311
- }
2312
- {
2313
- if (typeof type.tag === "number") {
2314
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
2315
- }
2316
- }
2317
- if (typeof type === "function") {
2318
- return type.displayName || type.name || null;
2319
- }
2320
- if (typeof type === "string") {
2321
- return type;
2322
- }
2323
- switch (type) {
2324
- case REACT_FRAGMENT_TYPE:
2325
- return "Fragment";
2326
- case REACT_PORTAL_TYPE:
2327
- return "Portal";
2328
- case REACT_PROFILER_TYPE:
2329
- return "Profiler";
2330
- case REACT_STRICT_MODE_TYPE:
2331
- return "StrictMode";
2332
- case REACT_SUSPENSE_TYPE:
2333
- return "Suspense";
2334
- case REACT_SUSPENSE_LIST_TYPE:
2335
- return "SuspenseList";
2336
- }
2337
- if (typeof type === "object") {
2338
- switch (type.$$typeof) {
2339
- case REACT_CONTEXT_TYPE:
2340
- var context = type;
2341
- return getContextName(context) + ".Consumer";
2342
- case REACT_PROVIDER_TYPE:
2343
- var provider = type;
2344
- return getContextName(provider._context) + ".Provider";
2345
- case REACT_FORWARD_REF_TYPE:
2346
- return getWrappedName(type, type.render, "ForwardRef");
2347
- case REACT_MEMO_TYPE:
2348
- var outerName = type.displayName || null;
2349
- if (outerName !== null) {
2350
- return outerName;
2351
- }
2352
- return getComponentNameFromType(type.type) || "Memo";
2353
- case REACT_LAZY_TYPE: {
2354
- var lazyComponent = type;
2355
- var payload = lazyComponent._payload;
2356
- var init = lazyComponent._init;
2357
- try {
2358
- return getComponentNameFromType(init(payload));
2359
- } catch (x) {
2360
- return null;
2361
- }
2362
- }
2363
- }
2364
- }
2365
- return null;
2366
- }
2367
- var assign = Object.assign;
2368
- var disabledDepth = 0;
2369
- var prevLog;
2370
- var prevInfo;
2371
- var prevWarn;
2372
- var prevError;
2373
- var prevGroup;
2374
- var prevGroupCollapsed;
2375
- var prevGroupEnd;
2376
- function disabledLog() {
2377
- }
2378
- disabledLog.__reactDisabledLog = true;
2379
- function disableLogs() {
2380
- {
2381
- if (disabledDepth === 0) {
2382
- prevLog = console.log;
2383
- prevInfo = console.info;
2384
- prevWarn = console.warn;
2385
- prevError = console.error;
2386
- prevGroup = console.group;
2387
- prevGroupCollapsed = console.groupCollapsed;
2388
- prevGroupEnd = console.groupEnd;
2389
- var props = {
2390
- configurable: true,
2391
- enumerable: true,
2392
- value: disabledLog,
2393
- writable: true
2394
- };
2395
- Object.defineProperties(console, {
2396
- info: props,
2397
- log: props,
2398
- warn: props,
2399
- error: props,
2400
- group: props,
2401
- groupCollapsed: props,
2402
- groupEnd: props
2403
- });
2404
- }
2405
- disabledDepth++;
2406
- }
2407
- }
2408
- function reenableLogs() {
2409
- {
2410
- disabledDepth--;
2411
- if (disabledDepth === 0) {
2412
- var props = {
2413
- configurable: true,
2414
- enumerable: true,
2415
- writable: true
2416
- };
2417
- Object.defineProperties(console, {
2418
- log: assign({}, props, {
2419
- value: prevLog
2420
- }),
2421
- info: assign({}, props, {
2422
- value: prevInfo
2423
- }),
2424
- warn: assign({}, props, {
2425
- value: prevWarn
2426
- }),
2427
- error: assign({}, props, {
2428
- value: prevError
2429
- }),
2430
- group: assign({}, props, {
2431
- value: prevGroup
2432
- }),
2433
- groupCollapsed: assign({}, props, {
2434
- value: prevGroupCollapsed
2435
- }),
2436
- groupEnd: assign({}, props, {
2437
- value: prevGroupEnd
2438
- })
2439
- });
2440
- }
2441
- if (disabledDepth < 0) {
2442
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2443
- }
2444
- }
2445
- }
2446
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2447
- var prefix;
2448
- function describeBuiltInComponentFrame(name, source, ownerFn) {
2449
- {
2450
- if (prefix === void 0) {
2451
- try {
2452
- throw Error();
2453
- } catch (x) {
2454
- var match = x.stack.trim().match(/\n( *(at )?)/);
2455
- prefix = match && match[1] || "";
2456
- }
2457
- }
2458
- return "\n" + prefix + name;
2459
- }
2460
- }
2461
- var reentry = false;
2462
- var componentFrameCache;
2463
- {
2464
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
2465
- componentFrameCache = new PossiblyWeakMap();
2466
- }
2467
- function describeNativeComponentFrame(fn, construct) {
2468
- if (!fn || reentry) {
2469
- return "";
2470
- }
2471
- {
2472
- var frame = componentFrameCache.get(fn);
2473
- if (frame !== void 0) {
2474
- return frame;
2475
- }
2476
- }
2477
- var control;
2478
- reentry = true;
2479
- var previousPrepareStackTrace = Error.prepareStackTrace;
2480
- Error.prepareStackTrace = void 0;
2481
- var previousDispatcher;
2482
- {
2483
- previousDispatcher = ReactCurrentDispatcher.current;
2484
- ReactCurrentDispatcher.current = null;
2485
- disableLogs();
2486
- }
2487
- try {
2488
- if (construct) {
2489
- var Fake = function() {
2490
- throw Error();
2491
- };
2492
- Object.defineProperty(Fake.prototype, "props", {
2493
- set: function() {
2494
- throw Error();
2495
- }
2496
- });
2497
- if (typeof Reflect === "object" && Reflect.construct) {
2498
- try {
2499
- Reflect.construct(Fake, []);
2500
- } catch (x) {
2501
- control = x;
2502
- }
2503
- Reflect.construct(fn, [], Fake);
2504
- } else {
2505
- try {
2506
- Fake.call();
2507
- } catch (x) {
2508
- control = x;
2509
- }
2510
- fn.call(Fake.prototype);
2511
- }
2512
- } else {
2513
- try {
2514
- throw Error();
2515
- } catch (x) {
2516
- control = x;
2517
- }
2518
- fn();
2519
- }
2520
- } catch (sample) {
2521
- if (sample && control && typeof sample.stack === "string") {
2522
- var sampleLines = sample.stack.split("\n");
2523
- var controlLines = control.stack.split("\n");
2524
- var s = sampleLines.length - 1;
2525
- var c = controlLines.length - 1;
2526
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
2527
- c--;
2528
- }
2529
- for (; s >= 1 && c >= 0; s--, c--) {
2530
- if (sampleLines[s] !== controlLines[c]) {
2531
- if (s !== 1 || c !== 1) {
2532
- do {
2533
- s--;
2534
- c--;
2535
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
2536
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
2537
- if (fn.displayName && _frame.includes("<anonymous>")) {
2538
- _frame = _frame.replace("<anonymous>", fn.displayName);
2539
- }
2540
- {
2541
- if (typeof fn === "function") {
2542
- componentFrameCache.set(fn, _frame);
2543
- }
2544
- }
2545
- return _frame;
2546
- }
2547
- } while (s >= 1 && c >= 0);
2548
- }
2549
- break;
2550
- }
2551
- }
2552
- }
2553
- } finally {
2554
- reentry = false;
2555
- {
2556
- ReactCurrentDispatcher.current = previousDispatcher;
2557
- reenableLogs();
2558
- }
2559
- Error.prepareStackTrace = previousPrepareStackTrace;
2560
- }
2561
- var name = fn ? fn.displayName || fn.name : "";
2562
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
2563
- {
2564
- if (typeof fn === "function") {
2565
- componentFrameCache.set(fn, syntheticFrame);
2566
- }
2567
- }
2568
- return syntheticFrame;
2569
- }
2570
- function describeFunctionComponentFrame(fn, source, ownerFn) {
2571
- {
2572
- return describeNativeComponentFrame(fn, false);
2573
- }
2574
- }
2575
- function shouldConstruct(Component) {
2576
- var prototype = Component.prototype;
2577
- return !!(prototype && prototype.isReactComponent);
2578
- }
2579
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2580
- if (type == null) {
2581
- return "";
2582
- }
2583
- if (typeof type === "function") {
2584
- {
2585
- return describeNativeComponentFrame(type, shouldConstruct(type));
2586
- }
2587
- }
2588
- if (typeof type === "string") {
2589
- return describeBuiltInComponentFrame(type);
2590
- }
2591
- switch (type) {
2592
- case REACT_SUSPENSE_TYPE:
2593
- return describeBuiltInComponentFrame("Suspense");
2594
- case REACT_SUSPENSE_LIST_TYPE:
2595
- return describeBuiltInComponentFrame("SuspenseList");
2596
- }
2597
- if (typeof type === "object") {
2598
- switch (type.$$typeof) {
2599
- case REACT_FORWARD_REF_TYPE:
2600
- return describeFunctionComponentFrame(type.render);
2601
- case REACT_MEMO_TYPE:
2602
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2603
- case REACT_LAZY_TYPE: {
2604
- var lazyComponent = type;
2605
- var payload = lazyComponent._payload;
2606
- var init = lazyComponent._init;
2607
- try {
2608
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2609
- } catch (x) {
2610
- }
2611
- }
2612
- }
2613
- }
2614
- return "";
2615
- }
2616
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2617
- var loggedTypeFailures = {};
2618
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2619
- function setCurrentlyValidatingElement(element) {
2620
- {
2621
- if (element) {
2622
- var owner = element._owner;
2623
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2624
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
2625
- } else {
2626
- ReactDebugCurrentFrame.setExtraStackFrame(null);
2627
- }
2628
- }
2629
- }
2630
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
2631
- {
2632
- var has = Function.call.bind(hasOwnProperty);
2633
- for (var typeSpecName in typeSpecs) {
2634
- if (has(typeSpecs, typeSpecName)) {
2635
- var error$1 = void 0;
2636
- try {
2637
- if (typeof typeSpecs[typeSpecName] !== "function") {
2638
- 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`.");
2639
- err.name = "Invariant Violation";
2640
- throw err;
2641
- }
2642
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
2643
- } catch (ex) {
2644
- error$1 = ex;
2645
- }
2646
- if (error$1 && !(error$1 instanceof Error)) {
2647
- setCurrentlyValidatingElement(element);
2648
- 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);
2649
- setCurrentlyValidatingElement(null);
2650
- }
2651
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2652
- loggedTypeFailures[error$1.message] = true;
2653
- setCurrentlyValidatingElement(element);
2654
- error("Failed %s type: %s", location, error$1.message);
2655
- setCurrentlyValidatingElement(null);
2656
- }
2657
- }
2658
- }
2659
- }
2660
- }
2661
- var isArrayImpl = Array.isArray;
2662
- function isArray(a) {
2663
- return isArrayImpl(a);
2664
- }
2665
- function typeName(value) {
2666
- {
2667
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
2668
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
2669
- return type;
2670
- }
2671
- }
2672
- function willCoercionThrow(value) {
2673
- {
2674
- try {
2675
- testStringCoercion(value);
2676
- return false;
2677
- } catch (e) {
2678
- return true;
2679
- }
2680
- }
2681
- }
2682
- function testStringCoercion(value) {
2683
- return "" + value;
2684
- }
2685
- function checkKeyStringCoercion(value) {
2686
- {
2687
- if (willCoercionThrow(value)) {
2688
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
2689
- return testStringCoercion(value);
2690
- }
2691
- }
2692
- }
2693
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2694
- var RESERVED_PROPS = {
2695
- key: true,
2696
- ref: true,
2697
- __self: true,
2698
- __source: true
2699
- };
2700
- var specialPropKeyWarningShown;
2701
- var specialPropRefWarningShown;
2702
- var didWarnAboutStringRefs;
2703
- {
2704
- didWarnAboutStringRefs = {};
2705
- }
2706
- function hasValidRef(config) {
2707
- {
2708
- if (hasOwnProperty.call(config, "ref")) {
2709
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
2710
- if (getter && getter.isReactWarning) {
2711
- return false;
2712
- }
2713
- }
2714
- }
2715
- return config.ref !== void 0;
2716
- }
2717
- function hasValidKey(config) {
2718
- {
2719
- if (hasOwnProperty.call(config, "key")) {
2720
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2721
- if (getter && getter.isReactWarning) {
2722
- return false;
2723
- }
2724
- }
2725
- }
2726
- return config.key !== void 0;
2727
- }
2728
- function warnIfStringRefCannotBeAutoConverted(config, self) {
2729
- {
2730
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2731
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2732
- if (!didWarnAboutStringRefs[componentName]) {
2733
- 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', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2734
- didWarnAboutStringRefs[componentName] = true;
2735
- }
2736
- }
2737
- }
2738
- }
2739
- function defineKeyPropWarningGetter(props, displayName) {
2740
- {
2741
- var warnAboutAccessingKey = function() {
2742
- if (!specialPropKeyWarningShown) {
2743
- specialPropKeyWarningShown = true;
2744
- 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);
2745
- }
2746
- };
2747
- warnAboutAccessingKey.isReactWarning = true;
2748
- Object.defineProperty(props, "key", {
2749
- get: warnAboutAccessingKey,
2750
- configurable: true
2751
- });
2752
- }
2753
- }
2754
- function defineRefPropWarningGetter(props, displayName) {
2755
- {
2756
- var warnAboutAccessingRef = function() {
2757
- if (!specialPropRefWarningShown) {
2758
- specialPropRefWarningShown = true;
2759
- 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);
2760
- }
2761
- };
2762
- warnAboutAccessingRef.isReactWarning = true;
2763
- Object.defineProperty(props, "ref", {
2764
- get: warnAboutAccessingRef,
2765
- configurable: true
2766
- });
2767
- }
2768
- }
2769
- var ReactElement = function(type, key, ref, self, source, owner, props) {
2770
- var element = {
2771
- // This tag allows us to uniquely identify this as a React Element
2772
- $$typeof: REACT_ELEMENT_TYPE,
2773
- // Built-in properties that belong on the element
2774
- type,
2775
- key,
2776
- ref,
2777
- props,
2778
- // Record the component responsible for creating this element.
2779
- _owner: owner
2780
- };
2781
- {
2782
- element._store = {};
2783
- Object.defineProperty(element._store, "validated", {
2784
- configurable: false,
2785
- enumerable: false,
2786
- writable: true,
2787
- value: false
2788
- });
2789
- Object.defineProperty(element, "_self", {
2790
- configurable: false,
2791
- enumerable: false,
2792
- writable: false,
2793
- value: self
2794
- });
2795
- Object.defineProperty(element, "_source", {
2796
- configurable: false,
2797
- enumerable: false,
2798
- writable: false,
2799
- value: source
2800
- });
2801
- if (Object.freeze) {
2802
- Object.freeze(element.props);
2803
- Object.freeze(element);
2804
- }
2805
- }
2806
- return element;
2807
- };
2808
- function jsxDEV(type, config, maybeKey, source, self) {
2809
- {
2810
- var propName;
2811
- var props = {};
2812
- var key = null;
2813
- var ref = null;
2814
- if (maybeKey !== void 0) {
2815
- {
2816
- checkKeyStringCoercion(maybeKey);
2817
- }
2818
- key = "" + maybeKey;
2819
- }
2820
- if (hasValidKey(config)) {
2821
- {
2822
- checkKeyStringCoercion(config.key);
2823
- }
2824
- key = "" + config.key;
2825
- }
2826
- if (hasValidRef(config)) {
2827
- ref = config.ref;
2828
- warnIfStringRefCannotBeAutoConverted(config, self);
2829
- }
2830
- for (propName in config) {
2831
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2832
- props[propName] = config[propName];
2833
- }
2834
- }
2835
- if (type && type.defaultProps) {
2836
- var defaultProps = type.defaultProps;
2837
- for (propName in defaultProps) {
2838
- if (props[propName] === void 0) {
2839
- props[propName] = defaultProps[propName];
2840
- }
2841
- }
2842
- }
2843
- if (key || ref) {
2844
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
2845
- if (key) {
2846
- defineKeyPropWarningGetter(props, displayName);
2847
- }
2848
- if (ref) {
2849
- defineRefPropWarningGetter(props, displayName);
2850
- }
2851
- }
2852
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2853
- }
2854
- }
2855
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2856
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2857
- function setCurrentlyValidatingElement$1(element) {
2858
- {
2859
- if (element) {
2860
- var owner = element._owner;
2861
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2862
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2863
- } else {
2864
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2865
- }
2866
- }
2867
- }
2868
- var propTypesMisspellWarningShown;
2869
- {
2870
- propTypesMisspellWarningShown = false;
2871
- }
2872
- function isValidElement(object) {
2873
- {
2874
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2875
- }
2876
- }
2877
- function getDeclarationErrorAddendum() {
2878
- {
2879
- if (ReactCurrentOwner$1.current) {
2880
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2881
- if (name) {
2882
- return "\n\nCheck the render method of `" + name + "`.";
2883
- }
2884
- }
2885
- return "";
2886
- }
2887
- }
2888
- function getSourceInfoErrorAddendum(source) {
2889
- {
2890
- if (source !== void 0) {
2891
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2892
- var lineNumber = source.lineNumber;
2893
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2894
- }
2895
- return "";
2896
- }
2897
- }
2898
- var ownerHasKeyUseWarning = {};
2899
- function getCurrentComponentErrorInfo(parentType) {
2900
- {
2901
- var info = getDeclarationErrorAddendum();
2902
- if (!info) {
2903
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
2904
- if (parentName) {
2905
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2906
- }
2907
- }
2908
- return info;
2909
- }
2910
- }
2911
- function validateExplicitKey(element, parentType) {
2912
- {
2913
- if (!element._store || element._store.validated || element.key != null) {
2914
- return;
2915
- }
2916
- element._store.validated = true;
2917
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2918
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2919
- return;
2920
- }
2921
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2922
- var childOwner = "";
2923
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
2924
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2925
- }
2926
- setCurrentlyValidatingElement$1(element);
2927
- 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);
2928
- setCurrentlyValidatingElement$1(null);
2929
- }
2930
- }
2931
- function validateChildKeys(node, parentType) {
2932
- {
2933
- if (typeof node !== "object") {
2934
- return;
2935
- }
2936
- if (isArray(node)) {
2937
- for (var i = 0; i < node.length; i++) {
2938
- var child = node[i];
2939
- if (isValidElement(child)) {
2940
- validateExplicitKey(child, parentType);
2941
- }
2942
- }
2943
- } else if (isValidElement(node)) {
2944
- if (node._store) {
2945
- node._store.validated = true;
2946
- }
2947
- } else if (node) {
2948
- var iteratorFn = getIteratorFn(node);
2949
- if (typeof iteratorFn === "function") {
2950
- if (iteratorFn !== node.entries) {
2951
- var iterator = iteratorFn.call(node);
2952
- var step;
2953
- while (!(step = iterator.next()).done) {
2954
- if (isValidElement(step.value)) {
2955
- validateExplicitKey(step.value, parentType);
2956
- }
2957
- }
2958
- }
2959
- }
2960
- }
2961
- }
2962
- }
2963
- function validatePropTypes(element) {
2964
- {
2965
- var type = element.type;
2966
- if (type === null || type === void 0 || typeof type === "string") {
2967
- return;
2968
- }
2969
- var propTypes;
2970
- if (typeof type === "function") {
2971
- propTypes = type.propTypes;
2972
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
2973
- // Inner props are checked in the reconciler.
2974
- type.$$typeof === REACT_MEMO_TYPE)) {
2975
- propTypes = type.propTypes;
2976
- } else {
2977
- return;
2978
- }
2979
- if (propTypes) {
2980
- var name = getComponentNameFromType(type);
2981
- checkPropTypes(propTypes, element.props, "prop", name, element);
2982
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
2983
- propTypesMisspellWarningShown = true;
2984
- var _name = getComponentNameFromType(type);
2985
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
2986
- }
2987
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
2988
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2989
- }
2990
- }
2991
- }
2992
- function validateFragmentProps(fragment) {
2993
- {
2994
- var keys = Object.keys(fragment.props);
2995
- for (var i = 0; i < keys.length; i++) {
2996
- var key = keys[i];
2997
- if (key !== "children" && key !== "key") {
2998
- setCurrentlyValidatingElement$1(fragment);
2999
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
3000
- setCurrentlyValidatingElement$1(null);
3001
- break;
3002
- }
3003
- }
3004
- if (fragment.ref !== null) {
3005
- setCurrentlyValidatingElement$1(fragment);
3006
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
3007
- setCurrentlyValidatingElement$1(null);
3008
- }
3009
- }
3010
- }
3011
- var didWarnAboutKeySpread = {};
3012
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
3013
- {
3014
- var validType = isValidElementType(type);
3015
- if (!validType) {
3016
- var info = "";
3017
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
3018
- 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.";
3019
- }
3020
- var sourceInfo = getSourceInfoErrorAddendum(source);
3021
- if (sourceInfo) {
3022
- info += sourceInfo;
3023
- } else {
3024
- info += getDeclarationErrorAddendum();
3025
- }
3026
- var typeString;
3027
- if (type === null) {
3028
- typeString = "null";
3029
- } else if (isArray(type)) {
3030
- typeString = "array";
3031
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
3032
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
3033
- info = " Did you accidentally export a JSX literal instead of a component?";
3034
- } else {
3035
- typeString = typeof type;
3036
- }
3037
- error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
3038
- }
3039
- var element = jsxDEV(type, props, key, source, self);
3040
- if (element == null) {
3041
- return element;
3042
- }
3043
- if (validType) {
3044
- var children = props.children;
3045
- if (children !== void 0) {
3046
- if (isStaticChildren) {
3047
- if (isArray(children)) {
3048
- for (var i = 0; i < children.length; i++) {
3049
- validateChildKeys(children[i], type);
3050
- }
3051
- if (Object.freeze) {
3052
- Object.freeze(children);
3053
- }
3054
- } else {
3055
- error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
3056
- }
3057
- } else {
3058
- validateChildKeys(children, type);
3059
- }
3060
- }
3061
- }
3062
- {
3063
- if (hasOwnProperty.call(props, "key")) {
3064
- var componentName = getComponentNameFromType(type);
3065
- var keys = Object.keys(props).filter(function(k) {
3066
- return k !== "key";
3067
- });
3068
- var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
3069
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
3070
- var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
3071
- error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
3072
- didWarnAboutKeySpread[componentName + beforeExample] = true;
3073
- }
3074
- }
3075
- }
3076
- if (type === REACT_FRAGMENT_TYPE) {
3077
- validateFragmentProps(element);
3078
- } else {
3079
- validatePropTypes(element);
3080
- }
3081
- return element;
3082
- }
3083
- }
3084
- function jsxWithValidationStatic(type, props, key) {
3085
- {
3086
- return jsxWithValidation(type, props, key, true);
3087
- }
3088
- }
3089
- function jsxWithValidationDynamic(type, props, key) {
3090
- {
3091
- return jsxWithValidation(type, props, key, false);
3092
- }
3093
- }
3094
- var jsx5 = jsxWithValidationDynamic;
3095
- var jsxs3 = jsxWithValidationStatic;
3096
- exports.Fragment = REACT_FRAGMENT_TYPE;
3097
- exports.jsx = jsx5;
3098
- exports.jsxs = jsxs3;
3099
- })();
3100
- }
3101
- }
3102
- });
3103
-
3104
- // node_modules/react/jsx-runtime.js
3105
- var require_jsx_runtime = __commonJS({
3106
- "node_modules/react/jsx-runtime.js"(exports, module) {
3107
- "use strict";
3108
- if (process.env.NODE_ENV === "production") {
3109
- module.exports = require_react_jsx_runtime_production_min();
3110
- } else {
3111
- module.exports = require_react_jsx_runtime_development();
3112
- }
3113
- }
3114
- });
3115
-
3116
1
  // src/context/UserProvider.tsx
3117
- var import_react = __toESM(require_react(), 1);
2
+ import { createContext, useContext, useState, useEffect } from "react";
3118
3
 
3119
4
  // src/AppSettings.ts
3120
5
  var AppSettings = {
@@ -3191,11 +76,11 @@ var SparkStudioAuthenticationSDK = class {
3191
76
  };
3192
77
 
3193
78
  // src/context/UserProvider.tsx
3194
- var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
3195
- var UserContext = (0, import_react.createContext)(void 0);
79
+ import { jsx } from "react/jsx-runtime";
80
+ var UserContext = createContext(void 0);
3196
81
  function UserProvider({ children }) {
3197
- const [user, setUserState] = (0, import_react.useState)(null);
3198
- (0, import_react.useEffect)(() => {
82
+ const [user, setUserState] = useState(null);
83
+ useEffect(() => {
3199
84
  const fetchUser = async () => {
3200
85
  try {
3201
86
  const api = new SparkStudioAuthenticationSDK(AppSettings.APIUrl);
@@ -3220,22 +105,22 @@ function UserProvider({ children }) {
3220
105
  }
3221
106
  setUserState(null);
3222
107
  };
3223
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UserContext.Provider, { value: { user, setUser, logout }, children });
108
+ return /* @__PURE__ */ jsx(UserContext.Provider, { value: { user, setUser, logout }, children });
3224
109
  }
3225
110
  function useUser() {
3226
- const context = (0, import_react.useContext)(UserContext);
111
+ const context = useContext(UserContext);
3227
112
  if (!context) throw new Error("useUser must be used inside UserProvider");
3228
113
  return context;
3229
114
  }
3230
115
 
3231
116
  // src/components/Buttons/LoginButton.tsx
3232
- var import_react2 = __toESM(require_react(), 1);
117
+ import { useState as useState2 } from "react";
3233
118
  import { useGoogleLogin } from "@react-oauth/google";
3234
- var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
3235
119
  import { Button } from "@sparkstudio/common-ui";
120
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
3236
121
  function LoginButton({ onSuccess }) {
3237
122
  const { setUser } = useUser();
3238
- const [loading, setLoading] = (0, import_react2.useState)(false);
123
+ const [loading, setLoading] = useState2(false);
3239
124
  const login = useGoogleLogin({
3240
125
  flow: "implicit",
3241
126
  onSuccess: async (tokenResponse) => {
@@ -3267,8 +152,8 @@ function LoginButton({ onSuccess }) {
3267
152
  setLoading(false);
3268
153
  }
3269
154
  };
3270
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Button, { onClick: handleClick, disabled: loading, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
3271
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
155
+ return /* @__PURE__ */ jsx2(Button, { onClick: handleClick, disabled: loading, children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
156
+ /* @__PURE__ */ jsx2(
3272
157
  "span",
3273
158
  {
3274
159
  className: "spinner-border spinner-border-sm me-2 async-btn__spinner",
@@ -3277,8 +162,8 @@ function LoginButton({ onSuccess }) {
3277
162
  }
3278
163
  ),
3279
164
  "Signing in..."
3280
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
3281
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
165
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
166
+ /* @__PURE__ */ jsx2(
3282
167
  "img",
3283
168
  {
3284
169
  src: "../../assets/icons/google_icon.webp",
@@ -3286,23 +171,23 @@ function LoginButton({ onSuccess }) {
3286
171
  style: { width: "21px", height: "21px", margin: 0, padding: 0 }
3287
172
  }
3288
173
  ),
3289
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "d-none d-sm-inline ms-2", children: "Login" })
174
+ /* @__PURE__ */ jsx2("span", { className: "d-none d-sm-inline ms-2", children: "Login" })
3290
175
  ] }) });
3291
176
  }
3292
177
 
3293
178
  // src/components/UserInfoCard.tsx
3294
- var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
3295
179
  import { Button as Button2 } from "@sparkstudio/common-ui";
180
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
3296
181
  function UserInfoCard() {
3297
182
  const { user, logout } = useUser();
3298
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: user ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
183
+ return /* @__PURE__ */ jsx3(Fragment2, { children: user ? /* @__PURE__ */ jsx3(
3299
184
  Button2,
3300
185
  {
3301
186
  loadingText: "Logging out...",
3302
187
  showSpinner: true,
3303
188
  onAction: () => logout(),
3304
- renderContent: () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3305
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
189
+ renderContent: () => /* @__PURE__ */ jsxs2(Fragment2, { children: [
190
+ /* @__PURE__ */ jsx3(
3306
191
  "img",
3307
192
  {
3308
193
  src: user.ProfilePicture,
@@ -3310,10 +195,10 @@ function UserInfoCard() {
3310
195
  style: { width: "21px", height: "21px", margin: 0, padding: 0 }
3311
196
  }
3312
197
  ),
3313
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "d-none d-sm-inline ms-2", children: "Logout" })
198
+ /* @__PURE__ */ jsx3("span", { className: "d-none d-sm-inline ms-2", children: "Logout" })
3314
199
  ] }),
3315
- renderLoading: () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3316
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
200
+ renderLoading: () => /* @__PURE__ */ jsxs2(Fragment2, { children: [
201
+ /* @__PURE__ */ jsx3(
3317
202
  "span",
3318
203
  {
3319
204
  className: "spinner-border spinner-border-sm me-2 async-btn__spinner",
@@ -3324,22 +209,30 @@ function UserInfoCard() {
3324
209
  "Logging out..."
3325
210
  ] })
3326
211
  }
3327
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(LoginButton, {}) });
212
+ ) : /* @__PURE__ */ jsx3(LoginButton, {}) });
3328
213
  }
3329
214
 
3330
215
  // src/components/AuthenticatorProvider.tsx
3331
216
  import { GoogleOAuthProvider } from "@react-oauth/google";
3332
- var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
217
+ import { jsx as jsx4 } from "react/jsx-runtime";
3333
218
  function AuthenticatorProvider({
3334
219
  googleClientId,
3335
220
  children
3336
221
  }) {
3337
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(GoogleOAuthProvider, { clientId: googleClientId, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(UserProvider, { children }) });
222
+ return /* @__PURE__ */ jsx4(GoogleOAuthProvider, { clientId: googleClientId, children: /* @__PURE__ */ jsx4(UserProvider, { children }) });
223
+ }
224
+
225
+ // src/components/Buttons/AuthenticationTestButton.tsx
226
+ import { Button as Button3 } from "@sparkstudio/common-ui";
227
+ import { jsx as jsx5 } from "react/jsx-runtime";
228
+ function AuthenticationTestButton({ onSuccess }) {
229
+ return /* @__PURE__ */ jsx5(Button3, {});
3338
230
  }
3339
231
 
3340
232
  // src/types/Guid.ts
3341
233
  var EMPTY_GUID = "00000000-0000-0000-0000-000000000000";
3342
234
  export {
235
+ AuthenticationTestButton,
3343
236
  AuthenticatorProvider,
3344
237
  EMPTY_GUID,
3345
238
  LoginButton,
@@ -3348,50 +241,3 @@ export {
3348
241
  UserProvider,
3349
242
  useUser
3350
243
  };
3351
- /*! Bundled license information:
3352
-
3353
- react/cjs/react.production.min.js:
3354
- (**
3355
- * @license React
3356
- * react.production.min.js
3357
- *
3358
- * Copyright (c) Facebook, Inc. and its affiliates.
3359
- *
3360
- * This source code is licensed under the MIT license found in the
3361
- * LICENSE file in the root directory of this source tree.
3362
- *)
3363
-
3364
- react/cjs/react.development.js:
3365
- (**
3366
- * @license React
3367
- * react.development.js
3368
- *
3369
- * Copyright (c) Facebook, Inc. and its affiliates.
3370
- *
3371
- * This source code is licensed under the MIT license found in the
3372
- * LICENSE file in the root directory of this source tree.
3373
- *)
3374
-
3375
- react/cjs/react-jsx-runtime.production.min.js:
3376
- (**
3377
- * @license React
3378
- * react-jsx-runtime.production.min.js
3379
- *
3380
- * Copyright (c) Facebook, Inc. and its affiliates.
3381
- *
3382
- * This source code is licensed under the MIT license found in the
3383
- * LICENSE file in the root directory of this source tree.
3384
- *)
3385
-
3386
- react/cjs/react-jsx-runtime.development.js:
3387
- (**
3388
- * @license React
3389
- * react-jsx-runtime.development.js
3390
- *
3391
- * Copyright (c) Facebook, Inc. and its affiliates.
3392
- *
3393
- * This source code is licensed under the MIT license found in the
3394
- * LICENSE file in the root directory of this source tree.
3395
- *)
3396
- */
3397
- //# sourceMappingURL=index.js.map