@wtree/payload-ecommerce-coupon 3.78.4 → 3.78.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2133 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
+ key = keys[i];
13
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
21
+ value: mod,
22
+ enumerable: true
23
+ }) : target, mod));
24
+ //#endregion
25
+ //#region node_modules/react/cjs/react.production.js
26
+ /**
27
+ * @license React
28
+ * react.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */
35
+ var require_react_production = /* @__PURE__ */ __commonJSMin(((exports) => {
36
+ 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"), 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_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;
37
+ function getIteratorFn(maybeIterable) {
38
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
39
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
40
+ return "function" === typeof maybeIterable ? maybeIterable : null;
41
+ }
42
+ var ReactNoopUpdateQueue = {
43
+ isMounted: function() {
44
+ return !1;
45
+ },
46
+ enqueueForceUpdate: function() {},
47
+ enqueueReplaceState: function() {},
48
+ enqueueSetState: function() {}
49
+ }, assign = Object.assign, emptyObject = {};
50
+ function Component(props, context, updater) {
51
+ this.props = props;
52
+ this.context = context;
53
+ this.refs = emptyObject;
54
+ this.updater = updater || ReactNoopUpdateQueue;
55
+ }
56
+ Component.prototype.isReactComponent = {};
57
+ Component.prototype.setState = function(partialState, callback) {
58
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
59
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
60
+ };
61
+ Component.prototype.forceUpdate = function(callback) {
62
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
63
+ };
64
+ function ComponentDummy() {}
65
+ ComponentDummy.prototype = Component.prototype;
66
+ function PureComponent(props, context, updater) {
67
+ this.props = props;
68
+ this.context = context;
69
+ this.refs = emptyObject;
70
+ this.updater = updater || ReactNoopUpdateQueue;
71
+ }
72
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
73
+ pureComponentPrototype.constructor = PureComponent;
74
+ assign(pureComponentPrototype, Component.prototype);
75
+ pureComponentPrototype.isPureReactComponent = !0;
76
+ var isArrayImpl = Array.isArray;
77
+ function noop() {}
78
+ var ReactSharedInternals = {
79
+ H: null,
80
+ A: null,
81
+ T: null,
82
+ S: null
83
+ }, hasOwnProperty = Object.prototype.hasOwnProperty;
84
+ function ReactElement(type, key, props) {
85
+ var refProp = props.ref;
86
+ return {
87
+ $$typeof: REACT_ELEMENT_TYPE,
88
+ type,
89
+ key,
90
+ ref: void 0 !== refProp ? refProp : null,
91
+ props
92
+ };
93
+ }
94
+ function cloneAndReplaceKey(oldElement, newKey) {
95
+ return ReactElement(oldElement.type, newKey, oldElement.props);
96
+ }
97
+ function isValidElement(object) {
98
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
99
+ }
100
+ function escape(key) {
101
+ var escaperLookup = {
102
+ "=": "=0",
103
+ ":": "=2"
104
+ };
105
+ return "$" + key.replace(/[=:]/g, function(match) {
106
+ return escaperLookup[match];
107
+ });
108
+ }
109
+ var userProvidedKeyEscapeRegex = /\/+/g;
110
+ function getElementKey(element, index) {
111
+ return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
112
+ }
113
+ function resolveThenable(thenable) {
114
+ switch (thenable.status) {
115
+ case "fulfilled": return thenable.value;
116
+ case "rejected": throw thenable.reason;
117
+ default: switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) {
118
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
119
+ }, function(error) {
120
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
121
+ })), thenable.status) {
122
+ case "fulfilled": return thenable.value;
123
+ case "rejected": throw thenable.reason;
124
+ }
125
+ }
126
+ throw thenable;
127
+ }
128
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
129
+ var type = typeof children;
130
+ if ("undefined" === type || "boolean" === type) children = null;
131
+ var invokeCallback = !1;
132
+ if (null === children) invokeCallback = !0;
133
+ else switch (type) {
134
+ case "bigint":
135
+ case "string":
136
+ case "number":
137
+ invokeCallback = !0;
138
+ break;
139
+ case "object": switch (children.$$typeof) {
140
+ case REACT_ELEMENT_TYPE:
141
+ case REACT_PORTAL_TYPE:
142
+ invokeCallback = !0;
143
+ break;
144
+ case REACT_LAZY_TYPE: return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
145
+ }
146
+ }
147
+ if (invokeCallback) 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) {
148
+ return c;
149
+ })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(callback, escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + invokeCallback)), array.push(callback)), 1;
150
+ invokeCallback = 0;
151
+ var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
152
+ if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
153
+ else if (i = getIteratorFn(children), "function" === typeof i) for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
154
+ else if ("object" === type) {
155
+ if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
156
+ array = String(children);
157
+ throw Error("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.");
158
+ }
159
+ return invokeCallback;
160
+ }
161
+ function mapChildren(children, func, context) {
162
+ if (null == children) return children;
163
+ var result = [], count = 0;
164
+ mapIntoArray(children, result, "", "", function(child) {
165
+ return func.call(context, child, count++);
166
+ });
167
+ return result;
168
+ }
169
+ function lazyInitializer(payload) {
170
+ if (-1 === payload._status) {
171
+ var ctor = payload._result;
172
+ ctor = ctor();
173
+ ctor.then(function(moduleObject) {
174
+ if (0 === payload._status || -1 === payload._status) payload._status = 1, payload._result = moduleObject;
175
+ }, function(error) {
176
+ if (0 === payload._status || -1 === payload._status) payload._status = 2, payload._result = error;
177
+ });
178
+ -1 === payload._status && (payload._status = 0, payload._result = ctor);
179
+ }
180
+ if (1 === payload._status) return payload._result.default;
181
+ throw payload._result;
182
+ }
183
+ var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
184
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
185
+ var event = new window.ErrorEvent("error", {
186
+ bubbles: !0,
187
+ cancelable: !0,
188
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
189
+ error
190
+ });
191
+ if (!window.dispatchEvent(event)) return;
192
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
193
+ process.emit("uncaughtException", error);
194
+ return;
195
+ }
196
+ console.error(error);
197
+ }, Children = {
198
+ map: mapChildren,
199
+ forEach: function(children, forEachFunc, forEachContext) {
200
+ mapChildren(children, function() {
201
+ forEachFunc.apply(this, arguments);
202
+ }, forEachContext);
203
+ },
204
+ count: function(children) {
205
+ var n = 0;
206
+ mapChildren(children, function() {
207
+ n++;
208
+ });
209
+ return n;
210
+ },
211
+ toArray: function(children) {
212
+ return mapChildren(children, function(child) {
213
+ return child;
214
+ }) || [];
215
+ },
216
+ only: function(children) {
217
+ if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child.");
218
+ return children;
219
+ }
220
+ };
221
+ exports.Activity = REACT_ACTIVITY_TYPE;
222
+ exports.Children = Children;
223
+ exports.Component = Component;
224
+ exports.Fragment = REACT_FRAGMENT_TYPE;
225
+ exports.Profiler = REACT_PROFILER_TYPE;
226
+ exports.PureComponent = PureComponent;
227
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
228
+ exports.Suspense = REACT_SUSPENSE_TYPE;
229
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
230
+ exports.__COMPILER_RUNTIME = {
231
+ __proto__: null,
232
+ c: function(size) {
233
+ return ReactSharedInternals.H.useMemoCache(size);
234
+ }
235
+ };
236
+ exports.cache = function(fn) {
237
+ return function() {
238
+ return fn.apply(null, arguments);
239
+ };
240
+ };
241
+ exports.cacheSignal = function() {
242
+ return null;
243
+ };
244
+ exports.cloneElement = function(element, config, children) {
245
+ if (null === element || void 0 === element) throw Error("The argument must be a React element, but you passed " + element + ".");
246
+ var props = assign({}, element.props), key = element.key;
247
+ if (null != config) for (propName in void 0 !== config.key && (key = "" + config.key), config) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
248
+ var propName = arguments.length - 2;
249
+ if (1 === propName) props.children = children;
250
+ else if (1 < propName) {
251
+ for (var childArray = Array(propName), i = 0; i < propName; i++) childArray[i] = arguments[i + 2];
252
+ props.children = childArray;
253
+ }
254
+ return ReactElement(element.type, key, props);
255
+ };
256
+ exports.createContext = function(defaultValue) {
257
+ defaultValue = {
258
+ $$typeof: REACT_CONTEXT_TYPE,
259
+ _currentValue: defaultValue,
260
+ _currentValue2: defaultValue,
261
+ _threadCount: 0,
262
+ Provider: null,
263
+ Consumer: null
264
+ };
265
+ defaultValue.Provider = defaultValue;
266
+ defaultValue.Consumer = {
267
+ $$typeof: REACT_CONSUMER_TYPE,
268
+ _context: defaultValue
269
+ };
270
+ return defaultValue;
271
+ };
272
+ exports.createElement = function(type, config, children) {
273
+ var propName, props = {}, key = null;
274
+ if (null != config) for (propName in void 0 !== config.key && (key = "" + config.key), config) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
275
+ var childrenLength = arguments.length - 2;
276
+ if (1 === childrenLength) props.children = children;
277
+ else if (1 < childrenLength) {
278
+ for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 2];
279
+ props.children = childArray;
280
+ }
281
+ if (type && type.defaultProps) for (propName in childrenLength = type.defaultProps, childrenLength) void 0 === props[propName] && (props[propName] = childrenLength[propName]);
282
+ return ReactElement(type, key, props);
283
+ };
284
+ exports.createRef = function() {
285
+ return { current: null };
286
+ };
287
+ exports.forwardRef = function(render) {
288
+ return {
289
+ $$typeof: REACT_FORWARD_REF_TYPE,
290
+ render
291
+ };
292
+ };
293
+ exports.isValidElement = isValidElement;
294
+ exports.lazy = function(ctor) {
295
+ return {
296
+ $$typeof: REACT_LAZY_TYPE,
297
+ _payload: {
298
+ _status: -1,
299
+ _result: ctor
300
+ },
301
+ _init: lazyInitializer
302
+ };
303
+ };
304
+ exports.memo = function(type, compare) {
305
+ return {
306
+ $$typeof: REACT_MEMO_TYPE,
307
+ type,
308
+ compare: void 0 === compare ? null : compare
309
+ };
310
+ };
311
+ exports.startTransition = function(scope) {
312
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
313
+ ReactSharedInternals.T = currentTransition;
314
+ try {
315
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
316
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
317
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
318
+ } catch (error) {
319
+ reportGlobalError(error);
320
+ } finally {
321
+ null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
322
+ }
323
+ };
324
+ exports.unstable_useCacheRefresh = function() {
325
+ return ReactSharedInternals.H.useCacheRefresh();
326
+ };
327
+ exports.use = function(usable) {
328
+ return ReactSharedInternals.H.use(usable);
329
+ };
330
+ exports.useActionState = function(action, initialState, permalink) {
331
+ return ReactSharedInternals.H.useActionState(action, initialState, permalink);
332
+ };
333
+ exports.useCallback = function(callback, deps) {
334
+ return ReactSharedInternals.H.useCallback(callback, deps);
335
+ };
336
+ exports.useContext = function(Context) {
337
+ return ReactSharedInternals.H.useContext(Context);
338
+ };
339
+ exports.useDebugValue = function() {};
340
+ exports.useDeferredValue = function(value, initialValue) {
341
+ return ReactSharedInternals.H.useDeferredValue(value, initialValue);
342
+ };
343
+ exports.useEffect = function(create, deps) {
344
+ return ReactSharedInternals.H.useEffect(create, deps);
345
+ };
346
+ exports.useEffectEvent = function(callback) {
347
+ return ReactSharedInternals.H.useEffectEvent(callback);
348
+ };
349
+ exports.useId = function() {
350
+ return ReactSharedInternals.H.useId();
351
+ };
352
+ exports.useImperativeHandle = function(ref, create, deps) {
353
+ return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
354
+ };
355
+ exports.useInsertionEffect = function(create, deps) {
356
+ return ReactSharedInternals.H.useInsertionEffect(create, deps);
357
+ };
358
+ exports.useLayoutEffect = function(create, deps) {
359
+ return ReactSharedInternals.H.useLayoutEffect(create, deps);
360
+ };
361
+ exports.useMemo = function(create, deps) {
362
+ return ReactSharedInternals.H.useMemo(create, deps);
363
+ };
364
+ exports.useOptimistic = function(passthrough, reducer) {
365
+ return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
366
+ };
367
+ exports.useReducer = function(reducer, initialArg, init) {
368
+ return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
369
+ };
370
+ exports.useRef = function(initialValue) {
371
+ return ReactSharedInternals.H.useRef(initialValue);
372
+ };
373
+ exports.useState = function(initialState) {
374
+ return ReactSharedInternals.H.useState(initialState);
375
+ };
376
+ exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
377
+ return ReactSharedInternals.H.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
378
+ };
379
+ exports.useTransition = function() {
380
+ return ReactSharedInternals.H.useTransition();
381
+ };
382
+ exports.version = "19.2.4";
383
+ }));
384
+ //#endregion
385
+ //#region node_modules/react/cjs/react.development.js
386
+ /**
387
+ * @license React
388
+ * react.development.js
389
+ *
390
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
391
+ *
392
+ * This source code is licensed under the MIT license found in the
393
+ * LICENSE file in the root directory of this source tree.
394
+ */
395
+ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module) => {
396
+ "production" !== process.env.NODE_ENV && (function() {
397
+ function defineDeprecationWarning(methodName, info) {
398
+ Object.defineProperty(Component.prototype, methodName, { get: function() {
399
+ console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
400
+ } });
401
+ }
402
+ function getIteratorFn(maybeIterable) {
403
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
404
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
405
+ return "function" === typeof maybeIterable ? maybeIterable : null;
406
+ }
407
+ function warnNoop(publicInstance, callerName) {
408
+ publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
409
+ var warningKey = publicInstance + "." + callerName;
410
+ didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = !0);
411
+ }
412
+ function Component(props, context, updater) {
413
+ this.props = props;
414
+ this.context = context;
415
+ this.refs = emptyObject;
416
+ this.updater = updater || ReactNoopUpdateQueue;
417
+ }
418
+ function ComponentDummy() {}
419
+ function PureComponent(props, context, updater) {
420
+ this.props = props;
421
+ this.context = context;
422
+ this.refs = emptyObject;
423
+ this.updater = updater || ReactNoopUpdateQueue;
424
+ }
425
+ function noop() {}
426
+ function testStringCoercion(value) {
427
+ return "" + value;
428
+ }
429
+ function checkKeyStringCoercion(value) {
430
+ try {
431
+ testStringCoercion(value);
432
+ var JSCompiler_inline_result = !1;
433
+ } catch (e) {
434
+ JSCompiler_inline_result = !0;
435
+ }
436
+ if (JSCompiler_inline_result) {
437
+ JSCompiler_inline_result = console;
438
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
439
+ var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
440
+ JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
441
+ return testStringCoercion(value);
442
+ }
443
+ }
444
+ function getComponentNameFromType(type) {
445
+ if (null == type) return null;
446
+ if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
447
+ if ("string" === typeof type) return type;
448
+ switch (type) {
449
+ case REACT_FRAGMENT_TYPE: return "Fragment";
450
+ case REACT_PROFILER_TYPE: return "Profiler";
451
+ case REACT_STRICT_MODE_TYPE: return "StrictMode";
452
+ case REACT_SUSPENSE_TYPE: return "Suspense";
453
+ case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
454
+ case REACT_ACTIVITY_TYPE: return "Activity";
455
+ }
456
+ if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
457
+ case REACT_PORTAL_TYPE: return "Portal";
458
+ case REACT_CONTEXT_TYPE: return type.displayName || "Context";
459
+ case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
460
+ case REACT_FORWARD_REF_TYPE:
461
+ var innerType = type.render;
462
+ type = type.displayName;
463
+ type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
464
+ return type;
465
+ case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
466
+ case REACT_LAZY_TYPE:
467
+ innerType = type._payload;
468
+ type = type._init;
469
+ try {
470
+ return getComponentNameFromType(type(innerType));
471
+ } catch (x) {}
472
+ }
473
+ return null;
474
+ }
475
+ function getTaskName(type) {
476
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
477
+ if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
478
+ try {
479
+ var name = getComponentNameFromType(type);
480
+ return name ? "<" + name + ">" : "<...>";
481
+ } catch (x) {
482
+ return "<...>";
483
+ }
484
+ }
485
+ function getOwner() {
486
+ var dispatcher = ReactSharedInternals.A;
487
+ return null === dispatcher ? null : dispatcher.getOwner();
488
+ }
489
+ function UnknownOwner() {
490
+ return Error("react-stack-top-frame");
491
+ }
492
+ function hasValidKey(config) {
493
+ if (hasOwnProperty.call(config, "key")) {
494
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
495
+ if (getter && getter.isReactWarning) return !1;
496
+ }
497
+ return void 0 !== config.key;
498
+ }
499
+ function defineKeyPropWarningGetter(props, displayName) {
500
+ function warnAboutAccessingKey() {
501
+ specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
502
+ }
503
+ warnAboutAccessingKey.isReactWarning = !0;
504
+ Object.defineProperty(props, "key", {
505
+ get: warnAboutAccessingKey,
506
+ configurable: !0
507
+ });
508
+ }
509
+ function elementRefGetterWithDeprecationWarning() {
510
+ var componentName = getComponentNameFromType(this.type);
511
+ didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("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."));
512
+ componentName = this.props.ref;
513
+ return void 0 !== componentName ? componentName : null;
514
+ }
515
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
516
+ var refProp = props.ref;
517
+ type = {
518
+ $$typeof: REACT_ELEMENT_TYPE,
519
+ type,
520
+ key,
521
+ props,
522
+ _owner: owner
523
+ };
524
+ null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
525
+ enumerable: !1,
526
+ get: elementRefGetterWithDeprecationWarning
527
+ }) : Object.defineProperty(type, "ref", {
528
+ enumerable: !1,
529
+ value: null
530
+ });
531
+ type._store = {};
532
+ Object.defineProperty(type._store, "validated", {
533
+ configurable: !1,
534
+ enumerable: !1,
535
+ writable: !0,
536
+ value: 0
537
+ });
538
+ Object.defineProperty(type, "_debugInfo", {
539
+ configurable: !1,
540
+ enumerable: !1,
541
+ writable: !0,
542
+ value: null
543
+ });
544
+ Object.defineProperty(type, "_debugStack", {
545
+ configurable: !1,
546
+ enumerable: !1,
547
+ writable: !0,
548
+ value: debugStack
549
+ });
550
+ Object.defineProperty(type, "_debugTask", {
551
+ configurable: !1,
552
+ enumerable: !1,
553
+ writable: !0,
554
+ value: debugTask
555
+ });
556
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
557
+ return type;
558
+ }
559
+ function cloneAndReplaceKey(oldElement, newKey) {
560
+ newKey = ReactElement(oldElement.type, newKey, oldElement.props, oldElement._owner, oldElement._debugStack, oldElement._debugTask);
561
+ oldElement._store && (newKey._store.validated = oldElement._store.validated);
562
+ return newKey;
563
+ }
564
+ function validateChildKeys(node) {
565
+ isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
566
+ }
567
+ function isValidElement(object) {
568
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
569
+ }
570
+ function escape(key) {
571
+ var escaperLookup = {
572
+ "=": "=0",
573
+ ":": "=2"
574
+ };
575
+ return "$" + key.replace(/[=:]/g, function(match) {
576
+ return escaperLookup[match];
577
+ });
578
+ }
579
+ function getElementKey(element, index) {
580
+ return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
581
+ }
582
+ function resolveThenable(thenable) {
583
+ switch (thenable.status) {
584
+ case "fulfilled": return thenable.value;
585
+ case "rejected": throw thenable.reason;
586
+ default: switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) {
587
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
588
+ }, function(error) {
589
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
590
+ })), thenable.status) {
591
+ case "fulfilled": return thenable.value;
592
+ case "rejected": throw thenable.reason;
593
+ }
594
+ }
595
+ throw thenable;
596
+ }
597
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
598
+ var type = typeof children;
599
+ if ("undefined" === type || "boolean" === type) children = null;
600
+ var invokeCallback = !1;
601
+ if (null === children) invokeCallback = !0;
602
+ else switch (type) {
603
+ case "bigint":
604
+ case "string":
605
+ case "number":
606
+ invokeCallback = !0;
607
+ break;
608
+ case "object": switch (children.$$typeof) {
609
+ case REACT_ELEMENT_TYPE:
610
+ case REACT_PORTAL_TYPE:
611
+ invokeCallback = !0;
612
+ break;
613
+ case REACT_LAZY_TYPE: return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
614
+ }
615
+ }
616
+ if (invokeCallback) {
617
+ invokeCallback = children;
618
+ callback = callback(invokeCallback);
619
+ var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
620
+ isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
621
+ return c;
622
+ })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(callback, escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + childKey), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
623
+ return 1;
624
+ }
625
+ invokeCallback = 0;
626
+ childKey = "" === nameSoFar ? "." : nameSoFar + ":";
627
+ if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
628
+ else if (i = getIteratorFn(children), "function" === typeof i) for (i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0), children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
629
+ else if ("object" === type) {
630
+ if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
631
+ array = String(children);
632
+ throw Error("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.");
633
+ }
634
+ return invokeCallback;
635
+ }
636
+ function mapChildren(children, func, context) {
637
+ if (null == children) return children;
638
+ var result = [], count = 0;
639
+ mapIntoArray(children, result, "", "", function(child) {
640
+ return func.call(context, child, count++);
641
+ });
642
+ return result;
643
+ }
644
+ function lazyInitializer(payload) {
645
+ if (-1 === payload._status) {
646
+ var ioInfo = payload._ioInfo;
647
+ null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
648
+ ioInfo = payload._result;
649
+ var thenable = ioInfo();
650
+ thenable.then(function(moduleObject) {
651
+ if (0 === payload._status || -1 === payload._status) {
652
+ payload._status = 1;
653
+ payload._result = moduleObject;
654
+ var _ioInfo = payload._ioInfo;
655
+ null != _ioInfo && (_ioInfo.end = performance.now());
656
+ void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
657
+ }
658
+ }, function(error) {
659
+ if (0 === payload._status || -1 === payload._status) {
660
+ payload._status = 2;
661
+ payload._result = error;
662
+ var _ioInfo2 = payload._ioInfo;
663
+ null != _ioInfo2 && (_ioInfo2.end = performance.now());
664
+ void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
665
+ }
666
+ });
667
+ ioInfo = payload._ioInfo;
668
+ if (null != ioInfo) {
669
+ ioInfo.value = thenable;
670
+ var displayName = thenable.displayName;
671
+ "string" === typeof displayName && (ioInfo.name = displayName);
672
+ }
673
+ -1 === payload._status && (payload._status = 0, payload._result = thenable);
674
+ }
675
+ if (1 === payload._status) return ioInfo = payload._result, void 0 === ioInfo && console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", ioInfo), "default" in ioInfo || console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", ioInfo), ioInfo.default;
676
+ throw payload._result;
677
+ }
678
+ function resolveDispatcher() {
679
+ var dispatcher = ReactSharedInternals.H;
680
+ null === dispatcher && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.");
681
+ return dispatcher;
682
+ }
683
+ function releaseAsyncTransition() {
684
+ ReactSharedInternals.asyncTransitions--;
685
+ }
686
+ function enqueueTask(task) {
687
+ if (null === enqueueTaskImpl) try {
688
+ var requireString = ("require" + Math.random()).slice(0, 7);
689
+ enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate;
690
+ } catch (_err) {
691
+ enqueueTaskImpl = function(callback) {
692
+ !1 === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = !0, "undefined" === typeof MessageChannel && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
693
+ var channel = new MessageChannel();
694
+ channel.port1.onmessage = callback;
695
+ channel.port2.postMessage(void 0);
696
+ };
697
+ }
698
+ return enqueueTaskImpl(task);
699
+ }
700
+ function aggregateErrors(errors) {
701
+ return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
702
+ }
703
+ function popActScope(prevActQueue, prevActScopeDepth) {
704
+ prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
705
+ actScopeDepth = prevActScopeDepth;
706
+ }
707
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
708
+ var queue = ReactSharedInternals.actQueue;
709
+ if (null !== queue) if (0 !== queue.length) try {
710
+ flushActQueue(queue);
711
+ enqueueTask(function() {
712
+ return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
713
+ });
714
+ return;
715
+ } catch (error) {
716
+ ReactSharedInternals.thrownErrors.push(error);
717
+ }
718
+ else ReactSharedInternals.actQueue = null;
719
+ 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
720
+ }
721
+ function flushActQueue(queue) {
722
+ if (!isFlushing) {
723
+ isFlushing = !0;
724
+ var i = 0;
725
+ try {
726
+ for (; i < queue.length; i++) {
727
+ var callback = queue[i];
728
+ do {
729
+ ReactSharedInternals.didUsePromise = !1;
730
+ var continuation = callback(!1);
731
+ if (null !== continuation) {
732
+ if (ReactSharedInternals.didUsePromise) {
733
+ queue[i] = callback;
734
+ queue.splice(0, i);
735
+ return;
736
+ }
737
+ callback = continuation;
738
+ } else break;
739
+ } while (1);
740
+ }
741
+ queue.length = 0;
742
+ } catch (error) {
743
+ queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
744
+ } finally {
745
+ isFlushing = !1;
746
+ }
747
+ }
748
+ }
749
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
750
+ 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"), 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 = {
751
+ isMounted: function() {
752
+ return !1;
753
+ },
754
+ enqueueForceUpdate: function(publicInstance) {
755
+ warnNoop(publicInstance, "forceUpdate");
756
+ },
757
+ enqueueReplaceState: function(publicInstance) {
758
+ warnNoop(publicInstance, "replaceState");
759
+ },
760
+ enqueueSetState: function(publicInstance) {
761
+ warnNoop(publicInstance, "setState");
762
+ }
763
+ }, assign = Object.assign, emptyObject = {};
764
+ Object.freeze(emptyObject);
765
+ Component.prototype.isReactComponent = {};
766
+ Component.prototype.setState = function(partialState, callback) {
767
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
768
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
769
+ };
770
+ Component.prototype.forceUpdate = function(callback) {
771
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
772
+ };
773
+ var deprecatedAPIs = {
774
+ isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
775
+ replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
776
+ };
777
+ for (fnName in deprecatedAPIs) deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
778
+ ComponentDummy.prototype = Component.prototype;
779
+ deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
780
+ deprecatedAPIs.constructor = PureComponent;
781
+ assign(deprecatedAPIs, Component.prototype);
782
+ deprecatedAPIs.isPureReactComponent = !0;
783
+ var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
784
+ H: null,
785
+ A: null,
786
+ T: null,
787
+ S: null,
788
+ actQueue: null,
789
+ asyncTransitions: 0,
790
+ isBatchingLegacy: !1,
791
+ didScheduleLegacyUpdate: !1,
792
+ didUsePromise: !1,
793
+ thrownErrors: [],
794
+ getCurrentStack: null,
795
+ recentlyCreatedOwnerStacks: 0
796
+ }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
797
+ return null;
798
+ };
799
+ deprecatedAPIs = { react_stack_bottom_frame: function(callStackForError) {
800
+ return callStackForError();
801
+ } };
802
+ var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
803
+ var didWarnAboutElementRef = {};
804
+ var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs, UnknownOwner)();
805
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
806
+ var didWarnAboutMaps = !1, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
807
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
808
+ var event = new window.ErrorEvent("error", {
809
+ bubbles: !0,
810
+ cancelable: !0,
811
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
812
+ error
813
+ });
814
+ if (!window.dispatchEvent(event)) return;
815
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
816
+ process.emit("uncaughtException", error);
817
+ return;
818
+ }
819
+ console.error(error);
820
+ }, didWarnAboutMessageChannel = !1, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = !1, isFlushing = !1, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
821
+ queueMicrotask(function() {
822
+ return queueMicrotask(callback);
823
+ });
824
+ } : enqueueTask;
825
+ deprecatedAPIs = Object.freeze({
826
+ __proto__: null,
827
+ c: function(size) {
828
+ return resolveDispatcher().useMemoCache(size);
829
+ }
830
+ });
831
+ var fnName = {
832
+ map: mapChildren,
833
+ forEach: function(children, forEachFunc, forEachContext) {
834
+ mapChildren(children, function() {
835
+ forEachFunc.apply(this, arguments);
836
+ }, forEachContext);
837
+ },
838
+ count: function(children) {
839
+ var n = 0;
840
+ mapChildren(children, function() {
841
+ n++;
842
+ });
843
+ return n;
844
+ },
845
+ toArray: function(children) {
846
+ return mapChildren(children, function(child) {
847
+ return child;
848
+ }) || [];
849
+ },
850
+ only: function(children) {
851
+ if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child.");
852
+ return children;
853
+ }
854
+ };
855
+ exports.Activity = REACT_ACTIVITY_TYPE;
856
+ exports.Children = fnName;
857
+ exports.Component = Component;
858
+ exports.Fragment = REACT_FRAGMENT_TYPE;
859
+ exports.Profiler = REACT_PROFILER_TYPE;
860
+ exports.PureComponent = PureComponent;
861
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
862
+ exports.Suspense = REACT_SUSPENSE_TYPE;
863
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
864
+ exports.__COMPILER_RUNTIME = deprecatedAPIs;
865
+ exports.act = function(callback) {
866
+ var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
867
+ actScopeDepth++;
868
+ var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = !1;
869
+ try {
870
+ var result = callback();
871
+ } catch (error) {
872
+ ReactSharedInternals.thrownErrors.push(error);
873
+ }
874
+ if (0 < ReactSharedInternals.thrownErrors.length) throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
875
+ if (null !== result && "object" === typeof result && "function" === typeof result.then) {
876
+ var thenable = result;
877
+ queueSeveralMicrotasks(function() {
878
+ didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
879
+ });
880
+ return { then: function(resolve, reject) {
881
+ didAwaitActCall = !0;
882
+ thenable.then(function(returnValue) {
883
+ popActScope(prevActQueue, prevActScopeDepth);
884
+ if (0 === prevActScopeDepth) {
885
+ try {
886
+ flushActQueue(queue), enqueueTask(function() {
887
+ return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
888
+ });
889
+ } catch (error$0) {
890
+ ReactSharedInternals.thrownErrors.push(error$0);
891
+ }
892
+ if (0 < ReactSharedInternals.thrownErrors.length) {
893
+ var _thrownError = aggregateErrors(ReactSharedInternals.thrownErrors);
894
+ ReactSharedInternals.thrownErrors.length = 0;
895
+ reject(_thrownError);
896
+ }
897
+ } else resolve(returnValue);
898
+ }, function(error) {
899
+ popActScope(prevActQueue, prevActScopeDepth);
900
+ 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
901
+ });
902
+ } };
903
+ }
904
+ var returnValue$jscomp$0 = result;
905
+ popActScope(prevActQueue, prevActScopeDepth);
906
+ 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
907
+ didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("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(() => ...)"));
908
+ }), ReactSharedInternals.actQueue = null);
909
+ if (0 < ReactSharedInternals.thrownErrors.length) throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
910
+ return { then: function(resolve, reject) {
911
+ didAwaitActCall = !0;
912
+ 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
913
+ return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve, reject);
914
+ })) : resolve(returnValue$jscomp$0);
915
+ } };
916
+ };
917
+ exports.cache = function(fn) {
918
+ return function() {
919
+ return fn.apply(null, arguments);
920
+ };
921
+ };
922
+ exports.cacheSignal = function() {
923
+ return null;
924
+ };
925
+ exports.captureOwnerStack = function() {
926
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
927
+ return null === getCurrentStack ? null : getCurrentStack();
928
+ };
929
+ exports.cloneElement = function(element, config, children) {
930
+ if (null === element || void 0 === element) throw Error("The argument must be a React element, but you passed " + element + ".");
931
+ var props = assign({}, element.props), key = element.key, owner = element._owner;
932
+ if (null != config) {
933
+ var JSCompiler_inline_result;
934
+ a: {
935
+ if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(config, "ref").get) && JSCompiler_inline_result.isReactWarning) {
936
+ JSCompiler_inline_result = !1;
937
+ break a;
938
+ }
939
+ JSCompiler_inline_result = void 0 !== config.ref;
940
+ }
941
+ JSCompiler_inline_result && (owner = getOwner());
942
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
943
+ for (propName in config) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
944
+ }
945
+ var propName = arguments.length - 2;
946
+ if (1 === propName) props.children = children;
947
+ else if (1 < propName) {
948
+ JSCompiler_inline_result = Array(propName);
949
+ for (var i = 0; i < propName; i++) JSCompiler_inline_result[i] = arguments[i + 2];
950
+ props.children = JSCompiler_inline_result;
951
+ }
952
+ props = ReactElement(element.type, key, props, owner, element._debugStack, element._debugTask);
953
+ for (key = 2; key < arguments.length; key++) validateChildKeys(arguments[key]);
954
+ return props;
955
+ };
956
+ exports.createContext = function(defaultValue) {
957
+ defaultValue = {
958
+ $$typeof: REACT_CONTEXT_TYPE,
959
+ _currentValue: defaultValue,
960
+ _currentValue2: defaultValue,
961
+ _threadCount: 0,
962
+ Provider: null,
963
+ Consumer: null
964
+ };
965
+ defaultValue.Provider = defaultValue;
966
+ defaultValue.Consumer = {
967
+ $$typeof: REACT_CONSUMER_TYPE,
968
+ _context: defaultValue
969
+ };
970
+ defaultValue._currentRenderer = null;
971
+ defaultValue._currentRenderer2 = null;
972
+ return defaultValue;
973
+ };
974
+ exports.createElement = function(type, config, children) {
975
+ for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i]);
976
+ i = {};
977
+ var key = null;
978
+ if (null != config) for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = !0, console.warn("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")), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
979
+ var childrenLength = arguments.length - 2;
980
+ if (1 === childrenLength) i.children = children;
981
+ else if (1 < childrenLength) {
982
+ for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++) childArray[_i] = arguments[_i + 2];
983
+ Object.freeze && Object.freeze(childArray);
984
+ i.children = childArray;
985
+ }
986
+ if (type && type.defaultProps) for (propName in childrenLength = type.defaultProps, childrenLength) void 0 === i[propName] && (i[propName] = childrenLength[propName]);
987
+ key && defineKeyPropWarningGetter(i, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
988
+ var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
989
+ return ReactElement(type, key, i, getOwner(), propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
990
+ };
991
+ exports.createRef = function() {
992
+ var refObject = { current: null };
993
+ Object.seal(refObject);
994
+ return refObject;
995
+ };
996
+ exports.forwardRef = function(render) {
997
+ null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : "function" !== typeof render ? console.error("forwardRef requires a render function but was given %s.", null === render ? "null" : typeof render) : 0 !== render.length && 2 !== render.length && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
998
+ null != render && null != render.defaultProps && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");
999
+ var elementType = {
1000
+ $$typeof: REACT_FORWARD_REF_TYPE,
1001
+ render
1002
+ }, ownName;
1003
+ Object.defineProperty(elementType, "displayName", {
1004
+ enumerable: !1,
1005
+ configurable: !0,
1006
+ get: function() {
1007
+ return ownName;
1008
+ },
1009
+ set: function(name) {
1010
+ ownName = name;
1011
+ render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
1012
+ }
1013
+ });
1014
+ return elementType;
1015
+ };
1016
+ exports.isValidElement = isValidElement;
1017
+ exports.lazy = function(ctor) {
1018
+ ctor = {
1019
+ _status: -1,
1020
+ _result: ctor
1021
+ };
1022
+ var lazyType = {
1023
+ $$typeof: REACT_LAZY_TYPE,
1024
+ _payload: ctor,
1025
+ _init: lazyInitializer
1026
+ }, ioInfo = {
1027
+ name: "lazy",
1028
+ start: -1,
1029
+ end: -1,
1030
+ value: null,
1031
+ owner: null,
1032
+ debugStack: Error("react-stack-top-frame"),
1033
+ debugTask: console.createTask ? console.createTask("lazy()") : null
1034
+ };
1035
+ ctor._ioInfo = ioInfo;
1036
+ lazyType._debugInfo = [{ awaited: ioInfo }];
1037
+ return lazyType;
1038
+ };
1039
+ exports.memo = function(type, compare) {
1040
+ type ?? console.error("memo: The first argument must be a component. Instead received: %s", null === type ? "null" : typeof type);
1041
+ compare = {
1042
+ $$typeof: REACT_MEMO_TYPE,
1043
+ type,
1044
+ compare: void 0 === compare ? null : compare
1045
+ };
1046
+ var ownName;
1047
+ Object.defineProperty(compare, "displayName", {
1048
+ enumerable: !1,
1049
+ configurable: !0,
1050
+ get: function() {
1051
+ return ownName;
1052
+ },
1053
+ set: function(name) {
1054
+ ownName = name;
1055
+ type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
1056
+ }
1057
+ });
1058
+ return compare;
1059
+ };
1060
+ exports.startTransition = function(scope) {
1061
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
1062
+ currentTransition._updatedFibers = /* @__PURE__ */ new Set();
1063
+ ReactSharedInternals.T = currentTransition;
1064
+ try {
1065
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
1066
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
1067
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
1068
+ } catch (error) {
1069
+ reportGlobalError(error);
1070
+ } finally {
1071
+ null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error("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."), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
1072
+ }
1073
+ };
1074
+ exports.unstable_useCacheRefresh = function() {
1075
+ return resolveDispatcher().useCacheRefresh();
1076
+ };
1077
+ exports.use = function(usable) {
1078
+ return resolveDispatcher().use(usable);
1079
+ };
1080
+ exports.useActionState = function(action, initialState, permalink) {
1081
+ return resolveDispatcher().useActionState(action, initialState, permalink);
1082
+ };
1083
+ exports.useCallback = function(callback, deps) {
1084
+ return resolveDispatcher().useCallback(callback, deps);
1085
+ };
1086
+ exports.useContext = function(Context) {
1087
+ var dispatcher = resolveDispatcher();
1088
+ Context.$$typeof === REACT_CONSUMER_TYPE && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?");
1089
+ return dispatcher.useContext(Context);
1090
+ };
1091
+ exports.useDebugValue = function(value, formatterFn) {
1092
+ return resolveDispatcher().useDebugValue(value, formatterFn);
1093
+ };
1094
+ exports.useDeferredValue = function(value, initialValue) {
1095
+ return resolveDispatcher().useDeferredValue(value, initialValue);
1096
+ };
1097
+ exports.useEffect = function(create, deps) {
1098
+ create ?? console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");
1099
+ return resolveDispatcher().useEffect(create, deps);
1100
+ };
1101
+ exports.useEffectEvent = function(callback) {
1102
+ return resolveDispatcher().useEffectEvent(callback);
1103
+ };
1104
+ exports.useId = function() {
1105
+ return resolveDispatcher().useId();
1106
+ };
1107
+ exports.useImperativeHandle = function(ref, create, deps) {
1108
+ return resolveDispatcher().useImperativeHandle(ref, create, deps);
1109
+ };
1110
+ exports.useInsertionEffect = function(create, deps) {
1111
+ create ?? console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?");
1112
+ return resolveDispatcher().useInsertionEffect(create, deps);
1113
+ };
1114
+ exports.useLayoutEffect = function(create, deps) {
1115
+ create ?? console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?");
1116
+ return resolveDispatcher().useLayoutEffect(create, deps);
1117
+ };
1118
+ exports.useMemo = function(create, deps) {
1119
+ return resolveDispatcher().useMemo(create, deps);
1120
+ };
1121
+ exports.useOptimistic = function(passthrough, reducer) {
1122
+ return resolveDispatcher().useOptimistic(passthrough, reducer);
1123
+ };
1124
+ exports.useReducer = function(reducer, initialArg, init) {
1125
+ return resolveDispatcher().useReducer(reducer, initialArg, init);
1126
+ };
1127
+ exports.useRef = function(initialValue) {
1128
+ return resolveDispatcher().useRef(initialValue);
1129
+ };
1130
+ exports.useState = function(initialState) {
1131
+ return resolveDispatcher().useState(initialState);
1132
+ };
1133
+ exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
1134
+ return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1135
+ };
1136
+ exports.useTransition = function() {
1137
+ return resolveDispatcher().useTransition();
1138
+ };
1139
+ exports.version = "19.2.4";
1140
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1141
+ })();
1142
+ }));
1143
+ //#endregion
1144
+ //#region node_modules/react/index.js
1145
+ var require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1146
+ if (process.env.NODE_ENV === "production") module.exports = require_react_production();
1147
+ else module.exports = require_react_development();
1148
+ }));
1149
+ //#endregion
1150
+ //#region node_modules/react/cjs/react-jsx-runtime.production.js
1151
+ /**
1152
+ * @license React
1153
+ * react-jsx-runtime.production.js
1154
+ *
1155
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1156
+ *
1157
+ * This source code is licensed under the MIT license found in the
1158
+ * LICENSE file in the root directory of this source tree.
1159
+ */
1160
+ var require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((exports) => {
1161
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
1162
+ function jsxProd(type, config, maybeKey) {
1163
+ var key = null;
1164
+ void 0 !== maybeKey && (key = "" + maybeKey);
1165
+ void 0 !== config.key && (key = "" + config.key);
1166
+ if ("key" in config) {
1167
+ maybeKey = {};
1168
+ for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
1169
+ } else maybeKey = config;
1170
+ config = maybeKey.ref;
1171
+ return {
1172
+ $$typeof: REACT_ELEMENT_TYPE,
1173
+ type,
1174
+ key,
1175
+ ref: void 0 !== config ? config : null,
1176
+ props: maybeKey
1177
+ };
1178
+ }
1179
+ exports.Fragment = REACT_FRAGMENT_TYPE;
1180
+ exports.jsx = jsxProd;
1181
+ exports.jsxs = jsxProd;
1182
+ }));
1183
+ //#endregion
1184
+ //#region node_modules/react/cjs/react-jsx-runtime.development.js
1185
+ /**
1186
+ * @license React
1187
+ * react-jsx-runtime.development.js
1188
+ *
1189
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1190
+ *
1191
+ * This source code is licensed under the MIT license found in the
1192
+ * LICENSE file in the root directory of this source tree.
1193
+ */
1194
+ var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((exports) => {
1195
+ "production" !== process.env.NODE_ENV && (function() {
1196
+ function getComponentNameFromType(type) {
1197
+ if (null == type) return null;
1198
+ if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
1199
+ if ("string" === typeof type) return type;
1200
+ switch (type) {
1201
+ case REACT_FRAGMENT_TYPE: return "Fragment";
1202
+ case REACT_PROFILER_TYPE: return "Profiler";
1203
+ case REACT_STRICT_MODE_TYPE: return "StrictMode";
1204
+ case REACT_SUSPENSE_TYPE: return "Suspense";
1205
+ case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
1206
+ case REACT_ACTIVITY_TYPE: return "Activity";
1207
+ }
1208
+ if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
1209
+ case REACT_PORTAL_TYPE: return "Portal";
1210
+ case REACT_CONTEXT_TYPE: return type.displayName || "Context";
1211
+ case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
1212
+ case REACT_FORWARD_REF_TYPE:
1213
+ var innerType = type.render;
1214
+ type = type.displayName;
1215
+ type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
1216
+ return type;
1217
+ case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
1218
+ case REACT_LAZY_TYPE:
1219
+ innerType = type._payload;
1220
+ type = type._init;
1221
+ try {
1222
+ return getComponentNameFromType(type(innerType));
1223
+ } catch (x) {}
1224
+ }
1225
+ return null;
1226
+ }
1227
+ function testStringCoercion(value) {
1228
+ return "" + value;
1229
+ }
1230
+ function checkKeyStringCoercion(value) {
1231
+ try {
1232
+ testStringCoercion(value);
1233
+ var JSCompiler_inline_result = !1;
1234
+ } catch (e) {
1235
+ JSCompiler_inline_result = !0;
1236
+ }
1237
+ if (JSCompiler_inline_result) {
1238
+ JSCompiler_inline_result = console;
1239
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
1240
+ var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
1241
+ JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
1242
+ return testStringCoercion(value);
1243
+ }
1244
+ }
1245
+ function getTaskName(type) {
1246
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
1247
+ if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
1248
+ try {
1249
+ var name = getComponentNameFromType(type);
1250
+ return name ? "<" + name + ">" : "<...>";
1251
+ } catch (x) {
1252
+ return "<...>";
1253
+ }
1254
+ }
1255
+ function getOwner() {
1256
+ var dispatcher = ReactSharedInternals.A;
1257
+ return null === dispatcher ? null : dispatcher.getOwner();
1258
+ }
1259
+ function UnknownOwner() {
1260
+ return Error("react-stack-top-frame");
1261
+ }
1262
+ function hasValidKey(config) {
1263
+ if (hasOwnProperty.call(config, "key")) {
1264
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
1265
+ if (getter && getter.isReactWarning) return !1;
1266
+ }
1267
+ return void 0 !== config.key;
1268
+ }
1269
+ function defineKeyPropWarningGetter(props, displayName) {
1270
+ function warnAboutAccessingKey() {
1271
+ specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
1272
+ }
1273
+ warnAboutAccessingKey.isReactWarning = !0;
1274
+ Object.defineProperty(props, "key", {
1275
+ get: warnAboutAccessingKey,
1276
+ configurable: !0
1277
+ });
1278
+ }
1279
+ function elementRefGetterWithDeprecationWarning() {
1280
+ var componentName = getComponentNameFromType(this.type);
1281
+ didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("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."));
1282
+ componentName = this.props.ref;
1283
+ return void 0 !== componentName ? componentName : null;
1284
+ }
1285
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
1286
+ var refProp = props.ref;
1287
+ type = {
1288
+ $$typeof: REACT_ELEMENT_TYPE,
1289
+ type,
1290
+ key,
1291
+ props,
1292
+ _owner: owner
1293
+ };
1294
+ null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
1295
+ enumerable: !1,
1296
+ get: elementRefGetterWithDeprecationWarning
1297
+ }) : Object.defineProperty(type, "ref", {
1298
+ enumerable: !1,
1299
+ value: null
1300
+ });
1301
+ type._store = {};
1302
+ Object.defineProperty(type._store, "validated", {
1303
+ configurable: !1,
1304
+ enumerable: !1,
1305
+ writable: !0,
1306
+ value: 0
1307
+ });
1308
+ Object.defineProperty(type, "_debugInfo", {
1309
+ configurable: !1,
1310
+ enumerable: !1,
1311
+ writable: !0,
1312
+ value: null
1313
+ });
1314
+ Object.defineProperty(type, "_debugStack", {
1315
+ configurable: !1,
1316
+ enumerable: !1,
1317
+ writable: !0,
1318
+ value: debugStack
1319
+ });
1320
+ Object.defineProperty(type, "_debugTask", {
1321
+ configurable: !1,
1322
+ enumerable: !1,
1323
+ writable: !0,
1324
+ value: debugTask
1325
+ });
1326
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
1327
+ return type;
1328
+ }
1329
+ function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
1330
+ var children = config.children;
1331
+ if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
1332
+ for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
1333
+ Object.freeze && Object.freeze(children);
1334
+ } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1335
+ else validateChildKeys(children);
1336
+ if (hasOwnProperty.call(config, "key")) {
1337
+ children = getComponentNameFromType(type);
1338
+ var keys = Object.keys(config).filter(function(k) {
1339
+ return "key" !== k;
1340
+ });
1341
+ isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
1342
+ didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
1343
+ }
1344
+ children = null;
1345
+ void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
1346
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
1347
+ if ("key" in config) {
1348
+ maybeKey = {};
1349
+ for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
1350
+ } else maybeKey = config;
1351
+ children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
1352
+ return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
1353
+ }
1354
+ function validateChildKeys(node) {
1355
+ isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
1356
+ }
1357
+ function isValidElement(object) {
1358
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
1359
+ }
1360
+ var React = require_react(), 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"), 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"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
1361
+ return null;
1362
+ };
1363
+ React = { react_stack_bottom_frame: function(callStackForError) {
1364
+ return callStackForError();
1365
+ } };
1366
+ var specialPropKeyWarningShown;
1367
+ var didWarnAboutElementRef = {};
1368
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
1369
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1370
+ var didWarnAboutKeySpread = {};
1371
+ exports.Fragment = REACT_FRAGMENT_TYPE;
1372
+ exports.jsx = function(type, config, maybeKey) {
1373
+ var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1374
+ return jsxDEVImpl(type, config, maybeKey, !1, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
1375
+ };
1376
+ exports.jsxs = function(type, config, maybeKey) {
1377
+ var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1378
+ return jsxDEVImpl(type, config, maybeKey, !0, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
1379
+ };
1380
+ })();
1381
+ }));
1382
+ //#endregion
1383
+ //#region node_modules/react/jsx-runtime.js
1384
+ var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1385
+ if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_runtime_production();
1386
+ else module.exports = require_react_jsx_runtime_development();
1387
+ }));
1388
+ //#endregion
1389
+ //#region src/components/PartnerDashboard/EarningsSummary.tsx
1390
+ var import_react = /* @__PURE__ */ __toESM(require_react());
1391
+ var import_jsx_runtime = require_jsx_runtime();
1392
+ const formatCurrency$3 = (amount, currency) => {
1393
+ return new Intl.NumberFormat("en-US", {
1394
+ style: "currency",
1395
+ currency,
1396
+ minimumFractionDigits: 2
1397
+ }).format(amount);
1398
+ };
1399
+ const EarningsSummary = ({ stats, currency }) => {
1400
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1401
+ className: "partner-widget partner-widget--earnings",
1402
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
1403
+ className: "partner-widget__title",
1404
+ children: "Earnings Summary"
1405
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1406
+ className: "partner-widget__content",
1407
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1408
+ className: "earnings-grid",
1409
+ children: [
1410
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1411
+ className: "earnings-card earnings-card--total",
1412
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1413
+ className: "earnings-card__label",
1414
+ children: "Total Earnings"
1415
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1416
+ className: "earnings-card__value",
1417
+ children: formatCurrency$3(stats.totalEarnings, currency)
1418
+ })]
1419
+ }),
1420
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1421
+ className: "earnings-card earnings-card--pending",
1422
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1423
+ className: "earnings-card__label",
1424
+ children: "Pending"
1425
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1426
+ className: "earnings-card__value",
1427
+ children: formatCurrency$3(stats.pendingEarnings, currency)
1428
+ })]
1429
+ }),
1430
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1431
+ className: "earnings-card earnings-card--paid",
1432
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1433
+ className: "earnings-card__label",
1434
+ children: "Paid Out"
1435
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1436
+ className: "earnings-card__value",
1437
+ children: formatCurrency$3(stats.paidEarnings, currency)
1438
+ })]
1439
+ })
1440
+ ]
1441
+ })
1442
+ })]
1443
+ });
1444
+ };
1445
+ //#endregion
1446
+ //#region src/components/PartnerDashboard/ReferralPerformance.tsx
1447
+ const ReferralPerformance = ({ stats }) => {
1448
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1449
+ className: "partner-widget partner-widget--performance",
1450
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
1451
+ className: "partner-widget__title",
1452
+ children: "Referral Performance"
1453
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1454
+ className: "partner-widget__content",
1455
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1456
+ className: "performance-grid",
1457
+ children: [
1458
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1459
+ className: "performance-stat",
1460
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1461
+ className: "performance-stat__value",
1462
+ children: stats.totalReferrals
1463
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1464
+ className: "performance-stat__label",
1465
+ children: "Total Referrals"
1466
+ })]
1467
+ }),
1468
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1469
+ className: "performance-stat",
1470
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1471
+ className: "performance-stat__value",
1472
+ children: stats.successfulReferrals
1473
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1474
+ className: "performance-stat__label",
1475
+ children: "Successful"
1476
+ })]
1477
+ }),
1478
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1479
+ className: "performance-stat",
1480
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1481
+ className: "performance-stat__value",
1482
+ children: [stats.conversionRate.toFixed(1), "%"]
1483
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1484
+ className: "performance-stat__label",
1485
+ children: "Conversion Rate"
1486
+ })]
1487
+ })
1488
+ ]
1489
+ }), stats.monthlyEarnings.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1490
+ className: "performance-chart",
1491
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", {
1492
+ className: "performance-chart__title",
1493
+ children: "Monthly Trend"
1494
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1495
+ className: "performance-chart__bars",
1496
+ children: stats.monthlyEarnings.map((month, index) => {
1497
+ const maxEarnings = Math.max(...stats.monthlyEarnings.map((m) => m.earnings), 1);
1498
+ const heightPercent = month.earnings / maxEarnings * 100;
1499
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1500
+ className: "performance-chart__bar-container",
1501
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1502
+ className: "performance-chart__bar",
1503
+ style: { height: `${Math.max(heightPercent, 5)}%` },
1504
+ title: `${month.month}: ${month.referrals} referrals`
1505
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1506
+ className: "performance-chart__label",
1507
+ children: month.month.split(" ")[0]
1508
+ })]
1509
+ }, index);
1510
+ })
1511
+ })]
1512
+ })]
1513
+ })]
1514
+ });
1515
+ };
1516
+ //#endregion
1517
+ //#region src/components/PartnerDashboard/RecentReferrals.tsx
1518
+ const formatCurrency$2 = (amount, currency) => {
1519
+ return new Intl.NumberFormat("en-US", {
1520
+ style: "currency",
1521
+ currency,
1522
+ minimumFractionDigits: 2
1523
+ }).format(amount);
1524
+ };
1525
+ const formatDate = (dateString) => {
1526
+ return new Date(dateString).toLocaleDateString("en-US", {
1527
+ month: "short",
1528
+ day: "numeric",
1529
+ year: "numeric"
1530
+ });
1531
+ };
1532
+ const RecentReferrals = ({ referrals, currency }) => {
1533
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1534
+ className: "partner-widget partner-widget--recent",
1535
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
1536
+ className: "partner-widget__title",
1537
+ children: "Recent Referrals"
1538
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1539
+ className: "partner-widget__content",
1540
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1541
+ className: "referrals-table",
1542
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1543
+ className: "referrals-table__header",
1544
+ children: [
1545
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Code" }),
1546
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Order Value" }),
1547
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Commission" }),
1548
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Date" }),
1549
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Status" })
1550
+ ]
1551
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1552
+ className: "referrals-table__body",
1553
+ children: referrals.map((referral) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1554
+ className: "referrals-table__row",
1555
+ children: [
1556
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1557
+ className: "referrals-table__code",
1558
+ children: referral.code
1559
+ }),
1560
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1561
+ className: "referrals-table__value",
1562
+ children: formatCurrency$2(referral.orderValue, currency)
1563
+ }),
1564
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1565
+ className: "referrals-table__commission",
1566
+ children: formatCurrency$2(referral.commission, currency)
1567
+ }),
1568
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1569
+ className: "referrals-table__date",
1570
+ children: formatDate(referral.date)
1571
+ }),
1572
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1573
+ className: `referrals-table__status referrals-table__status--${referral.status}`,
1574
+ children: referral.status
1575
+ })
1576
+ ]
1577
+ }, referral.id))
1578
+ })]
1579
+ })
1580
+ })]
1581
+ });
1582
+ };
1583
+ //#endregion
1584
+ //#region src/components/PartnerDashboard/ReferralCodes.tsx
1585
+ const formatCurrency$1 = (amount, currency) => {
1586
+ return new Intl.NumberFormat("en-US", {
1587
+ style: "currency",
1588
+ currency,
1589
+ minimumFractionDigits: 2
1590
+ }).format(amount);
1591
+ };
1592
+ const ReferralCodes = ({ codes, currency }) => {
1593
+ const [copiedCode, setCopiedCode] = (0, import_react.useState)(null);
1594
+ const copyToClipboard = async (code) => {
1595
+ try {
1596
+ await navigator.clipboard.writeText(code);
1597
+ setCopiedCode(code);
1598
+ setTimeout(() => setCopiedCode(null), 2e3);
1599
+ } catch {
1600
+ const textArea = document.createElement("textarea");
1601
+ textArea.value = code;
1602
+ document.body.appendChild(textArea);
1603
+ textArea.select();
1604
+ document.execCommand("copy");
1605
+ document.body.removeChild(textArea);
1606
+ setCopiedCode(code);
1607
+ setTimeout(() => setCopiedCode(null), 2e3);
1608
+ }
1609
+ };
1610
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1611
+ className: "partner-widget partner-widget--codes",
1612
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
1613
+ className: "partner-widget__title",
1614
+ children: "Your Referral Codes"
1615
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1616
+ className: "partner-widget__content",
1617
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1618
+ className: "codes-list",
1619
+ children: codes.map((codeData) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1620
+ className: `code-card ${!codeData.isActive ? "code-card--inactive" : ""}`,
1621
+ children: [
1622
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1623
+ className: "code-card__header",
1624
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1625
+ className: "code-card__code",
1626
+ children: codeData.code
1627
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
1628
+ type: "button",
1629
+ className: "code-card__copy",
1630
+ onClick: () => copyToClipboard(codeData.code),
1631
+ title: "Copy code",
1632
+ children: copiedCode === codeData.code ? "✓ Copied" : "Copy"
1633
+ })]
1634
+ }),
1635
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1636
+ className: "code-card__stats",
1637
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1638
+ className: "code-card__stat",
1639
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1640
+ className: "code-card__stat-value",
1641
+ children: codeData.usageCount
1642
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1643
+ className: "code-card__stat-label",
1644
+ children: "Uses"
1645
+ })]
1646
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1647
+ className: "code-card__stat",
1648
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1649
+ className: "code-card__stat-value",
1650
+ children: formatCurrency$1(codeData.totalEarnings, currency)
1651
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1652
+ className: "code-card__stat-label",
1653
+ children: "Earnings"
1654
+ })]
1655
+ })]
1656
+ }),
1657
+ !codeData.isActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1658
+ className: "code-card__badge code-card__badge--inactive",
1659
+ children: "Inactive"
1660
+ })
1661
+ ]
1662
+ }, codeData.id))
1663
+ })
1664
+ })]
1665
+ });
1666
+ };
1667
+ //#endregion
1668
+ //#region src/components/PartnerDashboard/ProgramOverview.tsx
1669
+ const ProgramOverview = ({ program }) => {
1670
+ if (!program) return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1671
+ className: "partner-widget partner-widget--program-overview",
1672
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
1673
+ className: "partner-widget__title",
1674
+ children: "Program Overview"
1675
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1676
+ className: "partner-widget__content",
1677
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1678
+ className: "program-overview program-overview--empty",
1679
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "No referral program details are available yet." })
1680
+ })
1681
+ })]
1682
+ });
1683
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1684
+ className: "partner-widget partner-widget--program-overview",
1685
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
1686
+ className: "partner-widget__title",
1687
+ children: "Program Overview"
1688
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1689
+ className: "partner-widget__content",
1690
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1691
+ className: "program-overview",
1692
+ children: [
1693
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1694
+ className: "program-overview__row",
1695
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1696
+ className: "program-overview__label",
1697
+ children: "Program Name"
1698
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1699
+ className: "program-overview__value",
1700
+ children: program.name
1701
+ })]
1702
+ }),
1703
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1704
+ className: "program-overview__row",
1705
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1706
+ className: "program-overview__label",
1707
+ children: "Commission Rate"
1708
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1709
+ className: "program-overview__value",
1710
+ children: [program.commissionRate, "%"]
1711
+ })]
1712
+ }),
1713
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1714
+ className: "program-overview__row",
1715
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1716
+ className: "program-overview__label",
1717
+ children: "Customer Discount"
1718
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1719
+ className: "program-overview__value",
1720
+ children: [program.customerDiscount, "%"]
1721
+ })]
1722
+ })
1723
+ ]
1724
+ })
1725
+ })]
1726
+ });
1727
+ };
1728
+ //#endregion
1729
+ //#region src/components/PartnerDashboard/CommissionBreakdown.tsx
1730
+ const formatCurrency = (amount, currency) => {
1731
+ return new Intl.NumberFormat("en-US", {
1732
+ style: "currency",
1733
+ currency,
1734
+ minimumFractionDigits: 2
1735
+ }).format(amount);
1736
+ };
1737
+ const formatPercent = (value) => {
1738
+ if (!Number.isFinite(value)) return "0%";
1739
+ return `${value.toFixed(1)}%`;
1740
+ };
1741
+ const CommissionBreakdown = ({ stats, currency }) => {
1742
+ const totalEarnings = Math.max(stats.totalEarnings || 0, 0);
1743
+ const paidEarnings = Math.max(stats.paidEarnings || 0, 0);
1744
+ const pendingEarnings = Math.max(stats.pendingEarnings || 0, 0);
1745
+ const paidPercent = totalEarnings > 0 ? paidEarnings / totalEarnings * 100 : 0;
1746
+ const pendingPercent = totalEarnings > 0 ? pendingEarnings / totalEarnings * 100 : 0;
1747
+ const unpaidOrOther = Math.max(totalEarnings - (paidEarnings + pendingEarnings), 0);
1748
+ const otherPercent = totalEarnings > 0 ? unpaidOrOther / totalEarnings * 100 : 0;
1749
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1750
+ className: "partner-widget partner-widget--commission-breakdown",
1751
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
1752
+ className: "partner-widget__title",
1753
+ children: "Commission Breakdown"
1754
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1755
+ className: "partner-widget__content",
1756
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1757
+ className: "commission-breakdown",
1758
+ children: [
1759
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1760
+ className: "commission-breakdown__summary",
1761
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1762
+ className: "commission-breakdown__total-label",
1763
+ children: "Total Commission"
1764
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1765
+ className: "commission-breakdown__total-value",
1766
+ children: formatCurrency(totalEarnings, currency)
1767
+ })]
1768
+ }),
1769
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1770
+ className: "commission-breakdown__bars",
1771
+ role: "img",
1772
+ "aria-label": "Commission distribution",
1773
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1774
+ className: "commission-breakdown__track",
1775
+ children: [
1776
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1777
+ className: "commission-breakdown__segment commission-breakdown__segment--paid",
1778
+ style: { width: `${Math.max(Math.min(paidPercent, 100), 0)}%` },
1779
+ title: `Paid: ${formatCurrency(paidEarnings, currency)} (${formatPercent(paidPercent)})`
1780
+ }),
1781
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1782
+ className: "commission-breakdown__segment commission-breakdown__segment--pending",
1783
+ style: { width: `${Math.max(Math.min(pendingPercent, 100), 0)}%` },
1784
+ title: `Pending: ${formatCurrency(pendingEarnings, currency)} (${formatPercent(pendingPercent)})`
1785
+ }),
1786
+ otherPercent > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1787
+ className: "commission-breakdown__segment commission-breakdown__segment--other",
1788
+ style: { width: `${Math.max(Math.min(otherPercent, 100), 0)}%` },
1789
+ title: `Other: ${formatCurrency(unpaidOrOther, currency)} (${formatPercent(otherPercent)})`
1790
+ })
1791
+ ]
1792
+ })
1793
+ }),
1794
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1795
+ className: "commission-breakdown__legend",
1796
+ children: [
1797
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1798
+ className: "commission-breakdown__item",
1799
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "commission-breakdown__dot commission-breakdown__dot--paid" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1800
+ className: "commission-breakdown__meta",
1801
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1802
+ className: "commission-breakdown__label",
1803
+ children: "Paid"
1804
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1805
+ className: "commission-breakdown__value",
1806
+ children: [
1807
+ formatCurrency(paidEarnings, currency),
1808
+ " · ",
1809
+ formatPercent(paidPercent)
1810
+ ]
1811
+ })]
1812
+ })]
1813
+ }),
1814
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1815
+ className: "commission-breakdown__item",
1816
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "commission-breakdown__dot commission-breakdown__dot--pending" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1817
+ className: "commission-breakdown__meta",
1818
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1819
+ className: "commission-breakdown__label",
1820
+ children: "Pending"
1821
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1822
+ className: "commission-breakdown__value",
1823
+ children: [
1824
+ formatCurrency(pendingEarnings, currency),
1825
+ " · ",
1826
+ formatPercent(pendingPercent)
1827
+ ]
1828
+ })]
1829
+ })]
1830
+ }),
1831
+ otherPercent > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1832
+ className: "commission-breakdown__item",
1833
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "commission-breakdown__dot commission-breakdown__dot--other" }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1834
+ className: "commission-breakdown__meta",
1835
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1836
+ className: "commission-breakdown__label",
1837
+ children: "Other"
1838
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1839
+ className: "commission-breakdown__value",
1840
+ children: [
1841
+ formatCurrency(unpaidOrOther, currency),
1842
+ " · ",
1843
+ formatPercent(otherPercent)
1844
+ ]
1845
+ })]
1846
+ })]
1847
+ })
1848
+ ]
1849
+ }),
1850
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1851
+ className: "commission-breakdown__footnote",
1852
+ children: "Based on current referral payouts and pending settlements."
1853
+ })
1854
+ ]
1855
+ })
1856
+ })]
1857
+ });
1858
+ };
1859
+ //#endregion
1860
+ //#region src/components/PartnerDashboard/index.tsx
1861
+ const PartnerDashboard = ({ showEarningsSummary = true, showReferralPerformance = true, showRecentReferrals = true, showReferralCodes = true, showProgramOverview = true, showCommissionBreakdown = true, apiEndpoint = "/api/referrals/partner-stats" }) => {
1862
+ const [data, setData] = (0, import_react.useState)(null);
1863
+ const [loading, setLoading] = (0, import_react.useState)(true);
1864
+ const [error, setError] = (0, import_react.useState)(null);
1865
+ const [currency, setCurrency] = (0, import_react.useState)("USD");
1866
+ (0, import_react.useEffect)(() => {
1867
+ const fetchData = async () => {
1868
+ try {
1869
+ setLoading(true);
1870
+ const response = await fetch(apiEndpoint, { credentials: "include" });
1871
+ if (!response.ok) {
1872
+ if (response.status === 401) {
1873
+ setError("Please log in to view your partner dashboard");
1874
+ return;
1875
+ }
1876
+ if (response.status === 403) {
1877
+ setError("Partner access required");
1878
+ return;
1879
+ }
1880
+ throw new Error("Failed to fetch partner data");
1881
+ }
1882
+ const result = await response.json();
1883
+ if (result.success) {
1884
+ setData(result.data ?? null);
1885
+ setCurrency(result.currency ?? "USD");
1886
+ } else setError(result.error ?? "Failed to load dashboard data");
1887
+ } catch (err) {
1888
+ setError(err instanceof Error ? err.message : "An error occurred");
1889
+ } finally {
1890
+ setLoading(false);
1891
+ }
1892
+ };
1893
+ fetchData();
1894
+ }, [apiEndpoint]);
1895
+ if (loading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1896
+ className: "partner-dashboard partner-dashboard--loading",
1897
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1898
+ className: "partner-dashboard__loader",
1899
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "partner-dashboard__spinner" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Loading partner dashboard..." })]
1900
+ })
1901
+ });
1902
+ if (error) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1903
+ className: "partner-dashboard partner-dashboard--error",
1904
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1905
+ className: "partner-dashboard__error",
1906
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "Unable to load dashboard" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: error })]
1907
+ })
1908
+ });
1909
+ if (!data) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
1910
+ className: "partner-dashboard partner-dashboard--empty",
1911
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1912
+ className: "partner-dashboard__empty",
1913
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: "No data available" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Your partner dashboard will appear here once you have referral activity." })]
1914
+ })
1915
+ });
1916
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1917
+ className: "partner-dashboard",
1918
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1919
+ className: "partner-dashboard__header",
1920
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Partner Dashboard" }), data.program && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1921
+ className: "partner-dashboard__program",
1922
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1923
+ className: "partner-dashboard__program-name",
1924
+ children: data.program.name
1925
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1926
+ className: "partner-dashboard__program-rate",
1927
+ children: [data.program.commissionRate, "% commission"]
1928
+ })]
1929
+ })]
1930
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
1931
+ className: "partner-dashboard__grid",
1932
+ children: [
1933
+ showEarningsSummary && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EarningsSummary, {
1934
+ stats: data.stats,
1935
+ currency
1936
+ }),
1937
+ showReferralPerformance && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReferralPerformance, { stats: data.stats }),
1938
+ showRecentReferrals && data.stats.recentReferrals.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RecentReferrals, {
1939
+ referrals: data.stats.recentReferrals,
1940
+ currency
1941
+ }),
1942
+ showReferralCodes && data.referralCodes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ReferralCodes, {
1943
+ codes: data.referralCodes,
1944
+ currency
1945
+ }),
1946
+ showProgramOverview && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProgramOverview, { program: data.program }),
1947
+ showCommissionBreakdown && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommissionBreakdown, {
1948
+ stats: data.stats,
1949
+ currency
1950
+ })
1951
+ ]
1952
+ })]
1953
+ });
1954
+ };
1955
+ //#endregion
1956
+ //#region src/client/hooks.ts
1957
+ const DEFAULT_ENDPOINTS = {
1958
+ applyCoupon: "/api/coupons/apply",
1959
+ validateCoupon: "/api/coupons/validate",
1960
+ partnerStats: "/api/referrals/partner-stats"
1961
+ };
1962
+ function normalizePath(path) {
1963
+ if (!path) return "";
1964
+ return path.startsWith("/") ? path : `/${path}`;
1965
+ }
1966
+ function withBaseURL(path, baseURL) {
1967
+ if (!baseURL) return path;
1968
+ return `${baseURL.endsWith("/") ? baseURL.slice(0, -1) : baseURL}${normalizePath(path)}`;
1969
+ }
1970
+ function resolveEndpoints(input) {
1971
+ if (typeof input === "string") return {
1972
+ ...DEFAULT_ENDPOINTS,
1973
+ partnerStats: input
1974
+ };
1975
+ const baseURL = input?.baseURL;
1976
+ return {
1977
+ applyCoupon: withBaseURL(input?.applyCoupon || DEFAULT_ENDPOINTS.applyCoupon, baseURL),
1978
+ validateCoupon: withBaseURL(input?.validateCoupon || DEFAULT_ENDPOINTS.validateCoupon, baseURL),
1979
+ partnerStats: withBaseURL(input?.partnerStats || DEFAULT_ENDPOINTS.partnerStats, baseURL)
1980
+ };
1981
+ }
1982
+ /**
1983
+ * Apply a coupon/referral code to a cart
1984
+ * @param options - Code, cart ID, and optional customerEmail
1985
+ * @param endpointConfig - Optional endpoint override config
1986
+ */
1987
+ async function useCouponCode(options, endpointConfig) {
1988
+ const { code, cartID, customerEmail } = options;
1989
+ if (!code) return {
1990
+ success: false,
1991
+ message: "Coupon code is required",
1992
+ error: "Code is missing"
1993
+ };
1994
+ const endpoints = resolveEndpoints(endpointConfig);
1995
+ try {
1996
+ const response = await fetch(endpoints.applyCoupon, {
1997
+ method: "POST",
1998
+ headers: { "Content-Type": "application/json" },
1999
+ body: JSON.stringify({
2000
+ code,
2001
+ cartID,
2002
+ customerEmail
2003
+ })
2004
+ });
2005
+ const data = await response.json();
2006
+ if (!response.ok) return {
2007
+ success: false,
2008
+ message: data.error || "Failed to apply coupon",
2009
+ error: data.error
2010
+ };
2011
+ const couponData = data.coupon;
2012
+ const referralData = data.referralCode;
2013
+ return {
2014
+ success: Boolean(data.success),
2015
+ message: data.message || "Code applied",
2016
+ discount: data.discount || data.customerDiscount,
2017
+ partnerCommission: data.partnerCommission,
2018
+ customerDiscount: data.customerDiscount,
2019
+ coupon: couponData ? {
2020
+ code: couponData.code || "",
2021
+ type: couponData.type || "percentage",
2022
+ value: couponData.value || 0
2023
+ } : void 0,
2024
+ referralCode: referralData ? { code: referralData.code || "" } : void 0
2025
+ };
2026
+ } catch (error) {
2027
+ const message = error instanceof Error ? error.message : "Network error";
2028
+ return {
2029
+ success: false,
2030
+ message,
2031
+ error: message
2032
+ };
2033
+ }
2034
+ }
2035
+ /**
2036
+ * Validate a coupon/referral code without applying it
2037
+ * @param code - Code to validate
2038
+ * @param cartValue - Optional cart value
2039
+ * @param cartID - Optional cart ID
2040
+ * @param customerEmail - Optional customer email (for per-customer limits)
2041
+ * @param endpointConfig - Optional endpoint override config
2042
+ */
2043
+ async function validateCouponCode(code, cartValue, cartID, customerEmail, endpointConfig) {
2044
+ if (!code) return {
2045
+ success: false,
2046
+ message: "Code required",
2047
+ error: "Code missing"
2048
+ };
2049
+ const endpoints = resolveEndpoints(endpointConfig);
2050
+ try {
2051
+ const response = await fetch(endpoints.validateCoupon, {
2052
+ method: "POST",
2053
+ headers: { "Content-Type": "application/json" },
2054
+ body: JSON.stringify({
2055
+ code,
2056
+ cartValue,
2057
+ cartID,
2058
+ customerEmail
2059
+ })
2060
+ });
2061
+ const data = await response.json();
2062
+ if (!response.ok) return {
2063
+ success: false,
2064
+ message: data.error || "Invalid coupon",
2065
+ error: data.error
2066
+ };
2067
+ const couponData = data.coupon;
2068
+ const referralData = data.referralCode;
2069
+ return {
2070
+ success: Boolean(data.success),
2071
+ message: data.message || "Code is valid",
2072
+ coupon: couponData ? {
2073
+ code: couponData.code || "",
2074
+ type: couponData.type || "percentage",
2075
+ value: couponData.value || 0
2076
+ } : void 0,
2077
+ referralCode: referralData ? { code: referralData.code || "" } : void 0,
2078
+ discount: data.discount,
2079
+ partnerCommission: data.partnerCommission,
2080
+ customerDiscount: data.customerDiscount,
2081
+ currency: data.currency
2082
+ };
2083
+ } catch (error) {
2084
+ const message = error instanceof Error ? error.message : "Network error";
2085
+ return {
2086
+ success: false,
2087
+ message,
2088
+ error: message
2089
+ };
2090
+ }
2091
+ }
2092
+ /**
2093
+ * Fetch partner dashboard statistics
2094
+ * @param endpointConfig - Optional endpoint override config
2095
+ */
2096
+ async function usePartnerStats(endpointConfig) {
2097
+ const endpoints = resolveEndpoints(endpointConfig);
2098
+ try {
2099
+ const response = await fetch(endpoints.partnerStats, {
2100
+ method: "GET",
2101
+ headers: { "Content-Type": "application/json" },
2102
+ credentials: "include"
2103
+ });
2104
+ const data = await response.json();
2105
+ if (!response.ok) return {
2106
+ success: false,
2107
+ error: data.error || "Failed to fetch partner stats"
2108
+ };
2109
+ return {
2110
+ success: Boolean(data.success),
2111
+ data: data.data,
2112
+ currency: data.currency
2113
+ };
2114
+ } catch (error) {
2115
+ return {
2116
+ success: false,
2117
+ error: error instanceof Error ? error.message : "Network error"
2118
+ };
2119
+ }
2120
+ }
2121
+ //#endregion
2122
+ exports.CommissionBreakdown = CommissionBreakdown;
2123
+ exports.EarningsSummary = EarningsSummary;
2124
+ exports.PartnerDashboard = PartnerDashboard;
2125
+ exports.ProgramOverview = ProgramOverview;
2126
+ exports.RecentReferrals = RecentReferrals;
2127
+ exports.ReferralCodes = ReferralCodes;
2128
+ exports.ReferralPerformance = ReferralPerformance;
2129
+ exports.useCouponCode = useCouponCode;
2130
+ exports.usePartnerStats = usePartnerStats;
2131
+ exports.validateCouponCode = validateCouponCode;
2132
+
2133
+ //# sourceMappingURL=browser.js.map