@w3ux/hooks 2.3.1 → 2.3.2

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.
Files changed (3) hide show
  1. package/index.cjs +6 -1441
  2. package/index.js +26 -1474
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -1,13 +1,8 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
6
  var __export = (target, all) => {
12
7
  for (var name in all)
13
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -20,1414 +15,8 @@ var __copyProps = (to, from, except, desc) => {
20
15
  }
21
16
  return to;
22
17
  };
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
- // If the importer is in node compatibility mode or this is not an ESM
25
- // file that has been converted to a CommonJS file using a Babel-
26
- // compatible transform (i.e. "__esModule" has not been set), then set
27
- // "default" to the CommonJS "module.exports" for node compatibility.
28
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
- mod
30
- ));
31
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
19
 
33
- // ../../node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react.production.js
34
- var require_react_production = __commonJS({
35
- "../../node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react.production.js"(exports2) {
36
- "use strict";
37
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
38
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
39
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
40
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
41
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
42
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer");
43
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
44
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
45
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
46
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
47
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
48
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
49
- function getIteratorFn(maybeIterable) {
50
- if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
51
- maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
52
- return "function" === typeof maybeIterable ? maybeIterable : null;
53
- }
54
- var ReactNoopUpdateQueue = {
55
- isMounted: function() {
56
- return false;
57
- },
58
- enqueueForceUpdate: function() {
59
- },
60
- enqueueReplaceState: function() {
61
- },
62
- enqueueSetState: function() {
63
- }
64
- };
65
- var assign = Object.assign;
66
- var emptyObject = {};
67
- function Component(props, context, updater) {
68
- this.props = props;
69
- this.context = context;
70
- this.refs = emptyObject;
71
- this.updater = updater || ReactNoopUpdateQueue;
72
- }
73
- Component.prototype.isReactComponent = {};
74
- Component.prototype.setState = function(partialState, callback) {
75
- if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
76
- throw Error(
77
- "takes an object of state variables to update or a function which returns an object of state variables."
78
- );
79
- this.updater.enqueueSetState(this, partialState, callback, "setState");
80
- };
81
- Component.prototype.forceUpdate = function(callback) {
82
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
83
- };
84
- function ComponentDummy() {
85
- }
86
- ComponentDummy.prototype = Component.prototype;
87
- function PureComponent(props, context, updater) {
88
- this.props = props;
89
- this.context = context;
90
- this.refs = emptyObject;
91
- this.updater = updater || ReactNoopUpdateQueue;
92
- }
93
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
94
- pureComponentPrototype.constructor = PureComponent;
95
- assign(pureComponentPrototype, Component.prototype);
96
- pureComponentPrototype.isPureReactComponent = true;
97
- var isArrayImpl = Array.isArray;
98
- var ReactSharedInternals = { H: null, A: null, T: null, S: null, V: null };
99
- var hasOwnProperty = Object.prototype.hasOwnProperty;
100
- function ReactElement(type, key, self, source, owner, props) {
101
- self = props.ref;
102
- return {
103
- $$typeof: REACT_ELEMENT_TYPE,
104
- type,
105
- key,
106
- ref: void 0 !== self ? self : null,
107
- props
108
- };
109
- }
110
- function cloneAndReplaceKey(oldElement, newKey) {
111
- return ReactElement(
112
- oldElement.type,
113
- newKey,
114
- void 0,
115
- void 0,
116
- void 0,
117
- oldElement.props
118
- );
119
- }
120
- function isValidElement(object) {
121
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
122
- }
123
- function escape(key) {
124
- var escaperLookup = { "=": "=0", ":": "=2" };
125
- return "$" + key.replace(/[=:]/g, function(match) {
126
- return escaperLookup[match];
127
- });
128
- }
129
- var userProvidedKeyEscapeRegex = /\/+/g;
130
- function getElementKey(element, index) {
131
- return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
132
- }
133
- function noop$1() {
134
- }
135
- function resolveThenable(thenable) {
136
- switch (thenable.status) {
137
- case "fulfilled":
138
- return thenable.value;
139
- case "rejected":
140
- throw thenable.reason;
141
- default:
142
- switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
143
- function(fulfilledValue) {
144
- "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
145
- },
146
- function(error) {
147
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
148
- }
149
- )), thenable.status) {
150
- case "fulfilled":
151
- return thenable.value;
152
- case "rejected":
153
- throw thenable.reason;
154
- }
155
- }
156
- throw thenable;
157
- }
158
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
159
- var type = typeof children;
160
- if ("undefined" === type || "boolean" === type) children = null;
161
- var invokeCallback = false;
162
- if (null === children) invokeCallback = true;
163
- else
164
- switch (type) {
165
- case "bigint":
166
- case "string":
167
- case "number":
168
- invokeCallback = true;
169
- break;
170
- case "object":
171
- switch (children.$$typeof) {
172
- case REACT_ELEMENT_TYPE:
173
- case REACT_PORTAL_TYPE:
174
- invokeCallback = true;
175
- break;
176
- case REACT_LAZY_TYPE:
177
- return invokeCallback = children._init, mapIntoArray(
178
- invokeCallback(children._payload),
179
- array,
180
- escapedPrefix,
181
- nameSoFar,
182
- callback
183
- );
184
- }
185
- }
186
- if (invokeCallback)
187
- return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
188
- return c;
189
- })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
190
- callback,
191
- escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
192
- userProvidedKeyEscapeRegex,
193
- "$&/"
194
- ) + "/") + invokeCallback
195
- )), array.push(callback)), 1;
196
- invokeCallback = 0;
197
- var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
198
- if (isArrayImpl(children))
199
- for (var i = 0; i < children.length; i++)
200
- nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
201
- nameSoFar,
202
- array,
203
- escapedPrefix,
204
- type,
205
- callback
206
- );
207
- else if (i = getIteratorFn(children), "function" === typeof i)
208
- for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
209
- nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
210
- nameSoFar,
211
- array,
212
- escapedPrefix,
213
- type,
214
- callback
215
- );
216
- else if ("object" === type) {
217
- if ("function" === typeof children.then)
218
- return mapIntoArray(
219
- resolveThenable(children),
220
- array,
221
- escapedPrefix,
222
- nameSoFar,
223
- callback
224
- );
225
- array = String(children);
226
- throw Error(
227
- "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
228
- );
229
- }
230
- return invokeCallback;
231
- }
232
- function mapChildren(children, func, context) {
233
- if (null == children) return children;
234
- var result = [], count = 0;
235
- mapIntoArray(children, result, "", "", function(child) {
236
- return func.call(context, child, count++);
237
- });
238
- return result;
239
- }
240
- function lazyInitializer(payload) {
241
- if (-1 === payload._status) {
242
- var ctor = payload._result;
243
- ctor = ctor();
244
- ctor.then(
245
- function(moduleObject) {
246
- if (0 === payload._status || -1 === payload._status)
247
- payload._status = 1, payload._result = moduleObject;
248
- },
249
- function(error) {
250
- if (0 === payload._status || -1 === payload._status)
251
- payload._status = 2, payload._result = error;
252
- }
253
- );
254
- -1 === payload._status && (payload._status = 0, payload._result = ctor);
255
- }
256
- if (1 === payload._status) return payload._result.default;
257
- throw payload._result;
258
- }
259
- var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
260
- if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
261
- var event = new window.ErrorEvent("error", {
262
- bubbles: true,
263
- cancelable: true,
264
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
265
- error
266
- });
267
- if (!window.dispatchEvent(event)) return;
268
- } else if ("object" === typeof process && "function" === typeof process.emit) {
269
- process.emit("uncaughtException", error);
270
- return;
271
- }
272
- console.error(error);
273
- };
274
- function noop() {
275
- }
276
- exports2.Children = {
277
- map: mapChildren,
278
- forEach: function(children, forEachFunc, forEachContext) {
279
- mapChildren(
280
- children,
281
- function() {
282
- forEachFunc.apply(this, arguments);
283
- },
284
- forEachContext
285
- );
286
- },
287
- count: function(children) {
288
- var n = 0;
289
- mapChildren(children, function() {
290
- n++;
291
- });
292
- return n;
293
- },
294
- toArray: function(children) {
295
- return mapChildren(children, function(child) {
296
- return child;
297
- }) || [];
298
- },
299
- only: function(children) {
300
- if (!isValidElement(children))
301
- throw Error(
302
- "React.Children.only expected to receive a single React element child."
303
- );
304
- return children;
305
- }
306
- };
307
- exports2.Component = Component;
308
- exports2.Fragment = REACT_FRAGMENT_TYPE;
309
- exports2.Profiler = REACT_PROFILER_TYPE;
310
- exports2.PureComponent = PureComponent;
311
- exports2.StrictMode = REACT_STRICT_MODE_TYPE;
312
- exports2.Suspense = REACT_SUSPENSE_TYPE;
313
- exports2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
314
- exports2.__COMPILER_RUNTIME = {
315
- __proto__: null,
316
- c: function(size) {
317
- return ReactSharedInternals.H.useMemoCache(size);
318
- }
319
- };
320
- exports2.cache = function(fn) {
321
- return function() {
322
- return fn.apply(null, arguments);
323
- };
324
- };
325
- exports2.cloneElement = function(element, config, children) {
326
- if (null === element || void 0 === element)
327
- throw Error(
328
- "The argument must be a React element, but you passed " + element + "."
329
- );
330
- var props = assign({}, element.props), key = element.key, owner = void 0;
331
- if (null != config)
332
- for (propName in void 0 !== config.ref && (owner = void 0), void 0 !== config.key && (key = "" + config.key), config)
333
- !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
334
- var propName = arguments.length - 2;
335
- if (1 === propName) props.children = children;
336
- else if (1 < propName) {
337
- for (var childArray = Array(propName), i = 0; i < propName; i++)
338
- childArray[i] = arguments[i + 2];
339
- props.children = childArray;
340
- }
341
- return ReactElement(element.type, key, void 0, void 0, owner, props);
342
- };
343
- exports2.createContext = function(defaultValue) {
344
- defaultValue = {
345
- $$typeof: REACT_CONTEXT_TYPE,
346
- _currentValue: defaultValue,
347
- _currentValue2: defaultValue,
348
- _threadCount: 0,
349
- Provider: null,
350
- Consumer: null
351
- };
352
- defaultValue.Provider = defaultValue;
353
- defaultValue.Consumer = {
354
- $$typeof: REACT_CONSUMER_TYPE,
355
- _context: defaultValue
356
- };
357
- return defaultValue;
358
- };
359
- exports2.createElement = function(type, config, children) {
360
- var propName, props = {}, key = null;
361
- if (null != config)
362
- for (propName in void 0 !== config.key && (key = "" + config.key), config)
363
- hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
364
- var childrenLength = arguments.length - 2;
365
- if (1 === childrenLength) props.children = children;
366
- else if (1 < childrenLength) {
367
- for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
368
- childArray[i] = arguments[i + 2];
369
- props.children = childArray;
370
- }
371
- if (type && type.defaultProps)
372
- for (propName in childrenLength = type.defaultProps, childrenLength)
373
- void 0 === props[propName] && (props[propName] = childrenLength[propName]);
374
- return ReactElement(type, key, void 0, void 0, null, props);
375
- };
376
- exports2.createRef = function() {
377
- return { current: null };
378
- };
379
- exports2.forwardRef = function(render) {
380
- return { $$typeof: REACT_FORWARD_REF_TYPE, render };
381
- };
382
- exports2.isValidElement = isValidElement;
383
- exports2.lazy = function(ctor) {
384
- return {
385
- $$typeof: REACT_LAZY_TYPE,
386
- _payload: { _status: -1, _result: ctor },
387
- _init: lazyInitializer
388
- };
389
- };
390
- exports2.memo = function(type, compare) {
391
- return {
392
- $$typeof: REACT_MEMO_TYPE,
393
- type,
394
- compare: void 0 === compare ? null : compare
395
- };
396
- };
397
- exports2.startTransition = function(scope) {
398
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
399
- ReactSharedInternals.T = currentTransition;
400
- try {
401
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
402
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
403
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
404
- } catch (error) {
405
- reportGlobalError(error);
406
- } finally {
407
- ReactSharedInternals.T = prevTransition;
408
- }
409
- };
410
- exports2.unstable_useCacheRefresh = function() {
411
- return ReactSharedInternals.H.useCacheRefresh();
412
- };
413
- exports2.use = function(usable) {
414
- return ReactSharedInternals.H.use(usable);
415
- };
416
- exports2.useActionState = function(action, initialState, permalink) {
417
- return ReactSharedInternals.H.useActionState(action, initialState, permalink);
418
- };
419
- exports2.useCallback = function(callback, deps) {
420
- return ReactSharedInternals.H.useCallback(callback, deps);
421
- };
422
- exports2.useContext = function(Context) {
423
- return ReactSharedInternals.H.useContext(Context);
424
- };
425
- exports2.useDebugValue = function() {
426
- };
427
- exports2.useDeferredValue = function(value, initialValue) {
428
- return ReactSharedInternals.H.useDeferredValue(value, initialValue);
429
- };
430
- exports2.useEffect = function(create, createDeps, update) {
431
- var dispatcher = ReactSharedInternals.H;
432
- if ("function" === typeof update)
433
- throw Error(
434
- "useEffect CRUD overload is not enabled in this build of React."
435
- );
436
- return dispatcher.useEffect(create, createDeps);
437
- };
438
- exports2.useId = function() {
439
- return ReactSharedInternals.H.useId();
440
- };
441
- exports2.useImperativeHandle = function(ref, create, deps) {
442
- return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
443
- };
444
- exports2.useInsertionEffect = function(create, deps) {
445
- return ReactSharedInternals.H.useInsertionEffect(create, deps);
446
- };
447
- exports2.useLayoutEffect = function(create, deps) {
448
- return ReactSharedInternals.H.useLayoutEffect(create, deps);
449
- };
450
- exports2.useMemo = function(create, deps) {
451
- return ReactSharedInternals.H.useMemo(create, deps);
452
- };
453
- exports2.useOptimistic = function(passthrough, reducer) {
454
- return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
455
- };
456
- exports2.useReducer = function(reducer, initialArg, init) {
457
- return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
458
- };
459
- exports2.useRef = function(initialValue) {
460
- return ReactSharedInternals.H.useRef(initialValue);
461
- };
462
- exports2.useState = function(initialState) {
463
- return ReactSharedInternals.H.useState(initialState);
464
- };
465
- exports2.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
466
- return ReactSharedInternals.H.useSyncExternalStore(
467
- subscribe,
468
- getSnapshot,
469
- getServerSnapshot
470
- );
471
- };
472
- exports2.useTransition = function() {
473
- return ReactSharedInternals.H.useTransition();
474
- };
475
- exports2.version = "19.1.0";
476
- }
477
- });
478
-
479
- // ../../node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react.development.js
480
- var require_react_development = __commonJS({
481
- "../../node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react.development.js"(exports2, module2) {
482
- "use strict";
483
- "production" !== process.env.NODE_ENV && function() {
484
- function defineDeprecationWarning(methodName, info) {
485
- Object.defineProperty(Component.prototype, methodName, {
486
- get: function() {
487
- console.warn(
488
- "%s(...) is deprecated in plain JavaScript React classes. %s",
489
- info[0],
490
- info[1]
491
- );
492
- }
493
- });
494
- }
495
- function getIteratorFn(maybeIterable) {
496
- if (null === maybeIterable || "object" !== typeof maybeIterable)
497
- return null;
498
- maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
499
- return "function" === typeof maybeIterable ? maybeIterable : null;
500
- }
501
- function warnNoop(publicInstance, callerName) {
502
- publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
503
- var warningKey = publicInstance + "." + callerName;
504
- didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
505
- "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.",
506
- callerName,
507
- publicInstance
508
- ), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
509
- }
510
- function Component(props, context, updater) {
511
- this.props = props;
512
- this.context = context;
513
- this.refs = emptyObject;
514
- this.updater = updater || ReactNoopUpdateQueue;
515
- }
516
- function ComponentDummy() {
517
- }
518
- function PureComponent(props, context, updater) {
519
- this.props = props;
520
- this.context = context;
521
- this.refs = emptyObject;
522
- this.updater = updater || ReactNoopUpdateQueue;
523
- }
524
- function testStringCoercion(value) {
525
- return "" + value;
526
- }
527
- function checkKeyStringCoercion(value) {
528
- try {
529
- testStringCoercion(value);
530
- var JSCompiler_inline_result = false;
531
- } catch (e) {
532
- JSCompiler_inline_result = true;
533
- }
534
- if (JSCompiler_inline_result) {
535
- JSCompiler_inline_result = console;
536
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
537
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
538
- JSCompiler_temp_const.call(
539
- JSCompiler_inline_result,
540
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
541
- JSCompiler_inline_result$jscomp$0
542
- );
543
- return testStringCoercion(value);
544
- }
545
- }
546
- function getComponentNameFromType(type) {
547
- if (null == type) return null;
548
- if ("function" === typeof type)
549
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
550
- if ("string" === typeof type) return type;
551
- switch (type) {
552
- case REACT_FRAGMENT_TYPE:
553
- return "Fragment";
554
- case REACT_PROFILER_TYPE:
555
- return "Profiler";
556
- case REACT_STRICT_MODE_TYPE:
557
- return "StrictMode";
558
- case REACT_SUSPENSE_TYPE:
559
- return "Suspense";
560
- case REACT_SUSPENSE_LIST_TYPE:
561
- return "SuspenseList";
562
- case REACT_ACTIVITY_TYPE:
563
- return "Activity";
564
- }
565
- if ("object" === typeof type)
566
- switch ("number" === typeof type.tag && console.error(
567
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
568
- ), type.$$typeof) {
569
- case REACT_PORTAL_TYPE:
570
- return "Portal";
571
- case REACT_CONTEXT_TYPE:
572
- return (type.displayName || "Context") + ".Provider";
573
- case REACT_CONSUMER_TYPE:
574
- return (type._context.displayName || "Context") + ".Consumer";
575
- case REACT_FORWARD_REF_TYPE:
576
- var innerType = type.render;
577
- type = type.displayName;
578
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
579
- return type;
580
- case REACT_MEMO_TYPE:
581
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
582
- case REACT_LAZY_TYPE:
583
- innerType = type._payload;
584
- type = type._init;
585
- try {
586
- return getComponentNameFromType(type(innerType));
587
- } catch (x) {
588
- }
589
- }
590
- return null;
591
- }
592
- function getTaskName(type) {
593
- if (type === REACT_FRAGMENT_TYPE) return "<>";
594
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
595
- return "<...>";
596
- try {
597
- var name = getComponentNameFromType(type);
598
- return name ? "<" + name + ">" : "<...>";
599
- } catch (x) {
600
- return "<...>";
601
- }
602
- }
603
- function getOwner() {
604
- var dispatcher = ReactSharedInternals.A;
605
- return null === dispatcher ? null : dispatcher.getOwner();
606
- }
607
- function UnknownOwner() {
608
- return Error("react-stack-top-frame");
609
- }
610
- function hasValidKey(config) {
611
- if (hasOwnProperty.call(config, "key")) {
612
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
613
- if (getter && getter.isReactWarning) return false;
614
- }
615
- return void 0 !== config.key;
616
- }
617
- function defineKeyPropWarningGetter(props, displayName) {
618
- function warnAboutAccessingKey() {
619
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
620
- "%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)",
621
- displayName
622
- ));
623
- }
624
- warnAboutAccessingKey.isReactWarning = true;
625
- Object.defineProperty(props, "key", {
626
- get: warnAboutAccessingKey,
627
- configurable: true
628
- });
629
- }
630
- function elementRefGetterWithDeprecationWarning() {
631
- var componentName = getComponentNameFromType(this.type);
632
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
633
- "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."
634
- ));
635
- componentName = this.props.ref;
636
- return void 0 !== componentName ? componentName : null;
637
- }
638
- function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
639
- self = props.ref;
640
- type = {
641
- $$typeof: REACT_ELEMENT_TYPE,
642
- type,
643
- key,
644
- props,
645
- _owner: owner
646
- };
647
- null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
648
- enumerable: false,
649
- get: elementRefGetterWithDeprecationWarning
650
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
651
- type._store = {};
652
- Object.defineProperty(type._store, "validated", {
653
- configurable: false,
654
- enumerable: false,
655
- writable: true,
656
- value: 0
657
- });
658
- Object.defineProperty(type, "_debugInfo", {
659
- configurable: false,
660
- enumerable: false,
661
- writable: true,
662
- value: null
663
- });
664
- Object.defineProperty(type, "_debugStack", {
665
- configurable: false,
666
- enumerable: false,
667
- writable: true,
668
- value: debugStack
669
- });
670
- Object.defineProperty(type, "_debugTask", {
671
- configurable: false,
672
- enumerable: false,
673
- writable: true,
674
- value: debugTask
675
- });
676
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
677
- return type;
678
- }
679
- function cloneAndReplaceKey(oldElement, newKey) {
680
- newKey = ReactElement(
681
- oldElement.type,
682
- newKey,
683
- void 0,
684
- void 0,
685
- oldElement._owner,
686
- oldElement.props,
687
- oldElement._debugStack,
688
- oldElement._debugTask
689
- );
690
- oldElement._store && (newKey._store.validated = oldElement._store.validated);
691
- return newKey;
692
- }
693
- function isValidElement(object) {
694
- return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
695
- }
696
- function escape(key) {
697
- var escaperLookup = { "=": "=0", ":": "=2" };
698
- return "$" + key.replace(/[=:]/g, function(match) {
699
- return escaperLookup[match];
700
- });
701
- }
702
- function getElementKey(element, index) {
703
- return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
704
- }
705
- function noop$1() {
706
- }
707
- function resolveThenable(thenable) {
708
- switch (thenable.status) {
709
- case "fulfilled":
710
- return thenable.value;
711
- case "rejected":
712
- throw thenable.reason;
713
- default:
714
- switch ("string" === typeof thenable.status ? thenable.then(noop$1, noop$1) : (thenable.status = "pending", thenable.then(
715
- function(fulfilledValue) {
716
- "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
717
- },
718
- function(error) {
719
- "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
720
- }
721
- )), thenable.status) {
722
- case "fulfilled":
723
- return thenable.value;
724
- case "rejected":
725
- throw thenable.reason;
726
- }
727
- }
728
- throw thenable;
729
- }
730
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
731
- var type = typeof children;
732
- if ("undefined" === type || "boolean" === type) children = null;
733
- var invokeCallback = false;
734
- if (null === children) invokeCallback = true;
735
- else
736
- switch (type) {
737
- case "bigint":
738
- case "string":
739
- case "number":
740
- invokeCallback = true;
741
- break;
742
- case "object":
743
- switch (children.$$typeof) {
744
- case REACT_ELEMENT_TYPE:
745
- case REACT_PORTAL_TYPE:
746
- invokeCallback = true;
747
- break;
748
- case REACT_LAZY_TYPE:
749
- return invokeCallback = children._init, mapIntoArray(
750
- invokeCallback(children._payload),
751
- array,
752
- escapedPrefix,
753
- nameSoFar,
754
- callback
755
- );
756
- }
757
- }
758
- if (invokeCallback) {
759
- invokeCallback = children;
760
- callback = callback(invokeCallback);
761
- var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
762
- isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
763
- return c;
764
- })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
765
- callback,
766
- escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
767
- userProvidedKeyEscapeRegex,
768
- "$&/"
769
- ) + "/") + childKey
770
- ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
771
- return 1;
772
- }
773
- invokeCallback = 0;
774
- childKey = "" === nameSoFar ? "." : nameSoFar + ":";
775
- if (isArrayImpl(children))
776
- for (var i = 0; i < children.length; i++)
777
- nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
778
- nameSoFar,
779
- array,
780
- escapedPrefix,
781
- type,
782
- callback
783
- );
784
- else if (i = getIteratorFn(children), "function" === typeof i)
785
- for (i === children.entries && (didWarnAboutMaps || console.warn(
786
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
787
- ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
788
- nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
789
- nameSoFar,
790
- array,
791
- escapedPrefix,
792
- type,
793
- callback
794
- );
795
- else if ("object" === type) {
796
- if ("function" === typeof children.then)
797
- return mapIntoArray(
798
- resolveThenable(children),
799
- array,
800
- escapedPrefix,
801
- nameSoFar,
802
- callback
803
- );
804
- array = String(children);
805
- throw Error(
806
- "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
807
- );
808
- }
809
- return invokeCallback;
810
- }
811
- function mapChildren(children, func, context) {
812
- if (null == children) return children;
813
- var result = [], count = 0;
814
- mapIntoArray(children, result, "", "", function(child) {
815
- return func.call(context, child, count++);
816
- });
817
- return result;
818
- }
819
- function lazyInitializer(payload) {
820
- if (-1 === payload._status) {
821
- var ctor = payload._result;
822
- ctor = ctor();
823
- ctor.then(
824
- function(moduleObject) {
825
- if (0 === payload._status || -1 === payload._status)
826
- payload._status = 1, payload._result = moduleObject;
827
- },
828
- function(error) {
829
- if (0 === payload._status || -1 === payload._status)
830
- payload._status = 2, payload._result = error;
831
- }
832
- );
833
- -1 === payload._status && (payload._status = 0, payload._result = ctor);
834
- }
835
- if (1 === payload._status)
836
- return ctor = payload._result, void 0 === ctor && console.error(
837
- "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?",
838
- ctor
839
- ), "default" in ctor || console.error(
840
- "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
841
- ctor
842
- ), ctor.default;
843
- throw payload._result;
844
- }
845
- function resolveDispatcher() {
846
- var dispatcher = ReactSharedInternals.H;
847
- null === dispatcher && console.error(
848
- "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."
849
- );
850
- return dispatcher;
851
- }
852
- function noop() {
853
- }
854
- function enqueueTask(task) {
855
- if (null === enqueueTaskImpl)
856
- try {
857
- var requireString = ("require" + Math.random()).slice(0, 7);
858
- enqueueTaskImpl = (module2 && module2[requireString]).call(
859
- module2,
860
- "timers"
861
- ).setImmediate;
862
- } catch (_err) {
863
- enqueueTaskImpl = function(callback) {
864
- false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
865
- "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."
866
- ));
867
- var channel = new MessageChannel();
868
- channel.port1.onmessage = callback;
869
- channel.port2.postMessage(void 0);
870
- };
871
- }
872
- return enqueueTaskImpl(task);
873
- }
874
- function aggregateErrors(errors) {
875
- return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
876
- }
877
- function popActScope(prevActQueue, prevActScopeDepth) {
878
- prevActScopeDepth !== actScopeDepth - 1 && console.error(
879
- "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
880
- );
881
- actScopeDepth = prevActScopeDepth;
882
- }
883
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
884
- var queue = ReactSharedInternals.actQueue;
885
- if (null !== queue)
886
- if (0 !== queue.length)
887
- try {
888
- flushActQueue(queue);
889
- enqueueTask(function() {
890
- return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
891
- });
892
- return;
893
- } catch (error) {
894
- ReactSharedInternals.thrownErrors.push(error);
895
- }
896
- else ReactSharedInternals.actQueue = null;
897
- 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
898
- }
899
- function flushActQueue(queue) {
900
- if (!isFlushing) {
901
- isFlushing = true;
902
- var i = 0;
903
- try {
904
- for (; i < queue.length; i++) {
905
- var callback = queue[i];
906
- do {
907
- ReactSharedInternals.didUsePromise = false;
908
- var continuation = callback(false);
909
- if (null !== continuation) {
910
- if (ReactSharedInternals.didUsePromise) {
911
- queue[i] = callback;
912
- queue.splice(0, i);
913
- return;
914
- }
915
- callback = continuation;
916
- } else break;
917
- } while (1);
918
- }
919
- queue.length = 0;
920
- } catch (error) {
921
- queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
922
- } finally {
923
- isFlushing = false;
924
- }
925
- }
926
- }
927
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
928
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
929
- Symbol.for("react.provider");
930
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
931
- isMounted: function() {
932
- return false;
933
- },
934
- enqueueForceUpdate: function(publicInstance) {
935
- warnNoop(publicInstance, "forceUpdate");
936
- },
937
- enqueueReplaceState: function(publicInstance) {
938
- warnNoop(publicInstance, "replaceState");
939
- },
940
- enqueueSetState: function(publicInstance) {
941
- warnNoop(publicInstance, "setState");
942
- }
943
- }, assign = Object.assign, emptyObject = {};
944
- Object.freeze(emptyObject);
945
- Component.prototype.isReactComponent = {};
946
- Component.prototype.setState = function(partialState, callback) {
947
- if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
948
- throw Error(
949
- "takes an object of state variables to update or a function which returns an object of state variables."
950
- );
951
- this.updater.enqueueSetState(this, partialState, callback, "setState");
952
- };
953
- Component.prototype.forceUpdate = function(callback) {
954
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
955
- };
956
- var deprecatedAPIs = {
957
- isMounted: [
958
- "isMounted",
959
- "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
960
- ],
961
- replaceState: [
962
- "replaceState",
963
- "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
964
- ]
965
- }, fnName;
966
- for (fnName in deprecatedAPIs)
967
- deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
968
- ComponentDummy.prototype = Component.prototype;
969
- deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
970
- deprecatedAPIs.constructor = PureComponent;
971
- assign(deprecatedAPIs, Component.prototype);
972
- deprecatedAPIs.isPureReactComponent = true;
973
- var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
974
- H: null,
975
- A: null,
976
- T: null,
977
- S: null,
978
- V: null,
979
- actQueue: null,
980
- isBatchingLegacy: false,
981
- didScheduleLegacyUpdate: false,
982
- didUsePromise: false,
983
- thrownErrors: [],
984
- getCurrentStack: null,
985
- recentlyCreatedOwnerStacks: 0
986
- }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
987
- return null;
988
- };
989
- deprecatedAPIs = {
990
- "react-stack-bottom-frame": function(callStackForError) {
991
- return callStackForError();
992
- }
993
- };
994
- var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
995
- var didWarnAboutElementRef = {};
996
- var unknownOwnerDebugStack = deprecatedAPIs["react-stack-bottom-frame"].bind(deprecatedAPIs, UnknownOwner)();
997
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
998
- var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
999
- if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
1000
- var event = new window.ErrorEvent("error", {
1001
- bubbles: true,
1002
- cancelable: true,
1003
- message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
1004
- error
1005
- });
1006
- if (!window.dispatchEvent(event)) return;
1007
- } else if ("object" === typeof process && "function" === typeof process.emit) {
1008
- process.emit("uncaughtException", error);
1009
- return;
1010
- }
1011
- console.error(error);
1012
- }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
1013
- queueMicrotask(function() {
1014
- return queueMicrotask(callback);
1015
- });
1016
- } : enqueueTask;
1017
- deprecatedAPIs = Object.freeze({
1018
- __proto__: null,
1019
- c: function(size) {
1020
- return resolveDispatcher().useMemoCache(size);
1021
- }
1022
- });
1023
- exports2.Children = {
1024
- map: mapChildren,
1025
- forEach: function(children, forEachFunc, forEachContext) {
1026
- mapChildren(
1027
- children,
1028
- function() {
1029
- forEachFunc.apply(this, arguments);
1030
- },
1031
- forEachContext
1032
- );
1033
- },
1034
- count: function(children) {
1035
- var n = 0;
1036
- mapChildren(children, function() {
1037
- n++;
1038
- });
1039
- return n;
1040
- },
1041
- toArray: function(children) {
1042
- return mapChildren(children, function(child) {
1043
- return child;
1044
- }) || [];
1045
- },
1046
- only: function(children) {
1047
- if (!isValidElement(children))
1048
- throw Error(
1049
- "React.Children.only expected to receive a single React element child."
1050
- );
1051
- return children;
1052
- }
1053
- };
1054
- exports2.Component = Component;
1055
- exports2.Fragment = REACT_FRAGMENT_TYPE;
1056
- exports2.Profiler = REACT_PROFILER_TYPE;
1057
- exports2.PureComponent = PureComponent;
1058
- exports2.StrictMode = REACT_STRICT_MODE_TYPE;
1059
- exports2.Suspense = REACT_SUSPENSE_TYPE;
1060
- exports2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
1061
- exports2.__COMPILER_RUNTIME = deprecatedAPIs;
1062
- exports2.act = function(callback) {
1063
- var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
1064
- actScopeDepth++;
1065
- var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
1066
- try {
1067
- var result = callback();
1068
- } catch (error) {
1069
- ReactSharedInternals.thrownErrors.push(error);
1070
- }
1071
- if (0 < ReactSharedInternals.thrownErrors.length)
1072
- throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1073
- if (null !== result && "object" === typeof result && "function" === typeof result.then) {
1074
- var thenable = result;
1075
- queueSeveralMicrotasks(function() {
1076
- didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1077
- "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 () => ...);"
1078
- ));
1079
- });
1080
- return {
1081
- then: function(resolve, reject) {
1082
- didAwaitActCall = true;
1083
- thenable.then(
1084
- function(returnValue) {
1085
- popActScope(prevActQueue, prevActScopeDepth);
1086
- if (0 === prevActScopeDepth) {
1087
- try {
1088
- flushActQueue(queue), enqueueTask(function() {
1089
- return recursivelyFlushAsyncActWork(
1090
- returnValue,
1091
- resolve,
1092
- reject
1093
- );
1094
- });
1095
- } catch (error$0) {
1096
- ReactSharedInternals.thrownErrors.push(error$0);
1097
- }
1098
- if (0 < ReactSharedInternals.thrownErrors.length) {
1099
- var _thrownError = aggregateErrors(
1100
- ReactSharedInternals.thrownErrors
1101
- );
1102
- ReactSharedInternals.thrownErrors.length = 0;
1103
- reject(_thrownError);
1104
- }
1105
- } else resolve(returnValue);
1106
- },
1107
- function(error) {
1108
- popActScope(prevActQueue, prevActScopeDepth);
1109
- 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
1110
- ReactSharedInternals.thrownErrors
1111
- ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
1112
- }
1113
- );
1114
- }
1115
- };
1116
- }
1117
- var returnValue$jscomp$0 = result;
1118
- popActScope(prevActQueue, prevActScopeDepth);
1119
- 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
1120
- didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1121
- "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(() => ...)"
1122
- ));
1123
- }), ReactSharedInternals.actQueue = null);
1124
- if (0 < ReactSharedInternals.thrownErrors.length)
1125
- throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1126
- return {
1127
- then: function(resolve, reject) {
1128
- didAwaitActCall = true;
1129
- 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
1130
- return recursivelyFlushAsyncActWork(
1131
- returnValue$jscomp$0,
1132
- resolve,
1133
- reject
1134
- );
1135
- })) : resolve(returnValue$jscomp$0);
1136
- }
1137
- };
1138
- };
1139
- exports2.cache = function(fn) {
1140
- return function() {
1141
- return fn.apply(null, arguments);
1142
- };
1143
- };
1144
- exports2.captureOwnerStack = function() {
1145
- var getCurrentStack = ReactSharedInternals.getCurrentStack;
1146
- return null === getCurrentStack ? null : getCurrentStack();
1147
- };
1148
- exports2.cloneElement = function(element, config, children) {
1149
- if (null === element || void 0 === element)
1150
- throw Error(
1151
- "The argument must be a React element, but you passed " + element + "."
1152
- );
1153
- var props = assign({}, element.props), key = element.key, owner = element._owner;
1154
- if (null != config) {
1155
- var JSCompiler_inline_result;
1156
- a: {
1157
- if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1158
- config,
1159
- "ref"
1160
- ).get) && JSCompiler_inline_result.isReactWarning) {
1161
- JSCompiler_inline_result = false;
1162
- break a;
1163
- }
1164
- JSCompiler_inline_result = void 0 !== config.ref;
1165
- }
1166
- JSCompiler_inline_result && (owner = getOwner());
1167
- hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
1168
- for (propName in config)
1169
- !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
1170
- }
1171
- var propName = arguments.length - 2;
1172
- if (1 === propName) props.children = children;
1173
- else if (1 < propName) {
1174
- JSCompiler_inline_result = Array(propName);
1175
- for (var i = 0; i < propName; i++)
1176
- JSCompiler_inline_result[i] = arguments[i + 2];
1177
- props.children = JSCompiler_inline_result;
1178
- }
1179
- props = ReactElement(
1180
- element.type,
1181
- key,
1182
- void 0,
1183
- void 0,
1184
- owner,
1185
- props,
1186
- element._debugStack,
1187
- element._debugTask
1188
- );
1189
- for (key = 2; key < arguments.length; key++)
1190
- owner = arguments[key], isValidElement(owner) && owner._store && (owner._store.validated = 1);
1191
- return props;
1192
- };
1193
- exports2.createContext = function(defaultValue) {
1194
- defaultValue = {
1195
- $$typeof: REACT_CONTEXT_TYPE,
1196
- _currentValue: defaultValue,
1197
- _currentValue2: defaultValue,
1198
- _threadCount: 0,
1199
- Provider: null,
1200
- Consumer: null
1201
- };
1202
- defaultValue.Provider = defaultValue;
1203
- defaultValue.Consumer = {
1204
- $$typeof: REACT_CONSUMER_TYPE,
1205
- _context: defaultValue
1206
- };
1207
- defaultValue._currentRenderer = null;
1208
- defaultValue._currentRenderer2 = null;
1209
- return defaultValue;
1210
- };
1211
- exports2.createElement = function(type, config, children) {
1212
- for (var i = 2; i < arguments.length; i++) {
1213
- var node = arguments[i];
1214
- isValidElement(node) && node._store && (node._store.validated = 1);
1215
- }
1216
- i = {};
1217
- node = null;
1218
- if (null != config)
1219
- for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
1220
- "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"
1221
- )), hasValidKey(config) && (checkKeyStringCoercion(config.key), node = "" + config.key), config)
1222
- hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
1223
- var childrenLength = arguments.length - 2;
1224
- if (1 === childrenLength) i.children = children;
1225
- else if (1 < childrenLength) {
1226
- for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
1227
- childArray[_i] = arguments[_i + 2];
1228
- Object.freeze && Object.freeze(childArray);
1229
- i.children = childArray;
1230
- }
1231
- if (type && type.defaultProps)
1232
- for (propName in childrenLength = type.defaultProps, childrenLength)
1233
- void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1234
- node && defineKeyPropWarningGetter(
1235
- i,
1236
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1237
- );
1238
- var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1239
- return ReactElement(
1240
- type,
1241
- node,
1242
- void 0,
1243
- void 0,
1244
- getOwner(),
1245
- i,
1246
- propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1247
- propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1248
- );
1249
- };
1250
- exports2.createRef = function() {
1251
- var refObject = { current: null };
1252
- Object.seal(refObject);
1253
- return refObject;
1254
- };
1255
- exports2.forwardRef = function(render) {
1256
- null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
1257
- "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1258
- ) : "function" !== typeof render ? console.error(
1259
- "forwardRef requires a render function but was given %s.",
1260
- null === render ? "null" : typeof render
1261
- ) : 0 !== render.length && 2 !== render.length && console.error(
1262
- "forwardRef render functions accept exactly two parameters: props and ref. %s",
1263
- 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
1264
- );
1265
- null != render && null != render.defaultProps && console.error(
1266
- "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1267
- );
1268
- var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, 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
- render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
1278
- }
1279
- });
1280
- return elementType;
1281
- };
1282
- exports2.isValidElement = isValidElement;
1283
- exports2.lazy = function(ctor) {
1284
- return {
1285
- $$typeof: REACT_LAZY_TYPE,
1286
- _payload: { _status: -1, _result: ctor },
1287
- _init: lazyInitializer
1288
- };
1289
- };
1290
- exports2.memo = function(type, compare) {
1291
- null == type && console.error(
1292
- "memo: The first argument must be a component. Instead received: %s",
1293
- null === type ? "null" : typeof type
1294
- );
1295
- compare = {
1296
- $$typeof: REACT_MEMO_TYPE,
1297
- type,
1298
- compare: void 0 === compare ? null : compare
1299
- };
1300
- var ownName;
1301
- Object.defineProperty(compare, "displayName", {
1302
- enumerable: false,
1303
- configurable: true,
1304
- get: function() {
1305
- return ownName;
1306
- },
1307
- set: function(name) {
1308
- ownName = name;
1309
- type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
1310
- }
1311
- });
1312
- return compare;
1313
- };
1314
- exports2.startTransition = function(scope) {
1315
- var prevTransition = ReactSharedInternals.T, currentTransition = {};
1316
- ReactSharedInternals.T = currentTransition;
1317
- currentTransition._updatedFibers = /* @__PURE__ */ new Set();
1318
- try {
1319
- var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
1320
- null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
1321
- "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
1322
- } catch (error) {
1323
- reportGlobalError(error);
1324
- } finally {
1325
- null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
1326
- "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."
1327
- )), ReactSharedInternals.T = prevTransition;
1328
- }
1329
- };
1330
- exports2.unstable_useCacheRefresh = function() {
1331
- return resolveDispatcher().useCacheRefresh();
1332
- };
1333
- exports2.use = function(usable) {
1334
- return resolveDispatcher().use(usable);
1335
- };
1336
- exports2.useActionState = function(action, initialState, permalink) {
1337
- return resolveDispatcher().useActionState(
1338
- action,
1339
- initialState,
1340
- permalink
1341
- );
1342
- };
1343
- exports2.useCallback = function(callback, deps) {
1344
- return resolveDispatcher().useCallback(callback, deps);
1345
- };
1346
- exports2.useContext = function(Context) {
1347
- var dispatcher = resolveDispatcher();
1348
- Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
1349
- "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1350
- );
1351
- return dispatcher.useContext(Context);
1352
- };
1353
- exports2.useDebugValue = function(value, formatterFn) {
1354
- return resolveDispatcher().useDebugValue(value, formatterFn);
1355
- };
1356
- exports2.useDeferredValue = function(value, initialValue) {
1357
- return resolveDispatcher().useDeferredValue(value, initialValue);
1358
- };
1359
- exports2.useEffect = function(create, createDeps, update) {
1360
- null == create && console.warn(
1361
- "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1362
- );
1363
- var dispatcher = resolveDispatcher();
1364
- if ("function" === typeof update)
1365
- throw Error(
1366
- "useEffect CRUD overload is not enabled in this build of React."
1367
- );
1368
- return dispatcher.useEffect(create, createDeps);
1369
- };
1370
- exports2.useId = function() {
1371
- return resolveDispatcher().useId();
1372
- };
1373
- exports2.useImperativeHandle = function(ref, create, deps) {
1374
- return resolveDispatcher().useImperativeHandle(ref, create, deps);
1375
- };
1376
- exports2.useInsertionEffect = function(create, deps) {
1377
- null == create && console.warn(
1378
- "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1379
- );
1380
- return resolveDispatcher().useInsertionEffect(create, deps);
1381
- };
1382
- exports2.useLayoutEffect = function(create, deps) {
1383
- null == create && console.warn(
1384
- "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1385
- );
1386
- return resolveDispatcher().useLayoutEffect(create, deps);
1387
- };
1388
- exports2.useMemo = function(create, deps) {
1389
- return resolveDispatcher().useMemo(create, deps);
1390
- };
1391
- exports2.useOptimistic = function(passthrough, reducer) {
1392
- return resolveDispatcher().useOptimistic(passthrough, reducer);
1393
- };
1394
- exports2.useReducer = function(reducer, initialArg, init) {
1395
- return resolveDispatcher().useReducer(reducer, initialArg, init);
1396
- };
1397
- exports2.useRef = function(initialValue) {
1398
- return resolveDispatcher().useRef(initialValue);
1399
- };
1400
- exports2.useState = function(initialState) {
1401
- return resolveDispatcher().useState(initialState);
1402
- };
1403
- exports2.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
1404
- return resolveDispatcher().useSyncExternalStore(
1405
- subscribe,
1406
- getSnapshot,
1407
- getServerSnapshot
1408
- );
1409
- };
1410
- exports2.useTransition = function() {
1411
- return resolveDispatcher().useTransition();
1412
- };
1413
- exports2.version = "19.1.0";
1414
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1415
- }();
1416
- }
1417
- });
1418
-
1419
- // ../../node_modules/.pnpm/react@19.1.0/node_modules/react/index.js
1420
- var require_react = __commonJS({
1421
- "../../node_modules/.pnpm/react@19.1.0/node_modules/react/index.js"(exports2, module2) {
1422
- "use strict";
1423
- if (process.env.NODE_ENV === "production") {
1424
- module2.exports = require_react_production();
1425
- } else {
1426
- module2.exports = require_react_development();
1427
- }
1428
- }
1429
- });
1430
-
1431
20
  // src/index.tsx
1432
21
  var index_exports = {};
1433
22
  __export(index_exports, {
@@ -1442,7 +31,7 @@ __export(index_exports, {
1442
31
  module.exports = __toCommonJS(index_exports);
1443
32
 
1444
33
  // src/useEffectIgnoreInitial.tsx
1445
- var import_react = __toESM(require_react(), 1);
34
+ var import_react = require("react");
1446
35
  var useEffectIgnoreInitial = (fn, deps) => {
1447
36
  const isInitial = (0, import_react.useRef)(true);
1448
37
  (0, import_react.useEffect)(
@@ -1459,7 +48,7 @@ var useEffectIgnoreInitial = (fn, deps) => {
1459
48
  };
1460
49
 
1461
50
  // src/useOnResize.tsx
1462
- var import_react2 = __toESM(require_react(), 1);
51
+ var import_react2 = require("react");
1463
52
  var useOnResize = (callback, options = {}) => {
1464
53
  const { outerElement, throttle: throttleDuration = 100 } = options;
1465
54
  const lastExecutedRef = (0, import_react2.useRef)(0);
@@ -1481,7 +70,7 @@ var useOnResize = (callback, options = {}) => {
1481
70
  };
1482
71
 
1483
72
  // src/useOutsideAlerter.tsx
1484
- var import_react3 = __toESM(require_react(), 1);
73
+ var import_react3 = require("react");
1485
74
  var useOutsideAlerter = (ref, callback, ignore = []) => {
1486
75
  (0, import_react3.useEffect)(() => {
1487
76
  const handleClickOutside = (ev) => {
@@ -1506,7 +95,7 @@ var useOutsideAlerter = (ref, callback, ignore = []) => {
1506
95
  };
1507
96
 
1508
97
  // src/useSafeContext.tsx
1509
- var import_react4 = __toESM(require_react(), 1);
98
+ var import_react4 = require("react");
1510
99
  var useSafeContext = (ctx) => {
1511
100
  if (ctx === null || ctx === void 0) {
1512
101
  throw new Error(
@@ -1522,7 +111,7 @@ var createSafeContext = () => {
1522
111
  };
1523
112
 
1524
113
  // src/useSize.tsx
1525
- var import_react5 = __toESM(require_react(), 1);
114
+ var import_react5 = require("react");
1526
115
  var useSize = (element, options = {}) => {
1527
116
  const { outerElement, throttle: throttleDuration = 100 } = options;
1528
117
  const getSize = (el = null) => {
@@ -1554,7 +143,7 @@ var useSize = (element, options = {}) => {
1554
143
 
1555
144
  // src/useTimeLeft/index.tsx
1556
145
  var import_utils = require("@w3ux/utils");
1557
- var import_react6 = __toESM(require_react(), 1);
146
+ var import_react6 = require("react");
1558
147
 
1559
148
  // src/util.ts
1560
149
  var import_date_fns = require("date-fns");
@@ -1687,27 +276,3 @@ var useTimeLeft = (props) => {
1687
276
  });
1688
277
  /* @license Copyright 2024 w3ux authors & contributors
1689
278
  SPDX-License-Identifier: GPL-3.0-only */
1690
- /*! Bundled license information:
1691
-
1692
- react/cjs/react.production.js:
1693
- (**
1694
- * @license React
1695
- * react.production.js
1696
- *
1697
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1698
- *
1699
- * This source code is licensed under the MIT license found in the
1700
- * LICENSE file in the root directory of this source tree.
1701
- *)
1702
-
1703
- react/cjs/react.development.js:
1704
- (**
1705
- * @license React
1706
- * react.development.js
1707
- *
1708
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1709
- *
1710
- * This source code is licensed under the MIT license found in the
1711
- * LICENSE file in the root directory of this source tree.
1712
- *)
1713
- */