@lets-events/react 12.1.3 → 12.1.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,1927 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __objRest = (source, exclude) => {
25
+ var target = {};
26
+ for (var prop in source)
27
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
28
+ target[prop] = source[prop];
29
+ if (source != null && __getOwnPropSymbols)
30
+ for (var prop of __getOwnPropSymbols(source)) {
31
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
32
+ target[prop] = source[prop];
33
+ }
34
+ return target;
35
+ };
36
+ var __commonJS = (cb, mod) => function __require() {
37
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
48
+ // If the importer is in node compatibility mode or this is not an ESM
49
+ // file that has been converted to a CommonJS file using a Babel-
50
+ // compatible transform (i.e. "__esModule" has not been set), then set
51
+ // "default" to the CommonJS "module.exports" for node compatibility.
52
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
53
+ mod
54
+ ));
55
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
56
+ var __async = (__this, __arguments, generator) => {
57
+ return new Promise((resolve, reject) => {
58
+ var fulfilled = (value) => {
59
+ try {
60
+ step(generator.next(value));
61
+ } catch (e) {
62
+ reject(e);
63
+ }
64
+ };
65
+ var rejected = (value) => {
66
+ try {
67
+ step(generator.throw(value));
68
+ } catch (e) {
69
+ reject(e);
70
+ }
71
+ };
72
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
73
+ step((generator = generator.apply(__this, __arguments)).next());
74
+ });
75
+ };
76
+
77
+ // ../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js
78
+ var require_react_is_development = __commonJS({
79
+ "../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"(exports) {
80
+ "use strict";
81
+ if (true) {
82
+ (function() {
83
+ "use strict";
84
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
85
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
86
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
87
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
88
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
89
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
90
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
91
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
92
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
93
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
94
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
95
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
96
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
97
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
98
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
99
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
100
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
101
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
102
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
103
+ function isValidElementType(type) {
104
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
105
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
106
+ }
107
+ function typeOf(object) {
108
+ if (typeof object === "object" && object !== null) {
109
+ var $$typeof = object.$$typeof;
110
+ switch ($$typeof) {
111
+ case REACT_ELEMENT_TYPE:
112
+ var type = object.type;
113
+ switch (type) {
114
+ case REACT_ASYNC_MODE_TYPE:
115
+ case REACT_CONCURRENT_MODE_TYPE:
116
+ case REACT_FRAGMENT_TYPE:
117
+ case REACT_PROFILER_TYPE:
118
+ case REACT_STRICT_MODE_TYPE:
119
+ case REACT_SUSPENSE_TYPE:
120
+ return type;
121
+ default:
122
+ var $$typeofType = type && type.$$typeof;
123
+ switch ($$typeofType) {
124
+ case REACT_CONTEXT_TYPE:
125
+ case REACT_FORWARD_REF_TYPE:
126
+ case REACT_LAZY_TYPE:
127
+ case REACT_MEMO_TYPE:
128
+ case REACT_PROVIDER_TYPE:
129
+ return $$typeofType;
130
+ default:
131
+ return $$typeof;
132
+ }
133
+ }
134
+ case REACT_PORTAL_TYPE:
135
+ return $$typeof;
136
+ }
137
+ }
138
+ return void 0;
139
+ }
140
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
141
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
142
+ var ContextConsumer = REACT_CONTEXT_TYPE;
143
+ var ContextProvider = REACT_PROVIDER_TYPE;
144
+ var Element = REACT_ELEMENT_TYPE;
145
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
146
+ var Fragment = REACT_FRAGMENT_TYPE;
147
+ var Lazy = REACT_LAZY_TYPE;
148
+ var Memo = REACT_MEMO_TYPE;
149
+ var Portal = REACT_PORTAL_TYPE;
150
+ var Profiler = REACT_PROFILER_TYPE;
151
+ var StrictMode = REACT_STRICT_MODE_TYPE;
152
+ var Suspense = REACT_SUSPENSE_TYPE;
153
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
154
+ function isAsyncMode(object) {
155
+ {
156
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
157
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
158
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
159
+ }
160
+ }
161
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
162
+ }
163
+ function isConcurrentMode(object) {
164
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
165
+ }
166
+ function isContextConsumer(object) {
167
+ return typeOf(object) === REACT_CONTEXT_TYPE;
168
+ }
169
+ function isContextProvider(object) {
170
+ return typeOf(object) === REACT_PROVIDER_TYPE;
171
+ }
172
+ function isElement(object) {
173
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
174
+ }
175
+ function isForwardRef(object) {
176
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
177
+ }
178
+ function isFragment(object) {
179
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
180
+ }
181
+ function isLazy(object) {
182
+ return typeOf(object) === REACT_LAZY_TYPE;
183
+ }
184
+ function isMemo(object) {
185
+ return typeOf(object) === REACT_MEMO_TYPE;
186
+ }
187
+ function isPortal(object) {
188
+ return typeOf(object) === REACT_PORTAL_TYPE;
189
+ }
190
+ function isProfiler(object) {
191
+ return typeOf(object) === REACT_PROFILER_TYPE;
192
+ }
193
+ function isStrictMode(object) {
194
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
195
+ }
196
+ function isSuspense(object) {
197
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
198
+ }
199
+ exports.AsyncMode = AsyncMode;
200
+ exports.ConcurrentMode = ConcurrentMode;
201
+ exports.ContextConsumer = ContextConsumer;
202
+ exports.ContextProvider = ContextProvider;
203
+ exports.Element = Element;
204
+ exports.ForwardRef = ForwardRef;
205
+ exports.Fragment = Fragment;
206
+ exports.Lazy = Lazy;
207
+ exports.Memo = Memo;
208
+ exports.Portal = Portal;
209
+ exports.Profiler = Profiler;
210
+ exports.StrictMode = StrictMode;
211
+ exports.Suspense = Suspense;
212
+ exports.isAsyncMode = isAsyncMode;
213
+ exports.isConcurrentMode = isConcurrentMode;
214
+ exports.isContextConsumer = isContextConsumer;
215
+ exports.isContextProvider = isContextProvider;
216
+ exports.isElement = isElement;
217
+ exports.isForwardRef = isForwardRef;
218
+ exports.isFragment = isFragment;
219
+ exports.isLazy = isLazy;
220
+ exports.isMemo = isMemo;
221
+ exports.isPortal = isPortal;
222
+ exports.isProfiler = isProfiler;
223
+ exports.isStrictMode = isStrictMode;
224
+ exports.isSuspense = isSuspense;
225
+ exports.isValidElementType = isValidElementType;
226
+ exports.typeOf = typeOf;
227
+ })();
228
+ }
229
+ }
230
+ });
231
+
232
+ // ../../node_modules/prop-types/node_modules/react-is/index.js
233
+ var require_react_is = __commonJS({
234
+ "../../node_modules/prop-types/node_modules/react-is/index.js"(exports, module) {
235
+ "use strict";
236
+ if (false) {
237
+ module.exports = null;
238
+ } else {
239
+ module.exports = require_react_is_development();
240
+ }
241
+ }
242
+ });
243
+
244
+ // ../../node_modules/object-assign/index.js
245
+ var require_object_assign = __commonJS({
246
+ "../../node_modules/object-assign/index.js"(exports, module) {
247
+ "use strict";
248
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
249
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
250
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
251
+ function toObject(val) {
252
+ if (val === null || val === void 0) {
253
+ throw new TypeError("Object.assign cannot be called with null or undefined");
254
+ }
255
+ return Object(val);
256
+ }
257
+ function shouldUseNative() {
258
+ try {
259
+ if (!Object.assign) {
260
+ return false;
261
+ }
262
+ var test1 = new String("abc");
263
+ test1[5] = "de";
264
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
265
+ return false;
266
+ }
267
+ var test2 = {};
268
+ for (var i = 0; i < 10; i++) {
269
+ test2["_" + String.fromCharCode(i)] = i;
270
+ }
271
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
272
+ return test2[n];
273
+ });
274
+ if (order2.join("") !== "0123456789") {
275
+ return false;
276
+ }
277
+ var test3 = {};
278
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
279
+ test3[letter] = letter;
280
+ });
281
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
282
+ return false;
283
+ }
284
+ return true;
285
+ } catch (err) {
286
+ return false;
287
+ }
288
+ }
289
+ module.exports = shouldUseNative() ? Object.assign : function(target, source) {
290
+ var from;
291
+ var to = toObject(target);
292
+ var symbols;
293
+ for (var s = 1; s < arguments.length; s++) {
294
+ from = Object(arguments[s]);
295
+ for (var key in from) {
296
+ if (hasOwnProperty.call(from, key)) {
297
+ to[key] = from[key];
298
+ }
299
+ }
300
+ if (getOwnPropertySymbols) {
301
+ symbols = getOwnPropertySymbols(from);
302
+ for (var i = 0; i < symbols.length; i++) {
303
+ if (propIsEnumerable.call(from, symbols[i])) {
304
+ to[symbols[i]] = from[symbols[i]];
305
+ }
306
+ }
307
+ }
308
+ }
309
+ return to;
310
+ };
311
+ }
312
+ });
313
+
314
+ // ../../node_modules/prop-types/lib/ReactPropTypesSecret.js
315
+ var require_ReactPropTypesSecret = __commonJS({
316
+ "../../node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports, module) {
317
+ "use strict";
318
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
319
+ module.exports = ReactPropTypesSecret;
320
+ }
321
+ });
322
+
323
+ // ../../node_modules/prop-types/lib/has.js
324
+ var require_has = __commonJS({
325
+ "../../node_modules/prop-types/lib/has.js"(exports, module) {
326
+ "use strict";
327
+ module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
328
+ }
329
+ });
330
+
331
+ // ../../node_modules/prop-types/checkPropTypes.js
332
+ var require_checkPropTypes = __commonJS({
333
+ "../../node_modules/prop-types/checkPropTypes.js"(exports, module) {
334
+ "use strict";
335
+ var printWarning = function() {
336
+ };
337
+ if (true) {
338
+ ReactPropTypesSecret = require_ReactPropTypesSecret();
339
+ loggedTypeFailures = {};
340
+ has = require_has();
341
+ printWarning = function(text) {
342
+ var message = "Warning: " + text;
343
+ if (typeof console !== "undefined") {
344
+ console.error(message);
345
+ }
346
+ try {
347
+ throw new Error(message);
348
+ } catch (x) {
349
+ }
350
+ };
351
+ }
352
+ var ReactPropTypesSecret;
353
+ var loggedTypeFailures;
354
+ var has;
355
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
356
+ if (true) {
357
+ for (var typeSpecName in typeSpecs) {
358
+ if (has(typeSpecs, typeSpecName)) {
359
+ var error;
360
+ try {
361
+ if (typeof typeSpecs[typeSpecName] !== "function") {
362
+ var err = Error(
363
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
364
+ );
365
+ err.name = "Invariant Violation";
366
+ throw err;
367
+ }
368
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
369
+ } catch (ex) {
370
+ error = ex;
371
+ }
372
+ if (error && !(error instanceof Error)) {
373
+ printWarning(
374
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
375
+ );
376
+ }
377
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
378
+ loggedTypeFailures[error.message] = true;
379
+ var stack = getStack ? getStack() : "";
380
+ printWarning(
381
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
382
+ );
383
+ }
384
+ }
385
+ }
386
+ }
387
+ }
388
+ checkPropTypes.resetWarningCache = function() {
389
+ if (true) {
390
+ loggedTypeFailures = {};
391
+ }
392
+ };
393
+ module.exports = checkPropTypes;
394
+ }
395
+ });
396
+
397
+ // ../../node_modules/prop-types/factoryWithTypeCheckers.js
398
+ var require_factoryWithTypeCheckers = __commonJS({
399
+ "../../node_modules/prop-types/factoryWithTypeCheckers.js"(exports, module) {
400
+ "use strict";
401
+ var ReactIs = require_react_is();
402
+ var assign = require_object_assign();
403
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
404
+ var has = require_has();
405
+ var checkPropTypes = require_checkPropTypes();
406
+ var printWarning = function() {
407
+ };
408
+ if (true) {
409
+ printWarning = function(text) {
410
+ var message = "Warning: " + text;
411
+ if (typeof console !== "undefined") {
412
+ console.error(message);
413
+ }
414
+ try {
415
+ throw new Error(message);
416
+ } catch (x) {
417
+ }
418
+ };
419
+ }
420
+ function emptyFunctionThatReturnsNull() {
421
+ return null;
422
+ }
423
+ module.exports = function(isValidElement, throwOnDirectAccess) {
424
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
425
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
426
+ function getIteratorFn(maybeIterable) {
427
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
428
+ if (typeof iteratorFn === "function") {
429
+ return iteratorFn;
430
+ }
431
+ }
432
+ var ANONYMOUS = "<<anonymous>>";
433
+ var ReactPropTypes = {
434
+ array: createPrimitiveTypeChecker("array"),
435
+ bigint: createPrimitiveTypeChecker("bigint"),
436
+ bool: createPrimitiveTypeChecker("boolean"),
437
+ func: createPrimitiveTypeChecker("function"),
438
+ number: createPrimitiveTypeChecker("number"),
439
+ object: createPrimitiveTypeChecker("object"),
440
+ string: createPrimitiveTypeChecker("string"),
441
+ symbol: createPrimitiveTypeChecker("symbol"),
442
+ any: createAnyTypeChecker(),
443
+ arrayOf: createArrayOfTypeChecker,
444
+ element: createElementTypeChecker(),
445
+ elementType: createElementTypeTypeChecker(),
446
+ instanceOf: createInstanceTypeChecker,
447
+ node: createNodeChecker(),
448
+ objectOf: createObjectOfTypeChecker,
449
+ oneOf: createEnumTypeChecker,
450
+ oneOfType: createUnionTypeChecker,
451
+ shape: createShapeTypeChecker,
452
+ exact: createStrictShapeTypeChecker
453
+ };
454
+ function is(x, y) {
455
+ if (x === y) {
456
+ return x !== 0 || 1 / x === 1 / y;
457
+ } else {
458
+ return x !== x && y !== y;
459
+ }
460
+ }
461
+ function PropTypeError(message, data) {
462
+ this.message = message;
463
+ this.data = data && typeof data === "object" ? data : {};
464
+ this.stack = "";
465
+ }
466
+ PropTypeError.prototype = Error.prototype;
467
+ function createChainableTypeChecker(validate) {
468
+ if (true) {
469
+ var manualPropTypeCallCache = {};
470
+ var manualPropTypeWarningCount = 0;
471
+ }
472
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
473
+ componentName = componentName || ANONYMOUS;
474
+ propFullName = propFullName || propName;
475
+ if (secret !== ReactPropTypesSecret) {
476
+ if (throwOnDirectAccess) {
477
+ var err = new Error(
478
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
479
+ );
480
+ err.name = "Invariant Violation";
481
+ throw err;
482
+ } else if (typeof console !== "undefined") {
483
+ var cacheKey = componentName + ":" + propName;
484
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
485
+ manualPropTypeWarningCount < 3) {
486
+ printWarning(
487
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
488
+ );
489
+ manualPropTypeCallCache[cacheKey] = true;
490
+ manualPropTypeWarningCount++;
491
+ }
492
+ }
493
+ }
494
+ if (props[propName] == null) {
495
+ if (isRequired) {
496
+ if (props[propName] === null) {
497
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
498
+ }
499
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
500
+ }
501
+ return null;
502
+ } else {
503
+ return validate(props, propName, componentName, location, propFullName);
504
+ }
505
+ }
506
+ var chainedCheckType = checkType.bind(null, false);
507
+ chainedCheckType.isRequired = checkType.bind(null, true);
508
+ return chainedCheckType;
509
+ }
510
+ function createPrimitiveTypeChecker(expectedType) {
511
+ function validate(props, propName, componentName, location, propFullName, secret) {
512
+ var propValue = props[propName];
513
+ var propType = getPropType(propValue);
514
+ if (propType !== expectedType) {
515
+ var preciseType = getPreciseType(propValue);
516
+ return new PropTypeError(
517
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
518
+ { expectedType }
519
+ );
520
+ }
521
+ return null;
522
+ }
523
+ return createChainableTypeChecker(validate);
524
+ }
525
+ function createAnyTypeChecker() {
526
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
527
+ }
528
+ function createArrayOfTypeChecker(typeChecker) {
529
+ function validate(props, propName, componentName, location, propFullName) {
530
+ if (typeof typeChecker !== "function") {
531
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
532
+ }
533
+ var propValue = props[propName];
534
+ if (!Array.isArray(propValue)) {
535
+ var propType = getPropType(propValue);
536
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
537
+ }
538
+ for (var i = 0; i < propValue.length; i++) {
539
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
540
+ if (error instanceof Error) {
541
+ return error;
542
+ }
543
+ }
544
+ return null;
545
+ }
546
+ return createChainableTypeChecker(validate);
547
+ }
548
+ function createElementTypeChecker() {
549
+ function validate(props, propName, componentName, location, propFullName) {
550
+ var propValue = props[propName];
551
+ if (!isValidElement(propValue)) {
552
+ var propType = getPropType(propValue);
553
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
554
+ }
555
+ return null;
556
+ }
557
+ return createChainableTypeChecker(validate);
558
+ }
559
+ function createElementTypeTypeChecker() {
560
+ function validate(props, propName, componentName, location, propFullName) {
561
+ var propValue = props[propName];
562
+ if (!ReactIs.isValidElementType(propValue)) {
563
+ var propType = getPropType(propValue);
564
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
565
+ }
566
+ return null;
567
+ }
568
+ return createChainableTypeChecker(validate);
569
+ }
570
+ function createInstanceTypeChecker(expectedClass) {
571
+ function validate(props, propName, componentName, location, propFullName) {
572
+ if (!(props[propName] instanceof expectedClass)) {
573
+ var expectedClassName = expectedClass.name || ANONYMOUS;
574
+ var actualClassName = getClassName(props[propName]);
575
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
576
+ }
577
+ return null;
578
+ }
579
+ return createChainableTypeChecker(validate);
580
+ }
581
+ function createEnumTypeChecker(expectedValues) {
582
+ if (!Array.isArray(expectedValues)) {
583
+ if (true) {
584
+ if (arguments.length > 1) {
585
+ printWarning(
586
+ "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
587
+ );
588
+ } else {
589
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
590
+ }
591
+ }
592
+ return emptyFunctionThatReturnsNull;
593
+ }
594
+ function validate(props, propName, componentName, location, propFullName) {
595
+ var propValue = props[propName];
596
+ for (var i = 0; i < expectedValues.length; i++) {
597
+ if (is(propValue, expectedValues[i])) {
598
+ return null;
599
+ }
600
+ }
601
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
602
+ var type = getPreciseType(value);
603
+ if (type === "symbol") {
604
+ return String(value);
605
+ }
606
+ return value;
607
+ });
608
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
609
+ }
610
+ return createChainableTypeChecker(validate);
611
+ }
612
+ function createObjectOfTypeChecker(typeChecker) {
613
+ function validate(props, propName, componentName, location, propFullName) {
614
+ if (typeof typeChecker !== "function") {
615
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
616
+ }
617
+ var propValue = props[propName];
618
+ var propType = getPropType(propValue);
619
+ if (propType !== "object") {
620
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
621
+ }
622
+ for (var key in propValue) {
623
+ if (has(propValue, key)) {
624
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
625
+ if (error instanceof Error) {
626
+ return error;
627
+ }
628
+ }
629
+ }
630
+ return null;
631
+ }
632
+ return createChainableTypeChecker(validate);
633
+ }
634
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
635
+ if (!Array.isArray(arrayOfTypeCheckers)) {
636
+ true ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
637
+ return emptyFunctionThatReturnsNull;
638
+ }
639
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
640
+ var checker = arrayOfTypeCheckers[i];
641
+ if (typeof checker !== "function") {
642
+ printWarning(
643
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
644
+ );
645
+ return emptyFunctionThatReturnsNull;
646
+ }
647
+ }
648
+ function validate(props, propName, componentName, location, propFullName) {
649
+ var expectedTypes = [];
650
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
651
+ var checker2 = arrayOfTypeCheckers[i2];
652
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
653
+ if (checkerResult == null) {
654
+ return null;
655
+ }
656
+ if (checkerResult.data && has(checkerResult.data, "expectedType")) {
657
+ expectedTypes.push(checkerResult.data.expectedType);
658
+ }
659
+ }
660
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
661
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
662
+ }
663
+ return createChainableTypeChecker(validate);
664
+ }
665
+ function createNodeChecker() {
666
+ function validate(props, propName, componentName, location, propFullName) {
667
+ if (!isNode(props[propName])) {
668
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
669
+ }
670
+ return null;
671
+ }
672
+ return createChainableTypeChecker(validate);
673
+ }
674
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
675
+ return new PropTypeError(
676
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
677
+ );
678
+ }
679
+ function createShapeTypeChecker(shapeTypes) {
680
+ function validate(props, propName, componentName, location, propFullName) {
681
+ var propValue = props[propName];
682
+ var propType = getPropType(propValue);
683
+ if (propType !== "object") {
684
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
685
+ }
686
+ for (var key in shapeTypes) {
687
+ var checker = shapeTypes[key];
688
+ if (typeof checker !== "function") {
689
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
690
+ }
691
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
692
+ if (error) {
693
+ return error;
694
+ }
695
+ }
696
+ return null;
697
+ }
698
+ return createChainableTypeChecker(validate);
699
+ }
700
+ function createStrictShapeTypeChecker(shapeTypes) {
701
+ function validate(props, propName, componentName, location, propFullName) {
702
+ var propValue = props[propName];
703
+ var propType = getPropType(propValue);
704
+ if (propType !== "object") {
705
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
706
+ }
707
+ var allKeys = assign({}, props[propName], shapeTypes);
708
+ for (var key in allKeys) {
709
+ var checker = shapeTypes[key];
710
+ if (has(shapeTypes, key) && typeof checker !== "function") {
711
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
712
+ }
713
+ if (!checker) {
714
+ return new PropTypeError(
715
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
716
+ );
717
+ }
718
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
719
+ if (error) {
720
+ return error;
721
+ }
722
+ }
723
+ return null;
724
+ }
725
+ return createChainableTypeChecker(validate);
726
+ }
727
+ function isNode(propValue) {
728
+ switch (typeof propValue) {
729
+ case "number":
730
+ case "string":
731
+ case "undefined":
732
+ return true;
733
+ case "boolean":
734
+ return !propValue;
735
+ case "object":
736
+ if (Array.isArray(propValue)) {
737
+ return propValue.every(isNode);
738
+ }
739
+ if (propValue === null || isValidElement(propValue)) {
740
+ return true;
741
+ }
742
+ var iteratorFn = getIteratorFn(propValue);
743
+ if (iteratorFn) {
744
+ var iterator = iteratorFn.call(propValue);
745
+ var step;
746
+ if (iteratorFn !== propValue.entries) {
747
+ while (!(step = iterator.next()).done) {
748
+ if (!isNode(step.value)) {
749
+ return false;
750
+ }
751
+ }
752
+ } else {
753
+ while (!(step = iterator.next()).done) {
754
+ var entry = step.value;
755
+ if (entry) {
756
+ if (!isNode(entry[1])) {
757
+ return false;
758
+ }
759
+ }
760
+ }
761
+ }
762
+ } else {
763
+ return false;
764
+ }
765
+ return true;
766
+ default:
767
+ return false;
768
+ }
769
+ }
770
+ function isSymbol(propType, propValue) {
771
+ if (propType === "symbol") {
772
+ return true;
773
+ }
774
+ if (!propValue) {
775
+ return false;
776
+ }
777
+ if (propValue["@@toStringTag"] === "Symbol") {
778
+ return true;
779
+ }
780
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
781
+ return true;
782
+ }
783
+ return false;
784
+ }
785
+ function getPropType(propValue) {
786
+ var propType = typeof propValue;
787
+ if (Array.isArray(propValue)) {
788
+ return "array";
789
+ }
790
+ if (propValue instanceof RegExp) {
791
+ return "object";
792
+ }
793
+ if (isSymbol(propType, propValue)) {
794
+ return "symbol";
795
+ }
796
+ return propType;
797
+ }
798
+ function getPreciseType(propValue) {
799
+ if (typeof propValue === "undefined" || propValue === null) {
800
+ return "" + propValue;
801
+ }
802
+ var propType = getPropType(propValue);
803
+ if (propType === "object") {
804
+ if (propValue instanceof Date) {
805
+ return "date";
806
+ } else if (propValue instanceof RegExp) {
807
+ return "regexp";
808
+ }
809
+ }
810
+ return propType;
811
+ }
812
+ function getPostfixForTypeWarning(value) {
813
+ var type = getPreciseType(value);
814
+ switch (type) {
815
+ case "array":
816
+ case "object":
817
+ return "an " + type;
818
+ case "boolean":
819
+ case "date":
820
+ case "regexp":
821
+ return "a " + type;
822
+ default:
823
+ return type;
824
+ }
825
+ }
826
+ function getClassName(propValue) {
827
+ if (!propValue.constructor || !propValue.constructor.name) {
828
+ return ANONYMOUS;
829
+ }
830
+ return propValue.constructor.name;
831
+ }
832
+ ReactPropTypes.checkPropTypes = checkPropTypes;
833
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
834
+ ReactPropTypes.PropTypes = ReactPropTypes;
835
+ return ReactPropTypes;
836
+ };
837
+ }
838
+ });
839
+
840
+ // ../../node_modules/prop-types/index.js
841
+ var require_prop_types = __commonJS({
842
+ "../../node_modules/prop-types/index.js"(exports, module) {
843
+ "use strict";
844
+ if (true) {
845
+ ReactIs = require_react_is();
846
+ throwOnDirectAccess = true;
847
+ module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
848
+ } else {
849
+ module.exports = null();
850
+ }
851
+ var ReactIs;
852
+ var throwOnDirectAccess;
853
+ }
854
+ });
855
+
856
+ // src/components/Icon.tsx
857
+ var import_prop_types = __toESM(require_prop_types());
858
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
859
+ import { library } from "@fortawesome/fontawesome-svg-core";
860
+ import { fas } from "@fortawesome/free-solid-svg-icons";
861
+ import { far } from "@fortawesome/free-regular-svg-icons";
862
+ import { fab } from "@fortawesome/free-brands-svg-icons";
863
+ import { jsx } from "react/jsx-runtime";
864
+ library.add(fas, far, fab);
865
+ var Icon = (_a) => {
866
+ var _b = _a, { name, prefix = "fas", size = "sm", color = "currentColor", className = "" } = _b, props = __objRest(_b, ["name", "prefix", "size", "color", "className"]);
867
+ var _a2, _b2;
868
+ const sizeMap = {
869
+ "xs": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
870
+ "sm": { width: "0.625rem", height: "0.625rem", fontSize: "0.625rem" },
871
+ "md": { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" },
872
+ "xl": { width: "1rem", height: "1rem", fontSize: "1rem" },
873
+ undefined: { width: "0.75rem", height: "0.75rem", fontSize: "0.75rem" }
874
+ };
875
+ return /* @__PURE__ */ jsx(
876
+ FontAwesomeIcon,
877
+ __spreadProps(__spreadValues({
878
+ icon: [prefix, name],
879
+ style: sizeMap[size],
880
+ color,
881
+ className
882
+ }, props), {
883
+ width: (_a2 = sizeMap[size]) == null ? void 0 : _a2.width,
884
+ height: (_b2 = sizeMap[size]) == null ? void 0 : _b2.height
885
+ })
886
+ );
887
+ };
888
+ Icon.propTypes = {
889
+ name: import_prop_types.default.string.isRequired,
890
+ prefix: import_prop_types.default.string,
891
+ size: import_prop_types.default.string,
892
+ color: import_prop_types.default.string,
893
+ className: import_prop_types.default.string
894
+ };
895
+ var Icon_default = Icon;
896
+
897
+ // ../tokens/dist/index.mjs
898
+ var colors = {
899
+ brand50: "#DBE8FF",
900
+ brand100: "#BDD5FF",
901
+ brand200: "#7AABFF",
902
+ brand300: "#3881FF",
903
+ brand400: "#005AF5",
904
+ brand500: "#004ED2",
905
+ brand600: "#0042B2",
906
+ brand700: "#00348F",
907
+ brand800: "#00276B",
908
+ brand900: "#001A47",
909
+ brand950: "#000D24",
910
+ blue50: "#E5F1FF",
911
+ blue100: "#CCE4FF",
912
+ blue200: "#9AC9FF",
913
+ blue300: "#66ADFF",
914
+ blue400: "#3392FF",
915
+ blue500: "#0278FE",
916
+ blue600: "#005FCD",
917
+ blue700: "#004799",
918
+ blue800: "#013066",
919
+ blue900: "#001834",
920
+ blue950: "#000C1A",
921
+ red50: "#FCEEEF",
922
+ red100: "#F9DCDF",
923
+ red200: "#F3BEC3",
924
+ red300: "#ED9CA2",
925
+ red400: "#E77982",
926
+ red500: "#E15662",
927
+ red600: "#DB3644",
928
+ red700: "#AD1F2B",
929
+ red800: "#75151D",
930
+ red900: "#380A0E",
931
+ red950: "#1E0507",
932
+ pink100: "#F9DCF3",
933
+ purple50: "#F3EFFB",
934
+ purple100: "#E6DEF7",
935
+ purple200: "#D1C2F0",
936
+ purple300: "#B9A1E8",
937
+ purple400: "#A080E0",
938
+ purple500: "#8961D8",
939
+ purple600: "#6431C8",
940
+ purple700: "#4B2597",
941
+ purple800: "#331966",
942
+ purple900: "#180C31",
943
+ purple950: "#0C0619",
944
+ yellow50: "#FFF9E6",
945
+ yellow100: "#FFF3CD",
946
+ yellow200: "#FFE69C",
947
+ yellow300: "#FFDA6A",
948
+ yellow400: "#FFCD39",
949
+ yellow500: "#FFC107",
950
+ yellow600: "#CC9A06",
951
+ yellow700: "#997404",
952
+ yellow800: "#664D03",
953
+ yellow900: "#332701",
954
+ yellow950: "#191300",
955
+ orange100: "#FEE0D8",
956
+ dark50: "#FFFFFF",
957
+ dark100: "#F4F4F4",
958
+ dark200: "#EAEBF0",
959
+ dark300: "#C2C3C7",
960
+ dark400: "#A9ABB1",
961
+ dark500: "#808289",
962
+ dark600: "#4C4F54",
963
+ dark700: "#34363B",
964
+ dark800: "#1E2023",
965
+ dark900: "#040507",
966
+ dark950: "#030303",
967
+ neutral50: "#FFFFFF",
968
+ neutral100: "#F4F4F4",
969
+ neutral200: "#EAEBF0",
970
+ neutral300: "#C2C3C7",
971
+ neutral400: "#A9ABB1",
972
+ neutral500: "#808289",
973
+ neutral600: "#4C4F54",
974
+ neutral700: "#34363B",
975
+ neutral800: "#1E2023",
976
+ neutral900: "#040507",
977
+ neutral950: "#030303",
978
+ green50: "#E6F9EA",
979
+ green100: "#CDF4D5",
980
+ green200: "#9BE8AC",
981
+ green300: "#6CD783",
982
+ green400: "#5BCA72",
983
+ green500: "#26A743",
984
+ green600: "#1E8535",
985
+ green700: "#176427",
986
+ green800: "#0F421A",
987
+ green900: "#08210D",
988
+ green950: "#041107",
989
+ grey50: "#F4F8FB",
990
+ grey100: "#E6EEF4",
991
+ grey200: "#DBE7F0",
992
+ grey300: "#BCCEDD",
993
+ grey400: "#9FB6C7",
994
+ grey500: "#849DAE",
995
+ grey600: "#698496",
996
+ grey700: "#516A7A",
997
+ grey800: "#394F61",
998
+ grey900: "#233543",
999
+ grey950: "#101B23",
1000
+ error50: "#FCEEEF",
1001
+ error100: "#F9DCDF",
1002
+ error200: "#F3BEC3",
1003
+ error300: "#ED9CA2",
1004
+ error400: "#E77982",
1005
+ error500: "#E15662",
1006
+ error600: "#DB3644",
1007
+ error700: "#AD1F2B",
1008
+ error800: "#75151D",
1009
+ error900: "#380A0E",
1010
+ error950: "#1E0507",
1011
+ success50: "#E6F9EA",
1012
+ success100: "#CDF4D5",
1013
+ success200: "#9BE8AC",
1014
+ success300: "#6CD783",
1015
+ success400: "#5BCA72",
1016
+ success500: "#26A743",
1017
+ success600: "#1E8535",
1018
+ success700: "#176427",
1019
+ success800: "#0F421A",
1020
+ success900: "#08210D",
1021
+ success950: "#041107",
1022
+ warning50: "#FFF9E6",
1023
+ warning100: "#FFF3CD",
1024
+ warning200: "#FFE69C",
1025
+ warning300: "#FFDA6A",
1026
+ warning400: "#FFCD39",
1027
+ warning500: "#FFC107",
1028
+ warning600: "#CC9A06",
1029
+ warning700: "#997404",
1030
+ warning800: "#664D03",
1031
+ warning900: "#332701",
1032
+ warning950: "#191300",
1033
+ info50: "#E5F1FF",
1034
+ info100: "#CCE4FF",
1035
+ info200: "#9AC9FF",
1036
+ info300: "#66ADFF",
1037
+ info400: "#3392FF",
1038
+ info500: "#0278FE",
1039
+ info600: "#005FCD",
1040
+ info700: "#004799",
1041
+ info800: "#013066",
1042
+ info900: "#001834",
1043
+ info950: "#000C1A",
1044
+ shadow50: "#546B923D"
1045
+ };
1046
+ var fonts = {
1047
+ default: '"Work Sans", sans-serif'
1048
+ };
1049
+ var fontSizes = {
1050
+ 2: "0.125rem",
1051
+ 4: "0.25rem",
1052
+ 6: "0.375rem",
1053
+ 8: "0.5rem",
1054
+ 10: "0.625rem",
1055
+ 12: "0.75rem",
1056
+ 13: "0.8125rem",
1057
+ 14: "0.875rem",
1058
+ 16: "1rem",
1059
+ 18: "1.125rem",
1060
+ 20: "1.25rem",
1061
+ 22: "1.375rem",
1062
+ 24: "1.5rem",
1063
+ 32: "2rem",
1064
+ 36: "2.25rem",
1065
+ 40: "2.5rem",
1066
+ 48: "3rem",
1067
+ 56: "3.5rem",
1068
+ 64: "4rem",
1069
+ 72: "4.5rem",
1070
+ 80: "5rem",
1071
+ xs: "0.375rem",
1072
+ sm: "0.5rem",
1073
+ md: "0.75rem",
1074
+ lg: "1rem",
1075
+ "2xl": "1.5rem",
1076
+ "3xl": "2rem",
1077
+ "4xl": "2.5rem",
1078
+ full: "62.4375rem",
1079
+ displayLarge: "3.5rem",
1080
+ displayMedium: "3rem",
1081
+ displaySmall: "2.25rem",
1082
+ headline1: "2.5rem",
1083
+ headline2: "2rem",
1084
+ headline3: "1.75rem",
1085
+ headline4: "1.375rem",
1086
+ headline5: "1.25rem",
1087
+ headline6: "1.125rem",
1088
+ headline7: "1rem",
1089
+ headline8: "0.875rem",
1090
+ bodyXL: "1.25rem",
1091
+ bodyL: "1.125rem",
1092
+ bodyM: "1rem",
1093
+ bodyS: "0.875rem",
1094
+ bodyXS: "0.8125rem",
1095
+ bodyXXS: "0.75rem",
1096
+ buttonLarge: "1.25rem",
1097
+ buttonMedium: "0.875rem",
1098
+ buttonSmall: "0.875rem",
1099
+ buttonExtraSmall: "0.75rem",
1100
+ badgeLarge: "1rem",
1101
+ badgeMedium: "0.875rem",
1102
+ badgeSmall: "0.75rem",
1103
+ badgeExtraSmall: "0.625rem",
1104
+ tooltip: "0.875rem",
1105
+ popoversRegular: "0.875rem",
1106
+ labelLarge: "1rem",
1107
+ labelMedium: "0.875rem",
1108
+ labelSmall: "0.8125rem",
1109
+ labelExtraSmall: "0.75rem",
1110
+ captionLarge: "0.8125rem",
1111
+ captionMedium: "0.75rem",
1112
+ captionSmall: "0.625rem"
1113
+ };
1114
+ var fontWeights = {
1115
+ regular: "400",
1116
+ medium: "500",
1117
+ semibold: "600",
1118
+ bold: "700"
1119
+ };
1120
+ var lineHeights = {
1121
+ smaller: "112.5%",
1122
+ // 4px
1123
+ shorter: "125%",
1124
+ // 8px
1125
+ short: "137.5%",
1126
+ // 12px
1127
+ base: "150%",
1128
+ // 16px
1129
+ tall: "175%",
1130
+ // 24px
1131
+ displayLarge: "4.5rem",
1132
+ displayMedium: "4rem",
1133
+ displaySmall: "3.25rem",
1134
+ headline1: "3.25rem",
1135
+ headline2: "2.75rem",
1136
+ headline3: "2.5rem",
1137
+ headline4: "1.75rem",
1138
+ headline5: "1.5rem",
1139
+ headline6: "1.375rem",
1140
+ headline7: "1.5rem",
1141
+ headline8: "1.25rem",
1142
+ bodyXL: "1.75rem",
1143
+ bodyL: "1.625rem",
1144
+ bodyM: "1.5rem",
1145
+ bodyS: "1.25rem",
1146
+ bodyXS: "1.125rem",
1147
+ bodyXXS: "1rem",
1148
+ buttonLarge: "1.25rem",
1149
+ buttonMedium: "1rem",
1150
+ buttonSmall: "0.875rem",
1151
+ buttonExtraSmall: "0.75rem",
1152
+ badgeLarge: "1rem",
1153
+ badgeMedium: "0.875rem",
1154
+ badgeSmall: "0.75rem",
1155
+ badgeExtraSmall: "0.625rem",
1156
+ tooltip: "1rem",
1157
+ popoversRegular: "1rem",
1158
+ labelLarge: "1.125rem",
1159
+ labelMedium: "1.125rem",
1160
+ labelSmall: "1rem",
1161
+ labelExtraSmall: "1rem",
1162
+ captionLarge: "1rem",
1163
+ captionMedium: "0.875rem",
1164
+ captionSmall: "0.75rem"
1165
+ };
1166
+ var radii = {
1167
+ "3xs": "2px",
1168
+ "2xs": "4px",
1169
+ "xs": "6px",
1170
+ "sm": "8px",
1171
+ "md": "10px",
1172
+ "lg": "12px",
1173
+ "xl": "14px",
1174
+ "2xl": "16px",
1175
+ "3xl": "18px",
1176
+ "4xl": "20px",
1177
+ "5xl": "22px",
1178
+ "6xl": "24px",
1179
+ "7xl": "32px",
1180
+ "8xl": "36px",
1181
+ "9xl": "40px",
1182
+ "10xl": "48px",
1183
+ "11xl": "56px",
1184
+ "12xl": "64px",
1185
+ "13xl": "72px",
1186
+ "14xl": "80px",
1187
+ full: "99999px"
1188
+ };
1189
+ var space = {
1190
+ 2: "0.125rem",
1191
+ 4: "0.25rem",
1192
+ 6: "0.375rem",
1193
+ 8: "0.5rem",
1194
+ 10: "0.625rem",
1195
+ 12: "0.75rem",
1196
+ 13: "0.8125rem",
1197
+ 14: "0.875rem",
1198
+ 16: "1rem",
1199
+ 18: "1.125rem",
1200
+ 20: "1.25rem",
1201
+ 22: "1.375rem",
1202
+ 24: "1.5rem",
1203
+ 32: "2rem",
1204
+ 36: "2.25rem",
1205
+ 40: "2.5rem",
1206
+ 48: "3rem",
1207
+ 56: "3.5rem",
1208
+ 64: "4rem",
1209
+ 72: "4.5rem",
1210
+ 80: "5rem",
1211
+ full: "62.4375rem"
1212
+ };
1213
+
1214
+ // src/styles/index.ts
1215
+ import { createStitches, defaultThemeMap } from "@stitches/react";
1216
+ var {
1217
+ styled,
1218
+ css,
1219
+ globalCss,
1220
+ keyframes,
1221
+ getCssText,
1222
+ theme,
1223
+ createTheme,
1224
+ config
1225
+ } = createStitches({
1226
+ themeMap: __spreadProps(__spreadValues({}, defaultThemeMap), {
1227
+ height: "space",
1228
+ width: "space",
1229
+ gap: "space"
1230
+ }),
1231
+ theme: {
1232
+ colors,
1233
+ fontSizes,
1234
+ fonts,
1235
+ fontWeights,
1236
+ lineHeights,
1237
+ radii,
1238
+ space
1239
+ }
1240
+ });
1241
+
1242
+ // src/components/Text.tsx
1243
+ import { Text as TextRadix } from "@radix-ui/themes";
1244
+
1245
+ // src/types/typographyValues.ts
1246
+ var typographyValues = {
1247
+ displayLarge: {
1248
+ fontSize: "$displayLarge",
1249
+ lineHeight: "$displayLarge",
1250
+ letterSpacing: "$displayLarge"
1251
+ },
1252
+ displayMedium: {
1253
+ fontSize: "$displayMedium",
1254
+ lineHeight: "$displayMedium",
1255
+ letterSpacing: "$displayMedium"
1256
+ },
1257
+ displaySmall: {
1258
+ fontSize: "$displaySmall",
1259
+ lineHeight: "$displaySmall",
1260
+ letterSpacing: "$displaySmall"
1261
+ },
1262
+ headline1: {
1263
+ fontSize: "$headline1",
1264
+ lineHeight: "$headline1"
1265
+ },
1266
+ headline2: {
1267
+ fontSize: "$headline2",
1268
+ lineHeight: "$headline2"
1269
+ },
1270
+ headline3: {
1271
+ fontSize: "$headline3",
1272
+ lineHeight: "$headline3"
1273
+ },
1274
+ headline4: {
1275
+ fontSize: "$headline4",
1276
+ lineHeight: "$headline4"
1277
+ },
1278
+ headline5: {
1279
+ fontSize: "$headline5",
1280
+ lineHeight: "$headline5"
1281
+ },
1282
+ headline6: {
1283
+ fontSize: "$headline6",
1284
+ lineHeight: "$headline6"
1285
+ },
1286
+ headline7: {
1287
+ fontSize: "$headline7",
1288
+ lineHeight: "$headline7"
1289
+ },
1290
+ headline8: {
1291
+ fontSize: "$headline8",
1292
+ lineHeight: "$headline8"
1293
+ },
1294
+ bodyXL: {
1295
+ fontSize: "$bodyXL",
1296
+ lineHeight: "$bodyXL"
1297
+ },
1298
+ bodyL: {
1299
+ fontSize: "$bodyL",
1300
+ lineHeight: "$bodyL"
1301
+ },
1302
+ bodyM: {
1303
+ fontSize: "$bodyM",
1304
+ lineHeight: "$bodyM"
1305
+ },
1306
+ bodyS: {
1307
+ fontSize: "$bodyS",
1308
+ lineHeight: "$bodyS"
1309
+ },
1310
+ bodyXS: {
1311
+ fontSize: "$bodyXS",
1312
+ lineHeight: "$bodyXS"
1313
+ },
1314
+ bodyXXS: {
1315
+ fontSize: "$bodyXXS",
1316
+ lineHeight: "$bodyXXS"
1317
+ },
1318
+ badgeLarge: {
1319
+ fontSize: "$badgeLarge",
1320
+ lineHeight: "$badgeLarge"
1321
+ },
1322
+ badgeMedium: {
1323
+ fontSize: "$badgeMedium",
1324
+ lineHeight: "$badgeMedium"
1325
+ },
1326
+ badgeSmall: {
1327
+ fontSize: "$badgeSmall",
1328
+ lineHeight: "$badgeSmall"
1329
+ },
1330
+ badgeExtraSmall: {
1331
+ fontSize: "$badgeExtraSmall",
1332
+ lineHeight: "$badgeExtraSmall"
1333
+ },
1334
+ tooltip: {
1335
+ fontSize: "$tooltip",
1336
+ lineHeight: "$tooltip"
1337
+ },
1338
+ popoversRegular: {
1339
+ fontSize: "$popoversRegular",
1340
+ lineHeight: "$popoversRegular"
1341
+ },
1342
+ captionLarge: {
1343
+ fontSize: "$captionLarge",
1344
+ lineHeight: "$captionLarge"
1345
+ },
1346
+ captionMedium: {
1347
+ fontSize: "$captionMedium",
1348
+ lineHeight: "$captionMedium"
1349
+ },
1350
+ captionSmall: {
1351
+ fontSize: "$captionSmall",
1352
+ lineHeight: "$captionSmall"
1353
+ },
1354
+ buttonLarge: {
1355
+ fontSize: "$buttonLarge",
1356
+ lineHeight: "$buttonLarge"
1357
+ },
1358
+ buttonMedium: {
1359
+ fontSize: "$buttonMedium",
1360
+ lineHeight: "$buttonMedium"
1361
+ },
1362
+ buttonSmall: {
1363
+ fontSize: "$buttonSmall",
1364
+ lineHeight: "$buttonSmall"
1365
+ },
1366
+ buttonExtraSmall: {
1367
+ fontSize: "$buttonExtraSmall",
1368
+ lineHeight: "$buttonExtraSmall"
1369
+ },
1370
+ labelLarge: {
1371
+ fontSize: "$labelLarge",
1372
+ lineHeight: "$labelLarge"
1373
+ },
1374
+ labelMedium: {
1375
+ fontSize: "$labelMedium",
1376
+ lineHeight: "$labelMedium"
1377
+ },
1378
+ labelSmall: {
1379
+ fontSize: "$labelSmall",
1380
+ lineHeight: "$labelSmall"
1381
+ },
1382
+ labelExtraSmall: {
1383
+ fontSize: "$labelExtraSmall",
1384
+ lineHeight: "$labelExtraSmall"
1385
+ }
1386
+ };
1387
+ var typographyLabelValues = {
1388
+ labelLarge: {
1389
+ fontSize: "$labelLarge",
1390
+ lineHeight: "$labelLarge"
1391
+ },
1392
+ labelMedium: {
1393
+ fontSize: "$labelMedium",
1394
+ lineHeight: "$labelMedium"
1395
+ },
1396
+ labelSmall: {
1397
+ fontSize: "$labelSmall",
1398
+ lineHeight: "$labelSmall"
1399
+ },
1400
+ labelExtraSmall: {
1401
+ fontSize: "$labelExtraSmall",
1402
+ lineHeight: "$labelExtraSmall"
1403
+ }
1404
+ };
1405
+
1406
+ // src/components/Text.tsx
1407
+ import { jsx as jsx2 } from "react/jsx-runtime";
1408
+ var TextStyle = styled(TextRadix, {
1409
+ fontFamily: "$default",
1410
+ lineHeight: "$base",
1411
+ variants: {
1412
+ typography: typographyValues,
1413
+ fontWeight: {
1414
+ regular: { fontWeight: "$regular" },
1415
+ medium: { fontWeight: "$medium" },
1416
+ semibold: { fontWeight: "$semibold" },
1417
+ bold: { fontWeight: "$bold" }
1418
+ }
1419
+ }
1420
+ });
1421
+ function Text(_a) {
1422
+ var _b = _a, { color } = _b, props = __objRest(_b, ["color"]);
1423
+ return /* @__PURE__ */ jsx2(
1424
+ TextStyle,
1425
+ __spreadProps(__spreadValues({}, props), {
1426
+ css: __spreadValues({
1427
+ color: color ? "$" + color : "$dark600"
1428
+ }, props.css)
1429
+ })
1430
+ );
1431
+ }
1432
+
1433
+ // src/components/Flex.tsx
1434
+ import { Flex as FlexRadix } from "@radix-ui/themes";
1435
+ import { jsx as jsx3 } from "react/jsx-runtime";
1436
+ var FlexStyled = styled(FlexRadix, {
1437
+ variants: {
1438
+ display: {
1439
+ "flex": { display: "flex" },
1440
+ "inline-flex": { display: "inline-flex" }
1441
+ },
1442
+ align: {
1443
+ start: { alignItems: "flex-start" },
1444
+ center: { alignItems: "center" },
1445
+ end: { alignItems: "flex-end" },
1446
+ stretch: { alignItems: "stretch" },
1447
+ baseline: { alignItems: "baseline" }
1448
+ },
1449
+ justify: {
1450
+ start: { justifyContent: "flex-start" },
1451
+ center: { justifyContent: "center" },
1452
+ end: { justifyContent: "flex-end" },
1453
+ between: { justifyContent: "space-between" },
1454
+ around: { justifyContent: "space-around" },
1455
+ evenly: { justifyContent: "space-evenly" }
1456
+ },
1457
+ direction: {
1458
+ row: { flexDirection: "row" },
1459
+ column: { flexDirection: "column" },
1460
+ "row-reverse": { flexDirection: "row-reverse" },
1461
+ "column-reverse": { flexDirection: "column-reverse" }
1462
+ },
1463
+ gap: {
1464
+ 0: { gap: "0px" },
1465
+ 2: { gap: "$2" },
1466
+ 4: { gap: "$4" },
1467
+ 6: { gap: "$6" },
1468
+ 8: { gap: "$8" },
1469
+ 10: { gap: "$10" },
1470
+ 12: { gap: "$12" },
1471
+ 14: { gap: "$14" },
1472
+ 16: { gap: "$16" },
1473
+ 20: { gap: "$20" },
1474
+ 22: { gap: "$22" },
1475
+ 24: { gap: "$24" },
1476
+ 32: { gap: "$32" },
1477
+ 36: { gap: "$36" },
1478
+ 40: { gap: "$40" },
1479
+ 48: { gap: "$48" },
1480
+ 56: { gap: "$56" },
1481
+ 64: { gap: "$64" },
1482
+ 72: { gap: "$72" },
1483
+ 80: { gap: "$80" },
1484
+ full: { gap: "$full" }
1485
+ },
1486
+ gapY: {
1487
+ 2: { gap: "$2" },
1488
+ 4: { gap: "$4" },
1489
+ 6: { gap: "$6" },
1490
+ 8: { gap: "$8" },
1491
+ 10: { gap: "$10" },
1492
+ 12: { gap: "$12" },
1493
+ 14: { gap: "$14" },
1494
+ 16: { gap: "$16" },
1495
+ 20: { gap: "$20" },
1496
+ 22: { gap: "$22" },
1497
+ 24: { gap: "$24" },
1498
+ 32: { gap: "$32" },
1499
+ 36: { gap: "$36" },
1500
+ 40: { gap: "$40" },
1501
+ 48: { gap: "$48" },
1502
+ 56: { gap: "$56" },
1503
+ 64: { gap: "$64" },
1504
+ 72: { gap: "$72" },
1505
+ 80: { gap: "$80" },
1506
+ full: { gap: "$full" }
1507
+ },
1508
+ gapX: {
1509
+ 2: { gap: "$2" },
1510
+ 4: { gap: "$4" },
1511
+ 6: { gap: "$6" },
1512
+ 8: { gap: "$8" },
1513
+ 10: { gap: "$10" },
1514
+ 12: { gap: "$12" },
1515
+ 14: { gap: "$14" },
1516
+ 16: { gap: "$16" },
1517
+ 20: { gap: "$20" },
1518
+ 22: { gap: "$22" },
1519
+ 24: { gap: "$24" },
1520
+ 32: { gap: "$32" },
1521
+ 36: { gap: "$36" },
1522
+ 40: { gap: "$40" },
1523
+ 48: { gap: "$48" },
1524
+ 56: { gap: "$56" },
1525
+ 64: { gap: "$64" },
1526
+ 72: { gap: "$72" },
1527
+ 80: { gap: "$80" },
1528
+ full: { gap: "$full" }
1529
+ }
1530
+ },
1531
+ defaultVariants: {
1532
+ display: "flex",
1533
+ direction: "row",
1534
+ gap: 10
1535
+ }
1536
+ });
1537
+ function Flex(_a) {
1538
+ var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
1539
+ return /* @__PURE__ */ jsx3(FlexStyled, __spreadProps(__spreadValues({}, props), { children }));
1540
+ }
1541
+
1542
+ // src/components/Toast/components/ToastItem.tsx
1543
+ import { useState } from "react";
1544
+
1545
+ // src/components/Toast/styles/index.ts
1546
+ import { keyframes as keyframes2 } from "@stitches/react";
1547
+ import * as ToastPrimitive from "@radix-ui/react-toast";
1548
+ var slideIn = keyframes2({
1549
+ from: {
1550
+ transform: "translateX(calc(100% + 25px))",
1551
+ opacity: 0
1552
+ },
1553
+ to: {
1554
+ transform: "translateX(0)",
1555
+ opacity: 1
1556
+ }
1557
+ });
1558
+ var slideOut = keyframes2({
1559
+ from: {
1560
+ transform: "translateX(0)",
1561
+ opacity: 1
1562
+ },
1563
+ to: {
1564
+ transform: "translateX(calc(100% + 25px))",
1565
+ opacity: 0
1566
+ }
1567
+ });
1568
+ var swipeOut = keyframes2({
1569
+ from: {
1570
+ transform: "translateX(var(--radix-toast-swipe-end-x))",
1571
+ opacity: 1
1572
+ },
1573
+ to: {
1574
+ transform: "translateX(calc(100% + 25px))",
1575
+ opacity: 0
1576
+ }
1577
+ });
1578
+ var ToastViewport = styled(ToastPrimitive.Viewport, {
1579
+ position: "fixed",
1580
+ top: 0,
1581
+ right: 0,
1582
+ display: "flex",
1583
+ flexDirection: "column",
1584
+ padding: 25,
1585
+ gap: 10,
1586
+ width: 390,
1587
+ maxWidth: "100vw",
1588
+ margin: 0,
1589
+ listStyle: "none",
1590
+ zIndex: 2147483647,
1591
+ outline: "none"
1592
+ });
1593
+ var ToastRoot = styled(ToastPrimitive.Root, {
1594
+ backgroundColor: "$neutral50",
1595
+ borderRadius: "$sm",
1596
+ boxShadow: "hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px",
1597
+ padding: "$16",
1598
+ gap: "$8",
1599
+ display: "flex",
1600
+ alignItems: "center",
1601
+ border: "1px solid",
1602
+ position: "relative",
1603
+ zIndex: 9999,
1604
+ '&[data-state="open"]': {
1605
+ animation: `${slideIn} 150ms cubic-bezier(0.16, 1, 0.3, 1)`
1606
+ },
1607
+ '&[data-state="closed"]': {
1608
+ animation: `${slideOut} 100ms ease-in`
1609
+ },
1610
+ '&[data-swipe="move"]': {
1611
+ transform: "translateX(var(--radix-toast-swipe-move-x))"
1612
+ },
1613
+ '&[data-swipe="cancel"]': {
1614
+ transform: "translateX(0)",
1615
+ transition: "transform 200ms ease-out"
1616
+ },
1617
+ '&[data-swipe="end"]': {
1618
+ animation: `${swipeOut} 100ms ease-out`
1619
+ },
1620
+ $$toastColor: "inherit",
1621
+ color: "$$toastColor",
1622
+ borderColor: "$$toastColor",
1623
+ variants: {
1624
+ type: {
1625
+ success: {
1626
+ $$toastColor: "$colors$success600",
1627
+ backgroundColor: "$success50"
1628
+ },
1629
+ error: {
1630
+ $$toastColor: "$colors$error600",
1631
+ backgroundColor: "$error50"
1632
+ },
1633
+ warning: {
1634
+ $$toastColor: "$colors$warning600",
1635
+ backgroundColor: "$warning50"
1636
+ },
1637
+ info: {
1638
+ $$toastColor: "$colors$info600",
1639
+ backgroundColor: "$info50"
1640
+ }
1641
+ }
1642
+ },
1643
+ defaultVariants: {
1644
+ type: "info"
1645
+ }
1646
+ });
1647
+ var ToastClose = styled(ToastPrimitive.Close, {
1648
+ border: "none",
1649
+ backgroundColor: "transparent",
1650
+ display: "flex",
1651
+ alignItems: "center",
1652
+ justifyContent: "center",
1653
+ color: "inherit",
1654
+ borderRadius: 4,
1655
+ padding: 4,
1656
+ cursor: "pointer",
1657
+ opacity: 0.7,
1658
+ "&:hover": {
1659
+ opacity: 1,
1660
+ backgroundColor: "rgba(0, 0, 0, 0.05)"
1661
+ },
1662
+ "&:focus": {
1663
+ boxShadow: "0 0 0 2px currentColor",
1664
+ opacity: 1
1665
+ }
1666
+ });
1667
+
1668
+ // src/components/Toast/components/ToastItem.tsx
1669
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
1670
+ function ToastItem({
1671
+ toast,
1672
+ onRemove
1673
+ }) {
1674
+ const [open, setOpen] = useState(true);
1675
+ const handleOpenChange = (open2) => {
1676
+ setOpen(open2);
1677
+ if (!open2) {
1678
+ onRemove(toast.id);
1679
+ }
1680
+ };
1681
+ return /* @__PURE__ */ jsxs(
1682
+ ToastRoot,
1683
+ {
1684
+ type: toast.type,
1685
+ duration: toast.duration,
1686
+ open,
1687
+ onOpenChange: handleOpenChange,
1688
+ children: [
1689
+ (toast == null ? void 0 : toast.icon) && /* @__PURE__ */ jsx4(Icon_default, { name: toast.icon, size: "xl" }),
1690
+ /* @__PURE__ */ jsx4("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx4(Text, { typography: "bodyS", fontWeight: "medium", children: toast.message }) }),
1691
+ /* @__PURE__ */ jsx4(ToastClose, { "aria-label": "Close", children: /* @__PURE__ */ jsx4(Icon_default, { name: "xmark", size: "md" }) })
1692
+ ]
1693
+ }
1694
+ );
1695
+ }
1696
+
1697
+ // src/components/Toast/components/ToastProvider.tsx
1698
+ import { createContext, useState as useState2 } from "react";
1699
+ import * as ToastPrimitive2 from "@radix-ui/react-toast";
1700
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
1701
+ var ToastContext = createContext(null);
1702
+ function ToastProvider({
1703
+ children,
1704
+ defaultDuration = 5e3,
1705
+ maxToasts = 5,
1706
+ swipeDirection = "right"
1707
+ }) {
1708
+ const [toasts, setToasts] = useState2([]);
1709
+ const addToast = (toastData) => {
1710
+ const id = Math.random().toString(36).substr(2, 9);
1711
+ const newToast = __spreadProps(__spreadValues({
1712
+ id
1713
+ }, toastData), {
1714
+ type: (toastData == null ? void 0 : toastData.type) || "info",
1715
+ duration: (toastData == null ? void 0 : toastData.duration) || defaultDuration,
1716
+ createdAt: Date.now()
1717
+ });
1718
+ setToasts((prevToasts) => {
1719
+ const updatedToasts = [...prevToasts, newToast];
1720
+ return updatedToasts.slice(-maxToasts);
1721
+ });
1722
+ return id;
1723
+ };
1724
+ const removeToast = (id) => {
1725
+ setToasts((prevToasts) => prevToasts.filter((toast) => toast.id !== id));
1726
+ };
1727
+ const removeAllToasts = () => {
1728
+ setToasts([]);
1729
+ };
1730
+ const contextValue = {
1731
+ toasts,
1732
+ addToast,
1733
+ removeToast,
1734
+ removeAllToasts
1735
+ };
1736
+ return /* @__PURE__ */ jsx5(ToastContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs2(ToastPrimitive2.Provider, { swipeDirection, children: [
1737
+ children,
1738
+ toasts.map((toast) => /* @__PURE__ */ jsx5(ToastItem, { toast, onRemove: removeToast }, toast.id)),
1739
+ /* @__PURE__ */ jsx5(ToastViewport, {})
1740
+ ] }) });
1741
+ }
1742
+
1743
+ // src/components/Toast/hooks/useToast.ts
1744
+ import { useContext } from "react";
1745
+ var useToast = () => {
1746
+ const context = useContext(ToastContext);
1747
+ if (!context) {
1748
+ throw new Error("useToast deve ser usado dentro de um ToastProvider");
1749
+ }
1750
+ return context;
1751
+ };
1752
+
1753
+ // src/utils/uploadService.ts
1754
+ var generateUniqueFilename = (originalName) => {
1755
+ const timestamp = Date.now().toString(36);
1756
+ const random = Math.random().toString(36).substring(2, 8);
1757
+ const extension = originalName.split(".").pop();
1758
+ return `${timestamp}_${random}.${extension}`;
1759
+ };
1760
+ var UploadService = class {
1761
+ static getPresignedUrl(filename, contentType, config2) {
1762
+ return __async(this, null, function* () {
1763
+ var _a;
1764
+ const apiUrl = config2.apiUrl;
1765
+ const presignedUrlEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.presignedUrl;
1766
+ const bucket = config2.s3Bucket;
1767
+ try {
1768
+ const response = yield fetch(`${apiUrl}${presignedUrlEndpoint}`, {
1769
+ method: "POST",
1770
+ headers: {
1771
+ "Content-Type": "application/json"
1772
+ },
1773
+ body: JSON.stringify({
1774
+ filename,
1775
+ contentType,
1776
+ bucket
1777
+ })
1778
+ });
1779
+ if (!response.ok) {
1780
+ throw new Error("Falha ao gerar URL de upload");
1781
+ }
1782
+ const data = yield response.json();
1783
+ return data.presignedUrl;
1784
+ } catch (error) {
1785
+ console.error("Erro ao gerar URL pr\xE9-assinada:", error);
1786
+ throw new Error("Falha ao gerar URL de upload");
1787
+ }
1788
+ });
1789
+ }
1790
+ static uploadToS3(file, config2, onProgress) {
1791
+ return __async(this, null, function* () {
1792
+ try {
1793
+ const uniqueFilename = generateUniqueFilename(file.name);
1794
+ const blob = new Blob([file], { type: file.type });
1795
+ const s3Url = `${config2.s3Url}/${uniqueFilename}`;
1796
+ return new Promise((resolve, reject) => {
1797
+ const xhr = new XMLHttpRequest();
1798
+ xhr.upload.addEventListener("progress", (event) => {
1799
+ if (event.lengthComputable) {
1800
+ const percentComplete = Math.round(
1801
+ event.loaded / event.total * 100
1802
+ );
1803
+ onProgress == null ? void 0 : onProgress({
1804
+ amount: percentComplete,
1805
+ message: `Fazendo upload... ${percentComplete}%`
1806
+ });
1807
+ }
1808
+ });
1809
+ xhr.addEventListener("load", () => {
1810
+ if (xhr.status === 200) {
1811
+ resolve({
1812
+ url: s3Url,
1813
+ filename: uniqueFilename,
1814
+ size: file.size,
1815
+ type: file.type
1816
+ });
1817
+ } else {
1818
+ reject(new Error(`Upload falhou com status: ${xhr.status}`));
1819
+ }
1820
+ });
1821
+ xhr.addEventListener("error", () => {
1822
+ reject(new Error("Erro de rede durante upload"));
1823
+ });
1824
+ xhr.open("PUT", s3Url);
1825
+ xhr.setRequestHeader("Content-Type", file.type);
1826
+ xhr.send(blob);
1827
+ });
1828
+ } catch (error) {
1829
+ console.error("Erro no upload:", error);
1830
+ throw error;
1831
+ }
1832
+ });
1833
+ }
1834
+ static uploadViaAPI(file, config2, onProgress) {
1835
+ return __async(this, null, function* () {
1836
+ try {
1837
+ const formData = new FormData();
1838
+ formData.append("file", file);
1839
+ const bucket = config2.s3Bucket;
1840
+ formData.append("bucket", bucket);
1841
+ const xhr = new XMLHttpRequest();
1842
+ return new Promise((resolve, reject) => {
1843
+ var _a;
1844
+ xhr.upload.addEventListener("progress", (event) => {
1845
+ if (event.lengthComputable) {
1846
+ const percentComplete = Math.round(
1847
+ event.loaded / event.total * 100
1848
+ );
1849
+ onProgress == null ? void 0 : onProgress({
1850
+ amount: percentComplete,
1851
+ message: `Fazendo upload... ${percentComplete}%`
1852
+ });
1853
+ }
1854
+ });
1855
+ xhr.addEventListener("load", () => {
1856
+ if (xhr.status === 200) {
1857
+ try {
1858
+ const response = JSON.parse(xhr.responseText);
1859
+ resolve({
1860
+ url: response.url,
1861
+ filename: response.filename,
1862
+ size: file.size,
1863
+ type: file.type
1864
+ });
1865
+ } catch (error) {
1866
+ reject(new Error("Resposta inv\xE1lida do servidor"));
1867
+ }
1868
+ } else {
1869
+ reject(new Error(`Upload falhou com status: ${xhr.status}`));
1870
+ }
1871
+ });
1872
+ xhr.addEventListener("error", () => {
1873
+ reject(new Error("Erro de rede durante upload"));
1874
+ });
1875
+ const apiUrl = config2.apiUrl;
1876
+ const uploadEndpoint = (_a = config2.endpoints) == null ? void 0 : _a.upload;
1877
+ xhr.open("POST", `${apiUrl}${uploadEndpoint}`);
1878
+ xhr.send(formData);
1879
+ });
1880
+ } catch (error) {
1881
+ console.error("Erro no upload via API:", error);
1882
+ throw error;
1883
+ }
1884
+ });
1885
+ }
1886
+ };
1887
+
1888
+ export {
1889
+ __spreadValues,
1890
+ __spreadProps,
1891
+ __objRest,
1892
+ __publicField,
1893
+ __async,
1894
+ Icon,
1895
+ Icon_default,
1896
+ colors,
1897
+ styled,
1898
+ typographyValues,
1899
+ typographyLabelValues,
1900
+ TextStyle,
1901
+ Text,
1902
+ FlexStyled,
1903
+ Flex,
1904
+ ToastItem,
1905
+ ToastProvider,
1906
+ useToast,
1907
+ UploadService
1908
+ };
1909
+ /*! Bundled license information:
1910
+
1911
+ react-is/cjs/react-is.development.js:
1912
+ (** @license React v16.13.1
1913
+ * react-is.development.js
1914
+ *
1915
+ * Copyright (c) Facebook, Inc. and its affiliates.
1916
+ *
1917
+ * This source code is licensed under the MIT license found in the
1918
+ * LICENSE file in the root directory of this source tree.
1919
+ *)
1920
+
1921
+ object-assign/index.js:
1922
+ (*
1923
+ object-assign
1924
+ (c) Sindre Sorhus
1925
+ @license MIT
1926
+ *)
1927
+ */