@arc-js/config-manager 0.0.5 → 0.0.6

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/index.js CHANGED
@@ -1,2517 +1,3 @@
1
-
2
-
3
-
4
-
5
- function __awaiter(thisArg, _arguments, P, generator) {
6
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7
- return new (P || (P = Promise))(function (resolve, reject) {
8
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
9
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
10
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
11
- step((generator = generator.apply(thisArg, _arguments || [])).next());
12
- });
13
- }
14
-
15
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
16
- var e = new Error(message);
17
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
18
- };
1
+ var index = {};
19
2
 
20
- var jsxRuntime = {exports: {}};
21
-
22
- var reactJsxRuntime_production = {};
23
-
24
-
25
- var hasRequiredReactJsxRuntime_production;
26
-
27
- function requireReactJsxRuntime_production () {
28
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
29
- hasRequiredReactJsxRuntime_production = 1;
30
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
31
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
32
- function jsxProd(type, config, maybeKey) {
33
- var key = null;
34
- void 0 !== maybeKey && (key = "" + maybeKey);
35
- void 0 !== config.key && (key = "" + config.key);
36
- if ("key" in config) {
37
- maybeKey = {};
38
- for (var propName in config)
39
- "key" !== propName && (maybeKey[propName] = config[propName]);
40
- } else maybeKey = config;
41
- config = maybeKey.ref;
42
- return {
43
- $$typeof: REACT_ELEMENT_TYPE,
44
- type: type,
45
- key: key,
46
- ref: void 0 !== config ? config : null,
47
- props: maybeKey
48
- };
49
- }
50
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
51
- reactJsxRuntime_production.jsx = jsxProd;
52
- reactJsxRuntime_production.jsxs = jsxProd;
53
- return reactJsxRuntime_production;
54
- }
55
-
56
- var reactJsxRuntime_development = {};
57
-
58
- var react = {exports: {}};
59
-
60
- var react_production = {};
61
-
62
-
63
- var hasRequiredReact_production;
64
-
65
- function requireReact_production () {
66
- if (hasRequiredReact_production) return react_production;
67
- hasRequiredReact_production = 1;
68
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
69
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
70
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
71
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
72
- REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
73
- REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
74
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
75
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
76
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
77
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
78
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
79
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
80
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
81
- function getIteratorFn(maybeIterable) {
82
- if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
83
- maybeIterable =
84
- (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
85
- maybeIterable["@@iterator"];
86
- return "function" === typeof maybeIterable ? maybeIterable : null;
87
- }
88
- var ReactNoopUpdateQueue = {
89
- isMounted: function () {
90
- return false;
91
- },
92
- enqueueForceUpdate: function () {},
93
- enqueueReplaceState: function () {},
94
- enqueueSetState: function () {}
95
- },
96
- assign = Object.assign,
97
- emptyObject = {};
98
- function Component(props, context, updater) {
99
- this.props = props;
100
- this.context = context;
101
- this.refs = emptyObject;
102
- this.updater = updater || ReactNoopUpdateQueue;
103
- }
104
- Component.prototype.isReactComponent = {};
105
- Component.prototype.setState = function (partialState, callback) {
106
- if (
107
- "object" !== typeof partialState &&
108
- "function" !== typeof partialState &&
109
- null != partialState
110
- )
111
- throw Error(
112
- "takes an object of state variables to update or a function which returns an object of state variables."
113
- );
114
- this.updater.enqueueSetState(this, partialState, callback, "setState");
115
- };
116
- Component.prototype.forceUpdate = function (callback) {
117
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
118
- };
119
- function ComponentDummy() {}
120
- ComponentDummy.prototype = Component.prototype;
121
- function PureComponent(props, context, updater) {
122
- this.props = props;
123
- this.context = context;
124
- this.refs = emptyObject;
125
- this.updater = updater || ReactNoopUpdateQueue;
126
- }
127
- var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
128
- pureComponentPrototype.constructor = PureComponent;
129
- assign(pureComponentPrototype, Component.prototype);
130
- pureComponentPrototype.isPureReactComponent = true;
131
- var isArrayImpl = Array.isArray;
132
- function noop() {}
133
- var ReactSharedInternals = { H: null, A: null, T: null, S: null },
134
- hasOwnProperty = Object.prototype.hasOwnProperty;
135
- function ReactElement(type, key, props) {
136
- var refProp = props.ref;
137
- return {
138
- $$typeof: REACT_ELEMENT_TYPE,
139
- type: type,
140
- key: key,
141
- ref: void 0 !== refProp ? refProp : null,
142
- props: props
143
- };
144
- }
145
- function cloneAndReplaceKey(oldElement, newKey) {
146
- return ReactElement(oldElement.type, newKey, oldElement.props);
147
- }
148
- function isValidElement(object) {
149
- return (
150
- "object" === typeof object &&
151
- null !== object &&
152
- object.$$typeof === REACT_ELEMENT_TYPE
153
- );
154
- }
155
- function escape(key) {
156
- var escaperLookup = { "=": "=0", ":": "=2" };
157
- return (
158
- "$" +
159
- key.replace(/[=:]/g, function (match) {
160
- return escaperLookup[match];
161
- })
162
- );
163
- }
164
- var userProvidedKeyEscapeRegex = /\/+/g;
165
- function getElementKey(element, index) {
166
- return "object" === typeof element && null !== element && null != element.key
167
- ? escape("" + element.key)
168
- : index.toString(36);
169
- }
170
- function resolveThenable(thenable) {
171
- switch (thenable.status) {
172
- case "fulfilled":
173
- return thenable.value;
174
- case "rejected":
175
- throw thenable.reason;
176
- default:
177
- switch (
178
- ("string" === typeof thenable.status
179
- ? thenable.then(noop, noop)
180
- : ((thenable.status = "pending"),
181
- thenable.then(
182
- function (fulfilledValue) {
183
- "pending" === thenable.status &&
184
- ((thenable.status = "fulfilled"),
185
- (thenable.value = fulfilledValue));
186
- },
187
- function (error) {
188
- "pending" === thenable.status &&
189
- ((thenable.status = "rejected"), (thenable.reason = error));
190
- }
191
- )),
192
- thenable.status)
193
- ) {
194
- case "fulfilled":
195
- return thenable.value;
196
- case "rejected":
197
- throw thenable.reason;
198
- }
199
- }
200
- throw thenable;
201
- }
202
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
203
- var type = typeof children;
204
- if ("undefined" === type || "boolean" === type) children = null;
205
- var invokeCallback = false;
206
- if (null === children) invokeCallback = true;
207
- else
208
- switch (type) {
209
- case "bigint":
210
- case "string":
211
- case "number":
212
- invokeCallback = true;
213
- break;
214
- case "object":
215
- switch (children.$$typeof) {
216
- case REACT_ELEMENT_TYPE:
217
- case REACT_PORTAL_TYPE:
218
- invokeCallback = true;
219
- break;
220
- case REACT_LAZY_TYPE:
221
- return (
222
- (invokeCallback = children._init),
223
- mapIntoArray(
224
- invokeCallback(children._payload),
225
- array,
226
- escapedPrefix,
227
- nameSoFar,
228
- callback
229
- )
230
- );
231
- }
232
- }
233
- if (invokeCallback)
234
- return (
235
- (callback = callback(children)),
236
- (invokeCallback =
237
- "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
238
- isArrayImpl(callback)
239
- ? ((escapedPrefix = ""),
240
- null != invokeCallback &&
241
- (escapedPrefix =
242
- invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
243
- mapIntoArray(callback, array, escapedPrefix, "", function (c) {
244
- return c;
245
- }))
246
- : null != callback &&
247
- (isValidElement(callback) &&
248
- (callback = cloneAndReplaceKey(
249
- callback,
250
- escapedPrefix +
251
- (null == callback.key ||
252
- (children && children.key === callback.key)
253
- ? ""
254
- : ("" + callback.key).replace(
255
- userProvidedKeyEscapeRegex,
256
- "$&/"
257
- ) + "/") +
258
- invokeCallback
259
- )),
260
- array.push(callback)),
261
- 1
262
- );
263
- invokeCallback = 0;
264
- var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
265
- if (isArrayImpl(children))
266
- for (var i = 0; i < children.length; i++)
267
- (nameSoFar = children[i]),
268
- (type = nextNamePrefix + getElementKey(nameSoFar, i)),
269
- (invokeCallback += mapIntoArray(
270
- nameSoFar,
271
- array,
272
- escapedPrefix,
273
- type,
274
- callback
275
- ));
276
- else if (((i = getIteratorFn(children)), "function" === typeof i))
277
- for (
278
- children = i.call(children), i = 0;
279
- !(nameSoFar = children.next()).done;
280
-
281
- )
282
- (nameSoFar = nameSoFar.value),
283
- (type = nextNamePrefix + getElementKey(nameSoFar, i++)),
284
- (invokeCallback += mapIntoArray(
285
- nameSoFar,
286
- array,
287
- escapedPrefix,
288
- type,
289
- callback
290
- ));
291
- else if ("object" === type) {
292
- if ("function" === typeof children.then)
293
- return mapIntoArray(
294
- resolveThenable(children),
295
- array,
296
- escapedPrefix,
297
- nameSoFar,
298
- callback
299
- );
300
- array = String(children);
301
- throw Error(
302
- "Objects are not valid as a React child (found: " +
303
- ("[object Object]" === array
304
- ? "object with keys {" + Object.keys(children).join(", ") + "}"
305
- : array) +
306
- "). If you meant to render a collection of children, use an array instead."
307
- );
308
- }
309
- return invokeCallback;
310
- }
311
- function mapChildren(children, func, context) {
312
- if (null == children) return children;
313
- var result = [],
314
- count = 0;
315
- mapIntoArray(children, result, "", "", function (child) {
316
- return func.call(context, child, count++);
317
- });
318
- return result;
319
- }
320
- function lazyInitializer(payload) {
321
- if (-1 === payload._status) {
322
- var ctor = payload._result;
323
- ctor = ctor();
324
- ctor.then(
325
- function (moduleObject) {
326
- if (0 === payload._status || -1 === payload._status)
327
- (payload._status = 1), (payload._result = moduleObject);
328
- },
329
- function (error) {
330
- if (0 === payload._status || -1 === payload._status)
331
- (payload._status = 2), (payload._result = error);
332
- }
333
- );
334
- -1 === payload._status && ((payload._status = 0), (payload._result = ctor));
335
- }
336
- if (1 === payload._status) return payload._result.default;
337
- throw payload._result;
338
- }
339
- var reportGlobalError =
340
- "function" === typeof reportError
341
- ? reportError
342
- : function (error) {
343
- if (
344
- "object" === typeof window &&
345
- "function" === typeof window.ErrorEvent
346
- ) {
347
- var event = new window.ErrorEvent("error", {
348
- bubbles: true,
349
- cancelable: true,
350
- message:
351
- "object" === typeof error &&
352
- null !== error &&
353
- "string" === typeof error.message
354
- ? String(error.message)
355
- : String(error),
356
- error: error
357
- });
358
- if (!window.dispatchEvent(event)) return;
359
- } else if (
360
- "object" === typeof process &&
361
- "function" === typeof process.emit
362
- ) {
363
- process.emit("uncaughtException", error);
364
- return;
365
- }
366
- console.error(error);
367
- },
368
- Children = {
369
- map: mapChildren,
370
- forEach: function (children, forEachFunc, forEachContext) {
371
- mapChildren(
372
- children,
373
- function () {
374
- forEachFunc.apply(this, arguments);
375
- },
376
- forEachContext
377
- );
378
- },
379
- count: function (children) {
380
- var n = 0;
381
- mapChildren(children, function () {
382
- n++;
383
- });
384
- return n;
385
- },
386
- toArray: function (children) {
387
- return (
388
- mapChildren(children, function (child) {
389
- return child;
390
- }) || []
391
- );
392
- },
393
- only: function (children) {
394
- if (!isValidElement(children))
395
- throw Error(
396
- "React.Children.only expected to receive a single React element child."
397
- );
398
- return children;
399
- }
400
- };
401
- react_production.Activity = REACT_ACTIVITY_TYPE;
402
- react_production.Children = Children;
403
- react_production.Component = Component;
404
- react_production.Fragment = REACT_FRAGMENT_TYPE;
405
- react_production.Profiler = REACT_PROFILER_TYPE;
406
- react_production.PureComponent = PureComponent;
407
- react_production.StrictMode = REACT_STRICT_MODE_TYPE;
408
- react_production.Suspense = REACT_SUSPENSE_TYPE;
409
- react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
410
- ReactSharedInternals;
411
- react_production.__COMPILER_RUNTIME = {
412
- __proto__: null,
413
- c: function (size) {
414
- return ReactSharedInternals.H.useMemoCache(size);
415
- }
416
- };
417
- react_production.cache = function (fn) {
418
- return function () {
419
- return fn.apply(null, arguments);
420
- };
421
- };
422
- react_production.cacheSignal = function () {
423
- return null;
424
- };
425
- react_production.cloneElement = function (element, config, children) {
426
- if (null === element || void 0 === element)
427
- throw Error(
428
- "The argument must be a React element, but you passed " + element + "."
429
- );
430
- var props = assign({}, element.props),
431
- key = element.key;
432
- if (null != config)
433
- for (propName in (void 0 !== config.key && (key = "" + config.key), config))
434
- !hasOwnProperty.call(config, propName) ||
435
- "key" === propName ||
436
- "__self" === propName ||
437
- "__source" === propName ||
438
- ("ref" === propName && void 0 === config.ref) ||
439
- (props[propName] = config[propName]);
440
- var propName = arguments.length - 2;
441
- if (1 === propName) props.children = children;
442
- else if (1 < propName) {
443
- for (var childArray = Array(propName), i = 0; i < propName; i++)
444
- childArray[i] = arguments[i + 2];
445
- props.children = childArray;
446
- }
447
- return ReactElement(element.type, key, props);
448
- };
449
- react_production.createContext = function (defaultValue) {
450
- defaultValue = {
451
- $$typeof: REACT_CONTEXT_TYPE,
452
- _currentValue: defaultValue,
453
- _currentValue2: defaultValue,
454
- _threadCount: 0,
455
- Provider: null,
456
- Consumer: null
457
- };
458
- defaultValue.Provider = defaultValue;
459
- defaultValue.Consumer = {
460
- $$typeof: REACT_CONSUMER_TYPE,
461
- _context: defaultValue
462
- };
463
- return defaultValue;
464
- };
465
- react_production.createElement = function (type, config, children) {
466
- var propName,
467
- props = {},
468
- key = null;
469
- if (null != config)
470
- for (propName in (void 0 !== config.key && (key = "" + config.key), config))
471
- hasOwnProperty.call(config, propName) &&
472
- "key" !== propName &&
473
- "__self" !== propName &&
474
- "__source" !== propName &&
475
- (props[propName] = config[propName]);
476
- var childrenLength = arguments.length - 2;
477
- if (1 === childrenLength) props.children = children;
478
- else if (1 < childrenLength) {
479
- for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
480
- childArray[i] = arguments[i + 2];
481
- props.children = childArray;
482
- }
483
- if (type && type.defaultProps)
484
- for (propName in ((childrenLength = type.defaultProps), childrenLength))
485
- void 0 === props[propName] &&
486
- (props[propName] = childrenLength[propName]);
487
- return ReactElement(type, key, props);
488
- };
489
- react_production.createRef = function () {
490
- return { current: null };
491
- };
492
- react_production.forwardRef = function (render) {
493
- return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
494
- };
495
- react_production.isValidElement = isValidElement;
496
- react_production.lazy = function (ctor) {
497
- return {
498
- $$typeof: REACT_LAZY_TYPE,
499
- _payload: { _status: -1, _result: ctor },
500
- _init: lazyInitializer
501
- };
502
- };
503
- react_production.memo = function (type, compare) {
504
- return {
505
- $$typeof: REACT_MEMO_TYPE,
506
- type: type,
507
- compare: void 0 === compare ? null : compare
508
- };
509
- };
510
- react_production.startTransition = function (scope) {
511
- var prevTransition = ReactSharedInternals.T,
512
- currentTransition = {};
513
- ReactSharedInternals.T = currentTransition;
514
- try {
515
- var returnValue = scope(),
516
- onStartTransitionFinish = ReactSharedInternals.S;
517
- null !== onStartTransitionFinish &&
518
- onStartTransitionFinish(currentTransition, returnValue);
519
- "object" === typeof returnValue &&
520
- null !== returnValue &&
521
- "function" === typeof returnValue.then &&
522
- returnValue.then(noop, reportGlobalError);
523
- } catch (error) {
524
- reportGlobalError(error);
525
- } finally {
526
- null !== prevTransition &&
527
- null !== currentTransition.types &&
528
- (prevTransition.types = currentTransition.types),
529
- (ReactSharedInternals.T = prevTransition);
530
- }
531
- };
532
- react_production.unstable_useCacheRefresh = function () {
533
- return ReactSharedInternals.H.useCacheRefresh();
534
- };
535
- react_production.use = function (usable) {
536
- return ReactSharedInternals.H.use(usable);
537
- };
538
- react_production.useActionState = function (action, initialState, permalink) {
539
- return ReactSharedInternals.H.useActionState(action, initialState, permalink);
540
- };
541
- react_production.useCallback = function (callback, deps) {
542
- return ReactSharedInternals.H.useCallback(callback, deps);
543
- };
544
- react_production.useContext = function (Context) {
545
- return ReactSharedInternals.H.useContext(Context);
546
- };
547
- react_production.useDebugValue = function () {};
548
- react_production.useDeferredValue = function (value, initialValue) {
549
- return ReactSharedInternals.H.useDeferredValue(value, initialValue);
550
- };
551
- react_production.useEffect = function (create, deps) {
552
- return ReactSharedInternals.H.useEffect(create, deps);
553
- };
554
- react_production.useEffectEvent = function (callback) {
555
- return ReactSharedInternals.H.useEffectEvent(callback);
556
- };
557
- react_production.useId = function () {
558
- return ReactSharedInternals.H.useId();
559
- };
560
- react_production.useImperativeHandle = function (ref, create, deps) {
561
- return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
562
- };
563
- react_production.useInsertionEffect = function (create, deps) {
564
- return ReactSharedInternals.H.useInsertionEffect(create, deps);
565
- };
566
- react_production.useLayoutEffect = function (create, deps) {
567
- return ReactSharedInternals.H.useLayoutEffect(create, deps);
568
- };
569
- react_production.useMemo = function (create, deps) {
570
- return ReactSharedInternals.H.useMemo(create, deps);
571
- };
572
- react_production.useOptimistic = function (passthrough, reducer) {
573
- return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
574
- };
575
- react_production.useReducer = function (reducer, initialArg, init) {
576
- return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
577
- };
578
- react_production.useRef = function (initialValue) {
579
- return ReactSharedInternals.H.useRef(initialValue);
580
- };
581
- react_production.useState = function (initialState) {
582
- return ReactSharedInternals.H.useState(initialState);
583
- };
584
- react_production.useSyncExternalStore = function (
585
- subscribe,
586
- getSnapshot,
587
- getServerSnapshot
588
- ) {
589
- return ReactSharedInternals.H.useSyncExternalStore(
590
- subscribe,
591
- getSnapshot,
592
- getServerSnapshot
593
- );
594
- };
595
- react_production.useTransition = function () {
596
- return ReactSharedInternals.H.useTransition();
597
- };
598
- react_production.version = "19.2.3";
599
- return react_production;
600
- }
601
-
602
- var react_development = {exports: {}};
603
-
604
- react_development.exports;
605
-
606
- var hasRequiredReact_development;
607
-
608
- function requireReact_development () {
609
- if (hasRequiredReact_development) return react_development.exports;
610
- hasRequiredReact_development = 1;
611
- (function (module, exports$1) {
612
- "production" !== process.env.NODE_ENV &&
613
- (function () {
614
- function defineDeprecationWarning(methodName, info) {
615
- Object.defineProperty(Component.prototype, methodName, {
616
- get: function () {
617
- console.warn(
618
- "%s(...) is deprecated in plain JavaScript React classes. %s",
619
- info[0],
620
- info[1]
621
- );
622
- }
623
- });
624
- }
625
- function getIteratorFn(maybeIterable) {
626
- if (null === maybeIterable || "object" !== typeof maybeIterable)
627
- return null;
628
- maybeIterable =
629
- (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
630
- maybeIterable["@@iterator"];
631
- return "function" === typeof maybeIterable ? maybeIterable : null;
632
- }
633
- function warnNoop(publicInstance, callerName) {
634
- publicInstance =
635
- ((publicInstance = publicInstance.constructor) &&
636
- (publicInstance.displayName || publicInstance.name)) ||
637
- "ReactClass";
638
- var warningKey = publicInstance + "." + callerName;
639
- didWarnStateUpdateForUnmountedComponent[warningKey] ||
640
- (console.error(
641
- "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.",
642
- callerName,
643
- publicInstance
644
- ),
645
- (didWarnStateUpdateForUnmountedComponent[warningKey] = true));
646
- }
647
- function Component(props, context, updater) {
648
- this.props = props;
649
- this.context = context;
650
- this.refs = emptyObject;
651
- this.updater = updater || ReactNoopUpdateQueue;
652
- }
653
- function ComponentDummy() {}
654
- function PureComponent(props, context, updater) {
655
- this.props = props;
656
- this.context = context;
657
- this.refs = emptyObject;
658
- this.updater = updater || ReactNoopUpdateQueue;
659
- }
660
- function noop() {}
661
- function testStringCoercion(value) {
662
- return "" + value;
663
- }
664
- function checkKeyStringCoercion(value) {
665
- try {
666
- testStringCoercion(value);
667
- var JSCompiler_inline_result = !1;
668
- } catch (e) {
669
- JSCompiler_inline_result = true;
670
- }
671
- if (JSCompiler_inline_result) {
672
- JSCompiler_inline_result = console;
673
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
674
- var JSCompiler_inline_result$jscomp$0 =
675
- ("function" === typeof Symbol &&
676
- Symbol.toStringTag &&
677
- value[Symbol.toStringTag]) ||
678
- value.constructor.name ||
679
- "Object";
680
- JSCompiler_temp_const.call(
681
- JSCompiler_inline_result,
682
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
683
- JSCompiler_inline_result$jscomp$0
684
- );
685
- return testStringCoercion(value);
686
- }
687
- }
688
- function getComponentNameFromType(type) {
689
- if (null == type) return null;
690
- if ("function" === typeof type)
691
- return type.$$typeof === REACT_CLIENT_REFERENCE
692
- ? null
693
- : type.displayName || type.name || null;
694
- if ("string" === typeof type) return type;
695
- switch (type) {
696
- case REACT_FRAGMENT_TYPE:
697
- return "Fragment";
698
- case REACT_PROFILER_TYPE:
699
- return "Profiler";
700
- case REACT_STRICT_MODE_TYPE:
701
- return "StrictMode";
702
- case REACT_SUSPENSE_TYPE:
703
- return "Suspense";
704
- case REACT_SUSPENSE_LIST_TYPE:
705
- return "SuspenseList";
706
- case REACT_ACTIVITY_TYPE:
707
- return "Activity";
708
- }
709
- if ("object" === typeof type)
710
- switch (
711
- ("number" === typeof type.tag &&
712
- console.error(
713
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
714
- ),
715
- type.$$typeof)
716
- ) {
717
- case REACT_PORTAL_TYPE:
718
- return "Portal";
719
- case REACT_CONTEXT_TYPE:
720
- return type.displayName || "Context";
721
- case REACT_CONSUMER_TYPE:
722
- return (type._context.displayName || "Context") + ".Consumer";
723
- case REACT_FORWARD_REF_TYPE:
724
- var innerType = type.render;
725
- type = type.displayName;
726
- type ||
727
- ((type = innerType.displayName || innerType.name || ""),
728
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
729
- return type;
730
- case REACT_MEMO_TYPE:
731
- return (
732
- (innerType = type.displayName || null),
733
- null !== innerType
734
- ? innerType
735
- : getComponentNameFromType(type.type) || "Memo"
736
- );
737
- case REACT_LAZY_TYPE:
738
- innerType = type._payload;
739
- type = type._init;
740
- try {
741
- return getComponentNameFromType(type(innerType));
742
- } catch (x) {}
743
- }
744
- return null;
745
- }
746
- function getTaskName(type) {
747
- if (type === REACT_FRAGMENT_TYPE) return "<>";
748
- if (
749
- "object" === typeof type &&
750
- null !== type &&
751
- type.$$typeof === REACT_LAZY_TYPE
752
- )
753
- return "<...>";
754
- try {
755
- var name = getComponentNameFromType(type);
756
- return name ? "<" + name + ">" : "<...>";
757
- } catch (x) {
758
- return "<...>";
759
- }
760
- }
761
- function getOwner() {
762
- var dispatcher = ReactSharedInternals.A;
763
- return null === dispatcher ? null : dispatcher.getOwner();
764
- }
765
- function UnknownOwner() {
766
- return Error("react-stack-top-frame");
767
- }
768
- function hasValidKey(config) {
769
- if (hasOwnProperty.call(config, "key")) {
770
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
771
- if (getter && getter.isReactWarning) return false;
772
- }
773
- return void 0 !== config.key;
774
- }
775
- function defineKeyPropWarningGetter(props, displayName) {
776
- function warnAboutAccessingKey() {
777
- specialPropKeyWarningShown ||
778
- ((specialPropKeyWarningShown = true),
779
- console.error(
780
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
781
- displayName
782
- ));
783
- }
784
- warnAboutAccessingKey.isReactWarning = true;
785
- Object.defineProperty(props, "key", {
786
- get: warnAboutAccessingKey,
787
- configurable: true
788
- });
789
- }
790
- function elementRefGetterWithDeprecationWarning() {
791
- var componentName = getComponentNameFromType(this.type);
792
- didWarnAboutElementRef[componentName] ||
793
- ((didWarnAboutElementRef[componentName] = true),
794
- console.error(
795
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
796
- ));
797
- componentName = this.props.ref;
798
- return void 0 !== componentName ? componentName : null;
799
- }
800
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
801
- var refProp = props.ref;
802
- type = {
803
- $$typeof: REACT_ELEMENT_TYPE,
804
- type: type,
805
- key: key,
806
- props: props,
807
- _owner: owner
808
- };
809
- null !== (void 0 !== refProp ? refProp : null)
810
- ? Object.defineProperty(type, "ref", {
811
- enumerable: false,
812
- get: elementRefGetterWithDeprecationWarning
813
- })
814
- : Object.defineProperty(type, "ref", { enumerable: false, value: null });
815
- type._store = {};
816
- Object.defineProperty(type._store, "validated", {
817
- configurable: false,
818
- enumerable: false,
819
- writable: true,
820
- value: 0
821
- });
822
- Object.defineProperty(type, "_debugInfo", {
823
- configurable: false,
824
- enumerable: false,
825
- writable: true,
826
- value: null
827
- });
828
- Object.defineProperty(type, "_debugStack", {
829
- configurable: false,
830
- enumerable: false,
831
- writable: true,
832
- value: debugStack
833
- });
834
- Object.defineProperty(type, "_debugTask", {
835
- configurable: false,
836
- enumerable: false,
837
- writable: true,
838
- value: debugTask
839
- });
840
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
841
- return type;
842
- }
843
- function cloneAndReplaceKey(oldElement, newKey) {
844
- newKey = ReactElement(
845
- oldElement.type,
846
- newKey,
847
- oldElement.props,
848
- oldElement._owner,
849
- oldElement._debugStack,
850
- oldElement._debugTask
851
- );
852
- oldElement._store &&
853
- (newKey._store.validated = oldElement._store.validated);
854
- return newKey;
855
- }
856
- function validateChildKeys(node) {
857
- isValidElement(node)
858
- ? node._store && (node._store.validated = 1)
859
- : "object" === typeof node &&
860
- null !== node &&
861
- node.$$typeof === REACT_LAZY_TYPE &&
862
- ("fulfilled" === node._payload.status
863
- ? isValidElement(node._payload.value) &&
864
- node._payload.value._store &&
865
- (node._payload.value._store.validated = 1)
866
- : node._store && (node._store.validated = 1));
867
- }
868
- function isValidElement(object) {
869
- return (
870
- "object" === typeof object &&
871
- null !== object &&
872
- object.$$typeof === REACT_ELEMENT_TYPE
873
- );
874
- }
875
- function escape(key) {
876
- var escaperLookup = { "=": "=0", ":": "=2" };
877
- return (
878
- "$" +
879
- key.replace(/[=:]/g, function (match) {
880
- return escaperLookup[match];
881
- })
882
- );
883
- }
884
- function getElementKey(element, index) {
885
- return "object" === typeof element &&
886
- null !== element &&
887
- null != element.key
888
- ? (checkKeyStringCoercion(element.key), escape("" + element.key))
889
- : index.toString(36);
890
- }
891
- function resolveThenable(thenable) {
892
- switch (thenable.status) {
893
- case "fulfilled":
894
- return thenable.value;
895
- case "rejected":
896
- throw thenable.reason;
897
- default:
898
- switch (
899
- ("string" === typeof thenable.status
900
- ? thenable.then(noop, noop)
901
- : ((thenable.status = "pending"),
902
- thenable.then(
903
- function (fulfilledValue) {
904
- "pending" === thenable.status &&
905
- ((thenable.status = "fulfilled"),
906
- (thenable.value = fulfilledValue));
907
- },
908
- function (error) {
909
- "pending" === thenable.status &&
910
- ((thenable.status = "rejected"),
911
- (thenable.reason = error));
912
- }
913
- )),
914
- thenable.status)
915
- ) {
916
- case "fulfilled":
917
- return thenable.value;
918
- case "rejected":
919
- throw thenable.reason;
920
- }
921
- }
922
- throw thenable;
923
- }
924
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
925
- var type = typeof children;
926
- if ("undefined" === type || "boolean" === type) children = null;
927
- var invokeCallback = false;
928
- if (null === children) invokeCallback = true;
929
- else
930
- switch (type) {
931
- case "bigint":
932
- case "string":
933
- case "number":
934
- invokeCallback = true;
935
- break;
936
- case "object":
937
- switch (children.$$typeof) {
938
- case REACT_ELEMENT_TYPE:
939
- case REACT_PORTAL_TYPE:
940
- invokeCallback = true;
941
- break;
942
- case REACT_LAZY_TYPE:
943
- return (
944
- (invokeCallback = children._init),
945
- mapIntoArray(
946
- invokeCallback(children._payload),
947
- array,
948
- escapedPrefix,
949
- nameSoFar,
950
- callback
951
- )
952
- );
953
- }
954
- }
955
- if (invokeCallback) {
956
- invokeCallback = children;
957
- callback = callback(invokeCallback);
958
- var childKey =
959
- "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
960
- isArrayImpl(callback)
961
- ? ((escapedPrefix = ""),
962
- null != childKey &&
963
- (escapedPrefix =
964
- childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
965
- mapIntoArray(callback, array, escapedPrefix, "", function (c) {
966
- return c;
967
- }))
968
- : null != callback &&
969
- (isValidElement(callback) &&
970
- (null != callback.key &&
971
- ((invokeCallback && invokeCallback.key === callback.key) ||
972
- checkKeyStringCoercion(callback.key)),
973
- (escapedPrefix = cloneAndReplaceKey(
974
- callback,
975
- escapedPrefix +
976
- (null == callback.key ||
977
- (invokeCallback && invokeCallback.key === callback.key)
978
- ? ""
979
- : ("" + callback.key).replace(
980
- userProvidedKeyEscapeRegex,
981
- "$&/"
982
- ) + "/") +
983
- childKey
984
- )),
985
- "" !== nameSoFar &&
986
- null != invokeCallback &&
987
- isValidElement(invokeCallback) &&
988
- null == invokeCallback.key &&
989
- invokeCallback._store &&
990
- !invokeCallback._store.validated &&
991
- (escapedPrefix._store.validated = 2),
992
- (callback = escapedPrefix)),
993
- array.push(callback));
994
- return 1;
995
- }
996
- invokeCallback = 0;
997
- childKey = "" === nameSoFar ? "." : nameSoFar + ":";
998
- if (isArrayImpl(children))
999
- for (var i = 0; i < children.length; i++)
1000
- (nameSoFar = children[i]),
1001
- (type = childKey + getElementKey(nameSoFar, i)),
1002
- (invokeCallback += mapIntoArray(
1003
- nameSoFar,
1004
- array,
1005
- escapedPrefix,
1006
- type,
1007
- callback
1008
- ));
1009
- else if (((i = getIteratorFn(children)), "function" === typeof i))
1010
- for (
1011
- i === children.entries &&
1012
- (didWarnAboutMaps ||
1013
- console.warn(
1014
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
1015
- ),
1016
- (didWarnAboutMaps = true)),
1017
- children = i.call(children),
1018
- i = 0;
1019
- !(nameSoFar = children.next()).done;
1020
-
1021
- )
1022
- (nameSoFar = nameSoFar.value),
1023
- (type = childKey + getElementKey(nameSoFar, i++)),
1024
- (invokeCallback += mapIntoArray(
1025
- nameSoFar,
1026
- array,
1027
- escapedPrefix,
1028
- type,
1029
- callback
1030
- ));
1031
- else if ("object" === type) {
1032
- if ("function" === typeof children.then)
1033
- return mapIntoArray(
1034
- resolveThenable(children),
1035
- array,
1036
- escapedPrefix,
1037
- nameSoFar,
1038
- callback
1039
- );
1040
- array = String(children);
1041
- throw Error(
1042
- "Objects are not valid as a React child (found: " +
1043
- ("[object Object]" === array
1044
- ? "object with keys {" + Object.keys(children).join(", ") + "}"
1045
- : array) +
1046
- "). If you meant to render a collection of children, use an array instead."
1047
- );
1048
- }
1049
- return invokeCallback;
1050
- }
1051
- function mapChildren(children, func, context) {
1052
- if (null == children) return children;
1053
- var result = [],
1054
- count = 0;
1055
- mapIntoArray(children, result, "", "", function (child) {
1056
- return func.call(context, child, count++);
1057
- });
1058
- return result;
1059
- }
1060
- function lazyInitializer(payload) {
1061
- if (-1 === payload._status) {
1062
- var ioInfo = payload._ioInfo;
1063
- null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
1064
- ioInfo = payload._result;
1065
- var thenable = ioInfo();
1066
- thenable.then(
1067
- function (moduleObject) {
1068
- if (0 === payload._status || -1 === payload._status) {
1069
- payload._status = 1;
1070
- payload._result = moduleObject;
1071
- var _ioInfo = payload._ioInfo;
1072
- null != _ioInfo && (_ioInfo.end = performance.now());
1073
- void 0 === thenable.status &&
1074
- ((thenable.status = "fulfilled"),
1075
- (thenable.value = moduleObject));
1076
- }
1077
- },
1078
- function (error) {
1079
- if (0 === payload._status || -1 === payload._status) {
1080
- payload._status = 2;
1081
- payload._result = error;
1082
- var _ioInfo2 = payload._ioInfo;
1083
- null != _ioInfo2 && (_ioInfo2.end = performance.now());
1084
- void 0 === thenable.status &&
1085
- ((thenable.status = "rejected"), (thenable.reason = error));
1086
- }
1087
- }
1088
- );
1089
- ioInfo = payload._ioInfo;
1090
- if (null != ioInfo) {
1091
- ioInfo.value = thenable;
1092
- var displayName = thenable.displayName;
1093
- "string" === typeof displayName && (ioInfo.name = displayName);
1094
- }
1095
- -1 === payload._status &&
1096
- ((payload._status = 0), (payload._result = thenable));
1097
- }
1098
- if (1 === payload._status)
1099
- return (
1100
- (ioInfo = payload._result),
1101
- void 0 === ioInfo &&
1102
- console.error(
1103
- "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?",
1104
- ioInfo
1105
- ),
1106
- "default" in ioInfo ||
1107
- console.error(
1108
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
1109
- ioInfo
1110
- ),
1111
- ioInfo.default
1112
- );
1113
- throw payload._result;
1114
- }
1115
- function resolveDispatcher() {
1116
- var dispatcher = ReactSharedInternals.H;
1117
- null === dispatcher &&
1118
- console.error(
1119
- "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
1120
- );
1121
- return dispatcher;
1122
- }
1123
- function releaseAsyncTransition() {
1124
- ReactSharedInternals.asyncTransitions--;
1125
- }
1126
- function enqueueTask(task) {
1127
- if (null === enqueueTaskImpl)
1128
- try {
1129
- var requireString = ("require" + Math.random()).slice(0, 7);
1130
- enqueueTaskImpl = (module && module[requireString]).call(
1131
- module,
1132
- "timers"
1133
- ).setImmediate;
1134
- } catch (_err) {
1135
- enqueueTaskImpl = function (callback) {
1136
- false === didWarnAboutMessageChannel &&
1137
- ((didWarnAboutMessageChannel = true),
1138
- "undefined" === typeof MessageChannel &&
1139
- console.error(
1140
- "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."
1141
- ));
1142
- var channel = new MessageChannel();
1143
- channel.port1.onmessage = callback;
1144
- channel.port2.postMessage(void 0);
1145
- };
1146
- }
1147
- return enqueueTaskImpl(task);
1148
- }
1149
- function aggregateErrors(errors) {
1150
- return 1 < errors.length && "function" === typeof AggregateError
1151
- ? new AggregateError(errors)
1152
- : errors[0];
1153
- }
1154
- function popActScope(prevActQueue, prevActScopeDepth) {
1155
- prevActScopeDepth !== actScopeDepth - 1 &&
1156
- console.error(
1157
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
1158
- );
1159
- actScopeDepth = prevActScopeDepth;
1160
- }
1161
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1162
- var queue = ReactSharedInternals.actQueue;
1163
- if (null !== queue)
1164
- if (0 !== queue.length)
1165
- try {
1166
- flushActQueue(queue);
1167
- enqueueTask(function () {
1168
- return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1169
- });
1170
- return;
1171
- } catch (error) {
1172
- ReactSharedInternals.thrownErrors.push(error);
1173
- }
1174
- else ReactSharedInternals.actQueue = null;
1175
- 0 < ReactSharedInternals.thrownErrors.length
1176
- ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
1177
- (ReactSharedInternals.thrownErrors.length = 0),
1178
- reject(queue))
1179
- : resolve(returnValue);
1180
- }
1181
- function flushActQueue(queue) {
1182
- if (!isFlushing) {
1183
- isFlushing = true;
1184
- var i = 0;
1185
- try {
1186
- for (; i < queue.length; i++) {
1187
- var callback = queue[i];
1188
- do {
1189
- ReactSharedInternals.didUsePromise = !1;
1190
- var continuation = callback(!1);
1191
- if (null !== continuation) {
1192
- if (ReactSharedInternals.didUsePromise) {
1193
- queue[i] = callback;
1194
- queue.splice(0, i);
1195
- return;
1196
- }
1197
- callback = continuation;
1198
- } else break;
1199
- } while (1);
1200
- }
1201
- queue.length = 0;
1202
- } catch (error) {
1203
- queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
1204
- } finally {
1205
- isFlushing = false;
1206
- }
1207
- }
1208
- }
1209
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1210
- "function" ===
1211
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
1212
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1213
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
1214
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
1215
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
1216
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
1217
- REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
1218
- REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
1219
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
1220
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
1221
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
1222
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
1223
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
1224
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
1225
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
1226
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
1227
- didWarnStateUpdateForUnmountedComponent = {},
1228
- ReactNoopUpdateQueue = {
1229
- isMounted: function () {
1230
- return false;
1231
- },
1232
- enqueueForceUpdate: function (publicInstance) {
1233
- warnNoop(publicInstance, "forceUpdate");
1234
- },
1235
- enqueueReplaceState: function (publicInstance) {
1236
- warnNoop(publicInstance, "replaceState");
1237
- },
1238
- enqueueSetState: function (publicInstance) {
1239
- warnNoop(publicInstance, "setState");
1240
- }
1241
- },
1242
- assign = Object.assign,
1243
- emptyObject = {};
1244
- Object.freeze(emptyObject);
1245
- Component.prototype.isReactComponent = {};
1246
- Component.prototype.setState = function (partialState, callback) {
1247
- if (
1248
- "object" !== typeof partialState &&
1249
- "function" !== typeof partialState &&
1250
- null != partialState
1251
- )
1252
- throw Error(
1253
- "takes an object of state variables to update or a function which returns an object of state variables."
1254
- );
1255
- this.updater.enqueueSetState(this, partialState, callback, "setState");
1256
- };
1257
- Component.prototype.forceUpdate = function (callback) {
1258
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
1259
- };
1260
- var deprecatedAPIs = {
1261
- isMounted: [
1262
- "isMounted",
1263
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
1264
- ],
1265
- replaceState: [
1266
- "replaceState",
1267
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
1268
- ]
1269
- };
1270
- for (fnName in deprecatedAPIs)
1271
- deprecatedAPIs.hasOwnProperty(fnName) &&
1272
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1273
- ComponentDummy.prototype = Component.prototype;
1274
- deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
1275
- deprecatedAPIs.constructor = PureComponent;
1276
- assign(deprecatedAPIs, Component.prototype);
1277
- deprecatedAPIs.isPureReactComponent = true;
1278
- var isArrayImpl = Array.isArray,
1279
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
1280
- ReactSharedInternals = {
1281
- H: null,
1282
- A: null,
1283
- T: null,
1284
- S: null,
1285
- actQueue: null,
1286
- asyncTransitions: 0,
1287
- isBatchingLegacy: false,
1288
- didScheduleLegacyUpdate: false,
1289
- didUsePromise: false,
1290
- thrownErrors: [],
1291
- getCurrentStack: null,
1292
- recentlyCreatedOwnerStacks: 0
1293
- },
1294
- hasOwnProperty = Object.prototype.hasOwnProperty,
1295
- createTask = console.createTask
1296
- ? console.createTask
1297
- : function () {
1298
- return null;
1299
- };
1300
- deprecatedAPIs = {
1301
- react_stack_bottom_frame: function (callStackForError) {
1302
- return callStackForError();
1303
- }
1304
- };
1305
- var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
1306
- var didWarnAboutElementRef = {};
1307
- var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
1308
- deprecatedAPIs,
1309
- UnknownOwner
1310
- )();
1311
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1312
- var didWarnAboutMaps = false,
1313
- userProvidedKeyEscapeRegex = /\/+/g,
1314
- reportGlobalError =
1315
- "function" === typeof reportError
1316
- ? reportError
1317
- : function (error) {
1318
- if (
1319
- "object" === typeof window &&
1320
- "function" === typeof window.ErrorEvent
1321
- ) {
1322
- var event = new window.ErrorEvent("error", {
1323
- bubbles: true,
1324
- cancelable: true,
1325
- message:
1326
- "object" === typeof error &&
1327
- null !== error &&
1328
- "string" === typeof error.message
1329
- ? String(error.message)
1330
- : String(error),
1331
- error: error
1332
- });
1333
- if (!window.dispatchEvent(event)) return;
1334
- } else if (
1335
- "object" === typeof process &&
1336
- "function" === typeof process.emit
1337
- ) {
1338
- process.emit("uncaughtException", error);
1339
- return;
1340
- }
1341
- console.error(error);
1342
- },
1343
- didWarnAboutMessageChannel = false,
1344
- enqueueTaskImpl = null,
1345
- actScopeDepth = 0,
1346
- didWarnNoAwaitAct = false,
1347
- isFlushing = false,
1348
- queueSeveralMicrotasks =
1349
- "function" === typeof queueMicrotask
1350
- ? function (callback) {
1351
- queueMicrotask(function () {
1352
- return queueMicrotask(callback);
1353
- });
1354
- }
1355
- : enqueueTask;
1356
- deprecatedAPIs = Object.freeze({
1357
- __proto__: null,
1358
- c: function (size) {
1359
- return resolveDispatcher().useMemoCache(size);
1360
- }
1361
- });
1362
- var fnName = {
1363
- map: mapChildren,
1364
- forEach: function (children, forEachFunc, forEachContext) {
1365
- mapChildren(
1366
- children,
1367
- function () {
1368
- forEachFunc.apply(this, arguments);
1369
- },
1370
- forEachContext
1371
- );
1372
- },
1373
- count: function (children) {
1374
- var n = 0;
1375
- mapChildren(children, function () {
1376
- n++;
1377
- });
1378
- return n;
1379
- },
1380
- toArray: function (children) {
1381
- return (
1382
- mapChildren(children, function (child) {
1383
- return child;
1384
- }) || []
1385
- );
1386
- },
1387
- only: function (children) {
1388
- if (!isValidElement(children))
1389
- throw Error(
1390
- "React.Children.only expected to receive a single React element child."
1391
- );
1392
- return children;
1393
- }
1394
- };
1395
- exports$1.Activity = REACT_ACTIVITY_TYPE;
1396
- exports$1.Children = fnName;
1397
- exports$1.Component = Component;
1398
- exports$1.Fragment = REACT_FRAGMENT_TYPE;
1399
- exports$1.Profiler = REACT_PROFILER_TYPE;
1400
- exports$1.PureComponent = PureComponent;
1401
- exports$1.StrictMode = REACT_STRICT_MODE_TYPE;
1402
- exports$1.Suspense = REACT_SUSPENSE_TYPE;
1403
- exports$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
1404
- ReactSharedInternals;
1405
- exports$1.__COMPILER_RUNTIME = deprecatedAPIs;
1406
- exports$1.act = function (callback) {
1407
- var prevActQueue = ReactSharedInternals.actQueue,
1408
- prevActScopeDepth = actScopeDepth;
1409
- actScopeDepth++;
1410
- var queue = (ReactSharedInternals.actQueue =
1411
- null !== prevActQueue ? prevActQueue : []),
1412
- didAwaitActCall = false;
1413
- try {
1414
- var result = callback();
1415
- } catch (error) {
1416
- ReactSharedInternals.thrownErrors.push(error);
1417
- }
1418
- if (0 < ReactSharedInternals.thrownErrors.length)
1419
- throw (
1420
- (popActScope(prevActQueue, prevActScopeDepth),
1421
- (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
1422
- (ReactSharedInternals.thrownErrors.length = 0),
1423
- callback)
1424
- );
1425
- if (
1426
- null !== result &&
1427
- "object" === typeof result &&
1428
- "function" === typeof result.then
1429
- ) {
1430
- var thenable = result;
1431
- queueSeveralMicrotasks(function () {
1432
- didAwaitActCall ||
1433
- didWarnNoAwaitAct ||
1434
- ((didWarnNoAwaitAct = true),
1435
- console.error(
1436
- "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 () => ...);"
1437
- ));
1438
- });
1439
- return {
1440
- then: function (resolve, reject) {
1441
- didAwaitActCall = true;
1442
- thenable.then(
1443
- function (returnValue) {
1444
- popActScope(prevActQueue, prevActScopeDepth);
1445
- if (0 === prevActScopeDepth) {
1446
- try {
1447
- flushActQueue(queue),
1448
- enqueueTask(function () {
1449
- return recursivelyFlushAsyncActWork(
1450
- returnValue,
1451
- resolve,
1452
- reject
1453
- );
1454
- });
1455
- } catch (error$0) {
1456
- ReactSharedInternals.thrownErrors.push(error$0);
1457
- }
1458
- if (0 < ReactSharedInternals.thrownErrors.length) {
1459
- var _thrownError = aggregateErrors(
1460
- ReactSharedInternals.thrownErrors
1461
- );
1462
- ReactSharedInternals.thrownErrors.length = 0;
1463
- reject(_thrownError);
1464
- }
1465
- } else resolve(returnValue);
1466
- },
1467
- function (error) {
1468
- popActScope(prevActQueue, prevActScopeDepth);
1469
- 0 < ReactSharedInternals.thrownErrors.length
1470
- ? ((error = aggregateErrors(
1471
- ReactSharedInternals.thrownErrors
1472
- )),
1473
- (ReactSharedInternals.thrownErrors.length = 0),
1474
- reject(error))
1475
- : reject(error);
1476
- }
1477
- );
1478
- }
1479
- };
1480
- }
1481
- var returnValue$jscomp$0 = result;
1482
- popActScope(prevActQueue, prevActScopeDepth);
1483
- 0 === prevActScopeDepth &&
1484
- (flushActQueue(queue),
1485
- 0 !== queue.length &&
1486
- queueSeveralMicrotasks(function () {
1487
- didAwaitActCall ||
1488
- didWarnNoAwaitAct ||
1489
- ((didWarnNoAwaitAct = true),
1490
- console.error(
1491
- "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
1492
- ));
1493
- }),
1494
- (ReactSharedInternals.actQueue = null));
1495
- if (0 < ReactSharedInternals.thrownErrors.length)
1496
- throw (
1497
- ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
1498
- (ReactSharedInternals.thrownErrors.length = 0),
1499
- callback)
1500
- );
1501
- return {
1502
- then: function (resolve, reject) {
1503
- didAwaitActCall = true;
1504
- 0 === prevActScopeDepth
1505
- ? ((ReactSharedInternals.actQueue = queue),
1506
- enqueueTask(function () {
1507
- return recursivelyFlushAsyncActWork(
1508
- returnValue$jscomp$0,
1509
- resolve,
1510
- reject
1511
- );
1512
- }))
1513
- : resolve(returnValue$jscomp$0);
1514
- }
1515
- };
1516
- };
1517
- exports$1.cache = function (fn) {
1518
- return function () {
1519
- return fn.apply(null, arguments);
1520
- };
1521
- };
1522
- exports$1.cacheSignal = function () {
1523
- return null;
1524
- };
1525
- exports$1.captureOwnerStack = function () {
1526
- var getCurrentStack = ReactSharedInternals.getCurrentStack;
1527
- return null === getCurrentStack ? null : getCurrentStack();
1528
- };
1529
- exports$1.cloneElement = function (element, config, children) {
1530
- if (null === element || void 0 === element)
1531
- throw Error(
1532
- "The argument must be a React element, but you passed " +
1533
- element +
1534
- "."
1535
- );
1536
- var props = assign({}, element.props),
1537
- key = element.key,
1538
- owner = element._owner;
1539
- if (null != config) {
1540
- var JSCompiler_inline_result;
1541
- a: {
1542
- if (
1543
- hasOwnProperty.call(config, "ref") &&
1544
- (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1545
- config,
1546
- "ref"
1547
- ).get) &&
1548
- JSCompiler_inline_result.isReactWarning
1549
- ) {
1550
- JSCompiler_inline_result = false;
1551
- break a;
1552
- }
1553
- JSCompiler_inline_result = void 0 !== config.ref;
1554
- }
1555
- JSCompiler_inline_result && (owner = getOwner());
1556
- hasValidKey(config) &&
1557
- (checkKeyStringCoercion(config.key), (key = "" + config.key));
1558
- for (propName in config)
1559
- !hasOwnProperty.call(config, propName) ||
1560
- "key" === propName ||
1561
- "__self" === propName ||
1562
- "__source" === propName ||
1563
- ("ref" === propName && void 0 === config.ref) ||
1564
- (props[propName] = config[propName]);
1565
- }
1566
- var propName = arguments.length - 2;
1567
- if (1 === propName) props.children = children;
1568
- else if (1 < propName) {
1569
- JSCompiler_inline_result = Array(propName);
1570
- for (var i = 0; i < propName; i++)
1571
- JSCompiler_inline_result[i] = arguments[i + 2];
1572
- props.children = JSCompiler_inline_result;
1573
- }
1574
- props = ReactElement(
1575
- element.type,
1576
- key,
1577
- props,
1578
- owner,
1579
- element._debugStack,
1580
- element._debugTask
1581
- );
1582
- for (key = 2; key < arguments.length; key++)
1583
- validateChildKeys(arguments[key]);
1584
- return props;
1585
- };
1586
- exports$1.createContext = function (defaultValue) {
1587
- defaultValue = {
1588
- $$typeof: REACT_CONTEXT_TYPE,
1589
- _currentValue: defaultValue,
1590
- _currentValue2: defaultValue,
1591
- _threadCount: 0,
1592
- Provider: null,
1593
- Consumer: null
1594
- };
1595
- defaultValue.Provider = defaultValue;
1596
- defaultValue.Consumer = {
1597
- $$typeof: REACT_CONSUMER_TYPE,
1598
- _context: defaultValue
1599
- };
1600
- defaultValue._currentRenderer = null;
1601
- defaultValue._currentRenderer2 = null;
1602
- return defaultValue;
1603
- };
1604
- exports$1.createElement = function (type, config, children) {
1605
- for (var i = 2; i < arguments.length; i++)
1606
- validateChildKeys(arguments[i]);
1607
- i = {};
1608
- var key = null;
1609
- if (null != config)
1610
- for (propName in (didWarnAboutOldJSXRuntime ||
1611
- !("__self" in config) ||
1612
- "key" in config ||
1613
- ((didWarnAboutOldJSXRuntime = true),
1614
- console.warn(
1615
- "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
1616
- )),
1617
- hasValidKey(config) &&
1618
- (checkKeyStringCoercion(config.key), (key = "" + config.key)),
1619
- config))
1620
- hasOwnProperty.call(config, propName) &&
1621
- "key" !== propName &&
1622
- "__self" !== propName &&
1623
- "__source" !== propName &&
1624
- (i[propName] = config[propName]);
1625
- var childrenLength = arguments.length - 2;
1626
- if (1 === childrenLength) i.children = children;
1627
- else if (1 < childrenLength) {
1628
- for (
1629
- var childArray = Array(childrenLength), _i = 0;
1630
- _i < childrenLength;
1631
- _i++
1632
- )
1633
- childArray[_i] = arguments[_i + 2];
1634
- Object.freeze && Object.freeze(childArray);
1635
- i.children = childArray;
1636
- }
1637
- if (type && type.defaultProps)
1638
- for (propName in ((childrenLength = type.defaultProps), childrenLength))
1639
- void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1640
- key &&
1641
- defineKeyPropWarningGetter(
1642
- i,
1643
- "function" === typeof type
1644
- ? type.displayName || type.name || "Unknown"
1645
- : type
1646
- );
1647
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1648
- return ReactElement(
1649
- type,
1650
- key,
1651
- i,
1652
- getOwner(),
1653
- propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1654
- propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1655
- );
1656
- };
1657
- exports$1.createRef = function () {
1658
- var refObject = { current: null };
1659
- Object.seal(refObject);
1660
- return refObject;
1661
- };
1662
- exports$1.forwardRef = function (render) {
1663
- null != render && render.$$typeof === REACT_MEMO_TYPE
1664
- ? console.error(
1665
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1666
- )
1667
- : "function" !== typeof render
1668
- ? console.error(
1669
- "forwardRef requires a render function but was given %s.",
1670
- null === render ? "null" : typeof render
1671
- )
1672
- : 0 !== render.length &&
1673
- 2 !== render.length &&
1674
- console.error(
1675
- "forwardRef render functions accept exactly two parameters: props and ref. %s",
1676
- 1 === render.length
1677
- ? "Did you forget to use the ref parameter?"
1678
- : "Any additional parameter will be undefined."
1679
- );
1680
- null != render &&
1681
- null != render.defaultProps &&
1682
- console.error(
1683
- "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1684
- );
1685
- var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
1686
- ownName;
1687
- Object.defineProperty(elementType, "displayName", {
1688
- enumerable: false,
1689
- configurable: true,
1690
- get: function () {
1691
- return ownName;
1692
- },
1693
- set: function (name) {
1694
- ownName = name;
1695
- render.name ||
1696
- render.displayName ||
1697
- (Object.defineProperty(render, "name", { value: name }),
1698
- (render.displayName = name));
1699
- }
1700
- });
1701
- return elementType;
1702
- };
1703
- exports$1.isValidElement = isValidElement;
1704
- exports$1.lazy = function (ctor) {
1705
- ctor = { _status: -1, _result: ctor };
1706
- var lazyType = {
1707
- $$typeof: REACT_LAZY_TYPE,
1708
- _payload: ctor,
1709
- _init: lazyInitializer
1710
- },
1711
- ioInfo = {
1712
- name: "lazy",
1713
- start: -1,
1714
- end: -1,
1715
- value: null,
1716
- owner: null,
1717
- debugStack: Error("react-stack-top-frame"),
1718
- debugTask: console.createTask ? console.createTask("lazy()") : null
1719
- };
1720
- ctor._ioInfo = ioInfo;
1721
- lazyType._debugInfo = [{ awaited: ioInfo }];
1722
- return lazyType;
1723
- };
1724
- exports$1.memo = function (type, compare) {
1725
- null == type &&
1726
- console.error(
1727
- "memo: The first argument must be a component. Instead received: %s",
1728
- null === type ? "null" : typeof type
1729
- );
1730
- compare = {
1731
- $$typeof: REACT_MEMO_TYPE,
1732
- type: type,
1733
- compare: void 0 === compare ? null : compare
1734
- };
1735
- var ownName;
1736
- Object.defineProperty(compare, "displayName", {
1737
- enumerable: false,
1738
- configurable: true,
1739
- get: function () {
1740
- return ownName;
1741
- },
1742
- set: function (name) {
1743
- ownName = name;
1744
- type.name ||
1745
- type.displayName ||
1746
- (Object.defineProperty(type, "name", { value: name }),
1747
- (type.displayName = name));
1748
- }
1749
- });
1750
- return compare;
1751
- };
1752
- exports$1.startTransition = function (scope) {
1753
- var prevTransition = ReactSharedInternals.T,
1754
- currentTransition = {};
1755
- currentTransition._updatedFibers = new Set();
1756
- ReactSharedInternals.T = currentTransition;
1757
- try {
1758
- var returnValue = scope(),
1759
- onStartTransitionFinish = ReactSharedInternals.S;
1760
- null !== onStartTransitionFinish &&
1761
- onStartTransitionFinish(currentTransition, returnValue);
1762
- "object" === typeof returnValue &&
1763
- null !== returnValue &&
1764
- "function" === typeof returnValue.then &&
1765
- (ReactSharedInternals.asyncTransitions++,
1766
- returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
1767
- returnValue.then(noop, reportGlobalError));
1768
- } catch (error) {
1769
- reportGlobalError(error);
1770
- } finally {
1771
- null === prevTransition &&
1772
- currentTransition._updatedFibers &&
1773
- ((scope = currentTransition._updatedFibers.size),
1774
- currentTransition._updatedFibers.clear(),
1775
- 10 < scope &&
1776
- console.warn(
1777
- "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."
1778
- )),
1779
- null !== prevTransition &&
1780
- null !== currentTransition.types &&
1781
- (null !== prevTransition.types &&
1782
- prevTransition.types !== currentTransition.types &&
1783
- console.error(
1784
- "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
1785
- ),
1786
- (prevTransition.types = currentTransition.types)),
1787
- (ReactSharedInternals.T = prevTransition);
1788
- }
1789
- };
1790
- exports$1.unstable_useCacheRefresh = function () {
1791
- return resolveDispatcher().useCacheRefresh();
1792
- };
1793
- exports$1.use = function (usable) {
1794
- return resolveDispatcher().use(usable);
1795
- };
1796
- exports$1.useActionState = function (action, initialState, permalink) {
1797
- return resolveDispatcher().useActionState(
1798
- action,
1799
- initialState,
1800
- permalink
1801
- );
1802
- };
1803
- exports$1.useCallback = function (callback, deps) {
1804
- return resolveDispatcher().useCallback(callback, deps);
1805
- };
1806
- exports$1.useContext = function (Context) {
1807
- var dispatcher = resolveDispatcher();
1808
- Context.$$typeof === REACT_CONSUMER_TYPE &&
1809
- console.error(
1810
- "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1811
- );
1812
- return dispatcher.useContext(Context);
1813
- };
1814
- exports$1.useDebugValue = function (value, formatterFn) {
1815
- return resolveDispatcher().useDebugValue(value, formatterFn);
1816
- };
1817
- exports$1.useDeferredValue = function (value, initialValue) {
1818
- return resolveDispatcher().useDeferredValue(value, initialValue);
1819
- };
1820
- exports$1.useEffect = function (create, deps) {
1821
- null == create &&
1822
- console.warn(
1823
- "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1824
- );
1825
- return resolveDispatcher().useEffect(create, deps);
1826
- };
1827
- exports$1.useEffectEvent = function (callback) {
1828
- return resolveDispatcher().useEffectEvent(callback);
1829
- };
1830
- exports$1.useId = function () {
1831
- return resolveDispatcher().useId();
1832
- };
1833
- exports$1.useImperativeHandle = function (ref, create, deps) {
1834
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
1835
- };
1836
- exports$1.useInsertionEffect = function (create, deps) {
1837
- null == create &&
1838
- console.warn(
1839
- "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1840
- );
1841
- return resolveDispatcher().useInsertionEffect(create, deps);
1842
- };
1843
- exports$1.useLayoutEffect = function (create, deps) {
1844
- null == create &&
1845
- console.warn(
1846
- "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1847
- );
1848
- return resolveDispatcher().useLayoutEffect(create, deps);
1849
- };
1850
- exports$1.useMemo = function (create, deps) {
1851
- return resolveDispatcher().useMemo(create, deps);
1852
- };
1853
- exports$1.useOptimistic = function (passthrough, reducer) {
1854
- return resolveDispatcher().useOptimistic(passthrough, reducer);
1855
- };
1856
- exports$1.useReducer = function (reducer, initialArg, init) {
1857
- return resolveDispatcher().useReducer(reducer, initialArg, init);
1858
- };
1859
- exports$1.useRef = function (initialValue) {
1860
- return resolveDispatcher().useRef(initialValue);
1861
- };
1862
- exports$1.useState = function (initialState) {
1863
- return resolveDispatcher().useState(initialState);
1864
- };
1865
- exports$1.useSyncExternalStore = function (
1866
- subscribe,
1867
- getSnapshot,
1868
- getServerSnapshot
1869
- ) {
1870
- return resolveDispatcher().useSyncExternalStore(
1871
- subscribe,
1872
- getSnapshot,
1873
- getServerSnapshot
1874
- );
1875
- };
1876
- exports$1.useTransition = function () {
1877
- return resolveDispatcher().useTransition();
1878
- };
1879
- exports$1.version = "19.2.3";
1880
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1881
- "function" ===
1882
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
1883
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1884
- })();
1885
- } (react_development, react_development.exports));
1886
- return react_development.exports;
1887
- }
1888
-
1889
- var hasRequiredReact;
1890
-
1891
- function requireReact () {
1892
- if (hasRequiredReact) return react.exports;
1893
- hasRequiredReact = 1;
1894
-
1895
- if (process.env.NODE_ENV === 'production') {
1896
- react.exports = requireReact_production();
1897
- } else {
1898
- react.exports = requireReact_development();
1899
- }
1900
- return react.exports;
1901
- }
1902
-
1903
-
1904
- var hasRequiredReactJsxRuntime_development;
1905
-
1906
- function requireReactJsxRuntime_development () {
1907
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
1908
- hasRequiredReactJsxRuntime_development = 1;
1909
- "production" !== process.env.NODE_ENV &&
1910
- (function () {
1911
- function getComponentNameFromType(type) {
1912
- if (null == type) return null;
1913
- if ("function" === typeof type)
1914
- return type.$$typeof === REACT_CLIENT_REFERENCE
1915
- ? null
1916
- : type.displayName || type.name || null;
1917
- if ("string" === typeof type) return type;
1918
- switch (type) {
1919
- case REACT_FRAGMENT_TYPE:
1920
- return "Fragment";
1921
- case REACT_PROFILER_TYPE:
1922
- return "Profiler";
1923
- case REACT_STRICT_MODE_TYPE:
1924
- return "StrictMode";
1925
- case REACT_SUSPENSE_TYPE:
1926
- return "Suspense";
1927
- case REACT_SUSPENSE_LIST_TYPE:
1928
- return "SuspenseList";
1929
- case REACT_ACTIVITY_TYPE:
1930
- return "Activity";
1931
- }
1932
- if ("object" === typeof type)
1933
- switch (
1934
- ("number" === typeof type.tag &&
1935
- console.error(
1936
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
1937
- ),
1938
- type.$$typeof)
1939
- ) {
1940
- case REACT_PORTAL_TYPE:
1941
- return "Portal";
1942
- case REACT_CONTEXT_TYPE:
1943
- return type.displayName || "Context";
1944
- case REACT_CONSUMER_TYPE:
1945
- return (type._context.displayName || "Context") + ".Consumer";
1946
- case REACT_FORWARD_REF_TYPE:
1947
- var innerType = type.render;
1948
- type = type.displayName;
1949
- type ||
1950
- ((type = innerType.displayName || innerType.name || ""),
1951
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
1952
- return type;
1953
- case REACT_MEMO_TYPE:
1954
- return (
1955
- (innerType = type.displayName || null),
1956
- null !== innerType
1957
- ? innerType
1958
- : getComponentNameFromType(type.type) || "Memo"
1959
- );
1960
- case REACT_LAZY_TYPE:
1961
- innerType = type._payload;
1962
- type = type._init;
1963
- try {
1964
- return getComponentNameFromType(type(innerType));
1965
- } catch (x) {}
1966
- }
1967
- return null;
1968
- }
1969
- function testStringCoercion(value) {
1970
- return "" + value;
1971
- }
1972
- function checkKeyStringCoercion(value) {
1973
- try {
1974
- testStringCoercion(value);
1975
- var JSCompiler_inline_result = !1;
1976
- } catch (e) {
1977
- JSCompiler_inline_result = true;
1978
- }
1979
- if (JSCompiler_inline_result) {
1980
- JSCompiler_inline_result = console;
1981
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
1982
- var JSCompiler_inline_result$jscomp$0 =
1983
- ("function" === typeof Symbol &&
1984
- Symbol.toStringTag &&
1985
- value[Symbol.toStringTag]) ||
1986
- value.constructor.name ||
1987
- "Object";
1988
- JSCompiler_temp_const.call(
1989
- JSCompiler_inline_result,
1990
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
1991
- JSCompiler_inline_result$jscomp$0
1992
- );
1993
- return testStringCoercion(value);
1994
- }
1995
- }
1996
- function getTaskName(type) {
1997
- if (type === REACT_FRAGMENT_TYPE) return "<>";
1998
- if (
1999
- "object" === typeof type &&
2000
- null !== type &&
2001
- type.$$typeof === REACT_LAZY_TYPE
2002
- )
2003
- return "<...>";
2004
- try {
2005
- var name = getComponentNameFromType(type);
2006
- return name ? "<" + name + ">" : "<...>";
2007
- } catch (x) {
2008
- return "<...>";
2009
- }
2010
- }
2011
- function getOwner() {
2012
- var dispatcher = ReactSharedInternals.A;
2013
- return null === dispatcher ? null : dispatcher.getOwner();
2014
- }
2015
- function UnknownOwner() {
2016
- return Error("react-stack-top-frame");
2017
- }
2018
- function hasValidKey(config) {
2019
- if (hasOwnProperty.call(config, "key")) {
2020
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2021
- if (getter && getter.isReactWarning) return false;
2022
- }
2023
- return void 0 !== config.key;
2024
- }
2025
- function defineKeyPropWarningGetter(props, displayName) {
2026
- function warnAboutAccessingKey() {
2027
- specialPropKeyWarningShown ||
2028
- ((specialPropKeyWarningShown = true),
2029
- console.error(
2030
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
2031
- displayName
2032
- ));
2033
- }
2034
- warnAboutAccessingKey.isReactWarning = true;
2035
- Object.defineProperty(props, "key", {
2036
- get: warnAboutAccessingKey,
2037
- configurable: true
2038
- });
2039
- }
2040
- function elementRefGetterWithDeprecationWarning() {
2041
- var componentName = getComponentNameFromType(this.type);
2042
- didWarnAboutElementRef[componentName] ||
2043
- ((didWarnAboutElementRef[componentName] = true),
2044
- console.error(
2045
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
2046
- ));
2047
- componentName = this.props.ref;
2048
- return void 0 !== componentName ? componentName : null;
2049
- }
2050
- function ReactElement(type, key, props, owner, debugStack, debugTask) {
2051
- var refProp = props.ref;
2052
- type = {
2053
- $$typeof: REACT_ELEMENT_TYPE,
2054
- type: type,
2055
- key: key,
2056
- props: props,
2057
- _owner: owner
2058
- };
2059
- null !== (void 0 !== refProp ? refProp : null)
2060
- ? Object.defineProperty(type, "ref", {
2061
- enumerable: false,
2062
- get: elementRefGetterWithDeprecationWarning
2063
- })
2064
- : Object.defineProperty(type, "ref", { enumerable: false, value: null });
2065
- type._store = {};
2066
- Object.defineProperty(type._store, "validated", {
2067
- configurable: false,
2068
- enumerable: false,
2069
- writable: true,
2070
- value: 0
2071
- });
2072
- Object.defineProperty(type, "_debugInfo", {
2073
- configurable: false,
2074
- enumerable: false,
2075
- writable: true,
2076
- value: null
2077
- });
2078
- Object.defineProperty(type, "_debugStack", {
2079
- configurable: false,
2080
- enumerable: false,
2081
- writable: true,
2082
- value: debugStack
2083
- });
2084
- Object.defineProperty(type, "_debugTask", {
2085
- configurable: false,
2086
- enumerable: false,
2087
- writable: true,
2088
- value: debugTask
2089
- });
2090
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
2091
- return type;
2092
- }
2093
- function jsxDEVImpl(
2094
- type,
2095
- config,
2096
- maybeKey,
2097
- isStaticChildren,
2098
- debugStack,
2099
- debugTask
2100
- ) {
2101
- var children = config.children;
2102
- if (void 0 !== children)
2103
- if (isStaticChildren)
2104
- if (isArrayImpl(children)) {
2105
- for (
2106
- isStaticChildren = 0;
2107
- isStaticChildren < children.length;
2108
- isStaticChildren++
2109
- )
2110
- validateChildKeys(children[isStaticChildren]);
2111
- Object.freeze && Object.freeze(children);
2112
- } else
2113
- console.error(
2114
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
2115
- );
2116
- else validateChildKeys(children);
2117
- if (hasOwnProperty.call(config, "key")) {
2118
- children = getComponentNameFromType(type);
2119
- var keys = Object.keys(config).filter(function (k) {
2120
- return "key" !== k;
2121
- });
2122
- isStaticChildren =
2123
- 0 < keys.length
2124
- ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
2125
- : "{key: someKey}";
2126
- didWarnAboutKeySpread[children + isStaticChildren] ||
2127
- ((keys =
2128
- 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
2129
- console.error(
2130
- '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} />',
2131
- isStaticChildren,
2132
- children,
2133
- keys,
2134
- children
2135
- ),
2136
- (didWarnAboutKeySpread[children + isStaticChildren] = true));
2137
- }
2138
- children = null;
2139
- void 0 !== maybeKey &&
2140
- (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
2141
- hasValidKey(config) &&
2142
- (checkKeyStringCoercion(config.key), (children = "" + config.key));
2143
- if ("key" in config) {
2144
- maybeKey = {};
2145
- for (var propName in config)
2146
- "key" !== propName && (maybeKey[propName] = config[propName]);
2147
- } else maybeKey = config;
2148
- children &&
2149
- defineKeyPropWarningGetter(
2150
- maybeKey,
2151
- "function" === typeof type
2152
- ? type.displayName || type.name || "Unknown"
2153
- : type
2154
- );
2155
- return ReactElement(
2156
- type,
2157
- children,
2158
- maybeKey,
2159
- getOwner(),
2160
- debugStack,
2161
- debugTask
2162
- );
2163
- }
2164
- function validateChildKeys(node) {
2165
- isValidElement(node)
2166
- ? node._store && (node._store.validated = 1)
2167
- : "object" === typeof node &&
2168
- null !== node &&
2169
- node.$$typeof === REACT_LAZY_TYPE &&
2170
- ("fulfilled" === node._payload.status
2171
- ? isValidElement(node._payload.value) &&
2172
- node._payload.value._store &&
2173
- (node._payload.value._store.validated = 1)
2174
- : node._store && (node._store.validated = 1));
2175
- }
2176
- function isValidElement(object) {
2177
- return (
2178
- "object" === typeof object &&
2179
- null !== object &&
2180
- object.$$typeof === REACT_ELEMENT_TYPE
2181
- );
2182
- }
2183
- var React = requireReact(),
2184
- REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
2185
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
2186
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
2187
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
2188
- REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
2189
- REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
2190
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
2191
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
2192
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
2193
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
2194
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
2195
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
2196
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
2197
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
2198
- ReactSharedInternals =
2199
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
2200
- hasOwnProperty = Object.prototype.hasOwnProperty,
2201
- isArrayImpl = Array.isArray,
2202
- createTask = console.createTask
2203
- ? console.createTask
2204
- : function () {
2205
- return null;
2206
- };
2207
- React = {
2208
- react_stack_bottom_frame: function (callStackForError) {
2209
- return callStackForError();
2210
- }
2211
- };
2212
- var specialPropKeyWarningShown;
2213
- var didWarnAboutElementRef = {};
2214
- var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
2215
- React,
2216
- UnknownOwner
2217
- )();
2218
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
2219
- var didWarnAboutKeySpread = {};
2220
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
2221
- reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
2222
- var trackActualOwner =
2223
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
2224
- return jsxDEVImpl(
2225
- type,
2226
- config,
2227
- maybeKey,
2228
- false,
2229
- trackActualOwner
2230
- ? Error("react-stack-top-frame")
2231
- : unknownOwnerDebugStack,
2232
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
2233
- );
2234
- };
2235
- reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
2236
- var trackActualOwner =
2237
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
2238
- return jsxDEVImpl(
2239
- type,
2240
- config,
2241
- maybeKey,
2242
- true,
2243
- trackActualOwner
2244
- ? Error("react-stack-top-frame")
2245
- : unknownOwnerDebugStack,
2246
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
2247
- );
2248
- };
2249
- })();
2250
- return reactJsxRuntime_development;
2251
- }
2252
-
2253
- var hasRequiredJsxRuntime;
2254
-
2255
- function requireJsxRuntime () {
2256
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
2257
- hasRequiredJsxRuntime = 1;
2258
-
2259
- if (process.env.NODE_ENV === 'production') {
2260
- jsxRuntime.exports = requireReactJsxRuntime_production();
2261
- } else {
2262
- jsxRuntime.exports = requireReactJsxRuntime_development();
2263
- }
2264
- return jsxRuntime.exports;
2265
- }
2266
-
2267
- var jsxRuntimeExports = requireJsxRuntime();
2268
-
2269
- var reactExports = requireReact();
2270
-
2271
- const mergeDeep = (target, source) => {
2272
- if (typeof target !== 'object' || typeof source !== 'object')
2273
- return source;
2274
- const output = Object.assign({}, target);
2275
- for (const key in source) {
2276
- if (source.hasOwnProperty(key)) {
2277
- if (target.hasOwnProperty(key)) {
2278
- output[key] = mergeDeep(target[key], source[key]);
2279
- }
2280
- else {
2281
- output[key] = source[key];
2282
- }
2283
- }
2284
- }
2285
- return output;
2286
- };
2287
-
2288
- let configManagerConfig = null;
2289
- const setConfigManagerConfig = (config) => {
2290
- configManagerConfig = config;
2291
- };
2292
-
2293
- const loadBaseConfig = () => __awaiter(void 0, void 0, void 0, function* () {
2294
- try {
2295
- if (!(configManagerConfig === null || configManagerConfig === void 0 ? void 0 : configManagerConfig.base)) {
2296
- console.warn('No base config found');
2297
- return {};
2298
- }
2299
- const baseConfigs = yield Promise.all(Object.entries(configManagerConfig.base).map((_a) => __awaiter(void 0, [_a], void 0, function* ([key, loader]) {
2300
- try {
2301
- const config = yield loader();
2302
- return { key, config };
2303
- }
2304
- catch (error) {
2305
- console.error(`Failed to load base config ${key}:`, error);
2306
- return { key, config: {} };
2307
- }
2308
- })));
2309
- return baseConfigs.reduce((acc, { key, config }) => {
2310
- return Object.assign(Object.assign({}, acc), config);
2311
- }, {});
2312
- }
2313
- catch (error) {
2314
- console.error('Failed to load base config:', error);
2315
- return {};
2316
- }
2317
- });
2318
- const loadModulesConfigs = () => __awaiter(void 0, void 0, void 0, function* () {
2319
- const results = [];
2320
- if (!(configManagerConfig === null || configManagerConfig === void 0 ? void 0 : configManagerConfig.modules)) {
2321
- return results;
2322
- }
2323
- for (const [moduleName, loader] of Object.entries(configManagerConfig.modules)) {
2324
- try {
2325
- const config = yield loader();
2326
- results.push({
2327
- moduleName,
2328
- config
2329
- });
2330
- }
2331
- catch (error) {
2332
- console.error(`Failed to load config for module "${moduleName}"`, error);
2333
- }
2334
- }
2335
- return results;
2336
- });
2337
- const loadModuleConfig = (moduleName) => __awaiter(void 0, void 0, void 0, function* () {
2338
- var _a;
2339
- if (!((_a = configManagerConfig === null || configManagerConfig === void 0 ? void 0 : configManagerConfig.modules) === null || _a === void 0 ? void 0 : _a[moduleName])) {
2340
- return undefined;
2341
- }
2342
- try {
2343
- const loader = configManagerConfig.modules[moduleName];
2344
- const config = yield loader();
2345
- return {
2346
- moduleName,
2347
- config
2348
- };
2349
- }
2350
- catch (error) {
2351
- console.error(`Failed to load config for module "${moduleName}"`, error);
2352
- return undefined;
2353
- }
2354
- });
2355
-
2356
- class ConfigService {
2357
- constructor() {
2358
- Object.defineProperty(this, "resources", {
2359
- enumerable: true,
2360
- configurable: true,
2361
- writable: true,
2362
- value: {}
2363
- });
2364
- Object.defineProperty(this, "loadedModules", {
2365
- enumerable: true,
2366
- configurable: true,
2367
- writable: true,
2368
- value: new Set()
2369
- });
2370
- }
2371
- initialize() {
2372
- return __awaiter(this, void 0, void 0, function* () {
2373
- yield this.loadAllConfigs();
2374
- });
2375
- }
2376
- loadAllConfigs() {
2377
- return __awaiter(this, void 0, void 0, function* () {
2378
- const base = yield loadBaseConfig();
2379
- const modules = yield loadModulesConfigs();
2380
- this.resources = modules.reduce((acc, { moduleName, config }) => {
2381
- return mergeDeep(acc, { [moduleName]: config });
2382
- }, { base });
2383
- modules.forEach(({ moduleName }) => {
2384
- this.loadedModules.add(moduleName);
2385
- });
2386
- });
2387
- }
2388
- loadModule(moduleName) {
2389
- return __awaiter(this, void 0, void 0, function* () {
2390
- if (this.loadedModules.has(moduleName))
2391
- return;
2392
- const moduleData = yield loadModuleConfig(moduleName);
2393
- if (moduleData === null || moduleData === void 0 ? void 0 : moduleData.config) {
2394
- this.resources[moduleName] = mergeDeep(this.resources[moduleName] || {}, moduleData.config);
2395
- this.loadedModules.add(moduleName);
2396
- }
2397
- });
2398
- }
2399
- get(key, options = {}) {
2400
- const { moduleName = 'base', defaultValue = undefined, pathSeparator = '.' } = options;
2401
- const resource = this.resources[moduleName];
2402
- if (!resource) {
2403
- return defaultValue;
2404
- }
2405
- const result = key.split(pathSeparator).reduce((acc, part) => {
2406
- return acc && acc[part] !== undefined ? acc[part] : undefined;
2407
- }, resource);
2408
- return result !== undefined ? result : defaultValue;
2409
- }
2410
- getConfig(moduleName = 'base') {
2411
- return this.resources[moduleName] || {};
2412
- }
2413
- reload() {
2414
- return this.loadAllConfigs();
2415
- }
2416
- }
2417
-
2418
- const ConfigManagerContext = reactExports.createContext(null);
2419
- const ConfigManagerProvider = ({ configs, children, }) => {
2420
- const [service] = reactExports.useState(() => new ConfigService());
2421
- const [isLoading, setIsLoading] = reactExports.useState(true);
2422
- reactExports.useEffect(() => {
2423
- setConfigManagerConfig(configs);
2424
- }, [configs]);
2425
- reactExports.useEffect(() => {
2426
- const initialize = () => __awaiter(void 0, void 0, void 0, function* () {
2427
- setIsLoading(true);
2428
- try {
2429
- yield service.initialize();
2430
- }
2431
- catch (error) {
2432
- console.error('Failed to initialize config manager:', error);
2433
- }
2434
- finally {
2435
- setIsLoading(false);
2436
- }
2437
- });
2438
- initialize();
2439
- }, [service]);
2440
- const reloadConfig = reactExports.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
2441
- setIsLoading(true);
2442
- try {
2443
- yield service.reload();
2444
- }
2445
- catch (error) {
2446
- console.error('Failed to reload config:', error);
2447
- }
2448
- finally {
2449
- setIsLoading(false);
2450
- }
2451
- }), [service]);
2452
- const loadModuleConfig = reactExports.useCallback((moduleName) => __awaiter(void 0, void 0, void 0, function* () {
2453
- setIsLoading(true);
2454
- try {
2455
- yield service.loadModule(moduleName);
2456
- }
2457
- catch (error) {
2458
- console.error(`Failed to load module config ${moduleName}:`, error);
2459
- }
2460
- finally {
2461
- setIsLoading(false);
2462
- }
2463
- }), [service]);
2464
- const get = reactExports.useCallback((key, options) => {
2465
- return service.get(key, options);
2466
- }, [service]);
2467
- const getConfig = reactExports.useCallback((moduleName) => {
2468
- return service.getConfig(moduleName);
2469
- }, [service]);
2470
- const value = {
2471
- get,
2472
- getConfig,
2473
- reloadConfig,
2474
- isLoading,
2475
- loadModuleConfig,
2476
- };
2477
- return (jsxRuntimeExports.jsx(ConfigManagerContext.Provider, { value: value, children: children }));
2478
- };
2479
- const useConfigManager = () => {
2480
- const context = reactExports.useContext(ConfigManagerContext);
2481
- if (!context) {
2482
- throw new Error('useConfigManager must be used within a ConfigManagerProvider');
2483
- }
2484
- return context;
2485
- };
2486
-
2487
- const useConfig = (moduleName) => {
2488
- const configManager = useConfigManager();
2489
- const [isModuleLoading, setIsModuleLoading] = reactExports.useState(false);
2490
- const [moduleLoaded, setModuleLoaded] = reactExports.useState(!moduleName);
2491
- const cf = reactExports.useCallback((key, options) => {
2492
- const finalOptions = Object.assign(Object.assign({}, options), { moduleName: (options === null || options === void 0 ? void 0 : options.moduleName) || moduleName || 'base' });
2493
- return configManager.get(key, finalOptions);
2494
- }, [configManager, moduleName]);
2495
- reactExports.useEffect(() => {
2496
- if (moduleName && !moduleLoaded) {
2497
- setIsModuleLoading(true);
2498
- configManager.loadModuleConfig(moduleName)
2499
- .then(() => {
2500
- setModuleLoaded(true);
2501
- })
2502
- .finally(() => {
2503
- setIsModuleLoading(false);
2504
- });
2505
- }
2506
- }, [moduleName, moduleLoaded, configManager]);
2507
- return {
2508
- cf,
2509
- getConfig: configManager.getConfig,
2510
- reloadConfig: configManager.reloadConfig,
2511
- isLoading: configManager.isLoading || isModuleLoading,
2512
- isModuleLoaded: moduleLoaded,
2513
- loadModuleConfig: configManager.loadModuleConfig,
2514
- };
2515
- };
2516
-
2517
- export { ConfigManagerProvider, useConfig, useConfigManager };
3
+ export { index as default };